228 MISCELLANEOUS PROBLEMS [CH. XI 



The problem may be made more difficult by limiting the 

 possible movements by fixing bars inside the box which will 

 prevent the movement of a counter transverse to their directions. 

 We can conceive also of a similar cubical puzzle, but we could 

 not work it practically except by sections. 



The Tower of Hanoi. I may mention next the ingenious 

 puzzle known as the Tower of Hanoi. It was brought out in 

 1883 by M. Claus (Lucas). 



It consists of three pegs fastened to a stand, and of eight 

 circular discs of wood or cardboard each of which has a hole in 

 the middle through which a peg can be passed. These discs 

 are of different radii, and initially they are placed all on one 

 peg, so that the biggest is at the bottom, and the radii of the 

 successive discs decrease as we ascend : thus the smallest disc 

 is at the top. This arrangement is called the Tower. The 

 problem is to shift, the discs from one peg to another in such 

 a way that a disc shall never rest on one smaller than itself, 

 and finally to transfer the tower (i.e. all the discs in their proper 

 order) from the peg on which they initially rested to one of the 

 other pegs. 



The method of effecting this is as follows, (i) If initially 

 there are n discs on the peg A, the first operation is to transfer 

 gradually the top n — 1 discs from the peg A to the peg B, 

 leaving the peg G vacant : suppose that'this requires x separate 

 transfers, (ii) Next, move the bottom disc to the peg G. 

 (iii) Then, reversing the first process, transfer gradually the 

 « — 1 discs from B to G, which will necessitate as transfers. 

 Hence; if it requires % transfers of simple discs to move a tower 

 of n — 1 discs, then it will require 2% + 1 separate transfers of 

 single discs to move a tower of n discs. Now with 2 discs it 

 requires 3 transfers, i.e. 2 2 — 1 transfers ; hence with 3 discs the 

 number of transfers required will be 2 (2 2 — 1) + 1, that is, 2 s — 1. 

 Proceeding in this way we see that with a tower of n discs it 

 will require 2" — 1 transfers of single discs to effect the complete 

 transfer. Thus the eight discs of the puzzle will require 255 

 single transfers. It will be noticed that every alternate move 



