0% found this document useful (0 votes)
95 views9 pages

Eulerian and Hamiltonian Note

1) An Euler trail is an open trail in a graph G that contains all the edges of G. An Euler circuit is a circuit in a graph G that contains all the edges of G. 2) A graph is called edge-traceable if it has an Euler circuit or Euler trail, meaning it can be drawn with a pencil without lifting the pencil from the paper and without tracing any edge twice. 3) A graph is called Eulerian or Euler if it has an Euler circuit. Theorems are provided to characterize when a graph is Eulerian based on the degrees of its vertices.

Uploaded by

vikash raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views9 pages

Eulerian and Hamiltonian Note

1) An Euler trail is an open trail in a graph G that contains all the edges of G. An Euler circuit is a circuit in a graph G that contains all the edges of G. 2) A graph is called edge-traceable if it has an Euler circuit or Euler trail, meaning it can be drawn with a pencil without lifting the pencil from the paper and without tracing any edge twice. 3) A graph is called Eulerian or Euler if it has an Euler circuit. Theorems are provided to characterize when a graph is Eulerian based on the degrees of its vertices.

Uploaded by

vikash raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Eulerian and Hamiltonian

Graphs.
4.1 Euler trail: An
open'trail in
contains all the edges of G.
a
graph G is called an Fuler trail il i
Euler Circuit: A circuit in a
all the graph G is called an Euler circuit if it contains
edges of G.

Ia graph CG contains
only one verlex v and no edge. we call the walk (v)
an Euler circuit.

Example 4.1.1. Consider the


following graph G :

e 2
e
VA
G
Fig 4.1.1
Then(v. e. V. e. V. C. V V, e, V eV,) is an
Euler circuit in G.
Example 4.1.2 Consider the following graph G :

e,

G
Fig 4.1.2
G has no Euler circuit. but it has an Euler trail. The open trail (v,,
C. V
CVC. V, e V. V,) is an Euler trail in G.
is Edge-traceablea p
called an
gr : A graph which has an Euler circuit or an Euer t
be
drawn with
edge-traceable graph. Such graph has the property
a
thal D il can

pencil withoui litting the Dencil from the paper and Wilhou
tracing any edge Lwice.
erian (or,
it has Euler) graph: A graph G is said tw be an Fuleriana"
an Euler
circuit.
graph given in 4.1.1 is Eulerian. A graph consisting ol ia singie
and no
edge is treated as Eulerian.
COrem 4.1.1 If a connccted graph G is Eulerian, then cvery vertex ol
IS ol even
degree.
roo:Let G he a connected Eulerian graph. Ir G
consists of only one
V and
Cx no
edge, then ldv) = 0 (even). If G contains only one vertex
d a linite number of loops al v, then dev) = even. since every loop conuid-

ules 2 to the
degree of v.

NOw, We assume that G contains more than one vertex. Since G is Eulerian,
l has
an, Euler circuit. say C=(v,,
e, V,. V V V,). Let u be a
rdilrary vertex of G. Then. u must be an end point of some edge since G is
Connected. Since C contains all the edges, u must belong to C. If u is the
starting vertex v, then it is also the terminating vertex vThe cdyes e and
together contribute 2 10 the degree of u. If u is an intermediate vertex ot C.
then for each appearance of u in C there are two new edges incident on u, one
Tor entering u and another for exiting from u since no edges in C are repeated.
These two cdges contribute 2 to the degree of u. Thus, d(u) is even. Since u
IS arbitrary, every vertex of G is of even degrec.
Theorem 4.1.2 If G is a connected graph and every verlex of Ci is ol even
degree. then G is luleran.

Proof : Let Gi be a connccted graph and every vertex of G be ol even


legree. We prove the theorem by induction on the number of edges n of G.

Baasis step : Let n=0. Since G is connecled and has no edge. G consists of
a single vertex. Hence. by delinition, G is Eulerian.
we assuie
thäl i
cte Hypothesis: Le n be a positive integerand S
vertex is of even degree.
k (<n) cdges in which every
g r a p h with
Eulerian.
each vertCx
a connected graph with n edges and
nduction step: Let G be G contains a Circut
is of deeree at least two.
O be even. Since each vertex
I:uler
all the cdgcs of G. it becomes an
(C. theoren 2.3.1). C sav. If C contains
C and
from G all the edgcs of
Circuit and so G is Eulerian. If not, we remove

not be connectcd.
but each of its compo-
0Dlain a subgraph G' of G. G'may the removal
contain fewcr than n edges. Now,
nents wil be connccted and will
reduces
of a vertex unchanged or
of the edges of C cither leaves the degree
of CG' vill be ol
lhe degree by two. llence, all the vertices ol cach componcnt

the inductive hypothesis cach component


of is
Cvn degrec. Therefore. by mect the
since G is connected. cach component of CG' must
Eulerian. Morcover,
has an 1:uler circuit.
We
vertex. To show that G
Circuit C at least al one
and
Construct such a circuit in G as
follows: We start at a vertex u (say) of C
one of the components
of G. We
traverse C until we meet a vertcx v, (say) of
return to the circuit C
at the
circuit of that conmponent and
then traverse Euler of G
C and traverse each component
same vertex v,. We then continue along
we can traverse all
the edges of G.cxactl
is it mects the circuit C. Eventually,
(G is
Euler circuit in G. Hence
.

and back at u. This produces an


once come
Eulerian. Thus. by the induction principle. any cpnnected
graph all of whose
vertices are of even degree is an Eulerian graph.

Note 1. 1The process of producing an Euler circuit as given in the proof is


illustrated in the following graph

C
Fig 4.1.3
the Euler's theoret
2. 4.1.2 we have
Oe Combining
thcorems 4.1.I and if all the
ices
vertic
ds TollowS: "A connected graph G is Eulerian if and only
of G are of
even
degrce." graph
G
G the
ne
Eulerian
+Fleury's algorithm: To find an Euler circuit in
an

1Olowing algorithm, known as fleury's algorithm. is userul

1. Choose a vertex u of V as the starting Ve


Sagorithm: Step
for the Euler circuit C.
an edge it Chou>i
choose
raverse any available edee, But do not
Step 2.
no alterinative.
connects the remaining graph unless there is

it from E, together
wilh
any
Step 3. After traversing each edge, remove

isolated vertex that results.


obtained.
The Euler circuit has been
Step 4. II no edges remain, stop.
no cuges
Oherwise, select another available and repcat step 2 until
edge
remain in E
Euler trail if and only il it has
Theorem 4.1.3 A connccted graph G has an

exactly two odd-degrec verticcs.


Euler trail. Let u and v be
Proof :Let G be a connected graph having an

add an edge e joining u


the initial and final vertices of the Euler trail. If we
which will have an Euler circuit.
and v in G we get a new connected graph G'
In particular, u and v in C
Then every vertex of C will be of even degree.
becomes cven. But G and C have the same set
of vertices. If we now recover
v are the only vertices of-odd
G by removing the edge e we find that u and
degree.
connected and have cxactly two odd vertices u and v.
Conversely, let G be
By adding an cdge e joining u and v in G we obtain a connected graph G' al
Hence there exists an Euler circuit in G. If we now
of whose vertices arc even.

remove he edge e lrom this circuit we get an Eulcr trail in G.

Remark 4.1.1 To find an Euler trail in a connectcd graph with exactly two
odd vertices we must begin the trail at an odd vertex and terminate it at the
other odd vertex.
Kónigsberg Bridge Problem : In the city of Konigsherg (renameu
Kaliningrad) in Russia two islands in the Pregel river were connected to cach
other and to the outer
river banks by seven bridges as shown in the tollowing
gure 4.1.4. The city people tried their best to take a walk crossing all the
bridges cxactly and return to the starting point. But
once
they failed. They
wanted to know whether such a walk
is possible.
A

KOnigsberg Bridge Problem


Fig 4.1.4

Here A. D are the outer river banks and B. C are the islands. The problem
to start at sany of the land areas A. B. C or D. walk over each of the seven
bridges exactly once and return to the start1ng point This secmed to be ipos
Stble, but no one could explain why Swiss mathematieian Leonhard Euler
1707-'83) proved that such a walk is nposvible He converted the proble
a problem of graph theory and prcsented a soluton in a paper in 1736.
Euler's model for the problem was a graph w1th tour vertices and seven
cdges where the vertices represent the land arcas A. I!, C. D and the cdgese
, eprevent the seven brdges Then the contiguratton of the cty i
represented by the tollowng graph (i

G
Fig 4.1.5
NOW G IS conneeted and
n erossing a bridge coresponds to traveTsnE an
Cdge ol G: Then the
problem is reduced o
Since G has vertices of deterruinine whcther (G 1s nol
odd degree there is circuit in G.
Euierian. Hence it is
no Euler 1.e.
impossible to ind a roule to walk over all tne s"
bridges exactly once and return to the starting point.
Remark 4.1.2 At present here ver.
One connecling the land areas A and D. and the
are two more
other
on the lands
bridgesconnecting the 1staands
B and C. The
present conliguration of the city is representel hy the Jonow"
graph G,:
A
e/
e, e
B
e C
e
D
G
Fig 4.1.6
is even. Hence G, has an
connccted and every vertcx of G,
he graph G, is
Euler circuit. So. il is now possible to find a roule to walk over all the nine bndges

Cxactly once and rcturn to the starting point. An Fuler circuil in G, 1s :

(A. e. B, e C, C,. B. c, D, e, C, e A, e. D. e. B. e,. A).


Hamiltonian Path -A path in a graph G that
S 4.2. Hamiltonian graphs :

COntains every vertex ol G is callcd a Hamiltonian Path.

G that contains every vertex ol (G


Ilamiltonian Cycle : A cycle in a yraph
Is called a Hamilionian cycle.
Gis closed walk tlhat traverses every
Thus, a Hamiltonian cycle in a graph a

vertex awhich tie walk also


vertex ol G exactly once, except the slarting
graph with n vertices consists of
terminatcs. Hencc a Hamillonian cycle in a
Hamiltonian cycle. we get
Xactly n edges. Tl we removeany one edge lrom a
in a simple
Hence the length ol a Hamilionian path
Hamiitonian path.
is n-.
n-VCrlex graph
a Hamillonian cycle is called a.
Hamiltonion Graph : A graph having
1must be onnected.
ObservVe thal a amillonin graph
Ilamiltonian graph.
30
EXample 4.2.1 The following eraph as shown in fig. 4.2.1
i S
I1aminot

e e
e v,
C

G
Fig 4.2.1
The cycle C=(v,. C, V. e. V C V. C V. C,. V C. V. C V. C,V,)s
a llamiltonian cycle.

Remark 4.2.1 Any Hamilionian cycle in a bipartite


graph have the
must
Same number of vecrtices in cach
bipartition subset. since any edge in-a bipar-
lite graplh corresponds to a move from one bipartition subset to the other.
We would like to have a necessary and suflicient condition for the existenee
of a lanilionian cycle in a connecled graph. llowever. this is an
unsoiv ed
problem in graph theory. although several necessary or suffieienn conditions

Theorem 4.2.1 Lct G be a llamillonian graph with


V. For every vertes sel
n0on-empty proper subset S ol V. c (Ci-S) n(S). nhere ct(i) denotes the nun
ber of componens of Ci and S) denotes the number of vertices in S.

Proof: 1.ct G be a lHamillonian graph with vertcx-sei V. K be a llamiltonian


cyele in G and S V. Now. if we delcte the sel S of verlices together with
the edges incident with them Srom Gi 1hen
they will also be deleted from the
cycle K. sinee K contains all the vertices ol CG. Comseyucntly. the cycle K will
he divided into at nost n(S)
picces. i.e.. c(K-$) < n(S). Bul K-S is a suberaph
hat contains every vertex ol Ci-S. Hence. G-S camot have more
components
than K-S. i.e, e(i-S) <elK-S). Therefore. c(G-S) s n(S).

Note: T'he condition is not suflicient. Tlowever. we can use this condition
to show that a certain graph is not Hamiltonian.
EXmple 4.2.1 The followine eruph Ci as shown in lig. 4.2.I is IHamilontan.

V C V

e
N

e
V, , V

G
Fig 4.2.1
The cycle C=(v,. e, V, V C VC Vy. C V C, V. C V. C,.,) s
a Hamiltonian cycle.

Remark 4.2.1 Any lHamiltonian cyele in a bipartite graph must have the
same number of vertices in cach
bipartition subset. since any a edge in bipar-
ite graplh corresponds fronm
to a move one bipartition subsct to the other.
We would like to have a neeessary and sullicient condition for the existenee
of llaimiltonian eycle
a in a connected graph. Tlowever. this is an
unsoiv ed
problenm in graph theory. althoueh several necessary or suflicient conditions

Theorem 4.2.1 L.ct G he a Ilamiltonian graph with vertex set


V. For every
non-emptY proper subset S of V. e (CG-S)< n(S). where eti) denotes the nun-
her of componenis of G and n(S) denotes the numher of verlices in
S
Proof: I.et G be a lHamillonian graph with vertex-sci V. K be a llamiltonian
cyele in G and S= V. Now. il we delete the set S of vertices together with
the cdges incidenn With them from Ci then
they will also be deleted from the
ccle K. since K eontains all the vertices of' G. Conseyucntly. the cyele K will
he divided into at nost n(S) picees. i.c.. c(K-S)) <
n(S). 1But K-S is a suheraph
that contains every vertex ol CG-S. Tlence. G-S cannot have more
components
than K-S. i.e, e(Ci-S) < clK-S). Thereforc. c(G-S) n(S). s

Note: The condition is not sullicient. Tlowever. we can use this condition
to show that a certain graph is not Hamiltonian.
i 4.2.2 (Dirae's theorem, 1952): Let G be a simple conneeled gripn
with n3 vertie 1f d(v) for every vertex VE V then G is Ilamiltonian.

roof We omit the proot llowever, the prool can be found in | p 0°


We now state for a graph to be Hanmiltonian.
anot sutlicient condition
Theorem 4.2.3 1 ,1960]. Let G be a simple connected n-vertex graph
where n>3. If fo V pair of non-udjacent vertices u, V E V.
du) d(v) >n, then G is Ilamiltonian.
Proof: We omit the proof. The proof ean be lound in 13. p 223|

4. Worked Out Exercises


. Prove that a complete graph K. is Eulerian if and only if n is odd.

Proof: The complete graph K, is connected and contains n vertices. liach


venex of' K, is joineil to the remaining n-1 vertices by edges. Since K, is simple.
ihere are no parallel edges and loops. Ilence, d(v,) n-I lor cach vertex V
i - 1 . . . Hence, each d(v,) will be even if and
only if n-I
is even, i.c., if and
only ifn is odd. Hence, K will be Eulerian if and only if n is odd.

2. Prove that a complete graph K. n23, is lHamiltonian.

Proof : Let u be an arbitrary vertex of K,. Since K is complete.

d(u) = n - l 2 , since n g3. Hence, by Dirac's Theorem, K is Ilamiltonian.


2

You might also like