Английская Википедия:Hanoi graph

Материал из Онлайн справочника
Перейти к навигацииПерейти к поиску

Шаблон:Short description

Файл:Hanoi-Graph-7.svg
The Hanoi graph <math>H^7_3</math>

In graph theory and recreational mathematics, the Hanoi graphs are undirected graphs whose vertices represent the possible states of the Tower of Hanoi puzzle, and whose edges represent allowable moves between pairs of states.

Construction

Файл:Sierpinski Pascal triangle.svg
The Hanoi graph <math>H^5_3</math> (black discs) derived from the odd values in Pascal's triangle

The puzzle consists of a set of disks of different sizes, placed in increasing order of size on a fixed set of towers. The Hanoi graph for a puzzle with <math>n</math> disks on <math>k</math> towers is denoted <math>H^n_k</math>.Шаблон:R Each state of the puzzle is determined by the choice of one tower for each disk, so the graph has <math>k^n</math> vertices.Шаблон:R

In the moves of the puzzle, the smallest disk on one tower is moved either to an unoccupied tower or to a tower whose smallest disk is larger. If there are <math>u</math> unoccupied towers, the number of allowable moves is

<math>\binom{k}{2}-\binom{u}{2},</math>

which ranges from a maximum of <math>\tbinom{k}{2}</math> (when <math>u</math> is zero or one and <math>\tbinom{u}{2}</math> is zero) to <math>k-1</math> (when all disks are on one tower and <math>u</math> is <math>k-1</math>). Therefore, the degrees of the vertices in the Hanoi graph range from a maximum of <math>\tbinom{k}{2}</math> to a minimum of <math>k-1</math>. The total number of edges isШаблон:R

<math>\frac{1}{2}\binom{k}{2}\bigl(k^n-(k-2)^n\bigr).</math>

For <math>k=0</math> (no disks) there is only one state of the puzzle and one vertex of the graph. For <math>k > 0</math>, the Hanoi graph <math>H^n_k</math> can be decomposed into <math>k</math> copies of the smaller Hanoi graph <math>H^{n-1}_k</math>, one for each placement of the largest disk. These copies are connected to each other only at states where the largest disk is free to move: it is the only disk in its tower, and some other tower is unoccupied.Шаблон:R

General properties

Файл:Tower of hanoi graph.svg
<math>H^3_3</math> with 12 edges deleted to yield a Hamiltonian cycle

Every Hanoi graph contains a Hamiltonian cycle.Шаблон:R

The Hanoi graph <math>H^1_k</math> is a complete graph on <math>k</math> vertices. Because they contain complete graphs, all larger Hanoi graphs <math>H^n_k</math> require at least <math>k</math> colors in any graph coloring. They may be colored with exactly <math>k</math> colors by summing the indexes of the towers containing each disk, and using the sum modulo <math>k</math> as the color.Шаблон:R

Three towers

A particular case of the Hanoi graphs that has been well studied since the work of Шаблон:HarvtxtШаблон:R is the case of the three-tower Hanoi graphs, <math>H^n_3</math>. These graphs have Шаблон:Math vertices (Шаблон:Oeis) and Шаблон:Math edges (Шаблон:Oeis).[1] They are penny graphs (the contact graphs of non-overlapping unit disks in the plane), with an arrangement of disks that resembles the Sierpinski triangle. One way of constructing this arrangement is to arrange the numbers of Pascal's triangle on the points of a hexagonal lattice, with unit spacing, and place a unit disk on each point whose number is odd. The diameter of these graphs, and the length of the solution to the standard form of the Tower of Hanoi puzzle (in which the disks all start on one tower and must all move to one other tower) is <math>2^{n}-1</math>.Шаблон:R

More than three towers

Шаблон:Unsolved

For <math>k > 3</math>, the structure of the Hanoi graphs is not as well understood, and the diameter of these graphs is unknown.Шаблон:R When <math>k > 4</math> and <math>n > 0</math> or when <math>k = 4</math> and <math>n > 2</math>, these graphs are nonplanar.Шаблон:R

See also

References

Шаблон:Reflist