primitive recursive function


To define what a primitive recursive functionMathworldPlanetmath is, the following notations are used:

={Fkk}, where for each kFk={ff:k}.

Definition. The set of primitive recursive functions is the smallest subset 𝒫 of where:

  1. 1.

    (zero function) z𝒫F1, given by z(n):=0;

  2. 2.

    (successor function) s𝒫F1, given by s(n):=n+1;

  3. 3.

    (projection functions) pmk𝒫Fk, where mk, given by pmk(n1,,nk):=nm;

  4. 4.

    𝒫 is closed under composition: If {g1,,gm}𝒫Fk and h𝒫Fm, then f𝒫Fk, where

    f(n1,,nk)=h(g1(n1,,nk),,gm(n1,,nk));
  5. 5.

    𝒫 is closed under primitive recursion: If g𝒫Fk and h𝒫Fk+2, then f𝒫Fk+1, where

    f(n1,,nk,0) = g(n1,,nk)
    f(n1,,nk,s(n)) = h(n1,,nk,n,f(n1,,nk,n)).

Many of the arithmetic functions that we encounter in basic math are primitive recursive, including additionPlanetmathPlanetmath, multiplication, and exponentiation. More examples can be found in this entry (http://planetmath.org/ExamplesOfPrimitiveRecursiveFunctions).

Primitive recursive functions are computable by Turing machinesMathworldPlanetmath. In fact, it can be shown that 𝒫 is precisely the set of functions computable by programs using FOR NEXT loops. However, not all Turing-computable functions are primitive recursive: the Ackermann functionMathworldPlanetmath is one such example.

Since is countableMathworldPlanetmath, so is 𝒫. Moreover, 𝒫 is recursively enumerablePlanetmathPlanetmath (can be listed by a Turing machine).

Remarks.

  1. [1]

    Every primitive recursive function is total, since it is built from z, s, and pmk, each of which is total, and that functionalPlanetmathPlanetmathPlanetmathPlanetmath composition, and primitive recursion preserve totalness. By including in 𝒫 above, and close it by functional composition and primitive recursion, one gets the set of partial primitive recursive functions.

  2. [2]

    Primitive recursiveness can be defined on subsets of k: a subset Sk is primitive recursive if its characteristic functionMathworldPlanetmathPlanetmathPlanetmath φS, which is defined as

    φS(x):={1if xS,0otherwise.

    is primitive recursive.

  3. [3]

    Likewise, primitive recursiveness can be defined for predicatesMathworldPlanetmath over tuples of natural numbersMathworldPlanetmath. A predicate Φ(𝒙), where 𝒙k, is said to be primitive recursive if the set S(Φ):={𝒙Φ(𝒙)} is primitive recursive.

Title primitive recursive function
Canonical name PrimitiveRecursiveFunction
Date of creation 2013-03-22 12:33:19
Last modified on 2013-03-22 12:33:19
Owner CWoo (3771)
Last modified by CWoo (3771)
Numerical id 19
Author CWoo (3771)
Entry type Definition
Classification msc 03D20
Synonym primitive recursive
Related topic RecursiveFunction
Defines primitive recursive set
Defines primitive recursive predicate
Defines partial primitive recursive function