The Tower of Hanoi, the ideation around applying recurrence and solving the recurrence relation has been analyzed in depth in my previous post :
https://lnkd.in/gynGfHmdThe solution to the recurrence relation which helps us calculate the number of moves T(n) for moving n disks is :
T(n) = 2^n - 1 { n >= 0 }
French mathematician Edouard Lucas who proposed the Tower of Hanoi puzzle for 8 disks furnished this puzzle with a legend about a much larger Tower of Brahma which consisted of 64 disks of pure gold resting on 3 diamond needles. According to this legend, when time started God placed these 64 disks on one of the needle and tasked a group of priests to transfer the 64 disks to the third needle in accordance with the constraints that follow the same nature as the Tower of Hanoi puzzle. The legend mentions that when the task of the priests is completed, the Tower will crumble and the world will end.
The priests are still moving the disks because if we substitute n = 64 in the solution , the total number of moves is equal to 2^64 - 1 moves which is roughly 18 quintillion.
Even if the priests make 1 move in 1 microsecond, they will need more than 5000 centuries to transfer the Tower of Brahma. 😁
#recurrence #recursion #mathematics #towerofhanoi #discretemath #algorithms #softwareengineering #mythology #towerofbrahma
