|
Teaser No. 12
Tower of Hanoi
Question:
A B C
There are three columns in figure 1.The left most has
three disks.The problem is to move all Disks to another
one (figure 2),subject to following rules :
(a). You can move only one Disk at a time and it must
be the topmost.
(b). You cannot put larger Disk on top of smaller.
Answer:
Columns are denoted by A,B and C
and Disks are denoted by 1,2 and 3.1A to B means that
Disk 1 in column A is
transferred to column B.
The following sequence of movements will give the result
:-1A to C, 2A to B, 1C to B, 3A to C, 1B to A, 2B to
C and
1A to C.
|
|