Professional Documents
Culture Documents
Science 461
Lecture 9 Arc Routing
November 18, 2008
Changing Focus
We always assume
demand and service is at
the nodes
C
D
Non-Directed (edges) A B
a/k/a bidirectional E
C
D
A B
Mixed (arcs and edges) E
C
D
Remember This?
Try to draw the following without lifting
your pen from the paper or re-drawing any
segments
The Knigsberg Bridges
A
A
B
C B C
D
D
2 4
4 3
5 6
3 1 6
5 3
7 3
8 9
Non-Eulerian Graphs
3 1 6
Possible pairs:
5 3 2-4 and 6-8 (3+5 = 8)
7 3
8 9
2-6 and 4-8 (4+3 = 7)
2-8 and 4-6 (2+6 = 8)
Non-Eulerian Graphs
Augment the graph to make it
Eulerian (check node degree).
Each new arc effectively
1
3
2
1
3
means wereretracing our steps
Now that graph is Eulerian,
4 1 3
we apply end-pairing to find the
2 4
4 3
5 6 solution
3 1 6 Challenge: the matching
5 3
problem is difficult and
7 3
8 9
increases exponentially, making
this a hard problem to solve.
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 thats
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.
End-Pairing Algorithm
Example
1 2
4 3 5
6 7
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
1 2
Combine them
1-2-3-4-6-5-2-4-1
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
1 2
Combine them
1-2-3-4-6-5-2-4-1
4 3 5 Step 2: v = 6
Path: 6-5-7-6
Combine them
6 7
1-2-3-4-6-5-7-6-5-2-4-1
All edges visited. Stop.
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. Solns
within 3% of optimal
Rural Postman Problem
Frederickson heuristic:
4
4
1. Find a minimum
2 2
4 5 4 5
spanning tree (T) to
4 2 2 2 connect the
2 2
components of the
2
3 3 2 2 2 graph
2 2
2 2
4 2. Augment graph
2 2 2
6
3. Apply end-pairing
8
2 2
2 2 2
2 2
Rural Postman Problem
4
4
2 2
Frederickson algorithm (1979)
5
4
4
4 5 Determine MST connecting
2 2 2
2 2 connected components (T).
2 2 2 2
3 3
2 2
4
2 2
6
2 2 2 8
2 2
2 2 2
2 2
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
2 2 connected we need to:
17 18 19 A) Make Eulerian
B) Find Tour
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
2 2 2 degree (there are an
2 2 even number of them)
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
2 2 2
of odd-degree nodes. We
2 2 use the shortest paths to
17 18 19 find the minimum-cost
matching: match nodes to
2 2 2
minimize total cost of the
2 2 distances between them
20 21 22 (see Excel)
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 (i, j) in Full
2 2
i j Paths
2 3 2->3
17 18 19
6 10 6->7->10
8 11 8->11
2 2 2 12 15 12 -> 11 -> 4 -> 16 -> 15
16 19 16->19
2 2
17 21 17->18->21
20 21 22
Rural Postman Problem
2 2
5
4 4
4
2 2 2
2 2
2
2 2 2
3
2 2
2 2
The final graph is
2 2 2
2 2
Eulerian.
Apply end-pairing
2 2 2
2 2 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.