can we travel along the edges of a graph starting at a vertex and returning to it by traversing each edge of the graph exactly once ? similarly , can we travel along the the edges of a graph starting at a vertex and returning
to it while visiting each vertex of the graph exactly once ?
although these questions seem to be the similar , the first question ,which asks whether a graph has an euler ciruit, can be easily answered simply by examining the degrees of the vertices of the graph , while the second question , which asks whether a graph has a Hamilton circuit , is quite difficult to solve for most graphs . in this section we will study these questions and discuss and discuss the difficulty of solving them. Although both questions have many practical applications in many different areas , both arose in old puzzles . we will learn about these old puzzles as well as modern practical applications.
Euler paths and circuits
The town of koningsberg, Prussia (now called Kaliningrad and part of the Russian republic) , was divided into four sections by the branches of the pregel river .
these four sections in-ciuded the two regions on the banks of the pregel, kneiphof island , and the region between the two brances of the pregel.
In the eighteenth century seven bridges connectese these regions .
figure 1 depicts these regions and bridges.
The townspeople took long walks through town on Sundays . they wondered whether it was possible to start at some location in the town , travel across all the bridges without crossing any bridge twice , and return to the starting point .
The Swiss mathematician Leonhard Euler solved this problem . his solution, published in 1736 , may be the first use of graph theory . Euler studied this problem using the multigraph obtained when the four regions are represented by vertices and the bridges by edges. This multigraph is shown in figure 2 .
The problem of traveling across every bridge without crossing any bridge more than once can be rephrased in terms of this model . the question becomes : Is there a simple circuit in this multigraph that contains every edge?
Definition 1
An Euler circuit in a graph G is a simple circuit containing every edge of G . An Euler path in G is a simple path containing every edge of G .
Examples 1 and 2 illustrate the concept of Euler circuits and paths.
Example 1 Which of the undirected graphs in Figure 3 have an Euler circuit? Of those that do not , which have an Euler path?