Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy Samsung
Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* Samsung Telecommunications America, Inc. and The University of Texas at Dallas veerasam@utdallas. edu * Joint work with Balaji Raghavachari 1 © B. Raghavachari & J. Veerasamy, UTD
Euler Tour Problem Find a tour that traverses all edges exactly once. A Input Output A graph is Eulerian if and only if it is connected and the degree of each vertex is even (Euler, 1736!) 2 © B. Raghavachari & J. Veerasamy, UTD Even degree node
Non-Eulerian graph A B Walk starting at A got stuck at B Odd degree node Even degree node 3 © B. Raghavachari & J. Veerasamy, UTD
Directed Euler Tour Problem Find a tour in a directed graph that traverses all edges exactly once. A A directed graph is Eulerian if and only if it is strongly connected and indegree = outdegree at each vertex 4 © B. Raghavachari & J. Veerasamy, UTD Balanced node
Non-Eulerian Directed Graph A B Balanced node Walk starting at A got stuck at B Surplus node Deficit node 5 © B. Raghavachari & J. Veerasamy, UTD
Chinese Postman Problem (CPP) Find shortest tour visiting all edges at least once. A Input Augmented Add a minimum-weight T-join which has odd degree at odd-degree nodes and even-degree at even-degree nodes Output Even degree node Odd degree node 6 © B. Raghavachari & J. Veerasamy, UTD
Directed CPP Input Output Balanced node Add a minimum-weight subgraph which has outdegree = indegree + surplus at surplus nodes indegree = outdegree + deficit at deficit nodes 7 © B. Raghavachari & J. Veerasamy, UTD Deficit node Surplus node
Mixed Postman Problem (MPP) Includes both undirected and directed edges Input Solution 1 NP-hard! Solution 2 Balanced node Unbalanced node 8 © B. Raghavachari & J. Veerasamy, UTD
Windy Postman Problem (WPP) Undirected edges only, but traversal costs vary based on direction. 5 2 2 5 5 7 2 9 5 8 6 5 2 5 10 2 NP-hard! 9 Even degree node Odd degree node © B. Raghavachari & J. Veerasamy, UTD
Applications: City Management Elm Main Commerce Houston Jackson Street cleaning, Mail delivery, Snow removal, Courier delivery route 1 © 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 1 © 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 NPcomplete. • log n approximation algorithms for Directed Rural Postman Problem, General Routing Problem, and Postman Problem with restricted turns. 1 © 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 VS Given a graph satisfying even-degree condition, Frederickson showed how to find minimum-cost augmentation to make it Eulerian. 1 © 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 1 © B. Raghavachari & J. Veerasamy, UTD
Frederickson’s Algorithm (Part 1) Input G Solution S 1 H Match Flow Even parity C(H) C(Opt) C(S 1) C(Opt) + 2 C(D) Balanced node Unbalanced node 1 © B. Raghavachari & J. Veerasamy, UTD
Frederickson’s Algorithm (Part 2) Input G Solution S 2 D Flow 1 Double U C(Opt) C(D) + C(U) Solution S = min(S 1, S 2) C(S 2) C(D) + 2 C(U) 2 C(Opt) - C(D) C(S) 5/3 C(Opt) © B. Raghavachari & J. Veerasamy, UTD
Remarks • Input G Flow IN=OUT Directed edges D Undirected edges U • Cost(Opt) C(D) + C(U) = CFRED • Flow augmentation cost CIO(G) = C(D) + C(U) - C(G) • 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(S 1) 2 C(D) + C(U) C(S) (3/2) C(Opt) 1 © B. Raghavachari & J. Veerasamy, UTD
Idea for Improvement • Modify computation of S 1 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 1 © B. Raghavachari & J. Veerasamy, UTD
Improved lower bound Shrink each directed component to 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, then C(Opt) CFRED + C(X) 1 © B. Raghavachari & J. Veerasamy, UTD
Lower bound proof - sketch Input G INOUT solution GIO New input H INOUT solution HIO x Can CIO(H) < CIO(G)? No. In fact, adding any edge in U does not decrease INOUT augmentation cost. 2 © B. Raghavachari & J. Veerasamy, UTD Alternating cycle
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. 2 © B. Raghavachari & J. Veerasamy, UTD
Lower bound proof (continued) GIO 2 HIO GIO -B+R B C(R) < C(B) C(GIO -B+R) < C(GIO ) R Since INOUT is an optimal algorithm, this is false. So, adding any edge in U to G does not decrease INOUT augmentation cost. © B. Raghavachari & J. Veerasamy, UTD
Our Mixed algorithm (part 2) Input G Solution S 2 D Flow U Double C(Opt) C(D) + C(U) C(S 2) C(D) + 2 C(U) 2 C(Opt) - C(D) 2 © B. Raghavachari & J. Veerasamy, UTD
Our Mixed Algorithm (part 1) H Input G Solution S 1 Match X C(S 1) C(U) + C(X) + 2 C(D) C(Opt) + C(D) Flow Even parity Solution S = min(S 1, S 2) C(S) 3/2 C(Opt) Balanced node Unbalanced node 2 © B. Raghavachari & J. Veerasamy, UTD
Performance of Algorithms C(S 1) Cost of solution 2 C(Opt) C(new S 1) C(Opt) C(S 2) C(D) 2 © B. Raghavachari & J. Veerasamy, UTD C(Opt)
Windy Postman Problem (WPP) Undirected edges only, but traversal costs vary based on direction. 5 2 2 5 5 7 2 9 5 8 6 5 2 5 10 2 NP-hard! 2 Even degree node Odd degree node © B. Raghavachari & J. Veerasamy, UTD
Additional complexity of WPP Unlike MPP, undirected cycles cannot be oriented to get optimal Eulerian subtours. 2 2 5 5 2 2 Intermediate graph 2 Solution with cost © B. Raghavachari & J. Veerasamy, UTD Optimal solution
LP formulation for WPP Goal is to minimize total traversal cost (cij xij + cji xji) (i, j) E satisfying following constraints: xij + xji Usage of each edge Flow preservation at each node Non-negative flow 2 (xij - xji) 1 ( (i, j) E) = 0 ( (i, j) E) j : (i, j) E xij , xji © B. Raghavachari & J. Veerasamy, UTD
LP output LP Input G 5 D 5 5 2 9 5 8 2 5 U 10 6 5 Directed edges D, Undirected edges U (xij = xji = 0. 5) 2 2 7 GLP 2 C(Input) = 43. 5 C(LP Output) = 34. 5 LP augmentation cost CLP(G) = C(GLP) - C(G) Cost(Opt) C(GLP) = C(D) + C(U) 2 © B. Raghavachari & J. Veerasamy, UTD
Algorithm 1 D Duplicate edges U C(LP output) = 34. 5 C(S 1) = 57 C(S 1) = C(D) + 2 C(U) 3 Even degree node Odd degree node © B. Raghavachari & J. Veerasamy, UTD
Algorithm 2 D U min-cost T-join X T-join within D Components of D have to be Even degree to make the graph Eulerian. 3 © B. Raghavachari & J. Veerasamy, UTD Even degree node Odd degree node
Algorithm 2 (continued) D 2 D U Duplicate D U T-join within D U Question: Can we form a solution with cost C(2 D + U + X)? Hint: U and T-join within D form cycles! 3 © B. Raghavachari & J. Veerasamy, UTD
Algorithm 2 (continued) 2 D U Directed walks C(2 D+U+X) = 52 C(S 2 A) = 50 S 2 = solution with min. cost, C(S 2) 2 C(D) + C(U) + C(X) 3 © B. Raghavachari & J. Veerasamy, UTD C(S 2 B) = 54 Even degree node Odd degree node
Remarks • X is min-cost T-join between odd-degree strongly connected components (SCC) of GLP • Algorithm outputs min. cost solution between S 1 and S 2. • C(S 1) = C(D) + 2 C(U) C(Opt) - C(D) • C(S 2) 2 C(D) + C(U) + C(X) • If C(Opt) C(D) + C(U) + C(X), then C(S 2) C(Opt) + C(D) and C(S) 1. 5 C(Opt) • Can we prove: C(Opt) C(D) + C(U) + C(X) ? 3 © B. Raghavachari & J. Veerasamy, UTD
Improved lower bound Shrink each SCC to a single node, and compute T-join between odd degree SCCs. 3 © 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, then C(Opt) C(D) + C(U) + C(X) 3 © B. Raghavachari & J. Veerasamy, UTD
Lower bound proof - sketch Input G LP output New input H LP output x Can CLP(H) < CLP(G)? No. In fact, adding any edge in U does not decrease LP augmentation cost. 3 © B. Raghavachari & J. Veerasamy, UTD Alternating cycle
Lower bound proof (continued) GIO B R 3 HIO GIO-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. © 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? 3 © B. Raghavachari & J. Veerasamy, UTD
- Slides: 39