Hanoi Towers with 64 disks

There are several versions of the legend, but all of them say that the end of the world will be reached as soon as all the disks are moved from the source peg to the destination one. Then, the following Java implementation of the Hanoi Towers in an applet with 64 disks can be considered a count down to the end of the world, :).

The puzzle consists in moving all the disks from the source peg to the destination one. Only one disk can be moved in each movement, and a bigger disk can’t ever moved on a smaller one.

The minimum number of movements needed for n disks are 2n-1, the, with 64 disks and moving one disk each second, the puzzle solution would last 585.442 billions years (calculus fromWikipedia).

This would be the actual position of the disks if the execution would have started on 1883, when the puzzle was ivented by Édouard Lucas.










No comments: