Conform wikipedia :
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. All
primitive recursive functions are total and computable, but the
Ackermann function illustrates that not all total computable functions
are primitive recursive.
Intelegi conceptul ?
Uite si un exemplu luat de pe : vezi aici :
http://stackoverflow.com/questions/12678099/ackermann-function-understanding
def A(m, n, s="%s"):
print s % ("A(%d,%d)" % (m, n))
if m == 0:
return n + 1
if n == 0:
return A(m - 1, 1, s)
n2 = A(m, n - 1, s % ("A(%d,%%s)" % (m - 1)))
return A(m - 1, n2, s)
print A(2,2)