Section 6.2: Euler Paths and Hamiltonian Circuits

Abstract:

Graphs are useful for characterizing two interesting problems: the traveling salesman problem, and the highway inspector problem. The problem in each case is to traverse a network in an optimal way, whether the focus is on the nodes (Sir William Rowan Hamilton, 1805-1865) or the arcs (Leonhard Euler, 1707-1783).

Euler Paths

Definition: an Euler Path is a path in which each arc is used exactly once.

Euler got interested in these arcs when he encountered the Königsberg bridge problem (p. 421); a game in which the object was to cross every bridge without crossing any bridge twice. Euler solved this problem by inventing and then using Graph Theory, basically!

The bridges are the arcs, and the land masses are nodes, turned into the graph of Figure 6.5, p. 421.

To do: Practice 7, p. 421

Theorem: in any graph, the number of odd nodes (nodes of odd degree) is even.

Outline of proof:

  1. Suppose that there are A arcs, and N nodes. Each arc contributes 2 ends; the number of ends is 2A, and the degrees tex2html_wrap_inline144 satisfy

    displaymath130

  2. displaymath131

    and the left hand side is even (call it 2m).

  3. The sum of two odd degrees is even, so assume (we proceed by contradiction) that there is an odd number of odd nodes. We can pair up all but one (say i=k), and then

    displaymath132

  4. From which we conclude that

    displaymath133

    which means that tex2html_wrap_inline144 was, in fact, even; but this is a contradiction. Hence, the number of odd nodes is even.

Theorem: an Euler path exists in a connected graph tex2html_wrap_inline152 there are either two or zero odd nodes.

To do: Practice 9, p. 423

EulerPath Algorithm

The EulerPath algorithm makes use of the adjacency matrix representation of a graph to check for Euler paths. It simply counts up elements in a row i of the matrix (the degree of node i), and checks whether that's even or odd; if in the end there are not zero or two even nodes, there's no Euler path!

To do: Exercise 11, p. 427

Hamiltonian Circuit Problem (the traveling salesman)

Definition: a Hamiltonian Circuit is a cycle using every node of the graph.

An example is a complete graph, like tex2html_wrap_inline158 : there is a path from each node to every other node, so no matter where you start, you can trace a cycle through every node (breaks down for tex2html_wrap_inline160 .

To do: Practice 11, p. 425

To do: Exercise 14, p. 427 (using trees, symmetry, and exhaustion!)

Unfortunately, there's no nice HamiltonCircuit algorithm for determining when there is a circuit (only very grungy ones!).



LONG ANDREW E
Thu Mar 7 19:18:35 EST 2002