Towers of Hanoi

views updated

Towers of Hanoi An ancient problem supposedly devised by a Vietnamese emperor to help with the selection of an advisor. It may be stated as follows. Three poles (labeled A, B, and C) stand vertically on the ground. Pole A holds a set of circular disks all of differing radii; from the ground up these disks are positioned in decreasing order of radius size. The problem is to move the disks to pole C by means of a series of moves, each involving the transfer of a disk from one pole to another, with the constraint that at any time all disks on any one pole are situated in decreasing order of radius when viewed from the ground up. This problem has a solution that has a particularly appealing recursive solution.