From: David Kastrup <dak@gnu.org>
Subject: Re: to big nest level of recursion
Date: Sat, 25 Mar 2006 12:46:40 +0100 [thread overview]
Message-ID: <85mzfe21cv.fsf@lola.goethe.zz> (raw)
In-Reply-To: 94630e.09.ln@acm.acm
Alan Mackenzie <acm@muc.de> writes:
> David Reitter <david.reitter@gmail.com> wrote on Tue, 21 Mar 2006
> 21:31:29 +0000:
>
> [ .... ]
>
>> Maybe it's a consolation for you that for every recursive algorithm,
>> you can formulate an iterative version. And you don't bloat a call
>> stack when you do so.
>
> This is not true. There are algorithms that are intrinsically
> recursive and cannot be formulated with mere iteration (such as the
> Ackermann function, specially invented to demonstrate this).
They cannot be formulated with iteration _without_ a stack. But of
course, when using a stack as a data structure, you can map any
recursion onto iteration.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
next prev parent reply other threads:[~2006-03-25 11:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.21.1142976703.14011.help-gnu-emacs@gnu.org>
2006-03-25 10:30 ` to big nest level of recursion Alan Mackenzie
2006-03-25 11:46 ` David Kastrup [this message]
2006-04-04 13:36 ` david.reitter
2006-03-21 21:31 David Reitter
-- strict thread matches above, loose matches on Subject: below --
2006-03-20 12:35 Anton V. Belyaev
2006-03-20 12:45 ` Hans-Christoph Wirth
2006-03-20 12:51 ` David Kastrup
2006-03-20 13:52 ` Pascal Bourguignon
2006-03-20 15:56 ` Anton V. Belyaev
2006-03-21 17:09 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85mzfe21cv.fsf@lola.goethe.zz \
--to=dak@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).