We discuss a version of the Tower of Hanoi puzzle in which there are four pegs rather than three. The fourpeg puzzle provides a rich source of exercises (samples of which are included) for students after the familiar three-peg version has been presented. We give an algorithm that solves the four-peg puzzle in the claimed minimum number of moves (see [2, 4]). Our algorithm solves the four-peg puzzle in
O
-(4
√n
) moves whereas the best algorithm for the three-peg puzzle requires 2
n
- 1 moves. As far as we know, the minimum number of moves required to solve the four-peg puzzle is an open question.
A tiling problem is presented that demonstrates the power of recursion in the design of algorithms. When implemented as a program, the solution can be shown using a computer graphics display.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.