<Li> Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack . </Li> <Li> No disk may be placed on top of a smaller disk . </Li> <P> With 3 disks, the puzzle can be solved in 7 moves . The minimal number of moves required to solve a Tower of Hanoi puzzle is 2 − 1, where n is the number of disks . </P> <P> The puzzle was invented by the French mathematician Édouard Lucas in 1883 . There is a story about an Indian temple in Kashi Vishwanath which contains a large room with three time - worn posts in it, surrounded by 64 golden disks . Brahmin priests, acting out the command of an ancient prophecy, have been moving these disks in accordance with the immutable rules of Brahma since that time . The puzzle is therefore also known as the Tower of Brahma puzzle . According to the legend, when the last move of the puzzle is completed, the world will end . </P>

How many moves does it take to solve the tower of hanoi