Computable function
Encyclopedia : C : CO : COM : Computable function
Computable functions (or Turing-computable functions) are the basic objects of study in computability theory. They make precise the intuitive notion of algorithm. Computable functions can be used to discuss computability without referring to any concrete model of computation such as Turing machines or register machines. Their definition, however, must make reference to some specific model of computation.
Before the precise definition of computable function mathematicians often used the informal term effectively computable. This term has since come to be identified with the computable functions. Although these functions are called effective, they may be extremely inefficient. 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.
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 computable functions are finitary partial functions on the natural numbers. Each computable function [f] takes a fixed number of natural numbers as arguments; different functions may take different numbers of arguments. Because the functions are partial, they may not be defined for every possible choice of input. If a computable function is defined then it returns a single natural number as output (this output can be interpreted as a list of numbers using a pairing function). The notation [f(x_1,\ldots,x_k) \downarrow] indicates that the partial function [f] is defined on arguments [x_1,\ldots,x_k], and the notation [f(x_1,\ldots,x_k) \downarrow = y] indicates that [f] is defined on the arguments [x_1,\ldots,x_k] and the value returned is [y]. A function which is defined for all arguments is called total. In computability theory, the domain of a function is taken to be the set of all inputs for which the function is defined.
There are many equivalent ways to define the class of computable functions. For concreteness, the remainder of this article will assume that computable functions have been defined as those partial functions that can be calculated by a Turing machine. There are many equivalent models of computation that define the same class of computable functions. These models of computation include
- Turing machines
- Mu-recursive functions
- Lambda-recursive functions
- Post machines, also called tag systems.
- Register machines
Characteristics of computable functions
- Main article: Algorithm
Enderton [1997] 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.”
- “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).”
- “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.”
Enderton goes on to list several requirements that are not made of the procedure for a computable function:
- The procedure must 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.
Computable sets and relations
A set A of natural numbers is called computable (synonyms: recursive, decidable) if there is a computable function f such that for each number n, [f(n) \downarrow = 1] if n is in A and [f(n) \downarrow = 0] if n is not in A.
A set of natural numbers is called computably enumerable (synonyms: recursively enumerable, semidecidable) if there is a computable function f such that for each number n, f(n) is defined if and only if n 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 B of the natural numbers:
- B is the domain of a computable function.
- B is the range of a total computable function. If B is infinite then the function can be assumed to be injective.
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 article: Formal languages
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 [f] such that for each word w over the alphabet, [f(w) \downarrow = 1] if the word is in the language and [f(w)\downarrow = 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 f such that [f(w)] is defined if and only if the word w 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 constant function f : Nk→ N, f(n1,...nk) := n
- Addition f : N2→ N, f(n1,n2) := n1 + n2
- 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
The following example illustrates that a function may be computable even if no explicit algorithm is known to compute it.
- The function f such that f(n) = 1 if there is a sequence of n consecutive fives in the decimal expansion of π, and f(n) = 0 otherwise, is computable.
Church-Turing thesis
- ''Main article: Church-Turing thesis
- Many equivalent models of computation are known, and they are 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.
Uncomputable functions and unsolvable problems
- Main article: List of undecidable problems
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 numebrs) are true. Turing and Church independently showed that this set of natural numbers is not computable in the 1930s. According to the Church-Turing thesis, there is no effective procedure (with an algorithm) which can perform these computations.
Extensions of computability
The notion of computability of a function can be relativized to an arbitrary set of natural numbers A, or equivalently to an arbitrary function f from the naturals to the naturals, by using Turing machines (or any other model of computation) extended by an oracle for A or f. Such functions may be called A-computable or f-computable respectively.
Although the Church-Turing thesis states that the computable functions include all fuctions with algorithms, it is possible to consider broader classes of functions that relax the requirements that algorithms must possess. The field of Hypercomputation studies a computability notion in which it is possible to perform infinitely may steps before producing a successful answer. Hyperarithmetical theory studies a different extension of standard computability. 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.
See also
References
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).
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.
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
