The Tower of Hanoi

This ancient puzzle poses two challenges. The First Challenge is to move the tower of blocks from one of the three places to another, one block at a time and never placing a larger block on top of a smaller one. The Second Challenge is to do this in the least number of moves.

The table below contains the game for you to play. You simply click on a block and then click on the area to which you want the block to move. Continue in this way until the tower has been moved. Better to select a low number of blocks to start out with by resetting with the "reset" button, because higher numbers require a lot of moves. When you have played a game, you can compare your number of moves to the correct answer by clicking the "answer" button.

A question, For any size tower, what is the least number of moves it takes to move the tower? (There is a very simple mathematical formula for this.) And, here is a true secret (well, it was up to this point): By distinguishing the blocks in a certain way, one can automatically generate the least number of moves in question by following a special visual rule. (Hint: Look at the given tower.) This rule accomplishes both challenges.

The JavaScript program that runs the game is my revision (especially the graphics and the counter) of a publicly available program written by Adam Stock.  (For some reason, the MS Internet Explorer browser does not display the moves under the "answer" button, but the number of moves does display properly.)





 Go to • VanderNat's Homepage
 Go to • VanderNat's Projects page

 Copyright 2003, A. vander Nat. All rights reserved. Email avande1@luc.edu. 08-2003