Академический Документы
Профессиональный Документы
Культура Документы
GRAPH AND
HAMILTONIAN GRAPH
BY
A. PAUL BENEDICT
(1806MA1006)
DEP OF MATHS
A STUDY ON EULER GRAPH AND HAMILTONIAN GRAPH
Section – I : INTRODUCTION
The history of graph theory may be specifically traced to 1735, when the Swiss
mathematician Leonhard Euler solved the Königsberg bridge problem. The Königsberg bridge
problem was an old puzzle concerning the possibility of finding a path over every one of seven
bridges that span a forked river flowing past an island—but without crossing any bridge twice.
Euler argued that no such path exists. His proof involved only references to the physical
arrangement of the bridges, but essentially he proved the first theorem in graph theory.
An important number associated with each vertex is its degree, which is defined as
the number of edges that enter or exit from it. Thus, a loop contributes 2 to the degree of its vertex.
For instance, the vertices of the simple graph shown in the Figure 1.1 , all have a degree of 2,
whereas the vertices of the complete graph shown in Figure 1.2, are all of degree 3. Knowing the
number of vertices in a complete graph characterizes its essential nature. For this reason, complete
graphs are commonly designated Kn, where n refers to the number of vertices, and all vertices of Kn
have degree n − 1. (Translated into the terminology of modern graph theory, Euler’s theorem
about the Königsberg bridge problem could be restated as follows: If there is a path along edges of
a multigraph that traverses each edge once and only once, then there exist at most two vertices of
odd degree; furthermore, if the path begins and ends at the same vertex, then no vertices will have
odd degree.)Another important concept in graph theory is the path, which is any route along the
edges of a graph. A path may follow a single edge directly between two vertices, or it may follow
multiple edges through multiple vertices. If there is a path linking any two vertices in a graph, that
graph is said to be connected. A path that begins and ends at the same vertex without traversing any
edge more than once is called a circuit, or a closed path. A circuit that follows each edge exactly
once while visiting every vertex is known as an Eulerian circuit, and the graph is called an Eulerian
graph.
Euler Graph - A connected graph G is called an Euler graph, if there is a closed trail which
includes every edge of the graph G.
Euler Path - An Euler path is a path that uses every edge of a graph exactly once. An Euler path
starts and ends at different vertices.
Euler Circuit - An Euler circuit is a circuit that uses every edge of a graph exactly once. An Euler
circuit always starts and ends at the same vertex. A connected graph G is an Euler graph if and only
if all vertices of G are of even degree, and a connected graph G is Eulerian if and only if its edge set
can be decomposed into cycles.
The above graph is an Euler graph as a 1 b 2 c 3 d 4 e 5 c 6 f 7 g covers all the edges of the
Euler Graph & Hamilton Graph
Solution:
There are two islands A and B formed by a river. They are connected to each other and to the
river banks C and D by means of 7- bridges.
The problem is to start from any one of the 4 land areas A,B,C,D walk across each bridge
exactly once and return to the starting point.(without swimming across the river.)
area b area d
area
When the situation is represented by a graph, with vertices representing the land areas and the
c
dges representing the bridges the graph will be as shown in the figure.
area a
area area d
b
area
c
he problem is to find whether there is an Eulerian circuit or cycle [i.e., a circuit containing
very exactly once] in the graph.
ere, we can not find a Eulerain circuit. Hence, Konigsberg bridge problem has no solution.
uler Graph
path of a graph G is called an Eulerian path, if it contains each edge of the graph exactly once.
circuit or cycle of a graph G is called an Eulerian circuit or cycle, if it includes each edge of
xactly once.
(Here starting and ending vertex are same).
(2) Cycle should contain all the edges of graph but exactly once.
Any graph containing an Eulerian circuit or cycle is called an Eulerian graph. For example,
e1 B
A
e2
e7 e3 C
e6
e4
E
e5 D
For the above graph, we cannot find Eulerian Circuit (Cycle).Therefore, given graph is non
Eulerian.
A D
Solution:
Since, it includes each of the edges exactly once; the above cycle is a Eulerian cycle.
EXAMPLE 2: Find all possible Eulerian path of the given graph. Is it Euler graph?
A e1 B
e4 e5
e2
D e3 C
Solution:
(1)
(2)
(3)
(4)
(5)
(6)
Theorem: A connected graph is Euler graph (contains Eulerian circuit) if and only if
each of its vertices is of even degree.
Proof:
Let G be any graph having an Eulerian circuit (Cycle)and let ,c, be an Eulerian Circuit of G with
origin (and terminus) Vertex as u.
Each time a vertex v occurs as an internal of C,then two of the edges incident with v are
accounted for degree.
= even degree.
and, since an Euler circuit C contains every edge of G and C starts and ends at
= even degree.
i.e, Assume G be a connected graph which is not having an Euler circuit, with all vertices of
even degree and less number of edges. That is, any graph having less number of edges than G,
then it has an Eulerian circuit. Since each vertex of G has degree at least two, therefore G
contains closed path. Let C be a closed path of maximum possible length in G. if C itself has all
the edges of G, then C itself an Euler circuit in G.
By assumption, C is not an Euler circuit of G and G – E(C) has some component G’ with
|E(G’)|>0. C has less number of edges than G, therefore C itself is an Eulerian, and C has all the
vertices of even degree, thus the connected graph G’ also has all the vertices of even degree.
Since |E (G’)| < |E (G)|, therefore G’ has an Euler circuit C’. Because G is connected, there is a
vertex in both C and C’. Now join C and C’ and transverse all the edges of C and C’ with
common vertex, we get CC’ is a closed path in G and E(C C’) > E(C), which is not possible for
the choices of C.
Is a Euler graph.
graph.
Example:1
Non-Euler Graph
Here degree of vertex b and d is 3, an odd degree and violating the euler graph condition.
Example:2
Check the given graph is Euler graph or not.
V1
e1
e5
V3 V2
e6
e7 e2
e4
V5 V4
e3
Solution:
Since, all the vertices are of even degree, by the above theorem the given graph is
Euler graph.
Example:3
Find the Euler path and an Eulerian circuit, if it exists in each of the three Graphs in
figure. If it does not exist, explain why?
A B A G F E
D C B C D
Solution:
(1) In the graph the vertices B and D have odd degree, namely 3.
Then by the above result G1 has an Eulerian path which have an end points as B and D does
not have an Eulerian cycle
Since, Eulerian circuit does not exists for G1, the given graph is non-Eulerian.
(2) G2 has exactly two vertices of odd degree ,namely B and D .so, it has an
Eulerian path that must have B and D as end points, and does not have an
A circuit (cycle) of a graph G is called a Hamiltonian circuit (cycle) ,if it includes each
vertex of G exactly once, except the starting and ending vertices.
Note: In Hamiltonian circuit the starting and ending vertex are same.
For eg,
V1 V2
V3
V5 V4
Then V1-V2-V3-V4-V5 is a Hamiltonian path. Since, all the vertices appears exactly once)
(2) V5-V2-V3-V4-V5 is a cycle but not a Hamiltonian cycle. (Since the vertices V1 is not
included in the cycle, it is not a Hamiltonian cycle).
Example 4: Find Hamiltonian path &cycle, if the exist in each of the graphs given below.
B C C D
A G1 D B G2 A
Solution:
(1) A – B - C – D
(2) A – D – C – B
(3) B – C – D – A
(4) B – A – D – C
(5) C – D – A – B
(6) C – B – A – D
(7) D – A – B – C
(8) D – C – B – A
For G1, the possible Hamiltonian Cycles are
(1) A - B – C – D - A
(2) A – D – C – B - A
(3) B – C – D – A - B
(4) B – A – D – C - B
(5) C – D – A – B - C
(6) C – B – A – D - C
(7) D – A – B – C - D
(8) D – C – B – A - D
(Since all the vertices appears exactly once), but not all the edges.
(2) A → B - D - C
(3) D→ C - B - A etc
From the above two example, we can list out the following properties
Properties:
(1) A Hamiltonian circuit contains a Hamiltonian path, but a graph containing a Hamiltonian
path need not have a Hamiltonian cycle.
(2) By deleting any one edge from Hamiltonian cycle ,we can get Hamiltonian path.
(4) A complete graph Kn,will always have a Hamiltonian cycle, when n>=3.
Example 5: Give an example of graph which is
A C
E D
A—B—C—D—B—E—A
G1 is Euler graph.
A E
Since G2 Contains the Hamiltonian cycle, namely
A – B – C – D – E – A (All the Vertices occur exactly once).
G2 is Hamiltonian group.
Since the degree of the Vertex A is 3 ,deg(A) is not an even.
Therefore given graph is not an Euler graph.
(3) Example of both eulerian and Hamiltonian.
Consider the Graph
A B
D C
In G3, Consider the Cycle A–B–C–D–A
Since the Cycle contains all the edges, G3 is Eulerian.
Moreover, since the cycle contains all the vertices exactly once, G3 is Hamiltonian.
Therefore G3 is an example of both Eulerian and Hamiltonian.
(4) Example of neither Eulerian nor Hamiltonian.
A B
D C
n G4 deg (B) = deg (D) = 3.
Since degree of B and D are not an even numbers, G4 is not a Euler graph.
As no cycle passes through each of the vertices exactly once, the given graph G4 is not
Hamiltonian.
Therefore G4 is neither Euler graph nor Hamiltonian graph.
Theorem:2
Let G be a simple in directed graph with n vertices. Let u and v be two non adjacent
ertices in G such that deg (u) +deg (v) ≥n in G. Show that g is Hamiltonian if and only if
G+UV is Hamiltonian.
Solution:
If G is Hamiltonian, then obviously G+UV is Hamiltonian.
Conversely, suppose that G+UV is Hamiltonian, but G is not.
Then by Dirac theorem, we have
Example: 5 Find an Euler path or an Euler circuit, if it exists in each of the three graphs
below. If it does not exist, explain why?
Solution:
In G1, there are only two vertices, namely A and B of degree 3 and other vertices are of even
degree.
A–C–D–E–B–D–A–B
In G2, there are 6 vertices of odd degree. Hence, G2 contains neither an Euler path nor an Euler
circuit.
In G3, all the vertices of even degree. Hence there exist an Euler circuit, includes each .
CONCLUSION:
In this project, we discussed about Euler graph and Hamiltonian graph. Some of the
theorems are proved with example. Applications of Euler graph and Hamiltonian graph also
discussed. Combined example of Eulerian graph and Hamiltonian graph provided in this project.