Spring 2015 Mathematics in Management Science Chinese Postman Problem What is CPP? CPP & ECs & EPs Fleury’s Algorithm Eulerization
Jan 01, 2016
Spring 2015Mathematics in
Management Science
Chinese Postman Problem
What is CPP?CPP & ECs & EPsFleury’s AlgorithmEulerization
Parking Meter Problem
Blue dots indicate parking meters along certain streets. Meter reader must check each meter. Want efficient route.
Parking Meter Problem
Create associated graph with just the information we need. Identify corners B’,B” & C’,C” etc; corners become vtxs.
Meter reader must traverse each edge of above graph (to read all meters along it).
Would prefer no retracing; want an Euler circuitDoes graph have an Euler circuit?
So, what should meter reader do?
Chinese Postman Problem
Chinese mathematician Meigu Guan first studied this problem in 1962, hence the name.
The Problem
Given a connected graph, find a minimal length circuit (or path)
traversing all edges of the graph.
Solving CPP – easy case
If graph has an Euler circuit (or path), it is a minimal length circuit (or path) traversing the entire graph.
Euler’s Circuit/Path Theorems tell us exactly when a graph has EC/EP.
How do we actually find an Euler circuit or Euler path?
Fleury’s Algorithm
Check that the graph is connected and either has no odd vertices (for circuit), or has two odd vertices (for path).
Choose a starting vertex. For a circuit, can be any vertex; for path, it must be one of the two odd vertices.
At each step, if you have a choice, don’t choose a bridge of the yet-to-be-traveled part of the graph.
Bridges
An edge is called a bridge if erasing it makes the graph disconnected.
BF, FG, FH are bridges
Summary – CPP so far
Euler circuits and paths provide the most efficient means to traverse all edges of a graph.
Euler’s Theorems tell us an easy way to determine when a graph has an Euler circuit or path: the graph must be connected & all (all but 2 for path) vertices must be even.
Solving CPP – harder case
What if there are no ECs or EPs?No EC means: some odd vertex! No EP means: 4 or more odd vtxs.No EC/EP: gotta retrace edge(s).• Eulerize the graph• Find an EC (or EP) on new graph• Transfer back to original graph
(“squeeze”)
Pix’d graph has no EC; C & G odd valence.
Gonna have to retrace the edge CG.
To Eulerize this graph, duplicate edge CG.
Get a new graph! Careful; this new graph is not the same as the original.
Pix’d graph has no EC; C & G odd valence.
Gonna have to retrace the edge CG.
To Eulerize this graph, duplicate edge CG.
Get new graph pix’d below where the blue edge is duplicated CG edge.
Now find EC for this new graph; this easy.
Then, gotta transfer this EC back to original graph; traversing the blue edge here corresponds to retracing the CG edge in original graph.
The numbered edges describe the circuitA→B→C→D→H→G→C→G→F→B→F→E→A
in the original graph.
This then gives an efficient route for our meter reader.
Eulerizing Graphs
If all vtxs are even, done (have an EC). Otherwise, have odd vtxs: mark them. (Must have even number of odd vtxs!)
Pick an odd vtx. Duplicate an existing edge having this vtx as an endpoint.
Change valences of two vtxs just connected. All vtxs even – done; otherwise, repeat the above step.
Example
Example
Example
Example
Finding Good Eulerizations
Locate odd vertices. Try to duplicate connecting edges between pairs of odd vertices.
Sometimes odd vertices more than one edge apart; if so, gotta duplicate buncha edges.
Look for the fewest edges to duplicate to make all vertices even.
Rectangular Networks
“Edge Walker” AlgorithmStart in upper left corner. Travel
(clockwise) around outer boundary.As you travel, duplicate edge via rules:• If vertex is odd, duplicate edge and
link this vertex to next vertex.– If next vertex becomes even, skip it (just
keep “walking”).– If next vertex becomes odd, (on a
corner) link it to the next vertex.• Repeat rules until you reach the
upper left corner again.
Sometimes need an exhaustive route, but no “closed” requirement—route may start & stop at different points.
Now want to leave two odd vertices on the graph unchanged, and change the other odd vertices into even.
Route begins & ends at two odd vtxs.
Semi-Eulerizing Graphs
Conclusion
GraphsThe idea goes back to Euler.
Graph ModelsGraph theory useful to solve routing and network problems.
AlgorithmStep-by-step rules.Fleury’s Alg, “Edge Walker” Alg