Wednesday, February 10, 2010

Tower of Hanoi




A week, or few days ago I had a privielege of going into the computer lab and play the game called, "Tower of Hanoi". www.mazeworks.com/hanoi (I wan't able to post a new post because for some reason I lost the data) The goal of the game is to move all the discs to the far right side with using certain amount of moves. The game itself was very confusing and seemed like it was beyond my intelligence level. However with our teacher Mr. Cheng, our 10 wing class had an opportunity to find out the pattern. We have decided to find out the formula that could determine how many moves it would take to finish the game with certain numbers of hanoi. So this was the pattern we found out:

11


23


37


415


531


663


7127


8255

.........

112047

124095

.........


and so on.

So do you see any pattern in the numbers above? You might have noticed that every number before one another was 2 times the number plus 1. So for example number 3, the equation would be something like 3(2)+1 which would equal to 7. So if we would replace the number with the variable x, the equation would be (2x)+1= y. The variable "Y" here is the out come. We also realized that all the numbers that were multiples of the number 4 all ended up with the number 5 at the end of each nubers. This was also very intersesting and this gave us and helped us predicting more accurately.


So, I did try up to 4 discs of Hanoi and I did do it after many attempts to succeed. However, I think I want to show you how to solve the 5 Hanoi with 31 moves. I mean the person who is willing to read my post has some brain to even read this post, because i've asked my friends to go on to my blog and they did not even bother clicking on the link I've sent them -_-. ANYWAYS, this is how you could solve the 5 discs of Hanoi.


The strategy of Tower of Hanoi is to move the smallest disc to the far right corner. Funny, how when you have to play with the odd number of hanois, the smallest disc always go to the far right corner. However, when you have to play with the even number of hanois, the smallest disc always go to the middle. Then move the second smallest to the middle. Then put the smallest on top of the second smallest disc in the middle. Then put the third biggest disc to the far right side. Next move the smallest disc in the middle on top of the second largest on the left. Next move the second smallest in the middle to third largest on top. Then put the smallest on top of the second smallest and creating a space in the middle. Next move the second largest to the middle. Then move the smallest one on top of the second largest one. Next move the second smallest one to the biggest disc and then so on.


It's quite hard to explain each step by step. Although you have to remember that the smallest has to move the most and usually end up being on top of the largest disc. So do keep that in mind. :)


You know what surprised me the most though? It was when Mr. Cheng told us about the legend about the Tower of Hanoi. The legend itself was quite ridiculous. Supposedly the world will end if anyone would solve the 64 discs of hanoi. To learn about this more, go to http://en.wikipedia.org/wiki/Tower_of_Hanoi. We found out that it will take about 18,446,744,073,709,551,615 to finish the puzzle 0_0. If someone can make a move every second, this person would have to live longer than Earth to finish the puzzle! It will take about millenums to finish. I think i would rather be reading the Bible and wait for the coming of the Christ -_-;;


Anyways I hope I didn't lose anybody here, because looking at the posts what i wrote above seems very unorganized and very complicated. I really encourage you to play the game of Tower of Hanoi and become part of the Math NERDS! =P

No comments:

Post a Comment