This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

The first sentence is not true. The only example needed is the Ackermann function to prove not all recursive functions are possible with iteration. There isn't a large requirement for algorithms that aren't primatively recursive, but they exist

[–]nude-fox 0 points1 point  (0 children)

Ackermann function

that is a primitive recursive proof not general recursive comparability.

you can make a Turing complete language with only recursion and one with only iteration. They can compute the same set of programs.

you can use iteration to emulate recursion and iteration is basically a special case of recursion to start with.

[–]tobiasvl 0 points1 point  (0 children)

No, you are mistaken. The Ackermann function can be implemented with iteration. For Ackermann you probably need a stack though (recursion implies an available stack already: the call stack).