mathematical
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
field of
graph theory
In mathematics and computer science, graph theory is the study of ''graph (discrete mathematics), graphs'', which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of ''Vertex (graph ...
, a Hamiltonian path (or traceable path) is a
path
A path is a route for physical travel – see Trail.
Path or PATH may also refer to:
Physical paths of different types
* Bicycle path
* Bridle path, used by people on horseback
* Course (navigation), the intended path of a vehicle
* Desir ...
in an undirected or directed graph that visits each vertex exactly once. A Hamiltonian cycle (or Hamiltonian circuit) is a
cycle
Cycle, cycles, or cyclic may refer to:
Anthropology and social sciences
* Cyclic history, a theory of history
* Cyclical theory, a theory of American political history associated with Arthur Schlesinger, Sr.
* Social cycle, various cycles in ...
that visits each vertex exactly once. A Hamiltonian path that starts and ends at adjacent vertices can be completed by adding one more edge to form a Hamiltonian cycle, and removing any edge from a Hamiltonian cycle produces a Hamiltonian path. The computational problems of determining whether such paths and cycles exist in graphs are
NP-complete
In computational complexity theory, NP-complete problems are the hardest of the problems to which ''solutions'' can be verified ''quickly''.
Somewhat more precisely, a problem is NP-complete when:
# It is a decision problem, meaning that for any ...
; see
Hamiltonian path problem
The Hamiltonian path problem is a topic discussed in the fields of complexity theory and graph theory. It decides if a directed or undirected graph, ''G'', contains a Hamiltonian path, a path that visits every vertex in the graph exactly once. T ...
for details.
Hamiltonian paths and cycles are named after
William Rowan Hamilton
Sir William Rowan Hamilton (4 August 1805 – 2 September 1865) was an Irish astronomer, mathematician, and physicist who made numerous major contributions to abstract algebra, classical mechanics, and optics. His theoretical works and mathema ...
, who invented the
icosian game
The icosian game is a mathematical game invented in 1856 by Irish mathematician William Rowan Hamilton. It involves finding a Hamiltonian cycle on a dodecahedron, a polygon using edges of the dodecahedron that passes through all its vertex (geo ...
, now also known as ''Hamilton's puzzle'', which involves finding a Hamiltonian cycle in the edge graph of the
dodecahedron
In geometry, a dodecahedron (; ) or duodecahedron is any polyhedron with twelve flat faces. The most familiar dodecahedron is the regular dodecahedron with regular pentagons as faces, which is a Platonic solid. There are also three Kepler–Po ...
. Hamilton solved this problem using the
icosian calculus
The icosian calculus is a non-commutative algebraic structure discovered by the Irish mathematician William Rowan Hamilton in 1856.
In modern terms, he gave a group presentation of the icosahedral group, icosahedral rotation group by Generating se ...
, an
algebraic structure
In mathematics, an algebraic structure or algebraic system consists of a nonempty set ''A'' (called the underlying set, carrier set or domain), a collection of operations on ''A'' (typically binary operations such as addition and multiplicatio ...
based on
roots of unity
In mathematics, a root of unity is any complex number that yields 1 when raised to some positive integer power . Roots of unity are used in many branches of mathematics, and are especially important in number theory, the theory of group char ...
with many similarities to the
quaternion
In mathematics, the quaternion number system extends the complex numbers. Quaternions were first described by the Irish mathematician William Rowan Hamilton in 1843 and applied to mechanics in three-dimensional space. The algebra of quater ...
s (also invented by Hamilton). This solution does not generalize to arbitrary graphs.
Despite being named after Hamilton, Hamiltonian cycles in polyhedra had also been studied a year earlier by
Thomas Kirkman
Thomas Penyngton Kirkman FRS (31 March 1806 – 3 February 1895) was a British mathematician and ordained minister of the Church of England. Despite being primarily a churchman, he maintained an active interest in research-level mathematics, a ...
, who, in particular, gave an example of a polyhedron without Hamiltonian cycles. Even earlier, Hamiltonian cycles and paths in the
knight's graph
In graph theory, a knight's graph, or a knight's tour graph, is a graph that represents all legal moves of the knight chess piece on a chessboard. Each vertex of this graph represents a square of the chessboard, and each edge connects two square ...
of the
chessboard
A chessboard is a game board used to play chess. It consists of 64 squares, 8 rows by 8 columns, on which the chess pieces are placed. It is square in shape and uses two colours of squares, one light and one dark, in a chequered pattern. During p ...
, the
knight's tour
A knight's tour is a sequence of moves of a knight on a chessboard such that the knight visits every square exactly once. If the knight ends on a square that is one knight's move from the beginning square (so that it could tour the board again im ...
, had been studied in the 9th century in
Indian mathematics
Indian mathematics emerged in the Indian subcontinent from 1200 BCE until the end of the 18th century. In the classical period of Indian mathematics (400 CE to 1200 CE), important contributions were made by scholars like Aryabhata, Brahmagupta, ...
by
Rudrata
Rudrata (, ) () was a Kashmiri poet and literary theorist, who wrote a work called the ''Kavyalankara'' in the first quarter of the ninth century. Very little is known about Rudrata. From Namisadhu's commentary on the verses 12-14 of the fifth c ...
, and around the same time in
Islamic mathematics
Mathematics during the Golden Age of Islam, especially during the 9th and 10th centuries, was built upon syntheses of Greek mathematics (Euclid, Archimedes, Apollonius) and Indian mathematics (Aryabhata, Brahmagupta). Important developments of ...
by
al-Adli ar-Rumi
Al-Adli al-Rumi (), was an Arab player and theoretician of Shatranj, an ancient form of chess from Persia. Originally from Anatolia, he authored one of the first treatises on Shatranj in 842, called ''Kitab ash-shatranj'' ('Book of Chess').
He wa ...
. In 18th century Europe, knight's tours were published by
Abraham de Moivre
Abraham de Moivre FRS (; 26 May 166727 November 1754) was a French mathematician known for de Moivre's formula, a formula that links complex numbers and trigonometry, and for his work on the normal distribution and probability theory.
He move ...
and
Leonhard Euler
Leonhard Euler ( ; ; ; 15 April 170718 September 1783) was a Swiss polymath who was active as a mathematician, physicist, astronomer, logician, geographer, and engineer. He founded the studies of graph theory and topology and made influential ...
.
Definitions
A ''Hamiltonian path'' or ''traceable path'' is a
path
A path is a route for physical travel – see Trail.
Path or PATH may also refer to:
Physical paths of different types
* Bicycle path
* Bridle path, used by people on horseback
* Course (navigation), the intended path of a vehicle
* Desir ...
that visits each vertex of the graph exactly once. A graph that contains a Hamiltonian path is called a traceable graph. A graph is Hamiltonian-connected if for every pair of vertices there is a Hamiltonian path between the two vertices.
A ''Hamiltonian cycle'', ''Hamiltonian circuit'', ''vertex tour'' or ''graph cycle'' is a
cycle
Cycle, cycles, or cyclic may refer to:
Anthropology and social sciences
* Cyclic history, a theory of history
* Cyclical theory, a theory of American political history associated with Arthur Schlesinger, Sr.
* Social cycle, various cycles in ...
that visits each vertex exactly once. A graph that contains a Hamiltonian cycle is called a Hamiltonian graph.
Similar notions may be defined for '' directed graphs'', where each edge (arc) of a path or cycle can only be traced in a single direction (i.e., the vertices are connected with arrows and the edges traced "tail-to-head").
A
Hamiltonian decomposition
In graph theory, a branch of mathematics, a Hamiltonian decomposition of a given graph is a partition of the edges of the graph into Hamiltonian cycles. Hamiltonian decompositions have been studied both for undirected graphs and for directed grap ...
is an edge decomposition of a graph into Hamiltonian circuits.
A ''Hamilton maze'' is a type of logic puzzle in which the goal is to find the unique Hamiltonian cycle in a given graph.
Examples
* A
complete graph
In the mathematical field of graph theory, a complete graph is a simple undirected graph in which every pair of distinct vertices is connected by a unique edge. A complete digraph is a directed graph in which every pair of distinct vertices i ...
with more than two vertices is Hamiltonian
* Every
cycle graph
In graph theory, a cycle graph or circular graph is a graph that consists of a single cycle, or in other words, some number of vertices (at least 3, if the graph is simple) connected in a closed chain. The cycle graph with vertices is called ...
is Hamiltonian
* Every
tournament
A tournament is a competition involving at least three competitors, all participating in a sport or game. More specifically, the term may be used in either of two overlapping senses:
# One or more competitions held at a single venue and concen ...
has an odd number of Hamiltonian paths ( Rédei 1934)
* Every
platonic solid
In geometry, a Platonic solid is a Convex polytope, convex, regular polyhedron in three-dimensional space, three-dimensional Euclidean space. Being a regular polyhedron means that the face (geometry), faces are congruence (geometry), congruent (id ...
, considered as a graph, is Hamiltonian
* The
Cayley graph
In mathematics, a Cayley graph, also known as a Cayley color graph, Cayley diagram, group diagram, or color group, is a Graph (discrete mathematics), graph that encodes the abstract structure of a group (mathematics), group. Its definition is sug ...
of a finite
Coxeter group
In mathematics, a Coxeter group, named after H. S. M. Coxeter, is an abstract group that admits a formal description in terms of reflections (or kaleidoscopic mirrors). Indeed, the finite Coxeter groups are precisely the finite Euclidean ref ...
is Hamiltonian (For more information on Hamiltonian paths in Cayley graphs, see the
Lovász conjecture
In graph theory, the Lovász conjecture (1969) is a classical problem on Hamiltonian paths in graphs. It says:
: Every finite connected vertex-transitive graph contains a Hamiltonian path.
Originally László Lovász stated the problem in the opp ...
.)
*
Cayley graph
In mathematics, a Cayley graph, also known as a Cayley color graph, Cayley diagram, group diagram, or color group, is a Graph (discrete mathematics), graph that encodes the abstract structure of a group (mathematics), group. Its definition is sug ...
s on
nilpotent group
In mathematics, specifically group theory, a nilpotent group ''G'' is a group that has an upper central series that terminates with ''G''. Equivalently, it has a central series of finite length or its lower central series terminates with .
I ...
s with cyclic
commutator subgroup
In mathematics, more specifically in abstract algebra, the commutator subgroup or derived subgroup of a group is the subgroup generated by all the commutators of the group.
The commutator subgroup is important because it is the smallest normal ...
are Hamiltonian.
* The
flip graph
In mathematics, a flip graph is a graph whose vertices are combinatorial or geometric objects, and whose edges link two of these objects when they can be obtained from one another by an elementary operation called a flip. Flip graphs are speci ...
of a convex polygon or equivalently, the rotation graph of
binary tree
In computer science, a binary tree is a tree data structure in which each node has at most two children, referred to as the ''left child'' and the ''right child''. That is, it is a ''k''-ary tree with . A recursive definition using set theor ...
s, is Hamiltonian.
Properties
Any Hamiltonian cycle can be converted to a Hamiltonian path by removing one of its edges, but a Hamiltonian path can be extended to a Hamiltonian cycle only if its endpoints are adjacent.
All Hamiltonian graphs are biconnected, but a biconnected graph need not be Hamiltonian (see, for example, the
Petersen graph
In the mathematical field of graph theory, the Petersen graph is an undirected graph with 10 vertices and 15 edges. It is a small graph that serves as a useful example and counterexample for many problems in graph theory. The Petersen graph i ...
).
An
Eulerian graph
In graph theory, an Eulerian trail (or Eulerian path) is a trail in a finite graph that visits every edge exactly once (allowing for revisiting vertices). Similarly, an Eulerian circuit or Eulerian cycle is an Eulerian trail that starts and ends ...
(a
connected graph
In mathematics and computer science, connectivity is one of the basic concepts of graph theory: it asks for the minimum number of elements (nodes or edges) that need to be removed to separate the remaining nodes into two or more isolated subgrap ...
in which every vertex has even degree) necessarily has an Euler tour, a closed walk passing through each edge of exactly once. This tour corresponds to a Hamiltonian cycle in the
line graph
In the mathematics, mathematical discipline of graph theory, the line graph of an undirected graph is another graph that represents the adjacencies between edge (graph theory), edges of . is constructed in the following way: for each edge i ...
, so the line graph of every Eulerian graph is Hamiltonian. Line graphs may have other Hamiltonian cycles that do not correspond to Euler tours, and in particular the line graph of every Hamiltonian graph is itself Hamiltonian, regardless of whether the graph is Eulerian.
A
tournament
A tournament is a competition involving at least three competitors, all participating in a sport or game. More specifically, the term may be used in either of two overlapping senses:
# One or more competitions held at a single venue and concen ...
(with more than two vertices) is Hamiltonian if and only if it is
strongly connected
In the mathematical theory of directed graphs, a graph is said to be strongly connected if every vertex is reachable from every other vertex. The strongly connected components of a directed graph form a partition into subgraphs that are thems ...
.
The number of different Hamiltonian cycles in a complete undirected graph on vertices is and in a complete directed graph on vertices is . These counts assume that cycles that are the same apart from their starting point are not counted separately.
Bondy–Chvátal theorem
The best vertex degree characterization of Hamiltonian graphs was provided in 1972 by the
Bondy
Bondy () is a commune in the northeastern suburbs of Paris, France. It is located from the centre of Paris, in the Seine-Saint-Denis department.
Name
The name Bondy was recorded for the first time around AD 600 as ''Bonitiacum'', meaning " ...
– Chvátal theorem, which generalizes earlier results by G. A. Dirac (1952) and
Øystein Ore
Øystein Ore (7 October 1899 – 13 August 1968) was a Norwegian mathematician known for his work in ring theory, Galois connections, graph theory, and the history of mathematics.
Life
Ore graduated from the University of Oslo in 1922, with a ...
. Both Dirac's and Ore's theorems can also be derived from Pósa's theorem (1962). Hamiltonicity has been widely studied with relation to various parameters such as graph
density
Density (volumetric mass density or specific mass) is the ratio of a substance's mass to its volume. The symbol most often used for density is ''ρ'' (the lower case Greek letter rho), although the Latin letter ''D'' (or ''d'') can also be u ...
,
toughness
In materials science and metallurgy, toughness is the ability of a material to absorb energy and plastically deform without fracturing.forbidden subgraphs and
distance
Distance is a numerical or occasionally qualitative measurement of how far apart objects, points, people, or ideas are. In physics or everyday usage, distance may refer to a physical length or an estimation based on other criteria (e.g. "two co ...
among other parameters. Dirac and Ore's theorems basically state that a graph is Hamiltonian if it has ''enough edges''.
The Bondy–Chvátal theorem operates on the closure of a graph with vertices, obtained by repeatedly adding a new edge connecting a nonadjacent pair of vertices and with until no more pairs with this property can be found.
As complete graphs are Hamiltonian, all graphs whose closure is complete are Hamiltonian, which is the content of the following earlier theorems by Dirac and Ore.
The following theorems can be regarded as directed versions:
The number of vertices must be doubled because each undirected edge corresponds to two directed arcs and thus the degree of a vertex in the directed graph is twice the degree in the undirected graph.
The above theorem can only recognize the existence of a Hamiltonian path in a graph and not a Hamiltonian Cycle.
Many of these results have analogues for balanced
bipartite graph
In the mathematics, mathematical field of graph theory, a bipartite graph (or bigraph) is a Graph (discrete mathematics), graph whose vertex (graph theory), vertices can be divided into two disjoint sets, disjoint and Independent set (graph theo ...
s, in which the vertex degrees are compared to the number of vertices on a single side of the bipartition rather than the number of vertices in the whole graph.
Existence of Hamiltonian cycles in planar graphs
The Hamiltonian cycle polynomial
An algebraic representation of the Hamiltonian cycles of a given weighted digraph (whose arcs are assigned weights from a certain ground field) is the Hamiltonian cycle polynomial of its weighted adjacency matrix defined as the sum of the products of the arc weights of the digraph's Hamiltonian cycles. This polynomial is not identically zero as a function in the arc weights if and only if the digraph is Hamiltonian. The relationship between the computational complexities of computing it and
computing the permanent
In linear algebra, the computation of the permanent of a matrix is a problem that is thought to be more difficult than the computation of the determinant of a matrix despite the apparent similarity of the definitions.
The permanent is defined sim ...
was shown by Grigoriy Kogan.
See also
*
Barnette's conjecture
Barnette's conjecture is an conjecture, unsolved problem in graph theory, a branch of mathematics, concerning Hamiltonian cycles in graphs. It is named after David W. Barnette, a professor emeritus at the University of California, Davis; it state ...
, an open problem on Hamiltonicity of cubic bipartite
polyhedral graph
In geometric graph theory, a branch of mathematics, a polyhedral graph is the undirected graph formed from the Vertex (geometry), vertices and Edge (geometry), edges of a convex polyhedron. Alternatively, in purely graph-theoretic terms, the polyh ...
s
*
Eulerian path
In graph theory, an Eulerian trail (or Eulerian path) is a trail (graph theory), trail in a finite graph (discrete mathematics), graph that visits every edge (graph theory), edge exactly once (allowing for revisiting vertices). Similarly, an Eule ...
, a path through all edges in a graph
*
Fleischner's theorem
In graph theory, a branch of mathematics, Fleischner's theorem gives a sufficient condition for a graph to contain a Hamiltonian cycle. It states that, if G is a 2-vertex-connected graph, then the square of G is Hamiltonian. It is named after H ...
Gray code
The reflected binary code (RBC), also known as reflected binary (RB) or Gray code after Frank Gray (researcher), Frank Gray, is an ordering of the binary numeral system such that two successive values differ in only one bit (binary digit).
For ...
*
Grinberg's theorem
In graph theory, Grinberg's theorem is a necessary condition for a planar graph to contain a Hamiltonian cycle, based on the lengths of its face cycles. If a graph does not meet this condition, it is not Hamiltonian. The result has been widely use ...
giving a necessary condition for
planar graph
In graph theory, a planar graph is a graph (discrete mathematics), graph that can be graph embedding, embedded in the plane (geometry), plane, i.e., it can be drawn on the plane in such a way that its edges intersect only at their endpoints. ...
s to have a Hamiltonian cycle
*
Hamiltonian path problem
The Hamiltonian path problem is a topic discussed in the fields of complexity theory and graph theory. It decides if a directed or undirected graph, ''G'', contains a Hamiltonian path, a path that visits every vertex in the graph exactly once. T ...
, the computational problem of finding Hamiltonian paths
*
Hypohamiltonian graph
In the mathematics, mathematical field of graph theory, a graph (discrete mathematics), graph ''G'' is said to be hypohamiltonian if ''G'' itself does not have a Hamiltonian cycle but every graph formed by removing a single vertex from ''G'' is H ...
, a non-Hamiltonian graph in which every vertex-deleted subgraph is Hamiltonian
*
Knight's tour
A knight's tour is a sequence of moves of a knight on a chessboard such that the knight visits every square exactly once. If the knight ends on a square that is one knight's move from the beginning square (so that it could tour the board again im ...
, a Hamiltonian cycle in the
knight's graph
In graph theory, a knight's graph, or a knight's tour graph, is a graph that represents all legal moves of the knight chess piece on a chessboard. Each vertex of this graph represents a square of the chessboard, and each edge connects two square ...
*
LCF notation
In the mathematical field of graph theory, LCF notation or LCF code is a notation devised by Joshua Lederberg, and extended by Harold Scott MacDonald Coxeter, H. S. M. Coxeter and Robert Frucht, for the representation of cubic graphs that contain ...
for Hamiltonian
cubic graph
In the mathematical field of graph theory, a cubic graph is a graph in which all vertices have degree three. In other words, a cubic graph is a 3-regular graph. Cubic graphs are also called trivalent graphs.
A bicubic graph is a cubic bip ...
s.
*
Lovász conjecture
In graph theory, the Lovász conjecture (1969) is a classical problem on Hamiltonian paths in graphs. It says:
: Every finite connected vertex-transitive graph contains a Hamiltonian path.
Originally László Lovász stated the problem in the opp ...
that
vertex-transitive graph
In the mathematics, mathematical field of graph theory, an Graph automorphism, automorphism is a permutation of the Vertex (graph theory), vertices such that edges are mapped to edges and non-edges are mapped to non-edges. A graph is a vertex-tr ...
s are Hamiltonian
*
Pancyclic graph
In the mathematical study of graph theory, a pancyclic graph is a directed graph or undirected graph that contains cycles of all possible lengths from three up to the number of vertices in the graph.. Pancyclic graphs are a generalization of Ha ...
, graphs with cycles of all lengths including a Hamiltonian cycle
*
Panconnectivity
In graph theory, a panconnected graph is an undirected graph in which, for every two vertex (graph theory), vertices and , there exist path (graph theory), paths from to of every possible length from the distance up to , where is the number o ...
, a strengthening of both pancyclicity and Hamiltonian-connectedness
*
Seven Bridges of Königsberg
The Seven Bridges of Königsberg is a historically notable problem in mathematics. Its negative resolution by Leonhard Euler, in 1736, laid the foundations of graph theory and prefigured the idea of topology.
The city of Königsberg in Prussia ...
*
Shortness exponent In graph theory, the shortness exponent is a numerical parameter of a family of graphs that measures how far from Hamiltonian the graphs in the family can be. Intuitively, if e is the shortness exponent of a graph family , then every n-vertex graph ...
, a numerical measure of how far from Hamiltonian the graphs in a family can be
*
Snake-in-the-box
The snake-in-the-box problem in graph theory and computer science deals with finding a certain kind of path along the edges of a hypercube. This path starts at one corner and travels along the edges to as many corners as it can reach. After it g ...
, the longest
induced path
In the mathematical area of graph theory, an induced path in an undirected graph is a path that is an induced subgraph of . That is, it is a sequence of vertices in such that each two adjacent vertices in the sequence are connected by an edge ...
in a hypercube
*
Steinhaus–Johnson–Trotter algorithm
The Steinhaus–Johnson–Trotter algorithm or Johnson–Trotter algorithm, also called plain changes, is an algorithm named after Hugo Steinhaus, Selmer M. Johnson and Hale F. Trotter that generates all of the permutations of n elements. Eac ...
for finding a Hamiltonian path in a
permutohedron
In mathematics, the permutohedron (also spelled permutahedron) of order is an -dimensional polytope embedded in an -dimensional space. Its vertex (geometry), vertex coordinates (labels) are the permutations of the first natural numbers. The edg ...
*
Subhamiltonian graph
In graph theory and graph drawing, a subhamiltonian graph is a subgraph of a planar Hamiltonian graph..
Definition
A graph ''G'' is subhamiltonian if ''G'' is a subgraph of another graph aug(''G'') on the same vertex set, such that aug(''G'') is ...
Tait's conjecture
In mathematics, Tait's conjecture states that "Every K-vertex-connected graph, 3-connected Planar graph, planar cubic graph has a Hamiltonian cycle (along the edges) through all its Vertex (geometry), vertices". It was proposed by and disproved b ...
(now known false) that 3-regular
polyhedral graph
In geometric graph theory, a branch of mathematics, a polyhedral graph is the undirected graph formed from the Vertex (geometry), vertices and Edge (geometry), edges of a convex polyhedron. Alternatively, in purely graph-theoretic terms, the polyh ...
s are Hamiltonian
*
Travelling salesman problem
In the Computational complexity theory, theory of computational complexity, the travelling salesman problem (TSP) asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest possible ...