The Tower of Hanoi — Brahma’s Discs
In the beginning, the universe was created. This has made a lot of people very angry and has been widely regarded as a bad move — Douglas Adams
The Tower of Hanoi is a popular math puzzle that was introduced to the west in the 19th century by a French Mathematician, Èdouard Lucas, after being inspired by the Kashi Vishwanath temple in India. The puzzle involves three simple rules that are to be followed through the process of solving, and arrive at a number (number of steps) once it’s completed. And through this process, one will find a recurrence in the steps, that can be tackled with iterations if it needs to be solved mathematically, or through a computer.
The puzzle consists of three rods, and a certain number of discs that are uneven in size, placed in ascending order on the first rod.
The rules of the game are:
· Transfer all pieces from Rod 1 to Rod 3 using Rod 2 as auxiliary
· Only one disk can be transferred in one move
· A disk can be placed either on an empty rod or on top of a disk that’s bigger than itself
An interesting thing about this is that the number of disks used determines the minimum number of moves it will take to complete the game.
Yes! You read that right. As you solve the puzzle, you might notice an iterative pattern. This pattern, once recognized, can be used to derive a formula, that is representative of the number of steps required to complete the game, with respect to the number of disks used.
It goes by:
(2^n) — 1 (Two raised to the power “n” minus one)
Meaning, one less than the value of 2 raised to the power of the number of disks.
For example, let’s say you use 5 discs. Then, according to the formula mentioned above, the number of moves to be made is 2⁵-1 = 31 moves. These iterations can be programmed into a computer and make it solve the puzzle when the number of moves is too high to be solved manually.
Check out how the number increases exponentially with a steady increase in the value of “n”:
n=1 gives 1 move
n=2 gives 3 moves
n=3 gives 7 moves
n=4 gives 15 moves
n=5 gives 31 moves
n=6 gives 63 moves, and so on —
Now, associate one second for every move. Assuming you solve it in the minimum number of moves possible, don't commit any mistakes along the way, and work on solving it without a break, then a puzzle involving 25 discs would take you 33554431 seconds. That approximates to 388 days, a little over a year.
So, how many years do you think solving with 64 discs would take?
Considering the abovementioned assumptions, it would take 2⁶⁴ — 1 seconds to solve the Hanoi puzzle. This equates to 1.85x10¹⁹ seconds, that's about 585x10⁹ years. That’s 585 Billion Years. According to the observations made by the CMB, the universe is currently about 13.8 billion years old. So, that means, it would take, at least another 42 times the current age of the universe to reach 585 Billion years and to solve the puzzle.
This entire universe is built on specific patterns that can be recognized at very high levels (mathematically). One such pattern is the number 42. In the movie A Hitchhiker’s Guide to the Galaxy, the answer to life, the universe, and everything is given as 42. Although mathematically, there hasn’t been any proof that it is the ultimate answer, it is widely accepted in the fictional world.
In the Kashi Vishwanath temple in India, legend says that there is a large room that contains giant structures of this puzzle. It is believed that the priests make one move per day, and it would take trillions of years to be completed. And once it is completed, it is said that the universe cycle will end, i.e. the life of Brahma, which is calculated to be around 300 trillion years.
The story behind the creation of the Tower of Brahma
According to the Rig Veda, in a clash between the Devtas and Asuras, the Devtas approached Lord Shiva as the Asuras were causing trouble. Lord Shiva then approached Lord Brahma regarding this, for which he came up with a solution. Create three different Lokas —
Aakash Loka (where Devtas reside)
Dharti Loka (where humans reside)
Paatala Loka (where Asuras reside)
Lord Brahma placed one tower, made of diamond, in each of these Lokas, and 64 golden disks in the Aakash Loka. The Devtas were assigned the task of transferring the disk, following the same rules, to the Paatala Loka. And upon its completion, the cycle of Lord Brahma himself, ends.
The reason why it is called the “Tower of Hanoi” is because a Buddhist temple in the city of Hanoi, Vietnam, carried a similar puzzle, where a Buddhist priest makes one move a day. But, the fact that it uses the Hindu numeral system and math resembles Hindu artithmetics, the Tower of Brahma puzzle leads to astoundingly large numbers, and such numbers were only found in Hindu scriptures in the ancient times. So, it must have originated from India.