The Ackermann function is the textbook example of a function which is total recursive but not primitive recursive.
If we want to implement it in some programming language we will need to use a priori unbounded loops (generally using while
or goto
).
I am looking for an algorithm used in real situations (e.g. in computational geometry or whatever field) that would implement a recursive function which is not primitive recursive (it doesn't need to be total). Such an algorithm would inherently require using a while
loop.
Does such an algorithm exist?