Hanoi Three-Peg Shortest State Path
Explore legal disk moves and see why a deceptively small puzzle needs exponentially many steps.
Free theory articleExplore legal disk moves and see why a deceptively small puzzle needs exponentially many steps.
Concept & interpretation
The Tower of Hanoi is a classic mathematical puzzle that perfectly illustrates recursive problem-solving and exponential growth. The objective is to move an entire stack of disks from one peg to another, subject to the rules that only one disk may be moved at a time, and a larger disk can never be placed on top of a smaller disk.
experiment
You can interact with the puzzle parameters to trace the shortest path and count available moves from any valid state. Using the interactive controls in the Hanoi Three-Peg Shortest State Path module:
- Set the Disks count to exactly 3.
- Adjust the Inspected moves select.
- Observe the visual graph and disk positions on pegs.
- Inspect the resulting Legal Neighbors to count the possible moves from the current state.