290 likes | 366 Views
Explore the shift from node-centric to edge-centric routing strategies. Learn about the Postman Problem, graph representation, Eulerian graphs, end-pairing algorithms, and solutions for non-Eulerian scenarios. Discover rural postman problems and heuristic approaches.
E N D
Management Science 461 Lecture 9 – Arc Routing November 18, 2008
We always assume demand and service is at the nodes … But what if they’re along the edges? What if the edges are more important than the nodes? Changing Focus
Arc Routing • Is it more important to visit every intersection, or cover every street? • What applications can you think of where arcs are more important than nodes? • What are the challenges of efficiently visiting each arc in a network?
Postman Problem • Formerly the Chinese Postman Problem, also called Route Inspection Problem • Given a network with nodes and arcs, find the shortest-distance route that traverses all arcs at least once • Don’t care which nodes to visit (or how often) • Ideally, every arc is visited once (lower bound) – is this always possible?
A B E C D A B E C D A B E C D Graph Representation • Directed (arcs) • Non-Directed (edges) • a/k/a bidirectional • Mixed (arcs and edges)
Remember This? • Try to draw the following without lifting your pen from the paper or re-drawing any segments
A A B B C C D D The Königsberg Bridges Euler, L. (1736), “Solutio problematis ad geometriam situs pertinentis,” Commentarii Academiae Scientiarum Imperialis Petropolitanae 8 128-140
3 A 5 3 B C D 3 Euler’s answer • Calculate the degree of each node • If all node degrees areeven, we can complete atour without retracingour steps • If all but two are even, canstart at one odd node, finishat the other (semi-Eulerian) • Otherwise, we have deadheading
Formal Definition • A graph is Eulerian or unicursal if: • Undirected graph: graph is connected, all node degrees are even • Directed graph: strongly connected, degree-in equals degree-out for each node
Formal Definition • Mixed graph (combo of dir/undir)“Every node must be incident to an even number of directed and undirected arcs. Moreover, for every subset S of all nodes V, the difference between the number of directed arcs from subset (V minus S) to subset S must be less or equal to the number of undirected arcs joining S and V minus S.”Eiselt et al (1995), “Arc Routing Problems, Part I: The Chinese Postman Problem,” Operations Research 43(2) 231-242.
The Postman Problem • What if the graph isn’t Eulerian? • Connecting two nodes of odd degree makes them even • There are an even number of odd-degree nodes in any graph • Algorithms to solve the Postman Problem revolve around “matching” odd-degree nodes with minimal cost
Non-Eulerian Graphs • Guan’s algorithm (1962) • Identify all odd-degree nodes • Find shortest paths between each pair • Select pairing of minimum cost • Augment the graph, solve Eulerian tour 3 1 1 2 3 4 1 3 2 4 4 5 3 6 3 1 6 5 3 7 3 8 9
Non-Eulerian Graphs • Identify odd degree nodes. 3 1 1 2 3 4 1 3 2 4 4 5 3 6 3 1 6 5 3 7 3 8 9
Non-Eulerian Graphs • Pair nodes through their shortest path in the graph. Select minimum cost pair assignment. • Possible pairs: • 2-4 and 6-8 (3+5 = 8) • 2-6 and 4-8 (4+3 = 7) • 2-8 and 4-6 (2+6 = 8) 3 1 1 2 3 4 1 3 2 4 4 3 5 6 3 1 6 5 3 7 8 3 9
Non-Eulerian Graphs • Augment the graph to make it Eulerian (check node degree). • Each new arc effectively means we’reretracing our steps • Now that graph is Eulerian, we apply end-pairing to find the solution • Challenge: the matching problem is difficult and increases exponentially, making this a “hard” problem to solve. 3 1 1 2 3 4 1 3 2 4 4 5 3 6 3 1 6 5 3 7 3 8 9
End-Pairing Algorithm • Hierholzer (1873) • Step 1: Trace simple tour. If all edges have been included, stop. • Step 2: Find a node v on the tour that’s connected to a node not on the tour. Form a second tour from v (do not overlap first tour) • Step 3: Merge both tours at the node v. If all edges have been traversed, stop. Otherwise go to Step 2.
1 2 4 3 5 6 7 End-Pairing Algorithm • Example
End-Pairing Algorithm • Example Step 1: 1-2-4-1 1 2 4 3 5 6 7
End-Pairing Algorithm • Example Step 1: 1-2-4-1 Step 2: v = 2 Path:2-3-4-6-5-2 Combine them 1-2-3-4-6-5-2-4-1 1 2 4 3 5 6 7
End-Pairing Algorithm Step 1: 1-2-4-1 Step 2: v = 2 Path: 2-3-4-6-5-2 Combine them 1-2-3-4-6-5-2-4-1 Step 2: v = 6 Path:6-5-7-6 Combine them 1-2-3-4-6-5-7-6-5-2-4-1 All edges visited. Stop. 1 2 4 3 5 6 7
Rural Postman Problem • Only a subset of the edges is mandatory • Proven to be NP-Hard (Orloff, 1974) • Technique: turn it into a postman problem and solve • Frederickson heuristic (1979): uses Min Spanning Tree as a sub-problem. Sol’ns within 3% of optimal
4 2 2 5 4 4 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 Rural Postman Problem Frederickson heuristic: • Find a minimum spanning tree (T) to connect the components of the graph • Augment graph • Apply end-pairing 4 5 2 3 3 4 6 8
4 2 2 5 4 4 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 Rural Postman Problem • Frederickson algorithm (1979) • Determine MST connecting connected components (T). 4 5 2 3 3 4 6 8
4 1 2 2 2 5 4 4 5 6 7 4 2 2 2 3 4 2 2 8 9 10 2 2 2 2 3 2 2 11 12 13 2 2 14 15 16 2 2 2 • Now the graph is connected… we need to: • Make Eulerian • Find Tour 2 2 17 18 19 2 2 2 2 2 20 21 22
4 1 2 2 2 5 4 4 5 6 7 4 2 2 2 3 4 2 2 8 9 10 2 2 2 2 3 2 2 11 12 13 2 2 14 15 16 Identify all nodes of odd degree (there are an even number of them) 2 2 2 2 2 17 18 19 2 2 2 2 2 20 21 22
4 1 2 2 2 5 4 4 5 6 7 4 2 2 2 3 4 2 2 8 9 10 2 2 2 2 3 2 2 11 12 13 2 2 14 15 16 Next we find shortest paths between each pair of odd-degree nodes. We use the shortest paths to find the minimum-cost matching: match nodes to minimize total cost of the distances between them (see Excel) 2 2 2 2 2 17 18 19 2 2 2 2 2 20 21 22
4 1 2 2 2 5 4 4 5 6 7 4 2 2 2 3 4 2 2 8 9 10 2 2 2 2 3 2 2 11 12 13 2 2 14 15 16 2 2 2 2 2 17 18 19 2 2 2 2 2 20 21 22
4 2 2 5 4 4 4 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 Rural Postman Problem The final graph is Eulerian. Apply end-pairing algorithm.
Review For any arc-routing problem (bidirectional) Step 1. If graph unconnected, connect it (min spanning tree). Step 2. If graph is non-Eulerian, make it Eulerian (find minimum matching using shortest paths, duplicate arcs). Step 3. Apply end-pairing algorithm to find the tour.