The Tower of Hanoi: Edouard Lucas - 1883
The Tower of Hanoi: Edouard Lucas - 1883
1 2 3 A
1 2 3 4 A
1 2 3 4 5 A
1 2 3 4 5 6
However, the recursive pattern can help us generate more numbers to find an explicit (non-recursive) pattern. Here's how to find the number of moves needed to transfer larger numbers of disks from post A to post C, when M = the number of moves needed to transfer n-1 disks from post A to post C: for 1 disk it takes 1 move to transfer 1 disk from post A to post C;
for 2 disks, it will take 3 moves: 2M + 1 = 2(1) + 1 = 3 for 3 disks, it will take 7 moves: 2M + 1 = 2(3) + 1 = 7 for 4 disks, it will take 15 moves: 2M + 1 = 2(7) + 1 = 15 for 5 disks, it will take 31 moves: 2M + 1 = 2(15) + 1 = 31 for 6 disks... ?
Explicit Pattern
Number of Disks 1 2 3 4 5 6 Number of Moves 1 3 7 15 31 63
Fascinating fact
So the formula for finding the number of steps it takes to transfer n disks from post A to post C is:
2 n- 1
The number of separate transfers of single disks the priests must make to transfer the tower is 2 to the 64th minus 1, or 18,446,744,073,709,551,615 moves! If the priests worked day and night, making one move every second it would take slightly more than 580 billion years to accomplish the job! - far, far longer than some scientists estimate the solar system will last.