Thursday, February 4, 2010

Tower of Hanoi

In math we did this puzzle called tower of hanoi. The legend behind the tower of hanoi is that in an ancient Indian city, monks in a temple were asked to move a pile of 64 sacred gold disks from one location to another. The disks were fragile and so only one could be moved at a time and larger disks could not be placed on top of a smaller one. The monks began carrying the disks back and forth, between the original pile, the pile at the new location, and the intermediate location, always keeping the piles in order (largest on the bottom, smallest on the top). Legend has it that when the monks make the final move to complete the new pile in the new location, the temple will turn to dust and the whole world will end! In class we calculated that to move 64 disks you use the formula (2 to the power of n) -1. We found that if the monks move each disk per second it would take 590 billion years before they finish.
My strategy for Tower of Hanoi is that for even numbers of discs I put the littlest disc on the middle pole. For odd numbers of disks I put the littlest disc on the right pole. I also try and visualise my next move before I put a disc on a different pole. If I am totally stuck I just watch the solution and then try the puzzle once again. Another method for solving these puzzles is to move the disks in the same direction, (middle if there is an even number of disks and right if there is a odd number). If there is no tower in the direction it should be moved then move it to the opposite end but still continue to move in the proper direction (right or middle).

No comments:

Post a Comment