© b.raghavachari & j.veerasamy, utd 1 approximation algorithms for postman problems jeyakesavan...

39
1 © B.Raghavachari & J.Veerasamy, UTD Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work with Balaji Raghavachari Samsung Telecommunications America, Inc. and The University of Texas at Dallas [email protected]

Upload: marian-lawrence

Post on 01-Jan-2016

220 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

[email protected]

Page 2: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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!)

Page 3: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

3 © B.Raghavachari & J.Veerasamy, UTD

Non-Eulerian graph

A

B

Even degree node

Odd degree nodeWalk starting at A got stuck at B

Page 4: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 5: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 6: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 7: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 8: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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!

Page 9: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 10: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

10

© B.Raghavachari & J.Veerasamy, UTD

Applications: City Management

Elm

Commerce

Main

JacksonHouston

Street cleaning, Mail delivery, Snow removal, Courier delivery route

Page 11: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 12: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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.

Page 13: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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.

Page 14: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 15: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 16: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 17: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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)

Page 18: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 19: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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)

Page 20: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 21: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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.

Page 22: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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.

Page 23: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 24: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 25: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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)

Page 26: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 27: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 28: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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)

Page 29: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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)

Page 30: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 31: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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.

Page 32: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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)?

Page 33: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 34: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 35: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

35

© B.Raghavachari & J.Veerasamy, UTD

Improved lower bound

Shrink each SCC to a single node, and compute T-join between odd degree SCCs.

Page 36: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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)

Page 37: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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

Page 38: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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.

Page 39: © B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung

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?