0% found this document useful (0 votes)
80 views15 pages

An Euler Circuit: Review

An Euler circuit covers each edge of a connected graph exactly once and exists if every vertex is even. An Euler path exists in a connected graph with exactly two odd vertices if it starts at one odd vertex and ends at the other. The document discusses Euler's theorem and path theorem, provides examples of graphs with and without Euler circuits/paths, and describes techniques for finding and representing Euler circuits like duplicating edges to make all vertices even in a process called "eulerizing".

Uploaded by

daryl.prado
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)
80 views15 pages

An Euler Circuit: Review

An Euler circuit covers each edge of a connected graph exactly once and exists if every vertex is even. An Euler path exists in a connected graph with exactly two odd vertices if it starts at one odd vertex and ends at the other. The document discusses Euler's theorem and path theorem, provides examples of graphs with and without Euler circuits/paths, and describes techniques for finding and representing Euler circuits like duplicating edges to make all vertices even in a process called "eulerizing".

Uploaded by

daryl.prado
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/ 15

Review

An Euler Circuit
8 1
P

7 5 2
4

6 3

A circuit that covers each edge exactly once is


called an Euler circuit.
Can we tell when an Euler circuit is possible?
EULER’S CIRCUIT THEOREM

■ If a graph is connected and every


vertex is even, then it has an Euler
circuit (at least one, usually more).
■ If a graph has any odd vertices, then
it does not have an Euler circuit.
Illustration using the Theorem

This graph is
connected but it
has odd vertices
(e.g. C). This
graph has no
Euler circuits.

Figure 1-15(b) in text.


Illustration using the Theorem

This graph is
connected
and all of the
vertices are
even. This
graph does
have Euler
circuits.
Figure 1-15(c) in text.
An Euler Path
5 1
P

6 2
4

7 Q 3

A path that covers each edge exactly once is


called an Euler path.
Can we tell when an Euler path is possible?
EULER’S PATH THEOREM
■ If a graph is connected and has
exactly two odd vertices, then it has
an Euler path (at least one, usually
more). Any such path must start at
one of the odd vertices and end at the
other one.
■ If a graph has more than two odd
vertices, then it cannot have an Euler
path.
An Euler Path
5 1
P

6 2
4

7 Q 3

There are two odd vertices: P and Q


This Euler path begins at P and ends at Q.
Guidance for Finding Euler Circuits
A

1 2

B C
3

E D
Bad choice!! Good
Choice

Never use an edge that is the only link between two


parts of the graph that still need to be covered.
Does this graph have an Euler Circuit?
degree = 3

degree = 3
No, according to Euler’s Theorem
In order to make a circuit that covers all edges
in this graph, some edges must be reused!
Eulerizing a Graph
• Duplicating an existing edge on a graph can
be interpreted as reusing an existing edge.
• Duplicating edges on a graph in order to
make all vertices even is called eulerizing
the graph.
• In this course, eulerizing a graph is limited
to duplicating existing edges.
Can it become “Eulerized?”
(4) (4) (2)
(2) B C
A D

E H
(2) F G (2)
(4) (4)

Answer: Yes, if we duplicate (reuse) an edge!


Circuits with Reused Edges
1 B 2 C 3
A D

12 10 9 7 6 4

E H
11 8 5
F G

1 B 2 C 3
A D

12 10 9 7
6 4

E H
11 8 5
F G
Example 1.22 Covering a 3 by 3 Street Grid

The graph represents a 3 block


by 3 block street grid.
How can we find an optimal
route that covers all the edges
of the graph and ends back at
the starting vertex?
Our first step is to identify the
odd vertices. (Shown in red.)
Example 1.22 Covering a 3 by 3 Street Grid

When we duplicate edges BC,


EF, HI, and KL, we get this
graph.
This is a eulerized version of the
original graph–its vertices are all
even, so it has an Euler circuit.
Could we have done this with
fewer than four duplicate edges?
Eulerizing a Street Network
Algorithm:
• “Walk” around the outside
edges of the network.
• Duplicate an edge
whenever you encounter
an odd degree by linking
to the next vertex.
• If the degree of this vertex
becomes even, skip to the
next vertex.

You might also like