Professional Documents
Culture Documents
Chapter5 Part2
Chapter5 Part2
B B
A A
C C
E D E D
B B
A A
C C
E D E D
B B
A A
C C
E D E D
B B
A A
C C
E D E D
For every vertex v other than the starting and ending vertices,
the path P enters v the same number of times that it leaves v
(say s times).
The Criterion for Euler Paths
For every vertex v other than the starting and ending vertices,
the path P enters v the same number of times that it leaves v
(say s times).
For every vertex v other than the starting and ending vertices,
the path P enters v the same number of times that it leaves v
(say s times).
Odd vertices
How Many Odd Vertices?
6 8 6
Number of odd vertices
2 4 8
The Handshaking Theorem
The Handshaking Theorem says that
d1 + d2 + · · · + dn−1 + dn = 2e
Or, equivalently,
d1 + d2 + · · · + dn−1 + dn
e=
2
The Handshaking Theorem
Why “Handshaking”?
delete
loop e
Bridges
If two or more edges share both endpoints, then removing any
one of them cannot make the graph disconnected. Therefore,
none of those edges is a bridge.
delete
multiple
C edges
A
B
D
Bridges
If two or more edges share both endpoints, then removing any
one of them cannot make the graph disconnected. Therefore,
none of those edges is a bridge.
delete
multiple
C edges
A
B
D
Finding Euler Circuits and Paths
B
A
C
D
E F
Finding Euler Circuits and Paths
There are two odd vertices, A and F. Let’s start at F.
B
A
C
D
E F
Finding Euler Circuits and Paths
Start walking at F. When you use an edge, delete it.
B
A
C
D
E F
Finding Euler Circuits and Paths
Path so far: FE
B
A
C
D
E F
Finding Euler Circuits and Paths
Path so far: FEA
B
A
C
D
E F
Finding Euler Circuits and Paths
Path so far: FEAC
B
A
C
D
E F
Finding Euler Circuits and Paths
Path so far: FEACB
B
A
C
D
E F
Finding Euler Circuits and Paths
B
A
C
D
E F
Finding Euler Circuits and Paths
Path so far: FEACBD.
B
A
C
D
E F
Finding Euler Circuits and Paths
Path so far: FEACBD. Don’t cross the bridge!
B
A
C
D
E F
Finding Euler Circuits and Paths
Path so far: FEACBDC
B
A
C
D
E F
Finding Euler Circuits and Paths
Path so far: FEACBDC Now we have to cross the bridge CF.
B
A
C
D
E F
Finding Euler Circuits and Paths
Path so far: FEACBDCF
B
A
C
D
E F
Finding Euler Circuits and Paths
Path so far: FEACBDCFD
B
A
C
D
E F
Finding Euler Circuits and Paths
Path so far: FEACBDCFDB
B
A
C
D
E F
Finding Euler Circuits and Paths
Euler Path: FEACBDCFDBA
B
A
C
D
E F
Finding Euler Circuits and Paths
Euler Path: FEACBDCFDBA
B
A
C
D
E F
Fleury’s Algorithm
A D
B C
E F G H
J K L M
O P
N Q