An eulerian tour is a closed eulerian trail.
An eulerian graph is a graph that has an eulerian tour.
Späziergang - a walk around town usually on Sunday afternoon.
Kneiphoff - the island in the Pregel River in Königsberg.
Theorem (Euler, 1736): A graph G has an eulerian tour if and only if G is connected up to isolated vertices and every vertex of G has even degree.
Theorem (Euler): A graph G has an open eulerian trail if and only if G is connected up to isolated vertices and the number of vertices of odd degree is 2.
Examples: 0110 is a (2,2)-deBruijn sequence, 01110100 is a (2,3)-deBruijn sequence.
A (2,n)-deBruijn digraph D2,n consists of 2n-1 vertices, labeled by the bitstrings of length n-1, and 2n arcs, labeled by the bitstrings of length n. The arc from b1b2...bn-1 to b2...bn-1bn is labeled b1b2...bn.
Proposition 6.2.1: The (2,n)-deBruijn digraph D2,n is eulerian.
The sequence of leftmost bits on the arc labels of any eulerian tour of the (2,n)-deBruijn digraph is a (2,n)-deBruijn sequence.
A hamiltonian graph is a graph that has a hamiltonian cycle.
Sir William Rowan Hamilton (1805-1865) and the Icosian Game.
Determining whether or not a graph is hamiltonian is an NP-complete problem.
Theorem 6.3.1 (Ore, 1960): Let G be a simple n-vertex graph, where n3, such that deg(x) + deg(y)n for each pair of non-adjacent vertices x and y. Then G is hamiltonian.
Ore's theorem gives a sufficient, but not necessary condition for a graph to be hamiltonian. Consider a cyclic graph with 5 or more vertices.
Corollary 6.3.2 (Dirac, 1952): Let G be a simple n-vertex graph, where n3, such that deg(v)½n for each vertex v. Then G is hamiltonian.
Recall that the n-dimensional hypercube graph Qn is the graph whose vertices are the length n bitstrings and two vertices are adjacent if and only if they differ in exactly one bit position. Therefore, a Gray code of order n corresponds to a hamiltonian cycle in Qn.
Theorem 6.4.1: The n-dimensional hypercube Qn is hamiltonian for all n2.
Proof: by induction.
Thus, Gray codes exist for all orders (n=1 is trivial, the rest can be obtained from Qn).
Gray codes are useful in data transmission.
Traveling Salesman Problem
Given a graph having edge weights, the TSP is to find a hamiltonian cycle with minimum edge weight sum. The graph can always be assumed to be a complete graph by adding missing edges to the given graph and assigning them extremely large weights.
The TSP is an NP-hard problem. To solve instances of it various heuristic methods have been developed. Two such are the nearest neighbor (greedy) algorithm and the doubling the tree algorithm.