Top Banner
Chapter 1: Urban Services Chapter at a Glance… Management Science Optimal Solutions for Urban Services Euler Circuits Parking-Control Officer Problem Finding Euler Circuits Qualifications: Even Valence and Connectedness Beyond Euler Circuits Chinese Postman Problem Eulerizing a Graph Urban Graph Traversal Problems More practical applications and modifications
35

Chapter 1: Urban Services Chapter at a Glance… Management Science Optimal Solutions for Urban Services Euler Circuits Parking-Control Officer Problem.

Dec 16, 2015

Download

Documents

Lynn Rogers
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Chapter 1: Urban ServicesChapter at a Glance…

Management Science Optimal Solutions for Urban Services

Euler Circuits Parking-Control Officer Problem

Finding Euler Circuits Qualifications: Even Valence and Connectedness

Beyond Euler Circuits Chinese Postman Problem Eulerizing a Graph

Urban Graph Traversal Problems More practical applications and modifications

Page 2: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Chapter 1: Urban ServicesManagement Science Management Science

Uses mathematical methods to help find optimal solutions to management problems. Often called Operations Research.

Optimal Solutions — The best (most favorable) solution Government, business, and individuals all seek optimal results.

Optimization problems: Finish a job quickly Maximize profits Minimize costs

Urban Services to optimize: Checking Parking Meters Delivering Mail Removing Snow Collecting Garbage

Page 3: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Parking-Control Officer Problem Checking parking meters Our job is to find the most efficient route

for the parking-control officer to walk as he checks the parking meters.

Problem: Check the meters on the top two blocks.

Goals for Parking-Control Officer Must cover all the sidewalks without

retracing any more steps than necessary.

Should end at the same point at which he began.

Problem: Start and end at the top left-hand corner of the left-hand block.

Chapter 1: Urban ServicesEuler Circuits

Euler circuit – A circuit that traverses each edge of a graph exactly once and starts and stops at the same point.

Street map for part of a town.

Page 4: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Chapter 1: Urban ServicesEuler Circuits

Simplified graph (a) is superimposed on the streets with parking meters.

Simplified graph (b) is enlarged to show the points (vertices) labeled with letters

A – F which are linked by edges.

Graph – A finite set of dots (vertices) and connecting links (edges). Graphs can represent our city map, air routes, etc.

Vertex (pl. vertices) – A point (dot) in a graph where the edges meet. Edge – A link that joins two vertices in a graph (traverse edges). Path – A connected sequence of edges showing a route, described

by naming the vertices traveled. Circuit – A path that starts and ends at the same vertex.

Page 5: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Chapter 1: Urban ServicesEuler Circuits

Circuit vs. Euler Circuit (Both start and end at same vertex.)

Path vs. Circuit Paths – Paths can start and end

at any vertex using the edges given. examples: NLB, NMRB, etc.

Circuits – Paths that starts and ends at the same vertex. Examples: MRLM, LRBL, etc. Nonstop air routes

Circuits may retrace edges or not use all the edges.

Euler circuits travel each edge once and cover all edges.

Page 6: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Two Ways to Find an Euler Circuit Trial and error

Keep trying to create different paths to find one that starts and ends at the same point and does not retrace steps.

Mathematical approach (better method)

An Euler circuit exists if the following statements are true: All points (vertices) have even valence. The graph is connected.

Chapter 1: Urban ServicesFinding Euler Circuits

Leonhard Euler (1707–1783) Among other discoveries, he was credited with inventing the idea of a graph as well as the concepts of valence and connectedness.

Page 7: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

7

Chapter 1: Urban ServicesFinding Euler Circuits

Valence – The number of edges touching that vertex (counting spokes on the hub of a wheel).

Connectedness – You can reach any vertex by traversing the edges given in the graph.

Euler circuit – Has even-valent vertices and is connected. If vertices have odd valence, it is not an Euler circuit.

An Euler circuit starting and ending at A

Proving Euler’s TheoremIf a graph has an Euler circuit, it must have only even-valent vertices and it must be connected. This can be proved by pairing up edges at each vertex, thus proving all vertices have paired edges and further proving there is an even number of edges at each vertex, X. Thus, every edge at X has an incoming edge (arriving at vertex X) and an outgoing edge (leaving from vertex X). Example: At vertex B, you can pair up edges 2 and 3 and edges 9 and 10.

Page 8: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Chapter 1: Urban ServicesFinding Euler Circuits Is there an Euler

Circuit? Does it have even

valence? (Yes) Is the graph

connected? (Yes)Euler circuit exists if both “yes.”

Create (Find) an Euler Circuit Pick a point to start (if none has been

given to you). Number the edges in order of travel,

showing the direction with arrows. Cover every edge only once, and end at

the same vertex where you started.

Page 9: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Task: Represent the street network of stores to be serviced for delivery as a graph. The stars represent stores.

Page 10: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Solution:Start with a basic street network. Without the stores, it looks like this:

Page 11: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Solution: Now replace each intersection or corner with a vertex. Represent these with circles like this:

Page 12: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Solution:By replacing each row of stores with an edge, the graph is made!

Page 13: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Task:Is this graph an Euler Circuit?Draw an Euler Circuit.

Page 14: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Solution:The stores as an Euler Circuit!

Page 15: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Task: Consider the following floor plan. The open space represents a door that one can pass through. Represent the floor plan as a graph.

Page 16: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Solution:

Page 17: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Task: Is this graph an Euler Circuit?Draw an Euler Circuit.

Page 18: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Solution: OABEDACDCO

Page 19: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Chapter 1: Urban ServicesBeyond Euler Circuits

Chinese Postman Problem In real life, not all problems will

be perfect Euler circuits. If no Euler circuit exists (odd

valences), you want to minimize the length of the circuit by carefully choosing the edges to be retraced.

For our purposes, we assume all edges have the same length—simplified Chinese postman problem.

Chinese mathematician Meigu Guan first studied this problem in 1962, hence the name.

The blue dots indicate parking meters along the street.

Page 20: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Task: Represent the street network of parking meters as a graph. The blue dots represent parking meters.

Page 21: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Solution: Is this graph an Euler Circuit?

Page 22: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Chapter 1: Urban ServicesBeyond Euler Circuits Eulerize the Graph to Solve Chinese Postman Problem

For graphs that are connected but have vertices with odd valence, we will want to reuse (duplicate) the minimum number of edges until all vertices appear to have even valence.

Only existing edges can be duplicated (or added). Each edge that is duplicated (added) will later be the edge that

will be reused during eulerization.

22

The edge CG is reused, which would make all vertices appear to have even valence.

A circuit is made by reusing the edge CG. Below, the graph is eulerized (starts and stops at same point and covers all “edges” once — including reused ones.

Page 23: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Chapter 1: Urban ServicesBeyond Euler Circuits

Steps to Eulerizing a Graph1.Locate all of the vertices with an odd valence.2.Add one edge at each such vertex, matching up the new edge with an existing edge in the original graph.3.After Eulerization, each vertex has an even valence.4.Create an Euler circuit by numbering each edge and indicating which direction.5.Final step is to “squeeze our Euler circuit onto the original graph that indicates reuse.

**If you add the new edges correctly, the number of reuses of the edges equals the number of edges added during eulerization**

Page 24: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Chapter 1: Urban ServicesBeyond Euler Circuits Hints for Eulerizing a Graph

For the most efficient eulerization, look for the fewest edges to add to make all vertices even.

Typically, locate odd valence vertices and try to reuse (add) the connecting edge between the vertices.

Sometimes vertices are more than one edge apart; in this case, reuse edges between vertices (see graph below).

Remember: Only duplicate (add to) the existing edges.

Odd vertices, X and Y, are more than one edge apart.

This is not allowed — must only reuse existing edges.

Reuse existing edges between the odd vertices.

Page 25: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Chapter 1: Urban ServicesBeyond Euler Circuits A Better Eulerization

Squeeze the eulerized circuit onto the graph.

Only reuse (add) edge BC.

Page 26: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Task:Eulerize the following graph.

Page 27: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Task:Now “squeeze” the graph.

Page 28: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Solution:Is this optimal?

Page 29: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Chapter 1: Urban ServicesBeyond Euler Circuits Rectangular Networks – This is the name given to a street network

composed of a series of rectangular blocks that form a large rectangle made up of so many blocks high by so many blocks wide.

Eulerizing rectangular networks: “Edge Walker”

Start in upper left corner (at A). Travel (clockwise) around the

outer boundary. As you travel, add an edge by

the following rules:

1. If the vertex is odd, add an edge by linking it to the next vertex. If this next vertex becomes even, skip it (just keep “walking”). If this next vertex becomes odd, (on a corner) link it to the next vertex.

2. Repeat this rule until you reach the upper left corner again.

Page 30: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Chapter 1: Urban ServicesUrban Graph Traversal Problem Euler Circuits and Eulerizing Graphs: Practical Applications

Checking parking meters (discussed) Collecting garbage Salting icy roads Inspecting railroad tracks

Special Requirements May Need to Be Addressed Traffic directions Number of streets/lanes (divided routes) Parking time restriction

Page 31: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Chapter 1: Urban ServicesUrban Graph Traversal Problem

Theory Modifications Can Address Special Requirements A digraph (directed graph) is used to show one-way street.

Arrows show restriction in traversal possibilities (not part of circuits).

Territories may need to be divided into multiple routes.

Salt-spreading route, where each west-west street has two traffic lanes in the same directions

Appropriate digraph model

Page 32: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Chapter 1: Urban ServicesUrban Graph Traversal Problem

Dr. Doug Shaw is usually blamed for spreading mathematical rumors. After investigating the rumor sources we have the following: Basho T. heard the rumor from Jordan M.Wayland M. heard it from Ren W. & Jordan M.Doug Shaw heard it from Laurel S. and Wayland M.Ren W. heard it from Laurel S.Laurel S. heard it from Doug Shaw

Make a digraph to investigate!

Page 33: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Chapter 1: Urban ServicesUrban Graph Traversal Problem

Can one conclude that Doug Shaw is the true culprit?

Who is the only one who could not have started the rumor?

If Laurel S. incorrectly stated that Doug Shaw was the source of the rumor she heard, then what can one conclude?

Page 34: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Suppose Amina needs to spread a written message among friends. The paper can only be given to one person at a time. Because of a restriction in the flow of communication, her 6 friends can pass the message as follows:

Friend Can Deliver to

Heidi Nadia, Amina

Nadia Heidi, Adam

Ali Faiz, Bara

Faiz Bara, Ali

Amina Heidi, Faiz

Bara Faiz, Ali

Adam Heidi, Nadia

Page 35: Chapter 1: Urban Services Chapter at a Glance… Management Science  Optimal Solutions for Urban Services Euler Circuits  Parking-Control Officer Problem.

Create a digraph.