PlanetMath (more info)
 Math for the people, by the people. Sponsor PlanetMath
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Owner confidence rating: Very high Entry average rating: Very high
primitive recursive function (Definition)

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

$\mathcal{F} = \bigcup \lbrace F_k \mid k \in \mathbb{N} \rbrace$ , where for each $k \in \mathbb{N}{, }F_k = \lbrace f \mid f \colon \mathbb{N}^{k} \to \mathbb{N} \rbrace$ .

Definition. The set of primitive recursive functions is the smallest subset $\mathcal{PR}$ of $\mathcal{F}$ where:

1.
(zero function) $z \in \mathcal{PR}\cap F_1$ , given by $z(n):=0$ ;
2.
(successor function) $s \in \mathcal{PR}\cap F_1$ , given by $s(n):=n+1$ ;
3.
(projection functions) $p^k_m \in \mathcal{PR}\cap F_k$ , where $m\le k$ , given by $p^k_m(n_1,\ldots,n_k):=n_m$ ;
4.
$\mathcal{PR}$ is closed under composition: If $\lbrace g_1, \ldots, g_m \rbrace \subseteq \mathcal{PR} \cap F_{k}$ and $h \in \mathcal{PR} \cap F_m$ , then $f \in \mathcal{PR} \cap F_{k}$ , where $$f(n_1,\ldots, n_k) = h(g_1(n_1, \ldots, n_k), \ldots, g_m(n_1,\ldots, n_k));$$
5.
$\mathcal{PR}$ is closed under primitive recursion: If $g \in \mathcal{PR} \cap F_{k}$ and $h \in \mathcal{PR} \cap F_{k+2}$ , then $f \in \mathcal{PR}\cap F_{k+1}$ , where \begin{eqnarray*} f(n_1, \ldots, n_k, 0) &=& g(n_1, \ldots, n_k) \\ f(n_1, \ldots, n_k, s(n)) &=& h(n_1, \ldots, n_k, n, f(n_1, \ldots, n_k, n)). \end{eqnarray*}

Many of the arithmetic functions that we encounter in basic math are primitive recursive, including addition, multiplication, and exponentiation. More examples can be found in this entry.

Primitive recursive functions are computable by Turing machines. In fact, it can be shown that $\mathcal{PR}$ is precisely the set of functions computable by programs using FOR NEXT loops. However, not all Turing-computable functions are primitive recursive: the Ackermann function is one such example.

Since $\mathcal{F}$ is countable, so is $\mathcal{PR}$ . Moreover, $\mathcal{PR}$ is recursively enumerable (can be listed by a Turing machine).

Remarks.

  1. Every primitive recursive function is total, since it is built from $z$ , $s$ , and $p^k_m$ , each of which is total, and that functional composition, and primitive recursion preserve totalness. By including $\varnothing$ in $\mathcal{PR}$ above, and close it by functional composition and primitive recursion, one gets the set of partial primitive recursive functions.
  2. Primitive recursiveness can be defined on subsets of $\mathbb{N}^k$ : a subset $S\subseteq \mathbb{N}^k$ is primitive recursive if its characteristic function $\varphi_S$ , which is defined as

    \begin{displaymath} \varphi_S(x):= \left\{ \begin{array}{ll} 1 & \textrm{if } x \in S, \ 0 & \textrm{otherwise.} \end{array}\right. \end{displaymath}
    is primitive recursive.
  3. Likewise, primitive recursiveness can be defined for predicates over tuples of natural numbers. A predicate $\Phi(\boldsymbol{x})$ , where $\boldsymbol{x}\in \mathbb{N}^k$ , is said to be primitive recursive if the set $S(\Phi):=\lbrace \boldsymbol{x}\mid \Phi(\boldsymbol{x})\rbrace$ is primitive recursive.




"primitive recursive function" is owned by CWoo. [ full author list (3) | owner history (2) ]
(view preamble | get metadata)

View style:

See Also: recursive function

Other names:  primitive recursive
Also defines:  primitive recursive set, primitive recursive predicate, partial primitive recursive function

Attachments:
characterization of primitive recursive functions of one variable (Theorem) by rspuzio
examples of primitive recursive functions (Example) by CWoo
bounded minimization (Definition) by CWoo
importance of primitive recursion (Feature) by CWoo
examples of primitive recursive predicates (Example) by CWoo
Log in to rate this entry.
(view current ratings)

Cross-references: natural numbers, tuples, predicates, characteristic function, primitive, preserve, functional, recursively enumerable, countable, Ackermann function, Turing-computable, loops, Turing machines, computable, arithmetic functions, primitive recursion, composition, closed under, projection, successor, function, subset
There are 15 references to this entry.

This is version 16 of primitive recursive function, born on 2002-03-23, modified 2009-11-11.
Object id is 2801, canonical name is PrimitiveRecursive.
Accessed 9985 times total.

Classification:
AMS MSC03D20 (Mathematical logic and foundations :: Computability and recursion theory :: Recursive functions and relations, subrecursive hierarchies)

Pending Errata and Addenda
None.
[ View all 4 ]
Discussion
Style: Expand: Order:
forum policy

No messages.

Interact
post | correct | update request | add derivation | add example | add (any)