Move the whole tower to C
One disc at a time, never a bigger one on a smaller one.
Click a peg or press 1, 2, 3 to lift its top disc.
Why this move?
The solver thinks recursively: before a disc can reach its goal, every smaller disc has to get out of the way onto the third peg. The same rule then applies to those smaller discs.
- 3Disc 3 has to go from A to C.First discs 1 to 2 have to wait on B.
- 2Disc 2 has to go from A to B.First disc 1 has to wait on C.
- 1Disc 1 has to go from A to C.Next move
The next moves
- 1AC
- 2AB
- 1CB
- 3AC
- 1BA
- 2BC
- 1AC
Every disc doubles the work
n discs need at least 2ⁿ − 1 moves: move n − 1 discs aside, the biggest one once, then the n − 1 discs back on top of it.
With 64 discs, as in the legend: 18,446,744,073,709,551,615 moves. At one move per second that is about 585 billion years.
About this tool
A puzzle with a legend
The French mathematician Édouard Lucas published it in 1883, together with a story about priests moving 64 golden discs. When they finish, the world ends.
2ⁿ − 1 moves, never fewer
The biggest disc has to move at least once, and before and after that all the others have to move as a whole. That is why each extra disc doubles the work and adds one.
The smallest disc keeps going round
In the shortest solution the smallest disc moves on every second move, always round the pegs in the same direction. Watch it in the move list.
Learn more
Keyboard
- 123
- Lift or drop a disc on peg A, B or C
- Space
- Solver on or off
- →
- Next optimal move
- ←
- Undo the last move
- H
- Show a hint
- S
- Scramble the discs
- R
- Start over
- +-
- More or fewer discs