Card & Tabletop Games Codexery

Tower of Hanoi

A mathematical puzzle of disks and rods.

Tower of Hanoi

The Tower of Hanoi is a mathematical game or puzzle consisting of three rods and a number of disks of various diameters, which can slide onto any rod. The puzzle begins with the disks stacked on one rod in order of decreasing size, the smallest at the top, approximating a conical shape. The objective is to move the entire stack to one of the other rods, obeying specific rules. The puzzle game was named after the capital city of today's Vietnam.

Inventor
Édouard Lucas
Field
Mathematics
Nationality
French
Known for
Tower of Hanoi puzzle
Minimum moves formula
2^n − 1 (where n is the number of disks)

Lore & Background

Accompanying the game was an instruction booklet, describing the game's purported origins in Tonkin, and claiming that according to legend, Brahmins at a temple in Benares have been carrying out the movement of the 'Sacred Tower of Brahma', consisting of 64 golden disks, according to the same rules as in the game, and that the completion of the tower would lead to the end of the world. Numerous variations on this legend exist, regarding the ancient and mystical nature of the puzzle.

Reader's Guide

The Tower of Hanoi is significant as a classic mathematical puzzle that illustrates key concepts in recursion and algorithm design. The minimum number of moves required to solve a Tower of Hanoi puzzle with n disks is 2^n − 1. With three disks, the puzzle can be solved in seven moves. The puzzle has iterative and recursive solutions; the recursive solution is often used as an example when teaching programming. The puzzle's legend claims that Brahmins at a temple in Benares have been moving a 'Sacred Tower of Brahma' of 64 golden disks, and that completion would end the world. The puzzle has many variations in back stories, with the temple sometimes being a monastery, the priests being monks, and the location varying, including Hanoi.

Did You Know?

More in Card & Tabletop Games 1-24

Elsewhere in the Card & Tabletop Games universe

Spotted an error? Know more?

This is a living reference — every entry is fact-audited, and reader corrections feed straight into our audit queue. Suggest an edit · See this site's audit record

Comments

Loading…
Open in the interactive codex →