Professional Documents
Culture Documents
While it would be easy to make a general definition of "Hamiltonian" that goes either way
as far as the singleton graph is concerned, defining "Hamiltonian" to mean "has a
Hamiltonian cycle" and taking "Hamiltonian cycles" to be a subset of "cycles" in general
would lead to the convention that the singleton graph is non hamiltonian (B. McKay, pers.
com, Oct. 11, 2006). However, by convention, the singleton graph is generally considered
to be Hamiltonian (B. McKay, pers. comm., Mar. 22, 2007). The convention in this work
and in GraphData is that is Hamiltonian, while is non hamiltonian.
The numbers of simple Hamiltonian graphs on nodes for n=1, 2, ... are then given by 1,
0, 1, 3, 8, 48, 383, 6196, 177083, ... (OEIS A003216).
All Hamiltonian graphs are biconnected, although the converse is not true (Skiena 1990,
p. 197). Any bipartite graph with unbalanced vertex parity is not Hamiltonian.
If the sums of the degrees of nonadjacent vertices in a graph is greater than the number
of nodes for all subsets of nonadjacent vertices, then is Hamiltonian (Ore 1960;
Skiena 1990, p. 197).
All planar 4-connected graphs have Hamiltonian cycles, but not all polyhedral graphs do.
For example, the smallest polyhedral graph that is not Hamiltonian is the Herschel
graph on 11 nodes.
Through a graph that visits each node exactly once (Skiena 1990, p. 196). A graph
possessing a Hamiltonian cycle is said to be a Hamiltonian graph. By convention,
the singleton graph is considered to be Hamiltonian even though it does not poses a
Hamiltonian cycle, while the connected graph on two nodes is not.
The Hamiltonian cycle is named after Sir William Rowan Hamilton, who devised a puzzle
in which such a path along the polyhedron edges of an dodecahedron was sought
(the Icosian game).
Precomputed lists of Hamiltonian cycles for many named graphs can be obtained
using Graph Data [graph, "Hamiltonian Cycles"]. Precomputed counts of the
corresponding number of Hamiltonian cycles may similarly be obtained using Graph Data
[graph, "Hamiltonian Cycle Count"].
The total numbers of directed Hamiltonian cycles for all simple graphs of orders , 2,
... are 0, 0, 2, 10, 58, 616, 9932, 333386, 25153932, 4548577688, ... (OEIS A124964).
In general, the problem of finding a Hamiltonian cycle is NP-complete (Karp 1972; Garey
and Johnson 1983, p. 199), so the only known way to determine whether a given
general graph has a Hamiltonian cycle is to undertake an exhaustive search. Rubin
(1974) describes an efficient search procedure that can find some or all Hamilton paths
and circuits in a graph using deductions that greatly reduce backtracking and guesswork.
A probabilistic algorithm due to Angluin and Valiant (1979), described by Wilf (1994), can
also be useful to find Hamiltonian cycles and paths.
Khomenko and Golovko (1972) gave a formula giving the number of graph cycles of any
length, but its computation requires computing and performing matrix operations involving
all subsets up to size , making it computationally expensive. A greatly simplified and
improved version of the Khomenko and Golovko formula for the special case of -cycles
(i.e., Hamiltonian cycles) gives
where is the th matrix power of the submatrix of the adjacency matrix with the
subset of rows and columns deleted (Perepechko and Voropaev).
Closed forms for some of these classes of graphs are summarized in the following
table, where , , and are the roots of and is a modified Bessel
function of the second kind.
Graph Formula
Antiprism graph
Complete graph
Crown graph
Cycle graph 1
Hanoi graph 1
Ladder graph 1
Möbius ladder
Prism graph
Sun graph 1
Wheel graph
Hamilonian Path – A simple path in a graph that passes through every vertex exactly
once is called a Hamiltonian path.
Hamilonian Circuit – A simple circuit in a graph that passes through every vertex exactly
once is called a Hamiltonian circuit.
Unlike Euler paths and circuits, there is no simple necessary and sufficient criteria to
determine if there are any Hamiltonian paths or circuits in a graph. But there are certain
criteria which rule out the existence of a Hamiltonian circuit in a graph, such as- if there
is a vertex of degree one in a graph then it is impossible for it to have a Hamiltonian circuit.
There are certain theorems which give sufficient but not necessary conditions for the
existence of Hamiltonian graphs.
Dirac’s Theorem- “If is a simple graph with vertices with such that the degree of
eververtex in is at least then has a Hamiltonian circuit.”
Ore’s Theorem- “If is a simple graph with vertices with such that for every pair of non-
adjacent vertices and in, then has a Hamiltonian circuit.”
As mentioned above that the above theorems are sufficient but not necessary conditions
for the existence of a Hamiltonian circuit in a graph, there are certain graphs which have
a Hamiltonian circuit but do not follow the conditions in the above-mentioned theorem.
For example, the cycle has a Hamiltonian circuit but does not follow the theorems.
There are many practical problems which can be solved by finding the optimal
Hamiltonian circuit. One such problem is the Travelling Salesman Problem which asks
for the shortest route through a set of cities.
Example 1- Does the following graph have a Hamiltonian Circuit?
Solution- Yes, the above graph has a Hamiltonian circuit. The solution is –
Solution- No the above graph does not have a Hamiltonian circuit as there are
two vertices with degree one in the graph.
An Hamiltonian path on a graph is a path going through every vertex of the graph once
only.
An Hamiltonien circuit or tour is a circuit (closed path) going through every vertex of the
grap.
They can be glued end to end to build an Hamiltonian circuit on the dual graph
(icosahedron).
Not every graph is Hamiltonian : An Hamiltonian graph must be 2-connected, that is we
have to delete at least 2 vertices to split the graph in two disconnected parts.
This is not enough, as shown by this smallest 2-connected non Hamiltonian graph.
Note also that we take care only of simple graphs (without loops and no more than one
arc between two vertices). The loops can be deleted as coming back to the vertex we
have just visited. The double arcs also are useless and can be deleted. We'll assume in
the sequel that all graphs are simple and connected graphs.
There are other necessary conditions for a graph to be Hamiltonian.
There are also some sufficient conditions. We don't know any general necessary and
sufficient condition.
For example, let's look at the following graphs (some of which were observed in earlier
pages) and determine if they're Hamiltonian.
Complete
Hamiltonian. Same case as above.
Graph K6
Complete
Bipartite Not Hamiltonian.
Graph K2,3