home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sun4nl!cwi.nl!tromp
- From: tromp@cwi.nl (John Tromp)
- Newsgroups: comp.programming
- Subject: Re: Teaching the basics
- Message-ID: <7154@charon.cwi.nl>
- Date: 26 Aug 92 08:39:58 GMT
- References: <1992Aug19.154830.11787@uwm.edu> <MJN.92Aug23031941@pseudo.uucp> <7116@charon.cwi.nl> <1992Aug25.174243.10436@uwm.edu>
- Sender: news@cwi.nl
- Lines: 25
-
- markh@csd4.csd.uwm.edu (Mark) writes:
-
- >In article <7116@charon.cwi.nl> tromp@cwi.nl (John Tromp) writes:
- >>>On top of it all, the recursive version does not have an arbitrary
- >>>limit on the number of disks, and can be easily translated to any
- >>>language supporting recursion.
- >>
- >>Well, nobody in his right mind would ever run hanoi on 32 discs or more:-)
- >>
- >>One of the prime applications of recursion, IMHO,
- >>and where you cannot hope to replace it by anything else,
- >>is in a tree search algorithm like alpha beta or plain old minimax.
-
- >Wrong. In fact, the non-recursive version (tree search) is far smaller and
- >simpler. No stacks either.
-
- Maybe I didn't make myself clear enough. I wasn't referring to mere
- tree *traversals* but to algorithm that keep some state information at each
- node. For instance, the alpha-beta algorithm keeps track of upper and lower
- bounds in each call, not globally. In contrast to towers-of-hanoi, this
- information does not derive from the current location of the search.
-
- These are the types of problem that recursion is most suited to.
-
- -John Tromp
-