-
Essay / Towers of Hanoi - 585
Towers of HanoiIntroduction============During this course, we were asked to study the towers of Hanoi. Towers of Hanoi is a simple game in which you must move a stack of 3, 4, 5 or any other number of disks (1, 2, 3, etc.) of decreasing radii from 1 of the 3 poles to another pole ( A, B, C). You can only move one disk at a time and you cannot place a larger disk on top of a smaller disk. You should also complete this task with as few movements as possible. Our ultimate task was to complete the game with 4 discs then 5 discs using the smallest number of moves, then find a formula to find the smallest number of moves for any number of discs. .Simple cases:=============4 disks=======After trying to solve the puzzle with 4 disks, I found that the smallest possible number of moves was of 15. (See fig.1) 5 discs To try to make things a little easier for myself, I decided to use the first 15 shots that I had used for 4 discs and then continue from there. This method was effective and led me to notice that the lowest number of moves was 31. (See fig. 2)Results and formulas================== ==Number of disks---------------Number of moves112337415531When placing all results in an array. I noticed that if you take a certain number of moves, say 3, then double it, you get 6. Then you just add another 1 to make 7, which is the next number of moves . This works for any number of moves to find the next number of moves. To simplify my results, I produced a formula as shown below.