[Haskell-beginners] tower hanoi problem

YCH dontdieych at gmail.com
Sun Feb 15 11:08:29 UTC 2015


On Sun, Feb 15, 2015 at 5:51 PM, Roelof Wobben <r.wobben at home.nl> wrote:
> YCH schreef op 15-2-2015 om 9:45:
>>
>> How about if I say "Actually target was c not b and here is one more
>> disc. I put it on a. Now you should move all to c"
>>
>>
>
> Hanoi 1 a b c
>
> A -> C
>
> Hanoi 2 a b c
>
> A -> B
> A -> C
> B -> C
>
> Hanoi 3 a b c
>
> A -> C -- Compare these three lines to 'hanoi 2 ...'.
> A -> B -- If you could find pattern here,
> C -> B -- you can swap these lines to 'hanoi 2 ...'.
> A -> C
> B -> A
> B -> C
> A -> C


More information about the Beginners mailing list