You are on page 1of 10

Euler and Hamilton Paths

Section 9.5

CSE 2813 Discrete Structures


Euler Paths and Circuits

• Seven bridges of Königsberg

C
c

D
A
a d

B
b
CSE 2813 Discrete Structures
Euler Paths and Circuits

• An Euler path is a path using every edge of


the graph G exactly once.
• An Euler circuit is an Euler path that returns
to its start.
C

• What about this one?


A D

B
CSE 2813 Discrete Structures
Necessary and Sufficient
Conditions
• Theorem: A connected multigraph has a
Euler circuit iff each of its vertices has
an even degree.

• Theorem: A connected multigraph has a


Euler path but not an Euler circuit iff it
has exactly two vertices of odd degree.

CSE 2813 Discrete Structures


Example

• Which of the following graphs have an


Euler circuit? Which have an Euler path?
a b a b a b

e e

d c d c c d e

CSE 2813 Discrete Structures


Hamilton Paths and
Circuits
• A Hamilton path in a graph G is a path
which visits every vertex in G exactly
once.

• A Hamilton circuit is a Hamilton path


that returns to its start.

CSE 2813 Discrete Structures


Finding Hamilton Circuits

• Unlike the Euler circuit problem, finding


Hamilton circuits is hard.
• There is no simple set of necessary and
sufficient conditions, and no simple
algorithm.

CSE 2813 Discrete Structures


Properties to look for ...

• No vertex of degree 1
• If a node has degree 2, then both
edges incident to it must be in any
Hamilton circuit.
• No smaller circuits contained in any
Hamilton circuit (the start/endpoint of
any smaller circuit would have to be
visited twice).

CSE 2813 Discrete Structures


A Sufficient Condition

• Let G be a connected simple graph with


n vertices with n  3.
G has a Hamilton circuit if the degree of
each vertex is  n/2.

CSE 2813 Discrete Structures


Summary

Property Euler Hamilton


Repeated visits to a given
YES NO
node allowed?
Repeated traversals of a NO NO
given edge allowed?
Omitted nodes allowed? NO NO
Omitted edges allowed? NO YES

CSE 2813 Discrete Structures

You might also like