Tower of Hanoi
A puzzle with 3 pegs and n disks of different sizes: they all must move from one peg to another, 1 at a time and never placing a big one on a small one.
Example
With 3 disks it takes 7 moves; with 10, 1,023. It is always 2ⁿ − 1.
Test yourself: Tower of Hanoi
Tower of Hanoi
Which of these moves is forbidden?
Rule 3 requires the small one always on top: disk 3 can never go on disk 1.
Tower of Hanoi
With a single disk, f(1) is solved in ___ move.
It goes straight from A to C: 2¹ − 1 = 1.
Tower of Hanoi
With 3 disks, f(3) = 2 × f(2) + 1 = 2 × 3 + 1 = ___ moves.
2 × 3 + 1 = 7, which matches 2³ − 1 = 7.
0/3
▶ Play