[Haskell-beginners] tower hanoi problem
Joel Neely
joel.neely at gmail.com
Tue Feb 17 12:05:59 UTC 2015
Let's tweak your answers just a bit, calling the three pegs the "source",
"goal", and "spare" pegs:
On Tue, Feb 17, 2015 at 5:23 AM, Roelof Wobben <r.wobben at home.nl> wrote:
> - Where do I move the bottom (largest disk) ?
>
> To the last peg, which do not contain any disk then
> .
>
>From the source peg to the goal peg, which will
/must
not contain any disks.
>
>
>
> - What must happen before I can move the bottom disk ?
>
> I have to move the disk which above that disk.
>
Move everything else from ____ to ____.
>
> - What must happen after I move the bottom disk ?
>
> All the other disk must be placed above that disk.
>
Move everything else from ____ to ____.
So more questions/hints:
1. How do you fill in the blanks?
2. How do you put the three statements in order?
3. How many disks does each statement talk about?
-jn-
--
Beauty of style and harmony and grace and good rhythm depend on simplicity.
- Plato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150217/61ee5c10/attachment.html>
More information about the Beginners
mailing list