Tower of Hanoi is a mathematical game or puzzle. It is also called as Tower of Brahma that is known as “End of Universe” game.
The earliest recorded reference of “Tower of Hanoi” is in 1883 from Edouard Lucas who is a French mathematician. The game has interesting story;
In the great temple of Brahma in Benares of India, there is a brass plate with three diamond needles under the dome that marks the center of the world. At the creation, God placed 64 discs of pure gold in the order of their sizes, from largest to smallest. This is the Tower of Brahma.
Day and night unceasingly the priests of the temple move the discs from one diamond needle to another according to the fixed and immutable rules listed below;
When the all discs are moved from one needle to another one forming the Tower of Brahma but on a different needle, then will come the end of the universe and all will turn to dust.
If there are n discs on the Tower, minimum of 2n-1 moves are required. Since there are 64 discs in The Tower of Brahma, minimum required moves are 18,446,744,073,709,551,615. At one move per second with the assumption of right moves every time, reforming the Tower with 64 discs will take about;
THanoi Tower supports 30 discs in original game. The following table gives the minimum moves to solve the puzzle;