© b.raghavachari & j.veerasamy, utd 1 approximation algorithms for postman problems jeyakesavan...
TRANSCRIPT
1 © B.Raghavachari & J.Veerasamy, UTD
Approximation Algorithms forPostman Problems
Jeyakesavan Veerasamy*
* Joint work with Balaji Raghavachari
Samsung Telecommunications America, Inc. and
The University of Texas at Dallas
2 © B.Raghavachari & J.Veerasamy, UTD
Euler Tour Problem
Find a tour that traverses all edges exactly once.
Even degree node
A
Input Output
A graph is Eulerian if and only if it is connected andthe degree of each vertex is even (Euler, 1736!)
3 © B.Raghavachari & J.Veerasamy, UTD
Non-Eulerian graph
A
B
Even degree node
Odd degree nodeWalk starting at A got stuck at B
4 © B.Raghavachari & J.Veerasamy, UTD
Directed Euler Tour Problem
A
Balanced node
Find a tour in a directed graph that traverses all edges exactly once.
A directed graph is Eulerian if and only if it is strongly connected and indegree = outdegree at each vertex
5 © B.Raghavachari & J.Veerasamy, UTD
Non-Eulerian Directed Graph
A B
Balanced node
Deficit node
Surplus nodeWalk starting at A got stuck at B
6 © B.Raghavachari & J.Veerasamy, UTD
Chinese Postman Problem (CPP)
Find shortest tour visiting all edges at least once.
Even degree node
Odd degree node
A
Input Augmented Output
Add a minimum-weight T-join which has odd degree at odd-degree nodes and even-degree at even-degree nodes
7 © B.Raghavachari & J.Veerasamy, UTD
Directed CPP
Balanced node
Deficit node
Surplus node
Output
Input
Add a minimum-weight subgraph which has outdegree = indegree + surplus at surplus nodesindegree = outdegree + deficit at deficit nodes
8 © B.Raghavachari & J.Veerasamy, UTD
Mixed Postman Problem (MPP)
Balanced node
Unbalanced node
Solution 1 Solution 2
Includes both undirected and directed edges
Input
NP-hard!
9 © B.Raghavachari & J.Veerasamy, UTD
Windy Postman Problem (WPP)
Even degree node
Odd degree node
Undirected edges only, but traversal costs vary based on direction.
NP-hard!
2
2
2
2
2
2
7
8
5
5
5
6
9
10
5
5
5
5
10
© B.Raghavachari & J.Veerasamy, UTD
Applications: City Management
Elm
Commerce
Main
JacksonHouston
Street cleaning, Mail delivery, Snow removal, Courier delivery route
11
© B.Raghavachari & J.Veerasamy, UTD
Previous work
• Edmonds and Johnson, 1973: – Algorithms for undirected CPP and directed CPP– Optimal algorithm for even degree mixed graphs– Suggested a 2-approximation algorithm for MPP
• MPP: Frederickson, 1979: – Designed two approximation algorithms– Select the best of the two solutions computed– Worst-case performance ratio = 5/3
• WPP: Win, 1989:– Optimal algorithm for Eulerian graphs– 2-approximation algorithm for general graphs
12
© B.Raghavachari & J.Veerasamy, UTD
Our results
• 3/2 approximation algorithm for Mixed Postman Problem
• 3/2 approximation algorithm for Windy Postman Problem
• Optimal algorithm for Mixed Postman Problem with duplication restricted to a subset of edges and arcs for even degree input graphs.
• 3/2 approximation algorithm for Mixed Postman Problem with duplication is restricted to edges.
• Euler Tour Problem with restriction on turns is NP-complete.
• log n approximation algorithms for Directed Rural Postman Problem, General Routing Problem, and Postman Problem with restricted turns.
13
© B.Raghavachari & J.Veerasamy, UTD
Properties of Eulerian Graphs• Even-degree condition: degree of each node is even
• Balanced set condition: For any cut (S, V \ S), the difference between number of directed edges crossing cut in each direction is at most the number of undirected edges crossing cut
• Eulerian mixed graphs can be detected in polynomial time
S V \ S
Given a graph satisfying even-degree condition, Frederickson showed how to find minimum-cost augmentation to make it Eulerian.
14
© B.Raghavachari & J.Veerasamy, UTD
Even-degree mixed graphs
• Solve flow problem and obtain IN = OUT at every node• Consider undirected edges and duplicated edges only• Traverse cycles formed by these edges and correct parity
Balanced node
Unbalanced node
15
© B.Raghavachari & J.Veerasamy, UTD
Input G
Frederickson’s Algorithm (Part 1)
Match Flow
H
Evenparity
Solution S1
C(H) C(Opt)
C(S1) C(Opt) + 2C(D) Balanced node
Unbalanced node
16
© B.Raghavachari & J.Veerasamy, UTD
Frederickson’s Algorithm (Part 2)
Input G
Flow Double
C(Opt) C(D) + C(U)
C(S2) C(D) + 2C(U) 2C(Opt) - C(D)
Solution S2
Solution S = min(S1, S2)
C(S) 5/3 C(Opt)
D
U
17
© B.Raghavachari & J.Veerasamy, UTD
Remarks
• Input GFlow
IN=OUT
Directed edges DUndirected edges U
• Cost(Opt) C(D) + C(U) = CFRED
• D may contain any number of copies of edges in G.
• H is obtained from G by adding a T-join of odd-degree nodes, ignoring the directions.
• If H-G contains only edges of D:
C(S1) 2C(D) + C(U)
C(S) (3/2) C(Opt)
• Flow augmentation cost CIO(G) = C(D) + C(U) - C(G)
18
© B.Raghavachari & J.Veerasamy, UTD
Idea for Improvement
• Modify computation of S1 as follows:
– When H is computed, make cost of edges in D to be 0. – T-join prefers edges of D to U.
• Problem: We may be forced to duplicate some edges of U.
Components of D may have odd-number of odd-degree nodes
19
© B.Raghavachari & J.Veerasamy, UTD
Improved lower bound
Shrink each directed componentto a single node, and compute T-join between odd degree components.
X, subset of U, forms the T-join. Optimal solution also has to pay C(X) to satisfy even degree condition.
If we can prove that adding X to G does not decrease Flow augmentation cost, thenC(Opt) CFRED + C(X)
20
© B.Raghavachari & J.Veerasamy, UTD
Lower bound proof - sketch
Input G New input HINOUT solution GIO INOUT solution HIO
Can CIO(H) < CIO(G)?
No. In fact, adding any edge in U does not decrease INOUT augmentation cost.
Alternating cycle
x
21
© B.Raghavachari & J.Veerasamy, UTD
Alternating cycles - Properties
• Symmetric difference of two INOUT solutions: arcs can be decomposed into alternating cyles.
• Each alternating cycle (AC) contains components (R and B) from both graphs.
• R and B satisfy the same deficit/surplus of nodes in the solution graphs.
• Let GR and GB be the solution graphs. Then, GR - R + B and GB - B + R are also INOUT solution graphs.
• If C(GR) < C(GB), then C(R) < C(B) for at least one alternating cycle.
22
© B.Raghavachari & J.Veerasamy, UTD
Lower bound proof (continued)
GIO HIOGIO-B+R
B
R
C(R) < C(B) C(GIO-B+R) < C(GIO)
Since INOUT is an optimal algorithm, this is false. So,adding any edge in U to G does not decrease INOUTaugmentation cost.
23
© B.Raghavachari & J.Veerasamy, UTD
Our Mixed algorithm (part 2)
Input G
Flow Double
C(Opt) C(D) + C(U)
C(S2) C(D) + 2C(U) 2C(Opt) - C(D)
Solution S2
D
U
24
© B.Raghavachari & J.Veerasamy, UTD
Input G
Our Mixed Algorithm (part 1)
Match Flow
H
Evenparity
Solution S1
C(S1) C(U) + C(X) + 2C(D)
C(Opt) + C(D) Balanced node
Unbalanced node
Solution S = min(S1, S2)
C(S) 3/2 C(Opt)
X
25
© B.Raghavachari & J.Veerasamy, UTD
Performance of Algorithms
C(D)
Cost of solution
C(Opt)
2C(Opt) C(new S1)
C(S2)
C(S1)
C(Opt)
26
© B.Raghavachari & J.Veerasamy, UTD
Windy Postman Problem (WPP)
Even degree node
Odd degree node
Undirected edges only, but traversal costs vary based on direction.
NP-hard!
2
2
2
2
2
2
7
8
5
5
5
6
9
10
5
5
5
5
27
© B.Raghavachari & J.Veerasamy, UTD
Additional complexity of WPP
Unlike MPP, undirected cycles cannot be oriented to get optimal Eulerian subtours.
2 2
22
55
Intermediate graph
Optimal solutionSolution with
cost
28
© B.Raghavachari & J.Veerasamy, UTD
LP formulation for WPP
Goal is to minimizetotal traversal cost
(cij xij + cji xji)
(i,j) E
satisfying following constraints:
xij + xji 1 ( (i,j) E)Usage of each edge
Flow preservationat each node
(xij - xji)
j : (i, j) E
=
Non-negative flow xij , xji 0 ( (i,j) E)
0 ( (i,j) E)
29
© B.Raghavachari & J.Veerasamy, UTD
LP output
C(Input) = 43.5
2
2
2
2
2
2
7
8
5
5
5
6
9
10
5
5
5
5
C(LP Output) = 34.5
Input GLP Directed edges D,
Undirected edges U (xij = xji = 0.5)
Cost(Opt) C(GLP) = C(D) + C(U)
D
U
GLP
LP augmentation cost CLP(G) = C(GLP) - C(G)
30
© B.Raghavachari & J.Veerasamy, UTD
Algorithm 1
C(LP output) = 34.5
D
UDuplicate edges
C(S1) = 57
C(S1) = C(D) + 2 C(U) Even degree node
Odd degree node
31
© B.Raghavachari & J.Veerasamy, UTD
Algorithm 2
D
U min-costXT-join
T-join
within D
Even degree node
Odd degree node
Components of D have to be Even degreeto make the graph Eulerian.
32
© B.Raghavachari & J.Veerasamy, UTD
Algorithm 2 (continued)
Hint: U and T-join within D form cycles!
2D
UDuplicate D
T-joinwithin D
D
U
U
Question: Can we form a solution with cost C(2D + U + X)?
33
© B.Raghavachari & J.Veerasamy, UTD
Algorithm 2 (continued)
2D
U
Directed walks
C(S2A) = 50 C(S2B) = 54 C(2D+U+X) = 52
S2 = solution with min. cost,C(S2) 2 C(D) + C(U) + C(X)
Even degree node
Odd degree node
34
© B.Raghavachari & J.Veerasamy, UTD
• If C(Opt) C(D) + C(U) + C(X), then C(S2) C(Opt) + C(D) andC(S) 1.5 C(Opt)
• C(S1) = C(D) + 2C(U) C(Opt) - C(D)
• Algorithm outputs min. cost solution between S1 and S2.
• C(S2) 2C(D) + C(U) + C(X)
• X is min-cost T-join between odd-degree strongly connected
• Can we prove: C(Opt) C(D) + C(U) + C(X) ?
components (SCC) of GLP
Remarks
35
© B.Raghavachari & J.Veerasamy, UTD
Improved lower bound
Shrink each SCC to a single node, and compute T-join between odd degree SCCs.
36
© B.Raghavachari & J.Veerasamy, UTD
Improved lower bound (continued)
X, subset of U, forms the T-join. Optimal solution also has to pay C(X) to satisfy even degree condition.
If we can prove that adding X to G does not decrease LP augmentation cost, thenC(Opt) C(D) + C(U) + C(X)
37
© B.Raghavachari & J.Veerasamy, UTD
Lower bound proof - sketch
Input G New input HLP output LP output
Can CLP(H) < CLP(G)?
No. In fact, adding any edge in U does not decrease LP augmentation cost.
Alternating cycle
x
38
© B.Raghavachari & J.Veerasamy, UTD
Lower bound proof (continued)
GIO HIOGIO-B+R
B
R
C(R) < C(B) C(GIO-B+R) < C(GIO)
Since INOUT is an optimal algorithm, this is false. So, adding any edge in U to G does not decrease INOUT augmentation cost.
39
© B.Raghavachari & J.Veerasamy, UTD
Future work
• Approximation algorithms for MPP / WPP with approximation ratio better than 1.5? Particularly, for planar graphs?
• Approximation algorithm for MPP with duplication restricted to a subset of edges and arcs?
• Approximation algorithm for Undirected CPP with restricted turns with approximation ratio better than log n?
• Approximation algorithm for Directed Rural Postman Problem with approximation ratio better than log n?