Welcome to NRICH.

 
Towers of Hanoi


By Battle Library on December 5, 1997:

Towers of Hanoi? Solutions please.


By Sujata:

For a beautiful illustration of the problem and an interactive solution to moving 4 disks on 3 posts, please visit: (Your browser will need to be Java enabled):

http://www.cut-the-knot.com/recurrence/hanoi.html

With 3 towers, for N number of disks, the formula for the minimum number of moves to complete the puzzle correctly is 2N - 1.

[If you are doing this problem as coursework, please note that you will not get any credit for this formula if you don't explain how you got it! - The Editor]

Hope this helps!

Sujata.


By The Editor:

Another site, which also includes some hints about analysing the problem, is here.