Jump to content
Wikipedia The Free Encyclopedia

Elementary recursive function

From Wikipedia, the free encyclopedia
Concept in computability theory
For other meanings, see Elementary function.

The term elementary was originally introduced by László Kalmár in the context of computability theory.[1] [2] He defined the class of elementary recursive functions ("Kalmár elementary functions") as a subset of the primitive recursive functions — specifically, those that can be computed using a limited set of operations such as composition, bounded sums, and bounded products. These functions grow no faster than a fixed-height tower of exponentiation (for example, O ( 2 2 n ) {\displaystyle O(2^{2^{n}})} {\displaystyle O(2^{2^{n}})}). Not all primitive recursive functions are elementary; for example, tetration grows too rapidly to be included in the elementary class.

In computational complexity theory, the term ELEMENTARY refers to a class of decision problems solvable in elementary time — that is, within time bounded by some fixed number of exponentials. Formally:

E L E M E N T A R Y = k N DTIME ( exp k ( n c ) ) {\displaystyle {\mathsf {ELEMENTARY}}=\bigcup _{k\in \mathbb {N} }{\text{DTIME}}(\exp ^{k}(n^{c}))} {\displaystyle {\mathsf {ELEMENTARY}}=\bigcup _{k\in \mathbb {N} }{\text{DTIME}}(\exp ^{k}(n^{c}))}
where exp k ( n ) {\displaystyle \exp ^{k}(n)} {\displaystyle \exp ^{k}(n)} denotes a k-level exponential tower (e.g., 2 2 n {\displaystyle 2^{2^{\cdot ^{\cdot ^{n}}}}} {\displaystyle 2^{2^{\cdot ^{\cdot ^{n}}}}}).

Although the name comes from the same historical origin, the ELEMENTARY complexity class deals with decision problems and Turing machine runtime, rather than total functions.

Definition

[edit ]

The definitions of elementary recursive functions are the same as for primitive recursive functions, except that primitive recursion is replaced by bounded summation and bounded product. All functions work over the natural numbers. The basic functions, all of them elementary recursive, are:

  1. Zero function. Returns zero: f ( x ) = 0 {\displaystyle f(x)=0} {\displaystyle f(x)=0}.
  2. Successor function: f ( x ) = x + 1 {\displaystyle f(x)=x+1} {\displaystyle f(x)=x+1}. Often this is denoted by S {\displaystyle S} {\displaystyle S}, as in S ( x ) {\displaystyle S(x)} {\displaystyle S(x)}. Via repeated application of a successor function, one can achieve addition.
  3. Projection functions: these are used for ignoring arguments. For example, f ( a , b ) = a {\displaystyle f(a,b)=a} {\displaystyle f(a,b)=a} is a projection function.
  4. Subtraction function: f ( x , y ) = x y {\displaystyle f(x,y)=x-y} {\displaystyle f(x,y)=x-y} if y < x {\displaystyle y<x} {\displaystyle y<x}, or 0 if y x {\displaystyle y\geq x} {\displaystyle y\geq x}. This function is used to define conditionals and iteration.

From these basic functions, we can build other elementary recursive functions.

  1. Composition: applying values from some elementary recursive function as an argument to another elementary recursive function. The function f {\displaystyle f} {\displaystyle f} defined as the composition f ( x 1 , , x n ) = h ( g 1 ( x 1 , , x n ) , , g m ( x 1 , , x n ) ) {\displaystyle f(x_{1},\ldots ,x_{n})=h{\bigl (}g_{1}(x_{1},\ldots ,x_{n}),\ldots ,g_{m}(x_{1},\ldots ,x_{n}){\bigr )}} {\displaystyle f(x_{1},\ldots ,x_{n})=h{\bigl (}g_{1}(x_{1},\ldots ,x_{n}),\ldots ,g_{m}(x_{1},\ldots ,x_{n}){\bigr )}} is elementary recursive if h {\displaystyle h} {\displaystyle h} is elementary recursive and each g i {\displaystyle g_{i}} {\displaystyle g_{i}} is elementary recursive.
  2. Bounded summation: f ( m , x 1 , , x n ) = i = 0 m g ( i , x 1 , , x n ) {\displaystyle f(m,x_{1},\ldots ,x_{n})=\sum \limits _{i=0}^{m}g(i,x_{1},\ldots ,x_{n})} {\displaystyle f(m,x_{1},\ldots ,x_{n})=\sum \limits _{i=0}^{m}g(i,x_{1},\ldots ,x_{n})} is elementary recursive if g {\displaystyle g} {\displaystyle g} is elementary recursive.
  3. Bounded product: f ( m , x 1 , , x n ) = i = 0 m g ( i , x 1 , , x n ) {\displaystyle f(m,x_{1},\ldots ,x_{n})=\prod \limits _{i=0}^{m}g(i,x_{1},\ldots ,x_{n})} {\displaystyle f(m,x_{1},\ldots ,x_{n})=\prod \limits _{i=0}^{m}g(i,x_{1},\ldots ,x_{n})} is elementary recursive if g {\displaystyle g} {\displaystyle g} is elementary recursive.

Superposition bases for elementary functions

[edit ]

In the context of computability theory, superposition is a method of constructing new functions from existing ones by functional composition. It allows the outputs of one or more functions to serve as the inputs to another function.

More formally, suppose:

  • f ( x 1 , , x k ) {\displaystyle f(x_{1},\dots ,x_{k})} {\displaystyle f(x_{1},\dots ,x_{k})} is a k {\displaystyle k} {\displaystyle k}-ary function, and
  • g 1 ( x 1 , , x n ) , , g k ( x 1 , , x n ) {\displaystyle g_{1}(x_{1},\dots ,x_{n}),\dots ,g_{k}(x_{1},\dots ,x_{n})} {\displaystyle g_{1}(x_{1},\dots ,x_{n}),\dots ,g_{k}(x_{1},\dots ,x_{n})} are n {\displaystyle n} {\displaystyle n}-ary functions.

Then the superposition of these functions yields a new n {\displaystyle n} {\displaystyle n}-ary function:

h ( x 1 , , x n ) = f ( g 1 ( x 1 , , x n ) , , g k ( x 1 , , x n ) ) {\displaystyle h(x_{1},\dots ,x_{n})=f(g_{1}(x_{1},\dots ,x_{n}),\dots ,g_{k}(x_{1},\dots ,x_{n}))} {\displaystyle h(x_{1},\dots ,x_{n})=f(g_{1}(x_{1},\dots ,x_{n}),\dots ,g_{k}(x_{1},\dots ,x_{n}))}.

The class of elementary recursive functions coincides with the closure under superposition of the projection functions and one of the following sets of initial functions:

  • { n + m , n ˙ m , n / m , 2 n } {\displaystyle \{n+m,\;n\mathbin {\dot {-}} m,\;\lfloor n/m\rfloor ,\;2^{n}\}} {\displaystyle \{n+m,\;n\mathbin {\dot {-}} m,\;\lfloor n/m\rfloor ,\;2^{n}\}}[3]
  • { 1 , n + m , n ˙ m , n / m , n × m , n m } {\displaystyle \{1,\;n+m,\;n\mathbin {\dot {-}} m,\;\lfloor n/m\rfloor ,\;n\times m,\;n^{m}\}} {\displaystyle \{1,\;n+m,\;n\mathbin {\dot {-}} m,\;\lfloor n/m\rfloor ,\;n\times m,\;n^{m}\}}[4]
  • { n + 1 , n ˙ m , n / m , n m } {\displaystyle \{n+1,\;n\mathbin {\dot {-}} m,\;\lfloor n/m\rfloor ,\;n^{m}\}} {\displaystyle \{n+1,\;n\mathbin {\dot {-}} m,\;\lfloor n/m\rfloor ,\;n^{m}\}}[citation needed ]
  • { n + m , n mod m , n 2 , 2 n } {\displaystyle \{n+m,\;n{\bmod {m}},\;n^{2},\;2^{n}\}} {\displaystyle \{n+m,\;n{\bmod {m}},\;n^{2},\;2^{n}\}}[5]
  • { n + m , n mod m , 2 n } {\displaystyle \{n+m,\;n{\bmod {m}},\;2^{n}\}} {\displaystyle \{n+m,\;n{\bmod {m}},\;2^{n}\}}[6]

where n ˙ m = max ( n m , 0 ) {\displaystyle n\mathbin {\dot {-}} m=\max(n-m,0)} {\displaystyle n\mathbin {\dot {-}} m=\max(n-m,0)} denotes truncated subtraction (monus).

In 2025 Mihai Prunescu, Lorenzo Sauras-Altuzarra and Joseph M. Shunia proved that the class of Kalmár elementary functions can be inductively generated from the addition ( n + m {\displaystyle n+m} {\displaystyle n+m}), the integer remainder ( n mod m {\displaystyle n{\bmod {m}}} {\displaystyle n{\bmod {m}}}) and the base-two exponentiation ( 2 n {\displaystyle 2^{n}} {\displaystyle 2^{n}}), improving previous results by Marchenkov[5] and Mazzanti.[4] In addition, they further proved that the substitution basis defined by these three operations is minimal.[7]

Example 1

Let

f ( a , b ) = a mod b , g 1 ( n ) = 2 n + n {\displaystyle f(a,b)=a{\bmod {b}},\;g_{1}(n)=2^{n+n}} {\displaystyle f(a,b)=a{\bmod {b}},\;g_{1}(n)=2^{n+n}}, and g 2 ( n ) = 2 n + n {\displaystyle g_{2}(n)=2^{n}+n} {\displaystyle g_{2}(n)=2^{n}+n}.

Then the function

h ( n ) = f ( g 1 ( n ) , g 2 ( n ) ) = 2 n + n mod ( 2 n + n ) {\displaystyle h(n)=f(g_{1}(n),g_{2}(n))=2^{n+n}{\bmod {(}}2^{n}+n)} {\displaystyle h(n)=f(g_{1}(n),g_{2}(n))=2^{n+n}{\bmod {(}}2^{n}+n)}

defines the square function h ( n ) = n 2 {\displaystyle h(n)=n^{2}} {\displaystyle h(n)=n^{2}} by superposition alone.

This shows how functions like squaring can be expressed using only addition, exponentiation, and modulo through superposition, without requiring explicit recursion.

Example 2

x ˙ y = ( ( 2 x + y + x ) mod ( 2 x + y + y ) ) mod ( 2 x + y + x ) {\displaystyle x\mathbin {\dot {-}} y=((2^{x+y}+x){\bmod {(}}2^{x+y}+y)){\bmod {(}}2^{x+y}+x)} {\displaystyle x\mathbin {\dot {-}} y=((2^{x+y}+x){\bmod {(}}2^{x+y}+y)){\bmod {(}}2^{x+y}+x)}.[8]

Example 3

x y = 2 ( x y + x + 1 ) y mod ( 2 x y + x + 1 ˙ x ) {\displaystyle x^{y}=2^{(xy+x+1)y}{\bmod {(}}2^{xy+x+1}\mathbin {\dot {-}} x)} {\displaystyle x^{y}=2^{(xy+x+1)y}{\bmod {(}}2^{xy+x+1}\mathbin {\dot {-}} x)}.[9]

Lower elementary recursive functions

[edit ]

Lower elementary recursive functions follow the definitions as above, except that bounded product is disallowed. That is, a lower elementary recursive function must be a zero, successor, or projection function, a composition of other lower elementary recursive functions, or the bounded sum of another lower elementary recursive function.

Lower elementary recursive functions are also known as Skolem elementary functions.[10] [11]

Whereas elementary recursive functions have potentially more than exponential growth, the lower elementary recursive functions have polynomial growth.

The class of lower elementary functions has a description in terms of composition of simple functions analogous to that we have for elementary functions.[11] [12] Namely, a polynomial-bounded function is lower elementary if and only if it can be expressed using a composition of the following functions: projections, n + 1 {\displaystyle n+1} {\displaystyle n+1}, n m {\displaystyle nm} {\displaystyle nm}, n ˙ m {\displaystyle n\mathbin {\dot {-}} m} {\displaystyle n\mathbin {\dot {-}} m}, n m {\displaystyle n\wedge m} {\displaystyle n\wedge m}, n / m {\displaystyle \lfloor n/m\rfloor } {\displaystyle \lfloor n/m\rfloor }, one exponential function ( 2 n {\displaystyle 2^{n}} {\displaystyle 2^{n}} or n m {\displaystyle n^{m}} {\displaystyle n^{m}}) with the following restriction on the structure of formulas: the formula can have no more than two floors with respect to an exponent (for example, x y ( z + 1 ) {\displaystyle xy(z+1)} {\displaystyle xy(z+1)} has 1 floor, ( x + y ) y z + x + z x + 1 {\displaystyle (x+y)^{yz+x}+z^{x+1}} {\displaystyle (x+y)^{yz+x}+z^{x+1}} has 2 floors, 2 2 x {\displaystyle 2^{2^{x}}} {\displaystyle 2^{2^{x}}} has 3 floors). Here n m {\displaystyle n\wedge m} {\displaystyle n\wedge m} is a bitwise AND of n and m.

See also

[edit ]

Notes

[edit ]
  1. ^ Kalmár 1943.
  2. ^ Kleene 1952, pp. 285, 526.
  3. ^ Marchenkov 1980.
  4. ^ a b Mazzanti 2002.
  5. ^ a b Marchenkov 2007.
  6. ^ n 2 = 2 n + n mod ( 2 n + n ) {\displaystyle n^{2}=2^{n+n}{\bmod {(}}2^{n}+n)} {\displaystyle n^{2}=2^{n+n}{\bmod {(}}2^{n}+n)} Prunescu, Sauras-Altuzarra & Shunia (2025)
  7. ^ Prunescu, Sauras-Altuzarra & Shunia 2025.
  8. ^ Prunescu, Sauras-Altuzarra & Shunia 2025, Theorem 3.
  9. ^ Lysikov 2025.
  10. ^ Skolem 1962.
  11. ^ a b Volkov 2010.
  12. ^ Volkov 2016.

References

[edit ]
  • Prunescu, Mihai; Sauras-Altuzarra, Lorenzo (5 June 2025). "On the representation of C-recursive integer sequences by arithmetic terms". arXiv:2405.04083 [math.LO].
  • Prunescu, Mihai; Sauras-Altuzarra, Lorenzo; Shunia, Joseph M. (8 August 2025). "A Minimal Substitution Basis for the Kalmar Elementary Functions". arXiv:2505.23787 [math.LO].
  • Volkov, S. A. (2010). "On the class of Skolem elementary functions". Journal of Applied and Industrial Mathematics. 4 (4): 588–599. doi:10.1134/S1990478910040149.
  • Volkov, Sergey (2016). "Finite Bases with Respect to the Superposition in Classes of Elementary Recursive Functions [dissertation]". arXiv:1611.04843 [cs.CC].
[edit ]

AltStyle によって変換されたページ (->オリジナル) /