A Hamiltonian path or traceable path is a path 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 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 of a path or cycle can only be traced in a single direction. A Hamiltonian decomposition 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 with more than two vertices is Hamiltonian
Any Hamiltonian cycle can be converted to a Hamiltonian path by removing one of its edges, but a Hamiltonian path can be extended to Hamiltonian cycle only if its endpoints are adjacent. All Hamiltonian graphs are biconnected, but a biconnected graph need not be Hamiltonian. An Eulerian graphG necessarily has an Euler tour, a closed walk passing through each edge of G exactly once. This tour corresponds to a Hamiltonian cycle in the line graphL, 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 L of every Hamiltonian graph G is itself Hamiltonian, regardless of whether the graph G is Eulerian. A tournament is Hamiltonian if and only if it is strongly connected. The number of different Hamiltonian cycles in a complete undirected graph on n vertices is and in a complete directed graph on n 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 bestvertex degree characterization of Hamiltonian graphs was provided in 1972 by the Bondy–Chvátal theorem, which generalizes earlier results by G. A. Dirac and Øystein Ore. Both Dirac's and Ore's theorems can also be derived from Pósa's theorem. Hamiltonicity has been widely studied with relation to various parameters such as graph density, toughness, forbidden subgraphs and distance 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 cl of a graph G with n vertices, obtained by repeatedly adding a new edge uv connecting a nonadjacent pair of vertices u and v 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 graphs, 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.
An algebraic representation of the Hamiltonian cycles of a given weighted digraph 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 was shown in.