Math 2.0

Mathematical logic and foundations Computability theory Example

Ackermann function

Example

The Ackermann function, in the two-argument form of Rózsa Péter, is the function A ⁣:ℕ×ℕ→ℕA \colon \N \times \N \to \N given by A(0,n)=n+1,A(m+1,0)=A(m,1),A(m+1,n+1)=A(m,A(m+1,n)).A(0, n) = n + 1, \qquad A(m + 1, 0) = A(m, 1), \qquad A(m + 1, n + 1) = A(m, A(m + 1, n)). It is a total computable function. Each right-hand side calls AA at a pair that is smaller in the lexicographic order on ℕ×ℕ\N \times \N. This order is a well-order, so the recursion stops on every input and gives an algorithm for AA.

Remarks

By induction on nn, one gets A(1,n)=n+2A(1, n) = n + 2, A(2,n)=2n+3A(2, n) = 2n + 3 and A(3,n)=2n+3−3A(3, n) = 2^{n+3} - 3. Then A(4,0)=A(3,1)=13A(4, 0) = A(3, 1) = 13 and A(4,1)=A(3,13)=216−3=65533A(4, 1) = A(3, 13) = 2^{16} - 3 = 65533. The function AA is not primitive recursive, see Ackermann function is not primitive recursive.

Further reading

  1. Web https://en.wikipedia.org/wiki/Ackermann_function
About this page
TagN470JF7ZJX
URIm2://N470JF7ZJX
Kindexample
WritingW0 stub
MSC03D20
Instance ofComputable function
Same as
Changed2 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

Results about this