|
|
Line 1: |
Line 1: |
| {{Redirect|Total recursive function|other uses of the term "recursive function"|Recursive function (disambiguation)}}
| | Greetings. meal delivery [http://www.ideafit.com/answers/what-is-the-best-meal-delivery-service-for-a-diet? service] Let me start by telling you the author's name - Phebe. One of the issues she enjoys most is to study comics and she'll be [http://Www.epicurious.com/articlesguides/healthy/news/diet-plan-meals starting] meal delivery service some thing else alongside with it. Hiring has been my profession for some time but I've already applied for an additional 1. California is exactly where I've usually been residing and I adore every working day residing here.<br><br>my web-site - meal delivery service meal [http://www.nutrition411.com/patient-education-materials/grocery-shopping-and-food-preparation/item/889-diet-plans-with-meal-delivery/ delivery service] ([http://l1Nk.net/diettogoreviews74620 mouse click the up coming website]) |
| '''Computable functions''' are the basic objects of study in [[recursion theory|computability theory]]. Computable functions are the formalized analogue of the intuitive notion of [[algorithm]]. They are used to discuss computability without referring to any concrete [[model of computation]] such as [[Turing machine]]s or [[register machine]]s. Any definition, however, must make reference to some specific model of computation but all valid definitions yield the same class of functions.
| |
| Particular models of computability that give rise to the set of computable functions are the [[Turing-computable function]]s and the [[μ-recursive function]]s.
| |
| | |
| Before the precise definition of computable function, [[mathematician]]s often used the informal term ''effectively calculable''. This term has since come to be identified with the computable functions. Note that the effective computability of these functions does not imply that they can be ''efficiently'' computed (i.e. computed within a reasonable amount of time). In fact, for some effectively calculable functions it can be shown that any algorithm that computes them will be very inefficient in the sense that the running time of the algorithm increases [[exponential growth|exponentially]] (or even [[Tetration|superexponentially]]) with the length of the input. The fields of [[feasible computability]] and [[computational complexity]] study functions that can be computed efficiently.
| |
| | |
| According to the [[Church–Turing thesis]], computable functions are exactly the functions that can be calculated using a mechanical calculation device given unlimited amounts of time and storage space. Equivalently, this thesis states that any function which has an algorithm is computable. Note that an algorithm in this sense is understood to be a sequence of steps a person with unlimited time and an infinite supply of pen and paper could follow.
| |
| | |
| The [[Blum axioms]] can be used to define an abstract [[computational complexity theory]] on the set of computable functions. In computational complexity theory, the problem of determining the complexity of a computable function is known as a [[function problem]].
| |
| | |
| ==Definition==
| |
| | |
| The class of computable functions can be defined in many equivalent [[model of computation|models of computation]], including
| |
| * '''[[Turing machine]]s'''
| |
| * '''[[μ-recursive function]]s'''
| |
| * '''[[Lambda calculus]]'''
| |
| * '''Post machines''' ('''[[Post–Turing machine]]s''' and '''[[Tag system|tag machines]]''').
| |
| * '''[[Register machine]]s'''
| |
| Although those models use different representations for the functions, their inputs and their outputs, translations exist between any two models. In the remainder of this article, functions from [[natural numbers]] to natural numbers are used (as is the case for, e.g., the μ-recursive functions).
| |
| | |
| Each computable function {{math|''f''}} takes a fixed, finite number of natural numbers as arguments. Note that the functions are [[partial function|partial]] in general, i.e. they may not be defined for every possible choice of input. If a computable function is defined for a certain input, then it returns a single natural number as output (this output can be interpreted as a list of numbers using a [[pairing function]]). These functions are also called '''partial recursive functions'''. In computability theory, the '''[[domain (mathematics)|domain]]''' of a function is taken to be the set of all inputs for which the function is defined.
| |
| | |
| A function which is defined for all possible arguments is called '''[[total function|total]]'''. If a computable function is total, it is called a '''total computable function''' or '''total recursive function'''.
| |
| | |
| The notation {{math|''f''(<var>x</var><sub>1</sub>, ..., <var>x<sub>k</sub></var>)↓ }} indicates that the partial function {{math|''f''}} is defined on arguments {{math|<var>x</var><sub>1</sub>, ..., <var>x<sub>k</sub></var>}}, and the notation {{math|''f''(<var>x</var><sub>1</sub>, ..., <var>x<sub>k</sub></var>) {{=}} <var>y</var> }} indicates that {{math|''f''}} is defined on the arguments {{math|<var>x</var><sub>1</sub>, ..., <var>x<sub>k</sub></var>}} and the value returned is {{math|<var>y</var>}}. The case that a function {{math|''f''}} is undefined for arguments {{math|<var>x</var><sub>1</sub>, ..., <var>x<sub>k</sub></var>}} is denoted by {{math|''f''(<var>x</var><sub>1</sub>, ..., <var>x<sub>k</sub></var>)↑ }} .
| |
| | |
| == Characteristics of computable functions ==
| |
| | |
| {{main|Algorithm}}
| |
| | |
| The basic characteristic of a computable function is that there must be a finite procedure (an [[algorithm]]) telling how to compute the function. The models of computation listed above give different interpretations of what a procedure is and how it is used, but these interpretations share many properties. The fact that these models give equivalent classes of computable functions stems from the fact that each model is capable of reading and mimicking a procedure for any of the other models, much as a [[compiler]] is able to read instructions in one computer language and emit instructions in another language.
| |
| | |
| [[Herbert Enderton|Enderton]] [1977] gives the following characteristics of a procedure for computing a computable function; similar characterizations have been given by Turing [1936], Rogers [1967], and others.
| |
| * "There must be exact instructions (i.e. a program), finite in length, for the procedure."
| |
| Thus every computable function must have a finite program that completely describes how the function is to be computed. It is possible to compute the function by just following the instructions; no guessing or special insight is required.
| |
| * "If the procedure is given a ''k''-tuple '''x''' in the domain of ''f'', then after a finite number of discrete steps the procedure must terminate and produce ''f('''x''')''."
| |
| Intuitively, the procedure proceeds step by step, with a specific rule to cover what to do at each step of the calculation. Only finitely many steps can be carried out before the value of the function is returned.
| |
| * "If the procedure is given a ''k''-tuple '''x''' which is not in the domain of ''f'', then the procedure might go on forever, never halting. Or it might get stuck at some point, but it must not pretend to produce a value for ''f'' at '''x'''."
| |
| Thus if a value for ''f('''x''')'' is ever found, it must be the correct value. It is not necessary for the computing agent to distinguish correct outcomes from incorrect ones because the procedure is always correct when it produces an outcome.
| |
| | |
| Enderton goes on to list several clarifications of these 3 requirements of the procedure for a computable function:<!-- must be enumerated for the "#Church–Turing thesis" below-->
| |
| # The procedure must theoretically work for arbitrarily large arguments. It is not assumed that the arguments are smaller than the number of atoms in the Earth, for example.
| |
| # The procedure is required to halt after finitely many steps in order to produce an output, but it may take arbitrarily many steps before halting. No time limitation is assumed.
| |
| # Although the procedure may use only a finite amount of storage space during a successful computation, there is no bound on the amount of space that is used. It is assumed that additional storage space can be given to the procedure whenever the procedure asks for it.
| |
| | |
| The field of [[computational complexity]] studies functions with prescribed bounds on the time and/or space allowed in a successful computation.
| |
| | |
| == Computable sets and relations ==
| |
| | |
| A set {{math|<var>A</var>}} of natural numbers is called '''computable''' (synonyms: '''recursive''', '''decidable''') if there is a computable, total function {{math|''f''}} such that for any natural number {{math|<var>n</var>}}, {{math|''f''(<var>n</var>) {{=}} 1}} if {{math|<var>n</var>}} is in {{math|<var>A</var>}} and {{math|''f''(<var>n</var>) {{=}} 0}} if {{math|<var>n</var>}} is not in {{math|<var>A</var>}}.
| |
| | |
| A set of natural numbers is called '''computably enumerable''' (synonyms: '''recursively enumerable''', '''semidecidable''') if there is a computable function {{math|''f''}} such that for each number {{math|<var>n</var>}}, {{math|''f''(<var>n</var>)}} is defined [[if and only if]] {{math|<var>n</var>}} is in the set. Thus a set is computably enumerable if and only if it is the domain of some computable function. The word ''enumerable'' is used because the following are equivalent for a nonempty subset {{math|<var>B</var>}} of the natural numbers:
| |
| * {{math|<var>B</var>}} is the domain of a computable function.
| |
| * {{math|<var>B</var>}} is the range of a total computable function. If {{math|<var>B</var>}} is infinite then the function can be assumed to be [[injective]].
| |
| If a set {{math|<var>B</var>}} is the range of a function {{math|''f''}} then the function can be viewed as an
| |
| enumeration of {{math|<var>B</var>}}, because the list {{math|''f''(0), ''f''(1), ...}} will include every element of {{math|<var>B</var>}}.
| |
| | |
| Because each [[finitary relation]] on the natural numbers can be identified with a corresponding set of finite sequences of natural numbers, the notions of '''computable relation''' and '''computably enumerable relation''' can be defined from their analogues for sets.
| |
| | |
| == Formal languages ==
| |
| {{main|Formal language}}''
| |
| | |
| In [[Computability theory (computer science)|computability theory in computer science]], it is common to consider [[formal language]]s. An '''alphabet''' is an arbitrary set. A '''word''' on an alphabet is a finite sequence of symbols from the alphabet; the same symbol may be used more than once. For example, binary strings are exactly the words on the alphabet {{math|{0, 1} }}. A '''language''' is a subset of the collection of all words on a fixed alphabet. For example, the collection of all binary strings that contain exactly 3 ones is a language over the binary alphabet.
| |
| | |
| A key property of a formal language is the level of difficulty required to decide whether a given word is in the language. Some coding system must be developed to allow a computable function to take an arbitrary word in the language as input; this is usually considered routine. A language is called '''computable''' (synonyms: '''recursive''', '''decidable''') if there is a computable function {{math|''f''}} such that for each word {{math|<var>w</var>}} over the alphabet, {{math|''f''(<var>w</var>) {{=}} 1}} if the word is in the language and {{math|''f''(<var>w</var>) {{=}} 0}} if the word is not in the language. Thus a language is computable just in case there is a procedure that is able to correctly tell whether arbitrary words are in the language.
| |
| | |
| A language is '''computably enumerable''' (synonyms: '''recursively enumerable''', '''semidecidable''') if there is a computable function {{math|''f''}} such that {{math|''f''(<var>w</var>)}} is defined if and only if the word {{math|<var>w</var>}} is in the language. The term ''enumerable'' has the same etymology as in computably enumerable sets of natural numbers.
| |
| | |
| ==Examples==
| |
| | |
| The following functions are computable:
| |
| | |
| * Each function with a finite [[Domain (mathematics)|domain]]; e.g., any finite sequence of natural numbers.
| |
| | |
| * Each [[constant function]] ''f'' : '''N'''<sup>''k''</sup> → '''N''', ''f''(''n''<sub>1</sub>,...''n''<sub>''k''</sub>) := ''n''.
| |
| | |
| * [[Addition]] ''f'' : '''N'''<sup>2</sup> → '''N''', ''f''(''n''<sub>1</sub>,''n''<sub>''2''</sub>) := ''n''<sub>1</sub> + ''n''<sub>2</sub>
| |
| | |
| * The function which gives the list of prime factors of a number.
| |
| | |
| * The [[greatest common divisor]] of two numbers is a computable function.
| |
| | |
| * [[Bézout's identity]], a linear [[Diophantine equation]]
| |
| | |
| If ''f'' and ''g'' are computable, then so are: ''f'' + ''g'', [[Multiplication|''f'' * ''g'']], [[Function composition|<math>f \circ g</math>]] if
| |
| ''f'' is [[Unary operation|unary]], max(''f'',''g''), min(''f'',''g''), [[arg max]]{''y'' ≤ ''f''(''x'')} and many more combinations.
| |
| | |
| The following examples illustrate that a function may be computable though it is not known which algorithm computes it.
| |
| | |
| * The function ''f'' such that ''f''(''n'') = 1 if there is a sequence of ''at least n'' consecutive fives in the decimal expansion of [[Pi|π]], and ''f''(''n'') = 0 otherwise, is computable. (The function ''f'' is either the constant 1 function, which is computable, or else there is a ''k'' such that ''f''(''n'') = 1 if ''n'' < ''k'' and ''f''(''n'') = 0 if ''n'' ≥ ''k''. Every such function is computable. It is not known whether there are arbitrarily long runs of fives in the decimal expansion of π, so we don't know ''which'' of those functions is ''f''. Nevertheless, we know that the function ''f'' must be computable.)
| |
| | |
| * Each finite segment of an ''un''computable sequence of natural numbers (such as the [[Busy beaver#The busy beaver function Σ|Busy Beaver function]] ''Σ'') is computable. E.g., for each natural number ''n'', there exists an algorithm that computes the finite sequence Σ(0), Σ(1), Σ(2), ..., Σ(''n'') — in contrast to the fact that there is no algorithm that computes the ''entire'' Σ-sequence, i.e. Σ(''n'') for all ''n''. Thus, "Print 0, 1, 4, 6, 13" is a trivial algorithm to compute Σ(0), Σ(1), Σ(2), Σ(3), Σ(4); similarly, for any given value of ''n'', such a trivial algorithm ''exists'' (even though it may never be ''known'' or produced by anyone) to compute Σ(0), Σ(1), Σ(2), ..., Σ(''n'').
| |
| | |
| == Church–Turing thesis ==
| |
| | |
| {{main|Church–Turing thesis}}
| |
| | |
| The '''Church–Turing thesis''' states that any function computable from a procedure possessing the three properties listed [[#Characteristics of computable functions|above]] is a computable function. Because these three properties are not formally stated, the Church–Turing thesis cannot be proved. The following facts are often taken as evidence for the thesis:
| |
| * Many equivalent models of computation are known, and they all give the same definition of computable function (or a weaker version, in some instances).
| |
| * No stronger model of computation which is generally considered to be [[effectively calculable]] has been proposed.
| |
| | |
| The Church–Turing thesis is sometimes used in proofs to justify that a particular function is computable by giving a concrete description of a procedure for the computation. This is permitted because it is believed that all such uses of the thesis can be removed by the tedious process of writing a formal procedure for the function in some model of computation.
| |
| | |
| == Uncomputable functions and unsolvable problems ==
| |
| {{main|List of undecidable problems}}
| |
| | |
| Every computable function has a finite procedure giving explicit, unambiguous instructions on how to compute it. Furthermore, this procedure has to be encoded in the finite alphabet used by the computational model, so there are only [[countability|countably]] many computable functions. For example, functions may be encoded using a string of bits (the alphabet {{math|Σ {{=}} {0, 1} }}).
| |
| | |
| The real numbers are uncountable so most real numbers are not computable. See [[Computable number#Properties|computable number]]. The set of [[finitary]] functions on the natural numbers is uncountable so most are not computable. Concrete examples of such functions are [[Busy beaver]], [[Kolmogorov complexity]], or any function that outputs the digits of a noncomputable number, such as [[Chaitin's constant]].
| |
| | |
| Similarly, most subsets of the natural numbers are not computable. The [[Halting problem]] was the first such set to be constructed. The [[Entscheidungsproblem]], proposed by [[David Hilbert]], asked whether there is an effective procedure to determine which mathematical statements (coded as natural numbers) are true. Turing and Church independently showed in the 1930s that this set of natural numbers is not computable. According to the Church–Turing thesis, there is no effective procedure (with an algorithm) which can perform these computations.
| |
| | |
| ==Extensions of computability==
| |
| ===Relative computability===
| |
| | |
| The notion of computability of a function can be [[relative computability|relativized]] to an arbitrary [[Set (mathematics)|set]] of [[natural number]]s ''A''. A function ''f'' is defined to be '''computable in ''A''''' (equivalently '''''A''-computable''' or '''computable relative to ''A''''') when it satisfies the definition of a computable function with modifications allowing access to ''A'' as an [[oracle (computability)|oracle]]. As with the concept of a computable function relative computability can be given equivalent definitions in many different models of computation. This is commonly accomplished by supplementing the model of computation with an additional primitive operation which asks whether a given integer is a member of ''A''. We can also talk about ''f'' being '''computable in ''g''''' by identifying ''g'' with its graph.
| |
| | |
| ===Higher recursion theory===
| |
| | |
| [[Hyperarithmetical theory]] studies those sets that can be computed from a [[computable ordinal]] number of iterates of the [[Turing jump]] of the empty set. This is equivalent to sets defined by both a universal and existential formula in the language of second order arithmetic and to some models of [[Hypercomputation]]. Even more general recursion theories have been studied, such as '''E-recursion theory''' in which any set can be used as an argument to an E-recursive function.
| |
| | |
| ===Hyper-computation===
| |
| | |
| Although the Church-Turing thesis states that the computable functions include all functions with algorithms, it is possible to consider broader classes of functions that relax the requirements that algorithms must possess. The field of [[Hypercomputation]] studies models of computation that go beyond normal Turing computation.
| |
| | |
| == See also ==
| |
| | |
| * [[Computable number]]
| |
| * [[Effective method]]
| |
| * [[Theory of computation]]
| |
| * [[Recursion theory]]
| |
| * [[Turing degree]]
| |
| * [[Arithmetical hierarchy]]
| |
| * [[Hypercomputation]]
| |
| * [[Super-recursive algorithm]]
| |
| * [[Semicomputable function]]
| |
| | |
| == References ==
| |
| *Cutland, Nigel. ''Computability''. Cambridge University Press, 1980.
| |
| *[[Herbert Enderton|Enderton, H.B.]] Elements of recursion theory. ''Handbook of Mathematical Logic'' (North-Holland 1977) pp. 527–566.
| |
| *Rogers, H. ''Theory of recursive functions and effective computation'' (McGraw–Hill 1967).
| |
| *[[A. Turing|Turing, A.]] (1936), On Computable Numbers, With an Application to the Entscheidungsproblem. ''Proceedings of the London Mathematical Society'', Series 2, Volume 42 (1936). Reprinted in M. Davis (ed.), ''The Undecidable'', Raven Press, Hewlett, NY, 1965.
| |
| | |
| {{ComplexityClasses}}
| |
| {{logic}}
| |
| | |
| [[Category:Computability theory]]
| |
| [[Category:Theory of computation]]
| |