The '''recursive functions''' are a class of [[function]]s from [[natural number]]s to [[natural number]]s which are "computable" in some intuitive sense. In fact, in [[computability theory]] it is shown that the recursive functions are precisely the functions that can be computed by [[Turing machine]]s. Recursive functions are related to [[primitive recursive function|primitive recursive functions]], and their inductive definition (below) builds upon that of the primitive recursive functions.
Not every recursive fuction is primitive recursive as well - the most famous example is the [[Ackermann function]].
Other equivalent function classes are the [[lambda-recursive function|λ-recursive functions]] and the functions that can be computed by [[Markov algorithm]]s.
== Definition ==
Take as axioms the axioms of the [[primitive recursive function]]s, but extend the definitions so as to allow for [[partial function]]s. Add one further operator, the ''least search'' or ''unbounded search'' operator, defined as follows:
:If ''f''(''x'',''z''<sub>1</sub>,''z''<sub>2</sub>,...,''z''<sub>''n''</sub>) is a partial function on the [[natural numbers]] with ''n''+1 arguments ''x'', ''z''<sub>1</sub>,...,''z''<sub>''n''</sub>, then the function μ''x'' ''f'' is the partial function with arguments ''z''<sub>1</sub>,...,''z''<sub>''n''</sub> that returns the least ''x'' such that ''f''(0,''z''<sub>1</sub>,''z''<sub>2</sub>,...,''z''<sub>''n''</sub>), ''f''(1,''z''<sub>1</sub>,''z''<sub>2</sub>,...,''z''<sub>''n''</sub>), ..., ''f''(''x'',''z''<sub>1</sub>,''z''<sub>2</sub>,...,''z''<sub>''n''</sub>) are all defined and ''f''(''x'',''z''<sub>1</sub>,''z''<sub>2</sub>,...,''z''<sub>''n''</sub>) = 0, if such an ''x'' exists; if no such ''x'' exists, then μ''x'' ''f'' is not defined for the particular arguments ''z''<sub>1</sub>,...,''z''<sub>''n''</sub>.
The set of ''partial recursive functions'' is defined as the smallest set of partial functions of any [[arity]] from natural numbers to natural numbers which contains the zero, successor, and projection functions, and which is closed under composition, primitive recursion, and unbounded search.
The set of ''recursive functions'' is the subset of partial recursive functions which are [[total function|total]].
In the [[equivalence of models of computability]] the parallel is drawn between [[Turing machine|Turing machines]] which do not terminate for certain inputs and an undefined result for that input in the corresponding partial recursive function.
The unbounded search operator is not definable by the rules of primitive recursion as those do not provide a mechanism for "infinite loops" (undefined values).
It is interesting to note that if the application of the unbounded search operator in the definition above is limited strictly to ''regular functions'' (functions which are guaranteed to be total when the unbounded search operator is applied to them), the resulting set (historically called the ''general recursive functions'') is the same as the set of recursive functions -- in other words, the requirement for partial functions can be partially obviated.
|