Re: Grammatical Recursion
From: Florian Laws (fl-usenet-2004_at_void.s.bawue.de)
Date: 12/18/04
- Next message: Dylan Sung: "Re: grockle"
- Previous message: Florian Laws: "Re: Grammatical Recursion"
- In reply to: Des Small: "Re: Grammatical Recursion"
- Next in thread: Lee Sau Dan: "Re: Grammatical Recursion"
- Reply: Lee Sau Dan: "Re: Grammatical Recursion"
- Messages sorted by: [ date ] [ thread ]
Date: 18 Dec 2004 11:41:21 GMT
On 2004-12-17, Des Small <des.small@bristol.ac.uk> wrote:
>
> Not all examples are trivial. The Ackermann function, for example:
>
> def Ack(M, N):
> if (not M):
> return( N + 1 )
> if (not N):
> return( Ack(M-1, 1) )
> return( Ack(M-1, Ack(M, N-1)) )
>
> To rewrite this "iteratively" would surely involve hand-management of
> a stack, which might as well be recursion.
I does, but that only shows that Iteration is in fact just as powerful
as Recursion.
Regards,
Florian
- Next message: Dylan Sung: "Re: grockle"
- Previous message: Florian Laws: "Re: Grammatical Recursion"
- In reply to: Des Small: "Re: Grammatical Recursion"
- Next in thread: Lee Sau Dan: "Re: Grammatical Recursion"
- Reply: Lee Sau Dan: "Re: Grammatical Recursion"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|