Figure 2.3

The Tower of Hanoi problem. There are three pegs, A, B, and C, and five disks of different sizes, 1, 2, 3, 4, and 5, with holes in their centers so that they can be stacked on the pegs. Initially, the disks are all on Peg A, stacked in a pyramid. The goal is to move all the disks to peg C. Only the top disk on a peg can be moved, and it can never be placed on top of a smaller disk.