street-routing problems - lecture 29 sections...

33
Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether Hampden-Sydney College Mon, Apr 6, 2015 Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 1 / 29

Upload: truongcong

Post on 22-Jul-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Street-Routing ProblemsLecture 29

Sections 5.2

Robb T. Koether

Hampden-Sydney College

Mon, Apr 6, 2015

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 1 / 29

Page 2: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

1 Street-Routing ProblemsThe Security Guard ProblemThe Mail Carrier ProblemThe Königsberg ProblemThe Bridges of Madison County Problem

2 Examples

3 Euler Paths and Circuits

4 Definitions

5 Euler’s Theorems

6 Assignment

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 2 / 29

Page 3: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Outline

1 Street-Routing ProblemsThe Security Guard ProblemThe Mail Carrier ProblemThe Königsberg ProblemThe Bridges of Madison County Problem

2 Examples

3 Euler Paths and Circuits

4 Definitions

5 Euler’s Theorems

6 Assignment

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 3 / 29

Page 4: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Street-Routing Problems

We have already considered the Traveling Salesman Problem.There are many other problems that would fall under the heading“Street-Routing Problems.”We will consider four of them.

The Security Guard ProblemThe Mail Carrier ProblemThe Königsberg Bridge ProblemThe Bridges of Madison County

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 4 / 29

Page 5: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Street-Routing Problems

We have already considered the Traveling Salesman Problem.There are many other problems that would fall under the heading“Street-Routing Problems.”We will consider four of them.

The Security Guard Problem

The Mail Carrier ProblemThe Königsberg Bridge ProblemThe Bridges of Madison County

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 4 / 29

Page 6: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Street-Routing Problems

We have already considered the Traveling Salesman Problem.There are many other problems that would fall under the heading“Street-Routing Problems.”We will consider four of them.

The Security Guard ProblemThe Mail Carrier Problem

The Königsberg Bridge ProblemThe Bridges of Madison County

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 4 / 29

Page 7: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Street-Routing Problems

We have already considered the Traveling Salesman Problem.There are many other problems that would fall under the heading“Street-Routing Problems.”We will consider four of them.

The Security Guard ProblemThe Mail Carrier ProblemThe Königsberg Bridge Problem

The Bridges of Madison County

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 4 / 29

Page 8: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Street-Routing Problems

We have already considered the Traveling Salesman Problem.There are many other problems that would fall under the heading“Street-Routing Problems.”We will consider four of them.

The Security Guard ProblemThe Mail Carrier ProblemThe Königsberg Bridge ProblemThe Bridges of Madison County

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 4 / 29

Page 9: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Outline

1 Street-Routing ProblemsThe Security Guard ProblemThe Mail Carrier ProblemThe Königsberg ProblemThe Bridges of Madison County Problem

2 Examples

3 Euler Paths and Circuits

4 Definitions

5 Euler’s Theorems

6 Assignment

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 5 / 29

Page 10: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

The Security Guard Problem

Example (The Security Guard Problem)

A security guard must patrol every street of the neighborhood.What route should he follow to minimize the total distance?Must he walk some streets twice?

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 6 / 29

Page 11: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Outline

1 Street-Routing ProblemsThe Security Guard ProblemThe Mail Carrier ProblemThe Königsberg ProblemThe Bridges of Madison County Problem

2 Examples

3 Euler Paths and Circuits

4 Definitions

5 Euler’s Theorems

6 Assignment

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 7 / 29

Page 12: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

The Mail Carrier Problem

Example (The Mail Carrier Problem)

A mail carrier must deliver mail to both sides of every street of theneighborhood, except the boundary.What route should he follow to minimize the total distance?Must he walk some streets twice?

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 8 / 29

Page 13: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Outline

1 Street-Routing ProblemsThe Security Guard ProblemThe Mail Carrier ProblemThe Königsberg ProblemThe Bridges of Madison County Problem

2 Examples

3 Euler Paths and Circuits

4 Definitions

5 Euler’s Theorems

6 Assignment

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 9 / 29

Page 14: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

The Königsberg Problem

Example (The Königsberg Problem)

A Königsberger would like to take a stroll across the sevenbridges.Can it be done without ever crossing the same bridge twice?Does it matter where the stroller starts?

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 10 / 29

Page 15: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Outline

1 Street-Routing ProblemsThe Security Guard ProblemThe Mail Carrier ProblemThe Königsberg ProblemThe Bridges of Madison County Problem

2 Examples

3 Euler Paths and Circuits

4 Definitions

5 Euler’s Theorems

6 Assignment

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 11 / 29

Page 16: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

The Bridges of Madison County Problem

Example (The Bridges of Madison County Problem)

A photographer wants to photograph each of the 11 bridges ofMadison County.He must cross the bridge to photograph it and each bridge has a$5 toll.What route will minimize the total cost?

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 12 / 29

Page 17: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

The Bridges of Madison County Problem

Example (The Bridges of Madison County Problem)

8

7

9

6

10

5

1143

2

1

A photographer wants to photograph each of the 11 bridges ofMadison County.He must cross the bridge to photograph it and each bridge has a$5 toll.What route will minimize the total cost?

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 13 / 29

Page 18: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Outline

1 Street-Routing ProblemsThe Security Guard ProblemThe Mail Carrier ProblemThe Königsberg ProblemThe Bridges of Madison County Problem

2 Examples

3 Euler Paths and Circuits

4 Definitions

5 Euler’s Theorems

6 Assignment

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 14 / 29

Page 19: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Example

Example (The Security Guard Problem)

In the Security Guard Problem, we want a path that traversesevery edge at least once and has the minimal total length.

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 15 / 29

Page 20: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Example

Example (The Mail Carrier Problem)

In the Mail Carrier Problem, we want a path that traverses everyedge at least twice (except the boundary) and has the minimaltotal length.With the duplicated edges, the Mail Carrier Problem is the sameas the Security Guard Problem.

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 16 / 29

Page 21: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Example

Example (The Bridges of Königsberg Problem)

In the Bridges of Königsberg Problem, we want a circuit thattraverses each edge exactly once.

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 17 / 29

Page 22: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Example

Example (The Bridges of Königsberg Problem)

We draw a graph that shows only the relevant parts.

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 18 / 29

Page 23: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Example

Example (The Bridges of Madison County Problem)

In the Bridges of Madison County Problem, we want a circuit thattraverses each edge at least once and has the minimal totallength.This is the same as the Security Guard Problem.

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 19 / 29

Page 24: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Outline

1 Street-Routing ProblemsThe Security Guard ProblemThe Mail Carrier ProblemThe Königsberg ProblemThe Bridges of Madison County Problem

2 Examples

3 Euler Paths and Circuits

4 Definitions

5 Euler’s Theorems

6 Assignment

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 20 / 29

Page 25: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Euler Paths and Circuits

Definition (Euler Path)An Euler path (pronounced "oiler") is a path that traverses each edgeexactly once.

Definition (Euler Circuit)An Euler circuit is an Euler path that is a circuit.

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 21 / 29

Page 26: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Euler Paths and Circuits

8

7

9

6

10

5

1143

2

1

In the Bridges of Königsberg Problem, we seek an Euler path andan Euler circuit.

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 22 / 29

Page 27: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Outline

1 Street-Routing ProblemsThe Security Guard ProblemThe Mail Carrier ProblemThe Königsberg ProblemThe Bridges of Madison County Problem

2 Examples

3 Euler Paths and Circuits

4 Definitions

5 Euler’s Theorems

6 Assignment

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 23 / 29

Page 28: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Definitions

Definition (Connected)A graph is connected if, for any two vertices, there is a path from oneto the other.

Definition (Even and Odd Vertices)A vertex is even if an even number of edges emanate from it.Otherwise, it is odd.

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 24 / 29

Page 29: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Outline

1 Street-Routing ProblemsThe Security Guard ProblemThe Mail Carrier ProblemThe Königsberg ProblemThe Bridges of Madison County Problem

2 Examples

3 Euler Paths and Circuits

4 Definitions

5 Euler’s Theorems

6 Assignment

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 25 / 29

Page 30: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Euler’s Theorems

Theorem (Euler Circuits)If a graph is connected and every vertex is even, then it has an Eulercircuit. Otherwise, it does not have an Euler circuit.

Theorem (Euler Paths)If a graph is connected and it has exactly 2 odd vertices, then it has anEuler path. If it has more than 2 odd vertices, then it does not have anEuler path.

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 26 / 29

Page 31: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Connected and Disconnected

Connected Disconnected

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 27 / 29

Page 32: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Outline

1 Street-Routing ProblemsThe Security Guard ProblemThe Mail Carrier ProblemThe Königsberg ProblemThe Bridges of Madison County Problem

2 Examples

3 Euler Paths and Circuits

4 Definitions

5 Euler’s Theorems

6 Assignment

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 28 / 29

Page 33: Street-Routing Problems - Lecture 29 Sections 5people.hsc.edu/faculty-staff/robbk/Math111/Lectures/Spring 2015... · Street-Routing Problems Lecture 29 Sections 5.2 Robb T. Koether

Assignment

AssignmentChapter 5: Exercises 19, 20, 21, 22, 27.

Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Mon, Apr 6, 2015 29 / 29