You are on page 1of 29

Management

Science 461
Lecture 9 Arc Routing
November 18, 2008
Changing Focus

We always assume
demand and service is at
the nodes

But what if theyre along


the edges?

What if the edges are more


important than the nodes?
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
Dont care which nodes to visit (or how often)
Ideally, every arc is visited once (lower bound)
is this always possible?
Graph Representation
Directed (arcs) A B

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

Euler, L. (1736), Solutio problematis ad geometriam situs pertinentis,


Commentarii Academiae Scientiarum Imperialis Petropolitanae 8
128-140
Eulers answer
Calculate the degree of each node
3
If all node degrees are
even, we can complete a A
tour without retracing 5 3
our steps
B C
If all but two are even, can
start at one odd node, finish
at the other (semi-Eulerian) D
3

Otherwise, we have deadheading


Formal Definition
A graph is Eulerian or unicursal if:

Undirectedgraph: 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 isnt 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
Guans algorithm (1962)

Identify all odd-degree


3 1
1 2 3 nodes
4 1 3 Find shortest paths
4
2
3
5
4
6
between each pair
Select pairing of minimum
3 1 6
cost
7
5
3
8
3
9 Augment the graph, solve
Eulerian tour
Non-Eulerian Graphs

Identify odd degree


1
3
2
1
3 nodes.
4 1 3

2 4
4 3
5 6

3 1 6

5 3
7 3
8 9
Non-Eulerian Graphs

Pair nodes through their


1
3
2
1
3 shortest path in the graph.
Select minimum cost pair
4 1 3
assignment.
2 4
4 3
5 6

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.

You might also like