Euler and Hamiltonian Graph

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Euler Graph

Definition.
An Euler cycle (or circuit) is a cycle that traverses every edge of a graph exactly
once. If there is an open path that traverse each edge only once, it is called an
Euler path.
Although the vertices can be repeated.

Figure 1 Figure 2
The left graph has an Euler cycle: a, c, d, e, c, b, a and the right graph has an
Euler path b, a, e, d, b, e

Graph theory may be said to have its beginning in 1736 when EULER
considered the Königsberg bridge problem:
Does there exist a walk crossing each of the seven bridges of
Königsberg exactly once?
This answer was answered by Euler (1736) and represented the
beginning of graph theory.
Konigsberg-7-bridge-problem:
The river Pregel flows through the city of Konigsberg (located in Russia) dividing
the city into four land regions of which, two are banks and two are islands.
During the time of Euler, the four land regions were connected by 7 bridges as
shown below (Figure 3 represents river Pregel flows in the city of Konigsberg
with seven bridges and Figure 4 represents the Euler’s visualization for its graph)
.
Figure 3

Figure 4

The citizens of Konigsberg had an entertaining exercise. Start from any land of
region and come back to the starting point after crossing each of seven bridges
exactly once. Euler explained that it is impossible to do so by using the
terminology of vertices (representing the land regions) and the lines
(representing the bridges). He titled his paper as “Solutions to a problem relating
to the geometry of positions”. Through this explanations, he laid the foundations
for Graph Theory.
Euler proved that the walk in Konigsberg is equivalent to traverse the graph in
Figure 4 which is a multigraph having 4 nodes (vertices) and 7 edges which is not
traversable.
The answer to above problem is the necessary and sufficient condition for a
graph to be Eulerian which is as follows:
Theorem
A connected undirected graph has an Euler cycle iff each vertex is of even
degree.
Proof. Let G be a connected graph. Suppose G has an Eulerian cycle. Thus,
whenever we arrive at a vertex using an edge, say , then we leave that
vertex using an edge, say , such that because each edge appears
exactly once. Hence degree of each vertex is always even is always even.
Conversely
We begins with an arbitrary vertex of G. We choose an arbitrary edge incident
with and continue by building a simple path, adding edges to the path until
we cannot add another edge to the path. This happens when we reach a vertex
for which we have already included all edges incident with that vertex in the
path. The path we have constructed must terminate because the graph has a
finite number of edges.
Another claim is that the path must terminate at vertex . To see this, every
time the path goes through a vertex with even degree, it uses one edge to enter
it and another to leave it. This means, other than a every time we enter a vertex,
we can leave it. An Euler circuit has been constructed if all the edges have been
used. Otherwise, consider the subgraph H obtained from G be deleting the edges
already used and vertices that are not incident with any remaining edges.
Because G is connected, H has at least one vertex in common with the circuit
that has been deleted. Let w be such a vertex. Every vertex in H has even degree.
Beginning at , construct a simple path in H by choosing edges as long as
possible, as done in G. This path terminate at . Next, form a circuit in G by
connecting the circuit in H with the original circuit in G. Continue the process
until all edges have been used.
Corollary1: A connected undirected graph has an Euler path (not a cycle) iff it
has exactly two vertices of odd degree.
Result: Let G be a connected graph with exactly two vertices of odd degree.
Then, there is an Eulerian path starting at one of those odd vertices and ending
at the other. For e.g. in figure 3, the walk b-e-a-b-d-c-a is an Euler path starting
from odd vertex b and ending at odd vertex a.

We can verify the results in above theorems with the help of above graphs.
Graph a
It possess Euler path as two vertices (1 and 3) have odd degrees.
Euler path: 3-4-1-3-2-1
Graph c
It possess Euler cycle as all vertices have degrees.
Euler cycle : 1-2-3-4-7-5-3-7-6-5-2-6-1
Verify the results for graphs b, d, e ,f.
Hamiltonian Graph

A Hamiltonian cycle is a cycle that traverses every vertex of a graph exactly once.
If there is an open path that traverses each vertex only once, it is called a
Hamiltonian path.

Figure 5 Figure 6 Figure 7

 Figure 5 is a graph which is non- Hamiltonian.


 Figure 6 is a graph which has Hamiltonian path but not cycle.
 Figure 7 is a graph which has Hamiltonian cycle.
Important: An Eulerian circuit traverses every edge in a graph exactly once, but
may repeat vertices, while a Hamiltonian circuit visits each vertex in a graph
exactly once but may repeat edges.
The terminology came from the Icosian puzzle, invented by Hamilton in 1857.
There was a wooden "schematic" dodecahedron with a peg at each vertex
labeled with different cities. The goal was to start at a city and travel along
edges, visiting each of the other 19 cities exactly ones (Figure 8).

Figure 8
Though there is necessary and sufficient conditions for the connected graph to
be Eulerian, there are no known conditions which are both necessary and
sufficient for Hamiltonian graphs. But there are a few sufficient conditons.
Theorem (Ore)
Let G be a simple graph with vertices, such that

For every pair of non-adjacent vertices u and v then G is Hamiltonian.

Theorem (Dirac)
Let G be a simple graph with vertices. If every vertex has degree at least
then G is Hamiltonian.

Theorem

A graph G has Hamiltonian cycle if where n is the number of


vertices and e is the number of edges in G.

 Examples of graphs which are Eulerian but non Hamiltonian and


Hamiltonian but non- Eulerian.

You might also like