Hanoi graph

Last updated
The Hanoi graph
H
3
7
{\displaystyle H_{3}^{7}} Hanoi-Graph-7.svg
The Hanoi graph

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.

Contents

Construction

The Hanoi graph
H
3
5
{\displaystyle H_{3}^{5}}
(black discs) derived from the odd values in Pascal's triangle Sierpinski Pascal triangle.svg
The Hanoi graph (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 disks on towers is denoted . [1] [2] Each state of the puzzle is determined by the choice of one tower for each disk, so the graph has vertices. [2]

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 unoccupied towers, the number of allowable moves is

which ranges from a maximum of (when is zero or one and is zero) to (when all disks are on one tower and is ). Therefore, the degrees of the vertices in the Hanoi graph range from a maximum of to a minimum of . The total number of edges is [3]

For (no disks) there is only one state of the puzzle and one vertex of the graph. For , the Hanoi graph can be decomposed into copies of the smaller Hanoi graph , 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. [4]

General properties

H
3
3
{\displaystyle H_{3}^{3}}
with 12 edges deleted to yield a Hamiltonian cycle Tower of hanoi graph.svg
with 12 edges deleted to yield a Hamiltonian cycle

Every Hanoi graph contains a Hamiltonian cycle. [5]

The Hanoi graph is a complete graph on vertices. Because they contain complete graphs, all larger Hanoi graphs require at least colors in any graph coloring. They may be colored with exactly colors by summing the indexes of the towers containing each disk, and using the sum modulo as the color. [3]

Three towers

A particular case of the Hanoi graphs that has been well studied since the work of Scorer, Grundy & Smith (1944) [1] [6] is the case of the three-tower Hanoi graphs, . These graphs have 3n vertices ( OEIS:  A000244 ) and 3(3n 1)/2 edges ( OEIS:  A029858 ). [7] 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 . [2]

More than three towers

Unsolved problem in mathematics:

What is the diameter of the graphs for ?

For , the structure of the Hanoi graphs is not as well understood, and the diameter of these graphs is unknown. [2] When and or when and , these graphs are nonplanar. [5]

See also

Related Research Articles

Binomial coefficient Number of subsets of a given size

In mathematics, the binomial coefficients are the positive integers that occur as coefficients in the binomial theorem. Commonly, a binomial coefficient is indexed by a pair of integers nk ≥ 0 and is written It is the coefficient of the xk term in the polynomial expansion of the binomial power (1 + x)n, and is given by the formula

Sierpiński triangle Fractal composed of triangles

The Sierpiński triangle, also called the Sierpiński gasket or Sierpiński sieve, is a fractal attractive fixed set with the overall shape of an equilateral triangle, subdivided recursively into smaller equilateral triangles. Originally constructed as a curve, this is one of the basic examples of self-similar sets—that is, it is a mathematically generated pattern that is reproducible at any magnification or reduction. It is named after the Polish mathematician Wacław Sierpiński, but appeared as a decorative pattern many centuries before the work of Sierpiński.

In mathematics, Pascal's triangle is a triangular array of the binomial coefficients that arises in probability theory, combinatorics, and algebra. In much of the Western world, it is named after the French mathematician Blaise Pascal, although other mathematicians studied it centuries before him in India, Persia, China, Germany, and Italy.

Tower of Hanoi Mathematical game or puzzle

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, thus approximating a conical shape. The objective of the puzzle is to move the entire stack to the last rod, obeying the following rules:

  1. Only one disk may be moved at a time.
  2. Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack or on an empty rod.
  3. No disk may be placed on top of a disk that is smaller than it.
Three utilities problem Mathematical puzzle of avoiding crossings

The classical mathematical puzzle known as the three utilities problem or sometimes water, gas and electricity asks for non-crossing connections to be drawn between three houses and three utility companies in the plane. When posing it in the early 20th century, Henry Dudeney wrote that it was already an old problem. It is an impossible puzzle: it is not possible to connect all nine lines without crossing. Versions of the problem on nonplanar surfaces such as a torus or Möbius strip, or that allow connections to pass through other houses or utilities, can be solved.

Menger sponge

In mathematics, the Menger sponge is a fractal curve. It is a three-dimensional generalization of the one-dimensional Cantor set and two-dimensional Sierpinski carpet. It was first described by Karl Menger in 1926, in his studies of the concept of topological dimension.

In graph theory, Turán's theorem bounds the number of edges that can be included in an undirected graph that does not have a complete subgraph of a given size. It is one of the central results of extremal graph theory, an area studying the largest or smallest graphs with given properties, and is a special case of the forbidden subgraph problem on the maximum number of edges in a graph that does not have a given subgraph.

Exact coloring

In graph theory, an exact coloring is a (proper) vertex coloring in which every pair of colors appears on exactly one pair of adjacent vertices. That is, it is a partition of the vertices of the graph into disjoint independent sets such that, for each pair of distinct independent sets in the partition, there is exactly one edge with endpoints in each set.

Tournament (graph theory)

A tournament is a directed graph (digraph) obtained by assigning a direction for each edge in an undirected complete graph. That is, it is an orientation of a complete graph, or equivalently a directed graph in which every pair of distinct vertices is connected by a directed edge with any one of the two possible orientations.

Kneser graph

In graph theory, the Kneser graphK(n, k) is the graph whose vertices correspond to the k-element subsets of a set of n elements, and where two vertices are adjacent if and only if the two corresponding sets are disjoint. Kneser graphs are named after Martin Kneser, who first investigated them in 1956.

Rooks graph Graph of chess rook moves

In graph theory, a rook's graph is a graph that represents all legal moves of the rook chess piece on a chessboard. Each vertex of a rook's graph represents a square on a chessboard, and each edge represents a legal move from one square to another. The same graphs can be defined mathematically as the Cartesian products of two complete graphs or as the line graphs of complete bipartite graphs.

Triangle-free graph Graph without triples of adjacent vertices

In the mathematical area of graph theory, a triangle-free graph is an undirected graph in which no three vertices form a triangle of edges. Triangle-free graphs may be equivalently defined as graphs with clique number ≤ 2, graphs with girth ≥ 4, graphs with no induced 3-cycle, or locally independent graphs.

Erdős–Rényi model Two closely related models for generating random graphs

In the mathematical field of graph theory, the Erdős–Rényi model is either of two closely related models for generating random graphs or the evolution of a random network. They are named after Hungarian mathematicians Paul Erdős and Alfréd Rényi, who first introduced one of the models in 1959, while Edgar Gilbert introduced the other model contemporaneously and independently of Erdős and Rényi. In the model of Erdős and Rényi, all graphs on a fixed vertex set with a fixed number of edges are equally likely; in the model introduced by Gilbert, also called the Erdős–Rényi–Gilbert model, each edge has a fixed probability of being present or absent, independently of the other edges. These models can be used in the probabilistic method to prove the existence of graphs satisfying various properties, or to provide a rigorous definition of what it means for a property to hold for almost all graphs.

In mathematics, a power of three is a number of the form 3n where n is an integer – that is, the result of exponentiation with number three as the base and integer n as the exponent.

Median graph Graph with a median for each three vertices

In graph theory, a division of mathematics, a median graph is an undirected graph in which every three vertices a, b, and c have a unique median: a vertex m(a,b,c) that belongs to shortest paths between each pair of a, b, and c.

Odd graph

In the mathematical field of graph theory, the odd graphsOn are a family of symmetric graphs with high odd girth, defined from certain set systems. They include and generalize the Petersen graph.

In the mathematics of structural rigidity, a rigidity matroid is a matroid that describes the number of degrees of freedom of an undirected graph with rigid edges of fixed lengths, embedded into Euclidean space. In a rigidity matroid for a graph with n vertices in d-dimensional space, a set of edges that defines a subgraph with k degrees of freedom has matroid rank dn − k. A set of edges is independent if and only if, for every edge in the set, removing the edge would increase the number of degrees of freedom of the remaining subgraph.

In graph theory, the graph removal lemma states that when a graph contains few copies of a given subgraph, then all of the copies can be eliminated by removing a small number of edges. The special case in which the subgraph is a triangle is known as the triangle removal lemma.

Locally linear graph Graph where every edge is in one triangle

In graph theory, a locally linear graph is an undirected graph in which every edge belongs to exactly one triangle. Equivalently, for each vertex of the graph, its neighbors are each adjacent to exactly one other neighbor, so the neighbors can be paired up into an induced matching. Locally linear graphs have also been called locally matched graphs.

<i>The Tower of Hanoi – Myths and Maths</i>

The Tower of Hanoi – Myths and Maths is a book in recreational mathematics, on the tower of Hanoi, baguenaudier, and related puzzles. It was written by Andreas M. Hinz, Sandi Klavžar, Uroš Milutinović, and Ciril Petr, and published in 2013 by Birkhäuser, with an expanded second edition in 2018. The Basic Library List Committee of the Mathematical Association of America has suggested its inclusion in undergraduate mathematics libraries.

References

  1. 1 2 Hinz, Andreas M.; Klavžar, Sandi; Petr, Ciril (2018), "2.3 Hanoi Graphs", The tower of Hanoi—myths and maths (2nd ed.), Cham: Birkhäuser, p. 120, doi:10.1007/978-3-319-73779-9, ISBN   978-3-319-73778-2, MR   3791459
  2. 1 2 3 4 Imrich, Wilfried; Klavžar, Sandi; Rall, Douglas F. (2008), "2.2 Hanoi Graphs", Topics in Graph Theory: Graphs and their Cartesian Product, Wellesley, MA: A K Peters, pp. 13–15, ISBN   978-1-56881-429-2, MR   2468851
  3. 1 2 Arett, Danielle; Dorée, Suzanne (2010), "Coloring and counting on the Tower of Hanoi graphs", Mathematics Magazine, 83 (3): 200–209, doi:10.4169/002557010X494841, MR   2668333, S2CID   120868360
  4. Stewart, Ian (2003), "Chapter 1: The Lion, the Llama, and the Lettuce", Another Fine Math You've Got Me Into, Mineola, NY: Dover Publications, ISBN   0-486-43181-9, MR   2046372
  5. 1 2 Hinz, Andreas M.; Parisse, Daniele (2002), "On the planarity of Hanoi graphs", Expositiones Mathematicae, 20 (3): 263–268, doi: 10.1016/S0723-0869(02)80023-8 , MR   1924112
  6. Scorer, R. S.; Grundy, P. M.; Smith, C. A. B. (July 1944), "Some binary games", The Mathematical Gazette, 28 (280): 96, doi:10.2307/3606393, JSTOR   3606393
  7. "Hanoi Graph".