Ackermann Function - Definition and Properties

Definition and Properties

Ackermann's original three-argument function is defined recursively as follows for nonnegative integers m, n, and p:

 \varphi(m,n,p) = \begin{cases}
\varphi(m, n, 0) = m + n \\
\varphi(m, 0, 1) = 0 \\
\varphi(m, 0, 2) = 1 \\
\varphi(m, 0, p) = m &\text{ for } p > 2 \\
\varphi(m, n, p) = \varphi(m, \varphi(m, n-1, p), p - 1) &\text{ for } n > 0 \text{ and } p > 0.
\end{cases}\,\!

Of the various two-argument versions, the one developed by Péter and Robinson (called "the" Ackermann function by some authors) is defined for nonnegative integers m and n as follows:

 A(m, n) =
\begin{cases}
n+1 & \mbox{if } m = 0 \\
A(m-1, 1) & \mbox{if } m > 0 \mbox{ and } n = 0 \\
A(m-1, A(m, n-1)) & \mbox{if } m > 0 \mbox{ and } n > 0.
\end{cases}

It may not be immediately obvious that the evaluation of always terminates. However, the recursion is bounded because in each recursive application either m decreases, or m remains the same and n decreases. Each time that n reaches zero, m decreases, so m eventually reaches zero as well. (Expressed more technically, in each case the pair (m, n) decreases in the lexicographic order on pairs, which is a well-ordering, just like the ordering of single non-negative integers; this means one cannot go down in the ordering infinitely many times in succession.) However, when m decreases there is no upper bound on how much n can increase — and it will often increase greatly.

The Péter-Ackermann function can also be expressed in terms of various other versions of the Ackermann function:

  • the indexed version of Knuth's up-arrow notation (extended to integer indices ≥ -2):
A(m, n) =
The part of the definition A(m, 0) = A(m-1, 1) corresponds to
  • hyper operators:
A(m, n) = hyper(2, m, n + 3) − 3.
  • Conway chained arrow notation:
A(m, n) = (2 → (n+3) → (m − 2)) − 3 for m > 2
hence
2 → nm = A(m+2,n-3) + 3 for n>2.
(n=1 and n=2 would correspond with A(m,−2) = −1 and A(m,−1) = 1, which could logically be added.)

For small values of m like 1, 2, or 3, the Ackermann function grows relatively slowly with respect to n (at most exponentially). For m ≥ 4, however, it grows much more quickly; even A(4, 2) is about 2×1019,728, and the decimal expansion of A(4, 3) is very large by any typical measure.

If we define the function f (n) = A(n, n), which increases both m and n at the same time, we have a function of one variable that dwarfs every primitive recursive function, including very fast-growing functions such as the exponential function, the factorial function, multi- and superfactorial functions, and even functions defined using Knuth's up-arrow notation (except when the indexed up-arrow is used).

This extreme growth can be exploited to show that f, which is obviously computable on a machine with infinite memory such as a Turing machine and so is a computable function, grows faster than any primitive recursive function and is therefore not primitive recursive. In a category with exponentials, using the isomorphism (in computer science, this is called currying), the Ackermann function may be defined via primitive recursion over higher-order functionals as follows:


\begin{array}{lcl}
\operatorname{Ack}(0) & = & \operatorname{Succ} \\
\operatorname{Ack}(m+1) & = & \operatorname{Iter}(\operatorname{Ack}(m))
\end{array}

where Succ is the usual successor function and Iter is defined by primitive recursion as well:


\begin{array}{lcl}
\operatorname{Iter}(f)(0) & = & f(1) \\
\operatorname{Iter}(f)(n+1) & = & f(\operatorname{Iter}(f)(n)).
\end{array}

One interesting aspect of the Ackermann function is that the only arithmetic operations it ever uses are addition and subtraction of 1. Its properties come solely from the power of unlimited recursion. This also implies that its running time is at least proportional to its output, and so is also extremely huge. In actuality, for most cases the running time is far larger than the output; see below.

Read more about this topic:  Ackermann Function

Famous quotes containing the words definition and/or properties:

    It is very hard to give a just definition of love. The most we can say of it is this: that in the soul, it is a desire to rule; in the spirit, it is a sympathy; and in the body, it is but a hidden and subtle desire to possess—after many mysteries—what one loves.
    François, Duc De La Rochefoucauld (1613–1680)

    A drop of water has the properties of the sea, but cannot exhibit a storm. There is beauty of a concert, as well as of a flute; strength of a host, as well as of a hero.
    Ralph Waldo Emerson (1803–1882)