Вы находитесь на странице: 1из 20

A STUDY ON EULER

GRAPH AND
HAMILTONIAN GRAPH

BY
A. PAUL BENEDICT
(1806MA1006)
DEP OF MATHS
A STUDY ON EULER GRAPH AND HAMILTONIAN GRAPH

Section – I : INTRODUCTION

Graph theory, branch of mathematics concerned with networks of points connected by


lines. The subject of graph theory had its beginnings in recreational math problems (see number
game), but it has grown into a significant area of mathematical research, with applications in
chemistry, operations research, social sciences, and computer science.

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.

Figure: 1.1 Figure: 1.2

Another important concepts of graph is Hamiltonian Graph. In this project we discussed


about Euler graph and Hamiltonian graph with examples and applications:

SECTION-II – EULER 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

Example: Explain Konigsberg bridge problem. Represent the problem by means of


graph. Does the problem have a solution?

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.)

This problem is the famous Konigsberg bridge problem.


area a

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

EFINITION: Eulerian path

path of a graph G is called an Eulerian path, if it contains each edge of the graph exactly once.

EFINITION: Eulerian circuit or Eulerian cycle:

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).

An Eulerian circuit or cycle should satisfies the following conditions.

(1) Starting and ending points (vertices) are same.

(2) Cycle should contain all the edges of graph but exactly once.

DEFINITION: Eulerian Graph or Euler Graph

Any graph containing an Eulerian circuit or cycle is called an Eulerian graph. For example,

Consider the graph,

e1 B
A
e2

e7 e3 C
e6

e4
E
e5 D

Then, the Euler path between E and D, namely

The above path consist of edges exactly ones.

For the above graph, we cannot find Eulerian Circuit (Cycle).Therefore, given graph is non
Eulerian.

EXAMPLE 1: Check the given graph is Euler or not.


B C

A D

Solution:

Consider the cycle

Since, it includes each of the edges exactly once; the above cycle is a Eulerian cycle.

Since the graph contains Eulerian cycle, it is a Euler graph.

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:

Possible Euler Paths are:

(1)

(2)

(3)
(4)

(5)

(6)

Here, we cannot find Eulerian cycle.

Therefore, given graph is not a Euler graph.

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.

We, get for internal vertex

= even degree.

and, since an Euler circuit C contains every edge of G and C starts and ends at

= even degree.

G has all the vertices of even degree.

Conversely, assume each of its vertices has an even degree.

Claim: G has an Eulerian circuit. Suppose not,

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.

has an Eulerian circuit.

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.

Contains exactly two vertices (B & D) of odd degree.

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

One such Euler path is D-A-B-C-D-B

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

Eulerian Path is B–A–G–F–E–D–C–G–B–C–F–D.


Since G2 does not have Eulerian cycle G2 is non-Euler graph.

SECTION:III Hamiltonian Graph

DEFINITION: Hamiltonian Path

A path of a graph G is called a Hamiltonian path, if it includes each vertex of G exactly


once.

DEFINITION: Hamiltonian cycle or cycle:

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.

DEFINITION: Hamiltonian Graph

Any Graph containing a Hamiltonian circuit or cycle is called Hamiltonian graph.

For eg,

V1 V2

V3

V5 V4

Then V1-V2-V3-V4-V5 is a Hamiltonian path. Since, all the vertices appears exactly once)

V4-V3-V2-V1-V5-V4 is a Hamiltonian cycle [since, all the vertices appears exactly


once)(not all the edges) ] and starting and ending vertex are same.
Note:

(1) In the above Example

V5 - V2 - V3- V4 is a path but not a Hamiltonian path.

(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.

also identify which graph is Hamiltonian.

B C C D

A G1 D B G2 A

Solution:

For G1, the possible Hamiltonian paths are

(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.

Since, G1 contains Hamiltonian cycle,G1-is a Hamiltonian graph.

(2) G2 contains Hamiltonian paths, namely


(1) A → B - C - D

(2) A → B - D - C

(3) D→ C - B - A etc

We cannot find Hamiltonian graph.

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.

(3) A graph may contain more than one Hamiltonian cycle.

(4) A complete graph Kn,will always have a Hamiltonian cycle, when n>=3.
Example 5: Give an example of graph which is

(1) Eulerian but not Hamiltonian


(2) Hamiltonian but not Eulerian
(3) Both Eulerian and Hamiltonian
(4) Non Eulerian and non Hamiltonian

Solution: (1) Example of Eulerian graph but not a Hamiltonian graph is

A C

E D

G1 contain the Eulerian cycle is

A—B—C—D—B—E—A

(Since all the edges occur exactly ones)

(More over the degree all vertices of G1 is even)

G1 is Euler graph.

We cannot find Hamiltonian cycle as the vertex B is repeated twice.

G1 is not a Hamiltonian graph

Therefore G1 is Eulerian but not Hamiltonian

(2) Example of Hamiltonian but not Eulerian is


B C

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

deg (u) +deg(v)<n

Which is a => <= to our assumption.

Thus G+UV is Hamiltonian implies G is Hamiltonian.

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.

Hence, there is an Euler path between A and B, namely

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 .

SECTION: IV APPLICATIONS OF EULER GRAPH & HAMILTONIAN GRAPH

1. Chinese Postman Problem


All vertices of a graph need not be of even degree and so a graph may not be Eulerian.
But if a graph has all except two vertices of even degree then it has an Eulerian path
which starts at one of the odd vertices and ends at the other odd vertex. A graph having
an Eulerian path but not an Eulerian circuit is called semi-Eulerian.
In a graph Gp that models streets and street corners in a town, with the street corners as
the vertices and the streets as the edges, some one starting in a street corner and walking
along the streets one after another can end up in a street corner, giving rise to a path in the
graph. Note that walking along a street more than once from one corner to another,
corresponds to repeating an edge or a vertex in the graph.
Suppose that a postman has to deliver letters to the residents in all the streets of a village.
Assume that the village is small enough for the postman to be assigned this task
everyday. If the graph Gp that represents the streets and street corners as mentioned
above, is semi-Eulerian so that there is an Euler path in the graph Gp, then this path gives
rise to a route following which the postman can start in a street corner, deliver letters
going through every street exactly once. This is a desirable situation for the postman. But
if no such Euler path exists in Gp, then the postman may have to repeat some of the
streets. This problem is called the Chinese postman problem in honour of a Chinese
mathematician Meigu Guan who proposed this problem.
2. DNA fragment assembly
DNA (deoxyribonucleic acid) is found in every living organism and is a storage medium
for genetic information. A DNA strand is composed of bases which are denoted by A
(adenine), C (cytosine), G (Guanine) and T (thymine). The familiar DNA double helix
arises by the bondage of two separate strands with the Watson-Crick complementarity (A
and T are complementary; C and G are complementary) leading to the formation of such
double strands.
DNA sequencing and fragment assembly is the problem of reconstructing full strands of
DNA based on the pieces of data recorded. It is of interest to note that ideas from graph
theory, especially Eulerian circuits have been used in a recently proposed approach to the
problem of DNA fragment assembly. We do not enter into the details but only mention
that this brings out the application of graph theory in the field of bioinformatics. More
elaborate details on this topic can be found in Kaptcianos (2008) and Pevzner et al
(2001).
3. Floor Designs and Eulerian graphs
Traditional interesting floor designs, known as “kolam”, are drawn as decorations in the
floor and in large sizes and in interesting shapes, during festivals and weddings, with the
drawing done with rice flour or rice paste especially in South India. See for example
Nagata and Robinson (2006), Siromoney (1978) and Siromoney et al (1974). Generally,
in drawing a kolam, first a suitable arrangement of dots is made and then lines going
around the dots are drawn. considered as vertices and the parts of the kambi between vertices
treated as edges. Theonly restriction is that unlike in a graph, these edges cannot be freely drawn as
there is aspecific way of drawing the kolam. The single kambi kolam will then be an Eulerian
graph with the drawing starting and ending in the same vertex and passing through every
edge of the graph only once.
For instance, when mapping genomes scientists must combine many tiny fragments of genetic
code (“reads”, they are called), into one single genomic sequence (a ‘superstring’). This can be
done by finding a Hamiltonian path or cycle, where each of the reads are considered nodes in a
graph and each overlap (place where the end of one read matches the beginning of another) is
considered to be an edge.
In a much less complex application of exactly the same math, school districts use Hamiltonians to
plan the best route to pick up students from across the district. Here students may be considered
nodes, the paths between them edges, and the bus wishes to travel a route that will pass each
students house exactly once.

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.

Вам также может понравиться