Presentation is loading. Please wait.

Presentation is loading. Please wait.

Euler and Hamilton Paths

Similar presentations


Presentation on theme: "Euler and Hamilton Paths"— Presentation transcript:

1 Euler and Hamilton Paths
Section 9.5 CSE 2813 Discrete Structures

2 Euler Paths and Circuits
Seven bridges of Königsberg A B C D a b c d CSE 2813 Discrete Structures

3 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. A B C D What about this one? CSE 2813 Discrete Structures

4 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

5 CSE 2813 Discrete Structures
Example Which of the following graphs have an Euler circuit? Which have an Euler path? e d a c b e d a c b e c a d b CSE 2813 Discrete Structures

6 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

7 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

8 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

9 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

10 CSE 2813 Discrete Structures
Summary Property Euler Hamilton Repeated visits to a given node allowed? Repeated traversals of a given edge allowed? Omitted nodes allowed? Omitted edges allowed? YES NO NO NO NO NO NO YES CSE 2813 Discrete Structures


Download ppt "Euler and Hamilton Paths"

Similar presentations


Ads by Google