Euler tours postman tours and mixed graphs Jeyakesavan

  • Slides: 25
Download presentation
Euler tours, postman tours and mixed graphs Jeyakesavan Veerasamy* Samsung Telecommunications America, Inc. and

Euler tours, postman tours and mixed graphs 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

Approximation Algorithms • An algorithm for solving a minimization problem that – runs in

Approximation Algorithms • An algorithm for solving a minimization problem that – runs in polynomial time and outputs a feasible solution S – performance ratio = Cost(S) / Cost(Opt) • In practice, if problem is NP-hard (intractable), – we can apply exact algorithms (if time permits), or – apply heuristic algorithms and approximation algorithms, and select best solution obtained. • Critical part of approximation algorithm analysis is lowerbound analysis of optimal solution • Such lower bounds can be used in practice to speed up exact algorithms such as branch and bound, and evaluate performance of heuristic algorithms. 2 © B. Raghavachari & J. Veerasamy, UTD

Euler Tour Problem Find a tour that traverses all edges exactly once. A Input

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!) 3 © B. Raghavachari & J. Veerasamy, UTD Even degree node

Non-Eulerian graph A B Odd degree node Walk starting at A got stuck at

Non-Eulerian graph A B Odd degree node Walk starting at A got stuck at B 4 © B. Raghavachari & J. Veerasamy, UTD Even degree node

Directed Euler Tour Problem Find a tour in a directed graph that traverses all

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 5 © B. Raghavachari & J. Veerasamy, UTD Balanced node

Non-Eulerian Directed Graph A B Balanced node Walk starting at A got stuck at

Non-Eulerian Directed Graph A B Balanced node Walk starting at A got stuck at B Surplus node Deficit node 6 © B. Raghavachari & J. Veerasamy, UTD

Chinese Postman Problem (CPP) Find shortest tour visiting all edges at least once. A

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 7 © B. Raghavachari & J. Veerasamy, UTD

Directed CPP Input Output Add a minimum-weight subgraph which has outdegree = indegree +

Directed CPP Input Output Add a minimum-weight subgraph which has outdegree = indegree + surplus at surplus nodes indegree = outdegree + deficit at deficit nodes Balanced node Deficit node Surplus node 8 © B. Raghavachari & J. Veerasamy, UTD

Directed CPP: Another example Input Balanced node Output Deficit node Surplus node 9 ©

Directed CPP: Another example Input Balanced node Output Deficit node Surplus node 9 © B. Raghavachari & J. Veerasamy, UTD

Mixed Postman Problem (MPP) Includes both undirected and directed edges Input Solution 1 NP-hard!

Mixed Postman Problem (MPP) Includes both undirected and directed edges Input Solution 1 NP-hard! Solution 2 Balanced node Unbalanced node 1 © B. Raghavachari & J. Veerasamy, UTD

Applications: City Management Elm Main Commerce Houston Jackson Street cleaning, Mail delivery, Snow removal,

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, Johnson, 1973 • Frederickson, 1979: – Designed two approximation algorithms

Previous work • Edmonds, Johnson, 1973 • Frederickson, 1979: – Designed two approximation algorithms – Select the best of the two solutions computed – Worst-case performance ratio = 5/3 • Christofides, 1984 • Ralphs, 1993: Linear Programming formulation • Nobert, Picard, 1996: Applied LP-based solution to schedule snow removal in Montreal • Raghavachari, Veerasamy, 1998: – Improved Frederickson’s algorithm for MPP – Performance ratio = 3/2 1 © B. Raghavachari & J. Veerasamy, UTD

Properties of Eulerian Graphs • • • Even-degree condition: degree of each node is

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

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

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 U Double

Frederickson’s Algorithm (Part 2) Input G Solution S 2 D Flow 1 U Double 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)

Remarks • Input G Flow IN=OUT Directed edges D Undirected edges U • Cost(Opt) C(D) + C(U) • 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

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

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) C(D) + C(U) + C(X) 1 © B. Raghavachari & J. Veerasamy, UTD

Lower bound proof Input G INOUT solution New input H INOUT solution x Can

Lower bound proof Input G INOUT solution New input H INOUT solution 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

Our Mixed algorithm (part 2) Input G Solution S 2 D Flow U Double

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 Match X C(S 1) C(U) +

Our Mixed Algorithm (part 1) H Input G Match X C(S 1) C(U) + C(X) + 2 C(D) C(Opt) + C(D) Solution S 1 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)

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)

Concluding Remarks • Worst case performance ratio for our algorithm is 1. 5 (Analysis

Concluding Remarks • Worst case performance ratio for our algorithm is 1. 5 (Analysis is tight). • Windy Postman Problem: Asymmetric version of MPP C(U, V) C(V, U) U V • LP relaxation of WPP is half-integral - gives 2 approximation algorithm. • Recently we have improved ratio of WPP to 1. 5 • Open: Improvements? Planar Graphs? 2 © B. Raghavachari & J. Veerasamy, UTD

Further Research • Explore MPP with additional constraints: – duplicate only undirected edges –

Further Research • Explore MPP with additional constraints: – duplicate only undirected edges – duplicate only directed edges • Explore shortest path problem in mixed graphs when negative costs are allowed. • Implement a few heuristic algorithms and analyze the performance. 2 © B. Raghavachari & J. Veerasamy, UTD