Re: Have you tried recursion with Ackerman?




"Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:45617054$0$326$e4fe514c@xxxxxxxxxxxxxxxxx
"Heinrich Wolf" <invalid@xxxxxxxxxxxxxxx> wrote in message
news:ejpqu1$4r5$1@xxxxxxxxxxxxxxxxxxxxx

Ackerman(0, y) := y + 1;
Ackerman(x, 0) := Ackerman(x - 1, 1);
Ackerman(x, y) := Ackerman(x - 1, Ackerman(x, y - 1));

No. Why do you ask?

Groetjes,
Maarten Wiltink

In the context of recursion it just came to my mind.
Of course it is a based on a completely different problem.

On friday you wrote, the hailstone recursion can be substituted by a loop.
I'm afraid, the Ackermann recursion cannot be substituted totally by loops.
From playing and trying I found some partial solutions by loops.
But I cannot proof those.

Viele Gruesse
Heiner


.



Relevant Pages

  • Re: Response to Karen and to Willem on recursive proofs
    ... >) int nFactorial ... The bits with 'max' are because the loop is a bit ... I agree that this does not need recursion and it is an elegant ... language proofs can be used, and I need to keep the language informal ...
    (comp.programming)
  • Re: StackOverflowException with attribute
    ... I figured that the recursion wasn't infinite. ... it would seem that the call to GetProperties on the ... You need to find some way to break this loop. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: CAS, Lambda Calculus, Continuation and Functional Programming
    ... >>Recursion that's equivalent to loops can always be optimized back into ... and that tail calls are equivalent to loops. ... If a loop is formulated in a recursive way then ... >> that makes tail call elimination less attractive for compiler writers. ...
    (sci.math.symbolic)
  • Re: Iteration in lisp
    ... recursive function can run out of stack since CL does not guarantee ... In loop you would usually only need one change. ... So using tail recursion rather than a loop can introduce bugs in complex looping constructs. ...
    (comp.lang.lisp)
  • Re: Halting Problem
    ... large due to recursion. ... there is a condition for the recursion to terminate. ... they don't have infinite memory. ... All programs without any loop, ...
    (comp.programming)