42
Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution of Euler Leonhard Euler Euler’s Theorem Eulerizing a graph Further extension Chapter 1 Urban Services Chi-Kwong Li

Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

  • Upload
    vungoc

  • View
    221

  • Download
    6

Embed Size (px)

Citation preview

Page 1: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Chapter 1 Urban Services

Chi-Kwong Li

Page 2: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Objectives of presentationexpected learning outcome

Discuss how to use graph theory to model and solve problems inManagement science, also known as operations research.

Page 3: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Some sample problems

• Parking control problem - start from one point (the controlbooth), go through all sidewalks to check the meters, andreturn to the starting point without repeating too manysidewalks.

• (Chinese) postman problem - start from one point (postoffice), deliver mail to each sidewalk, and return to thestarting point without repeating too many sidewalks.

Page 4: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Some sample problems

• Parking control problem - start from one point (the controlbooth), go through all sidewalks to check the meters, andreturn to the starting point without repeating too manysidewalks.

• (Chinese) postman problem - start from one point (postoffice), deliver mail to each sidewalk, and return to thestarting point without repeating too many sidewalks.

Page 5: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Some sample problems

• Parking control problem - start from one point (the controlbooth), go through all sidewalks to check the meters, andreturn to the starting point without repeating too manysidewalks.

• (Chinese) postman problem - start from one point (postoffice), deliver mail to each sidewalk, and return to thestarting point without repeating too many sidewalks.

Page 6: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Seven bridge problem

The city of Königsberg in Prussia (nowKaliningrad, Russia) was set on both sidesof the Pregel River, and included two largeislands which were connected to each otherand the mainland by seven bridges.

The problem was to find a walk through the city that would crosseach bridge once and only once.

• The islands could not be reached by any route other than thebridges.

• Every bridge must have been crossed completely every time.

Page 7: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Seven bridge problem

The city of Königsberg in Prussia (nowKaliningrad, Russia) was set on both sidesof the Pregel River, and included two largeislands which were connected to each otherand the mainland by seven bridges.

The problem was to find a walk through the city that would crosseach bridge once and only once.

• The islands could not be reached by any route other than thebridges.

• Every bridge must have been crossed completely every time.

Page 8: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Seven bridge problem

The city of Königsberg in Prussia (nowKaliningrad, Russia) was set on both sidesof the Pregel River, and included two largeislands which were connected to each otherand the mainland by seven bridges.

The problem was to find a walk through the city that would crosseach bridge once and only once.

• The islands could not be reached by any route other than thebridges.

• Every bridge must have been crossed completely every time.

Page 9: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Seven bridge problem

The city of Königsberg in Prussia (nowKaliningrad, Russia) was set on both sidesof the Pregel River, and included two largeislands which were connected to each otherand the mainland by seven bridges.

The problem was to find a walk through the city that would crosseach bridge once and only once.

• The islands could not be reached by any route other than thebridges.

• Every bridge must have been crossed completely every time.

Page 10: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

The solution of Euler, 1736

• Construct the connected graph with the vertices, edges, anddegrees (valences) of vertices as shown above.

• We need a circuit which covers all the edges once andexactly once. Such a circuit is called an Euler Circuit.

• If a graph has an Euler circuit, then (1) the graph has to beconnected, and (2) every vertex has an even degrees.

Page 11: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

The solution of Euler, 1736

• Construct the connected graph with the vertices, edges, anddegrees (valences) of vertices as shown above.

• We need a circuit which covers all the edges once andexactly once. Such a circuit is called an Euler Circuit.

• If a graph has an Euler circuit, then (1) the graph has to beconnected, and (2) every vertex has an even degrees.

Page 12: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

The solution of Euler, 1736

• Construct the connected graph with the vertices, edges, anddegrees (valences) of vertices as shown above.

• We need a circuit which covers all the edges once andexactly once. Such a circuit is called an Euler Circuit.

• If a graph has an Euler circuit, then (1) the graph has to beconnected, and (2) every vertex has an even degrees.

Page 13: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Leonhard Euler, 1707-1783

• Leonhard Euler was a Swiss mathematicianwho made enormous contributions to a widerange of mathematics and physics includinganalytic geometry, trigonometry, geometry,calculus, number theory and graph theory.He published over 500 works.

• He continued to do mathematics and produced interestingresults even after he became totally blind later in his life.

• People commented that: Euler could calculate effortlessly,“just as men breathe, as eagles sustain themselves in the air”.

Page 14: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Leonhard Euler, 1707-1783

• Leonhard Euler was a Swiss mathematicianwho made enormous contributions to a widerange of mathematics and physics includinganalytic geometry, trigonometry, geometry,calculus, number theory and graph theory.He published over 500 works.

• He continued to do mathematics and produced interestingresults even after he became totally blind later in his life.

• People commented that: Euler could calculate effortlessly,“just as men breathe, as eagles sustain themselves in the air”.

Page 15: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Leonhard Euler, 1707-1783

• Leonhard Euler was a Swiss mathematicianwho made enormous contributions to a widerange of mathematics and physics includinganalytic geometry, trigonometry, geometry,calculus, number theory and graph theory.He published over 500 works.

• He continued to do mathematics and produced interestingresults even after he became totally blind later in his life.

• People commented that: Euler could calculate effortlessly,“just as men breathe, as eagles sustain themselves in the air”.

Page 16: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Euler’s Theorem

Euler’s Theorem A graph has an Euler circuit if and only if it isconnected and each vertex has an even degree.

Let’s see how to find an Euler circuit in a connected even graph:

• Start from any vertex, find a circuit C without repeated edges.• Remove the edges in C from the graph, and find Euler

circuits from each component of the remaining graph.• Combine C with the Euler circuits to get an Euler circuit in

the original graph.

Page 17: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Euler’s Theorem

Euler’s Theorem A graph has an Euler circuit if and only if it isconnected and each vertex has an even degree.

Let’s see how to find an Euler circuit in a connected even graph:

• Start from any vertex, find a circuit C without repeated edges.• Remove the edges in C from the graph, and find Euler

circuits from each component of the remaining graph.• Combine C with the Euler circuits to get an Euler circuit in

the original graph.

Page 18: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Euler’s Theorem

Euler’s Theorem A graph has an Euler circuit if and only if it isconnected and each vertex has an even degree.

Let’s see how to find an Euler circuit in a connected even graph:

• Start from any vertex, find a circuit C without repeated edges.

• Remove the edges in C from the graph, and find Eulercircuits from each component of the remaining graph.

• Combine C with the Euler circuits to get an Euler circuit inthe original graph.

Page 19: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Euler’s Theorem

Euler’s Theorem A graph has an Euler circuit if and only if it isconnected and each vertex has an even degree.

Let’s see how to find an Euler circuit in a connected even graph:

• Start from any vertex, find a circuit C without repeated edges.• Remove the edges in C from the graph, and find Euler

circuits from each component of the remaining graph.

• Combine C with the Euler circuits to get an Euler circuit inthe original graph.

Page 20: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Euler’s Theorem

Euler’s Theorem A graph has an Euler circuit if and only if it isconnected and each vertex has an even degree.

Let’s see how to find an Euler circuit in a connected even graph:

• Start from any vertex, find a circuit C without repeated edges.• Remove the edges in C from the graph, and find Euler

circuits from each component of the remaining graph.• Combine C with the Euler circuits to get an Euler circuit in

the original graph.

Page 21: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Example: Euler circuit

• Find an Euler circuit in the following graph

1 2 4

5 6 7 8

3

• {1,2}, {2,3}, {3,4}, {4,8}, {8,7}, {7,6}, {6,5}, {5,1}• {1,6}, {6,2}, {2,7}, {7,1}• {5,2}, {2,8}, {8,3}, {3,6}, {6,4}, {4,5}• Euler circuit:

{1,6}, {6,2}, {2,7}, {7,1}, {1,2}, {2,3}, {3,4}, {4,8}, {8,7},{7,6}, {6,5}, {5,2}, {2,8}, {8,3}, {3,6}, {6,4}, {4,5}, {5,1}

Page 22: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Example: Euler circuit

• Find an Euler circuit in the following graph

1 2 4

5 6 7 8

3

• {1,2}, {2,3}, {3,4}, {4,8}, {8,7}, {7,6}, {6,5}, {5,1}

• {1,6}, {6,2}, {2,7}, {7,1}• {5,2}, {2,8}, {8,3}, {3,6}, {6,4}, {4,5}• Euler circuit:

{1,6}, {6,2}, {2,7}, {7,1}, {1,2}, {2,3}, {3,4}, {4,8}, {8,7},{7,6}, {6,5}, {5,2}, {2,8}, {8,3}, {3,6}, {6,4}, {4,5}, {5,1}

Page 23: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Example: Euler circuit

• Find an Euler circuit in the following graph

1 2 4

5 6 7 8

3

• {1,2}, {2,3}, {3,4}, {4,8}, {8,7}, {7,6}, {6,5}, {5,1}• {1,6}, {6,2}, {2,7}, {7,1}

• {5,2}, {2,8}, {8,3}, {3,6}, {6,4}, {4,5}• Euler circuit:

{1,6}, {6,2}, {2,7}, {7,1}, {1,2}, {2,3}, {3,4}, {4,8}, {8,7},{7,6}, {6,5}, {5,2}, {2,8}, {8,3}, {3,6}, {6,4}, {4,5}, {5,1}

Page 24: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Example: Euler circuit

• Find an Euler circuit in the following graph

1 2 4

5 6 7 8

3

• {1,2}, {2,3}, {3,4}, {4,8}, {8,7}, {7,6}, {6,5}, {5,1}• {1,6}, {6,2}, {2,7}, {7,1}• {5,2}, {2,8}, {8,3}, {3,6}, {6,4}, {4,5}

• Euler circuit:{1,6}, {6,2}, {2,7}, {7,1}, {1,2}, {2,3}, {3,4}, {4,8}, {8,7},{7,6}, {6,5}, {5,2}, {2,8}, {8,3}, {3,6}, {6,4}, {4,5}, {5,1}

Page 25: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Example: Euler circuit

• Find an Euler circuit in the following graph

1 2 4

5 6 7 8

3

• {1,2}, {2,3}, {3,4}, {4,8}, {8,7}, {7,6}, {6,5}, {5,1}• {1,6}, {6,2}, {2,7}, {7,1}• {5,2}, {2,8}, {8,3}, {3,6}, {6,4}, {4,5}• Euler circuit:

{1,6}, {6,2}, {2,7}, {7,1}, {1,2}, {2,3}, {3,4}, {4,8}, {8,7},{7,6}, {6,5}, {5,2}, {2,8}, {8,3}, {3,6}, {6,4}, {4,5}, {5,1}

Page 26: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Eulerizing a graph

Ex 1: Does the following have an Euler circuit?

A

B C

D E

F

G

H

• How many edges do we need to repeat to cover all the edges?

—– we have to repeat {A,C} and {G,H}.• Observe that the vertices with odd degrees are A, C, G, and

H. Is this a coincidence?• If we add edges {A,C} and {G,H} to the original graph, we

will get a graph with only even degrees, thus get an Eulercircuit.

Page 27: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Eulerizing a graph

Ex 1: Does the following have an Euler circuit?

A

B C

D E

F

G

H

• How many edges do we need to repeat to cover all the edges?

—– we have to repeat {A,C} and {G,H}.• Observe that the vertices with odd degrees are A, C, G, and

H. Is this a coincidence?• If we add edges {A,C} and {G,H} to the original graph, we

will get a graph with only even degrees, thus get an Eulercircuit.

Page 28: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Eulerizing a graph

Ex 1: Does the following have an Euler circuit?

A

B C

D E

F

G

H

• How many edges do we need to repeat to cover all the edges?

—– we have to repeat {A,C} and {G,H}.

• Observe that the vertices with odd degrees are A, C, G, andH. Is this a coincidence?

• If we add edges {A,C} and {G,H} to the original graph, wewill get a graph with only even degrees, thus get an Eulercircuit.

Page 29: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Eulerizing a graph

Ex 1: Does the following have an Euler circuit?

A

B C

D E

F

G

H

• How many edges do we need to repeat to cover all the edges?

—– we have to repeat {A,C} and {G,H}.• Observe that the vertices with odd degrees are A, C, G, and

H. Is this a coincidence?

• If we add edges {A,C} and {G,H} to the original graph, wewill get a graph with only even degrees, thus get an Eulercircuit.

Page 30: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Eulerizing a graph

Ex 1: Does the following have an Euler circuit?

A

B C

D E

F

G

H

• How many edges do we need to repeat to cover all the edges?

—– we have to repeat {A,C} and {G,H}.• Observe that the vertices with odd degrees are A, C, G, and

H. Is this a coincidence?• If we add edges {A,C} and {G,H} to the original graph, we

will get a graph with only even degrees, thus get an Eulercircuit.

Page 31: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Ex 2: Find an Euler circuit in the following graph with fewest newedges / repeated edges.

1 2 43

9 10 11 12

5 6 7 8

• Identify the odd-degree vertices:2, 3, 5, 8, 10, 12.

• Pair up the vertices so that the totaldistance between pairs is smallest:(2, 3), (5, 8), and (10, 11) andadd the edges.

• In the new graph, find an Euler circuit:{1, 2}, {2, 3}, {3, 4}, {4, 8}, {8, 7}, {7, 6}, {6, 5}, {5, 9},{9, 10}, {10, 6}, {6, 2}, {2, 3}, {3, 7}, {7, 11}, {11, 10},{10, 11}, {11, 12}, {12, 8}, {8, 5}, {5, 1}.

• Replace the added edges (red edges) with paths in theoriginal graph:{1, 2}, {2, 3}, {3, 4}, {4, 8}, {8, 7}, {7, 6}, {6, 5}, {5, 9},{9, 10}, {10, 6}, {6, 2}, {2, 3}, {3, 7}, {7, 11}, {11, 10},{10, 11}, {11, 12}, {12, 8}, {8, 7}, {7, 6}, {6, 5}, {5, 1}.

Page 32: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Ex 2: Find an Euler circuit in the following graph with fewest newedges / repeated edges.

1 2 43

9 10 11 12

5 6 7 8

• Identify the odd-degree vertices:2, 3, 5, 8, 10, 12.

• Pair up the vertices so that the totaldistance between pairs is smallest:(2, 3), (5, 8), and (10, 11) andadd the edges.

• In the new graph, find an Euler circuit:{1, 2}, {2, 3}, {3, 4}, {4, 8}, {8, 7}, {7, 6}, {6, 5}, {5, 9},{9, 10}, {10, 6}, {6, 2}, {2, 3}, {3, 7}, {7, 11}, {11, 10},{10, 11}, {11, 12}, {12, 8}, {8, 5}, {5, 1}.

• Replace the added edges (red edges) with paths in theoriginal graph:{1, 2}, {2, 3}, {3, 4}, {4, 8}, {8, 7}, {7, 6}, {6, 5}, {5, 9},{9, 10}, {10, 6}, {6, 2}, {2, 3}, {3, 7}, {7, 11}, {11, 10},{10, 11}, {11, 12}, {12, 8}, {8, 7}, {7, 6}, {6, 5}, {5, 1}.

Page 33: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Ex 2: Find an Euler circuit in the following graph with fewest newedges / repeated edges.

1 2 43

9 10 11 12

5 6 7 8

• Identify the odd-degree vertices:2, 3, 5, 8, 10, 12.

• Pair up the vertices so that the totaldistance between pairs is smallest:(2, 3), (5, 8), and (10, 11) andadd the edges.

• In the new graph, find an Euler circuit:{1, 2}, {2, 3}, {3, 4}, {4, 8}, {8, 7}, {7, 6}, {6, 5}, {5, 9},{9, 10}, {10, 6}, {6, 2}, {2, 3}, {3, 7}, {7, 11}, {11, 10},{10, 11}, {11, 12}, {12, 8}, {8, 5}, {5, 1}.

• Replace the added edges (red edges) with paths in theoriginal graph:{1, 2}, {2, 3}, {3, 4}, {4, 8}, {8, 7}, {7, 6}, {6, 5}, {5, 9},{9, 10}, {10, 6}, {6, 2}, {2, 3}, {3, 7}, {7, 11}, {11, 10},{10, 11}, {11, 12}, {12, 8}, {8, 7}, {7, 6}, {6, 5}, {5, 1}.

Page 34: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Ex 2: Find an Euler circuit in the following graph with fewest newedges / repeated edges.

1 2 43

9 10 11 12

5 6 7 8

• Identify the odd-degree vertices:2, 3, 5, 8, 10, 12.

• Pair up the vertices so that the totaldistance between pairs is smallest:(2, 3), (5, 8), and (10, 11) andadd the edges.

• In the new graph, find an Euler circuit:{1, 2}, {2, 3}, {3, 4}, {4, 8}, {8, 7}, {7, 6}, {6, 5}, {5, 9},{9, 10}, {10, 6}, {6, 2}, {2, 3}, {3, 7}, {7, 11}, {11, 10},{10, 11}, {11, 12}, {12, 8}, {8, 5}, {5, 1}.

• Replace the added edges (red edges) with paths in theoriginal graph:{1, 2}, {2, 3}, {3, 4}, {4, 8}, {8, 7}, {7, 6}, {6, 5}, {5, 9},{9, 10}, {10, 6}, {6, 2}, {2, 3}, {3, 7}, {7, 11}, {11, 10},{10, 11}, {11, 12}, {12, 8}, {8, 7}, {7, 6}, {6, 5}, {5, 1}.

Page 35: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Further Extension

• What if there are weights (lengths) associated with theedges? Can we find the circuit containing all edges withminimum weight? [Chinese postman problem.]

• What if there are directions associated with the graph, i.e.,we are dealing with a directed graph (digraph).

• Theorem A digraph has a directed Euler circuit if and only if. . . .

• Other problems?

Page 36: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Further Extension

• What if there are weights (lengths) associated with theedges? Can we find the circuit containing all edges withminimum weight? [Chinese postman problem.]

• What if there are directions associated with the graph, i.e.,we are dealing with a directed graph (digraph).

• Theorem A digraph has a directed Euler circuit if and only if. . . .

• Other problems?

Page 37: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Further Extension

• What if there are weights (lengths) associated with theedges? Can we find the circuit containing all edges withminimum weight? [Chinese postman problem.]

• What if there are directions associated with the graph, i.e.,we are dealing with a directed graph (digraph).

• Theorem A digraph has a directed Euler circuit if and only if. . . .

• Other problems?

Page 38: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Further Extension

• What if there are weights (lengths) associated with theedges? Can we find the circuit containing all edges withminimum weight? [Chinese postman problem.]

• What if there are directions associated with the graph, i.e.,we are dealing with a directed graph (digraph).

• Theorem A digraph has a directed Euler circuit if and only if. . . .

• Other problems?

Page 39: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Homework

• Assign weights (costs) to the graph in Ex. 1 so that one willnot repeat {A,C} and {G,H} to finish a circuit covering alledges.

• Argue in Ex. 2 that one has to repeat at least 4 edges to finisha circuit covering all edges.

• [Extra credit] Show that in every graphs, the sum of degreesof all vertices is twice the number of edges. Hence deducethat the number of odd degree vertices must be even.[Handshaking lemma.]

The End!

Page 40: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Homework

• Assign weights (costs) to the graph in Ex. 1 so that one willnot repeat {A,C} and {G,H} to finish a circuit covering alledges.

• Argue in Ex. 2 that one has to repeat at least 4 edges to finisha circuit covering all edges.

• [Extra credit] Show that in every graphs, the sum of degreesof all vertices is twice the number of edges. Hence deducethat the number of odd degree vertices must be even.[Handshaking lemma.]

The End!

Page 41: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Homework

• Assign weights (costs) to the graph in Ex. 1 so that one willnot repeat {A,C} and {G,H} to finish a circuit covering alledges.

• Argue in Ex. 2 that one has to repeat at least 4 edges to finisha circuit covering all edges.

• [Extra credit] Show that in every graphs, the sum of degreesof all vertices is twice the number of edges. Hence deducethat the number of odd degree vertices must be even.[Handshaking lemma.]

The End!

Page 42: Chapter 1 Urban Services - William & Mary Mathematicsckli/Courses/m162/m162-2.pdf ·  · 2011-02-10Chapter 1 Urban Services Chi-Kwong Li Urban Services Seven bridge problem Solution

Chapter 1Urban Services

Chi-Kwong Li

Urban Services

Seven bridgeproblem

Solution ofEuler

Leonhard Euler

Euler’sTheorem

Eulerizing agraph

Furtherextension

Homework

• Assign weights (costs) to the graph in Ex. 1 so that one willnot repeat {A,C} and {G,H} to finish a circuit covering alledges.

• Argue in Ex. 2 that one has to repeat at least 4 edges to finisha circuit covering all edges.

• [Extra credit] Show that in every graphs, the sum of degreesof all vertices is twice the number of edges. Hence deducethat the number of odd degree vertices must be even.[Handshaking lemma.]

The End!