PR (complexity)
Encyclopedia
PR is the complexity class of all primitive recursive function
s – or, equivalently, the set of all formal language
s that can be decided by such a function. This includes addition, multiplication, exponentiation, tetration
, etc.
The Ackermann function
is an example of a function that is not primitive recursive, showing that PR is strictly contained in R
.
PR functions can be explicitly enumerated, whereas not all functions R can be. This shows that 'PR' has a syntactic definition, whereas R lacks one.
On the other hand, we can "enumerate" any recursively enumerable set
(see also its complexity class RE
) by a primitive-recursive function in the following sense: given an input (M, k), where M is a Turing machine and k is an integer, if M halts within k steps then output M; otherwise output nothing. Then the union of the outputs, over all possible inputs (M, k), is exactly the set of M that halt.
PR strictly contains ELEMENTARY.
Primitive recursive function
The primitive recursive functions are defined using primitive recursion and composition as central operations and are a strict subset of the total µ-recursive functions...
s – or, equivalently, the set of all formal language
Formal language
A formal language is a set of words—that is, finite strings of letters, symbols, or tokens that are defined in the language. The set from which these letters are taken is the alphabet over which the language is defined. A formal language is often defined by means of a formal grammar...
s that can be decided by such a function. This includes addition, multiplication, exponentiation, tetration
Tetration
In mathematics, tetration is an iterated exponential and is the next hyper operator after exponentiation. The word tetration was coined by English mathematician Reuben Louis Goodstein from tetra- and iteration. Tetration is used for the notation of very large numbers...
, etc.
The Ackermann function
Ackermann function
In computability theory, the Ackermann function, named after Wilhelm Ackermann, is one of the simplest and earliest-discovered examples of a total computable function that is not primitive recursive...
is an example of a function that is not primitive recursive, showing that PR is strictly contained in R
R (complexity)
In computational complexity theory, R is the class of decision problems solvable by a Turing machine, which is the set of all recursive languages. R is equal to the set of all total computable functions....
.
PR functions can be explicitly enumerated, whereas not all functions R can be. This shows that 'PR' has a syntactic definition, whereas R lacks one.
On the other hand, we can "enumerate" any recursively enumerable set
Recursively enumerable set
In computability theory, traditionally called recursion theory, a set S of natural numbers is called recursively enumerable, computably enumerable, semidecidable, provable or Turing-recognizable if:...
(see also its complexity class RE
RE (complexity)
In computability theory and computational complexity theory, RE is the class of decision problems for which a 'yes' answer can be verified by a Turing machine in a finite amount of time. Informally, it means that if the answer is 'yes', then there is some procedure which takes finite time to...
) by a primitive-recursive function in the following sense: given an input (M, k), where M is a Turing machine and k is an integer, if M halts within k steps then output M; otherwise output nothing. Then the union of the outputs, over all possible inputs (M, k), is exactly the set of M that halt.
PR strictly contains ELEMENTARY.