Tower of Hanoi
- Math
Maoni
About this simulation
This simulation shows the classic Tower of Hanoi puzzle being solved by a recursive algorithm. Students choose from three to eight discs and watch one disc move at a time without ever placing a larger disc on a smaller one. Readouts show the moves made, the minimum number of moves, which is 2 to the power n minus 1, and the current move. A restart button begins again, and the main speed slider changes the pace. It is a vivid way to teach recursion and exponential growth in computing and maths lessons.
What students can explore
- Start with 3 Discs and count the moves, then check the Minimum readout.
- Add one disc at a time up to 8 and write down how the minimum doubles and then adds one.
- Press Restart and watch how the largest disc moves only once.
- Slow the main Speed slider and say aloud which sub-problem each move belongs to.
- Predict the minimum for 6 Discs before looking at the readout.
Learning objectives
- 1Describe the recursive strategy for solving the Tower of Hanoi.
- 2Calculate the minimum number of moves as 2 to the power n minus 1.
- 3Explain why the number of moves doubles with each extra disc.
- 4Use a pattern in a table of results to make a prediction.
Questions teachers ask
Is it free to use?
Yes, with a free KiwiBee account. Sign up, then open the Tower of Hanoi simulation in any modern browser. Nothing to download.
What are the rules of the puzzle?
Move one disc at a time from one peg to another, and never place a larger disc on top of a smaller one. The goal is to move the whole stack from the first peg to the last.
How many moves does it take?
The minimum for n discs is 2 to the power n minus 1. That is 7 moves for 3 discs, 31 for 5 and 255 for 8, and the number roughly doubles every time you add a disc.
How do I use the Tower of Hanoi simulation?
Choose the number of Discs, press Restart, and watch the solver. Use the Speed slider to go faster or slower and compare the Moves made with the Minimum.
Embed this simulation
Drop it into your LMS, blog, or class site — free.
<iframe src="https://kiwibee.io/sw/simulations/tower-of-hanoi-3d-simulation/embed" title="Tower of Hanoi | KiwiBee" loading="lazy" allowfullscreen style="width:100%;height:min(70vh,620px);min-height:420px;border:0;border-radius:16px"></iframe>Bring interactive science into your classroom
KiwiBee's free teacher workspace brings lesson planning, worksheets, classroom tools, and gradebook together in one place.
Start free and create your first classTazama KiwiBee kwenye YouTube
Video fupi za KiwiBee kwa walimu na shule. Jiandikishe, au fuata KiwiBee popote ulipo.
