Copyright © University of Cambridge. All rights reserved.

'Tower of Hanoi' printed from

Show menu

This problem is in two parts. The first part provides some building blocks which will help you to solve the final challenge. These can be attempted in any order. Of course, you are welcome to go straight to the Final Challenge without looking at the building blocks!

In this problem, you will be working on a famous mathematical puzzle called The Tower of Hanoi. There are three pegs, and on the first peg is a stack of discs of different sizes, arranged in order of descending size. The object of the game is to move all of the discs to another peg. However, only one disc can be moved at a time, and a disc cannot be placed on top of a smaller disc.

This interactivity shows the most efficient way of moving the discs from one end to the other:

Full Screen Version
This text is usually replaced by the Flash movie.

Click on a question below to get started:

Question A

Question B

Final Challenge