TOWER OF HANOI : P7

It consists of three pegs A, B, and C. Initially peg A has on it some number of disks, starting
with the largest one on the bottom and successively smaller ones on top, as shown in
Fig. 10.1. The object of the puzzle is to move the disks one at a time from peg to peg,
never placing a larger disk on top of a smaller one, eventually ending with all disks
on peg B.
One soon learns that the puzzle can be solved by the following simple algorithm.
Imagine the pegs arranged in a triangle. On odd-numbered moves, move the smallest
disk one peg clockwise. On even-numbered moves.

Continue reading