Primitive recursive function
Encyclopedia
|
| Tutorials | Encyclopedia | Dictionary | Directory |
|
Primitive recursive function
The primitive recursive functions are defined using primitive recursion and composition as central operations and are a strict subset of the recursive functions (recursive functions are also known as computable functions). The term was coined by Rózsa Péter. In computability theory, primitive recursive functions are a class of functions which form an important building block on the way to a full formalization of computability. These functions are also important in proof theory. Many of the functions normally studied in number theory, and approximations to real-valued functions, are primitive recursive, such as addition, division, factorial, exponential, finding the nth prime, and so on (Brainerd and Landweber, 1974). In fact, it is difficult to devise a function that is not primitive recursive, although some are known (see the section on Limitations below). The set of primitive recursive functions is known as PR in complexity theory. Every primitive recursive function is a general recursive function.
DefinitionThe primitive recursive functions are among the number-theoretic functions which are functions from the natural numbers (nonnegative integers) {0, 1, 2 , ...} to the natural numbers which take n arguments for some natural number n. Such a function is called n-ary. The basic primitive recursive functions are given by these axioms:
More complex primitive recursive functions can be obtained by applying the operators given by these axioms:
The primitive recursive functions are the basic functions and those which can be obtained from the basic functions by applying the operators a finite number of times. Role of the projection functionsThe projection functions can be used to avoid the apparent rigidity in terms of the arity of the functions above; by using compositions with various projection functions, it is possible to pass a subset of the arguments of one function to another function. For example, if g and h are 2-ary primitive recursive functions then
is also primitive recursive. One formal definition using projections functions is
Converting predicates to numeric functionsIn some settings it is natural to consider primitive recursive functions that take as inputs tuples that mix numbers with truth values { t= true, f=false }, or which produce truth values as outputs (see Kleene [1952 pp.226-227]). This can be accomplished by identifying the truth values with numbers in any fixed manner. For example, it is common to identify the truth value t with the number 1 and the truth value f with the number 0. Once this identification has been made, the characteristic function of a set A, which literally returns 1 or 0, can be viewed as a predicate that tells whether a number is in the set A. Such an identification of predicates with numeric functions will be assumed for the remainder of this article. ExamplesMost number-theoretic functions which can be defined using recursion on a single variable are primitive recursive. Basic examples include the addition and "limited subtraction" functions. AdditionIntuitively, addition can be recursively defined with the rules:
In order to fit this into a strict primitive recursive definition, define:
Here P13 is the projection function that takes 3 arguments and returns the first one. P11 is simply the identity function; its inclusion is required by the definition of the primitive recursion operator above; it plays the role of f. The composition of S and P13, which is primitive recursive, plays the role of g. SubtractionBecause primitive recursive functions use natural numbers rather than integers, and the natural numbers are not closed under subtraction, a limited subtraction function is studied in this context. This limited subtraction function sub(a,b) returns b - a if this is nonnegative and returns 0 otherwise. The predecessor function acts as the opposite of the successor function and is recursively defined by the rules:
These rules can be converted into a more formal definition by primitive recursion:
The limited subtraction function is definable from the predecessor function in a manner analogous to the way addition is defined from successor:
Here sub(a,b) corresponds to b-a; for the sake of simplicity, the order of the arguments has been switched from the "standard" definition to fit the requirements of primitive recursion. This could easily be rectified using composition with suitable projections. Other primitive recursive functions include exponentiation and primality testing. Given primitive recursive functions e, f, g, and h, a function which returns the value of g when e?f and the value of h otherwise is primitive recursive. Operations on integers and rational numbersBy using Gödel numbers, the primitive recursive functions can be extended to operate on other objects such as integers and rational numbers. If integers are encoded by Gödel numbers in a standard way, the arithmetic operations including addition, subtraction, and multiplication are all primitive recursive. Similarly, if the rationals are represented by Gödel numbers then the field operations are all primitive recursive. Relationship to recursive functionsThe broader class of partial recursive functions is defined by introducing an unbounded search operator. The use of this operator may result in a partial function, that is, a relation which has at most one value for each argument but, unlike a total function, does not necessarily have any value for an argument (see domain). An equivalent definition states that a partial recursive function is one that can be computed by a Turing machine. A total recursive function is a partial recursive function which is defined for every input. Every primitive recursive function is total recursive, but not all total recursive functions are primitive recursive. The Ackermann function A(m,n) is a well-known example of a total recursive function that is not primitive recursive. There is a characterization of the primitive recursive functions as a subset of the total recursive functions using the Ackermann function. This characterization states that a function is primitive recursive if and only if there is a natural number m such that the function can be computed by a Turing machine that always halts within A(m,n) or fewer steps, where n is the sum of the arguments of the primitive recursive function. LimitationsPrimitive recursive functions tend to correspond very closely with our intuition of what a computable function must be. Certainly the initial functions are intuitively computable (in their very simplicity), and the two operations by which one can create new primitive recursive functions are also very straightforward. However the set of primitive recursive functions does not include every possible computable function — this can be seen with a variant of Cantor's diagonal argument. This argument provides a computable function which is not primitive recursive. A sketch of the proof is as follows:
This argument can be applied to any class of computable (total) functions that can be enumerated in this way, as explained in the article Machines that always halt. Note however that the partial computable functions (those which need not be defined for all arguments) can be explicitly enumerated, for instance by enumerating Turing machine encodings. Other examples of total recursive but not primitive recursive functions are known:
Some common primitive recursive functions
In the following we observe that primitive recursive functions can be of four types:
In the following the mark " ' ", e.g. a' , is the primitive mark meaning "the successor of", usually thought of as " +1", e.g. a +1 =def a'. The functions 16-21 and #G are of particular interest with respect to converting primitive recursive predicates to, and extracting them from, their "arithmetical" form expressed as Gödel numbers.
See also
References
cs:Primitivn? rekurzivní funkce de:Primitiv-rekursive Funktion es:Recursión primitiva fr:Fonction récursive primitive it:Funzione ricorsiva primitiva he:??????? ?????????? ????????? ja:?????? ru:??????????? ??????? (?????? ????????????) zh:?????? Source: Wikipedia | The above article is available under the GNU FDL. | Edit this article
|
|
top
©2008-2009 TutorGig.com. All Rights Reserved. Privacy Statement