alternating paths and cycles of minimum length william
play

ALTERNATING PATHS AND CYCLES OF MINIMUM LENGTH William Evans - PowerPoint PPT Presentation

ALTERNATING PATHS AND CYCLES OF MINIMUM LENGTH William Evans University of British Columbia, Canada Giuseppe Liotta Universit a degli Studi di Perugia, Italy Henk Meijer U. C. Roosevelt, the Netherlands Stephen Wismath University of


  1. ALTERNATING PATHS AND CYCLES OF MINIMUM LENGTH William Evans University of British Columbia, Canada Giuseppe Liotta Universit´ a degli Studi di Perugia, Italy Henk Meijer U. C. Roosevelt, the Netherlands Stephen Wismath University of Lethbridge, Canada

  2. Motivating problem Draw planar graph on given point set to minimize total edge length [Chan et al. GD13] • vertex maps to point of the same color • each vertex has distinct color

  3. Motivating problem Draw planar graph on given point set to minimize total edge length [Chan et al. GD13] • vertex maps to point of the same color • each vertex has distinct color This is NP-hard [Bastert and Fekete 96]

  4. Our problem Draw planar graph on given point set to minimize total edge length • vertex maps to point of the same color • each vertex has distinct color

  5. Our problem alternating path/cycle Draw planar graph on given point set to minimize total edge length • vertex maps to point of the same color • each vertex has distinct color

  6. Our problem is NP-hard Draw planar alternating path/cycle on given point set to minimize total edge length Idea: Reduce from EXACT COVER Use (modified) reduction to Euclidean TSP [Papadimitriou 77]

  7. Our problem Draw planar alternating path/cycle on given colinear point set to minimize total edge length

  8. Cycles: A lower bound

  9. Cycles: A lower bound Minimum number of edges crossing this gap? (for any alternating cycle)

  10. Cycles: A lower bound 2 Minimum number of edges crossing this gap? (for any alternating cycle)

  11. Cycles: A lower bound 2 Minimum number of edges crossing this gap? (for any alternating cycle)

  12. Cycles: A lower bound 2 2 Minimum number of edges crossing this gap? (for any alternating cycle)

  13. Cycles: A lower bound 2 2 Minimum number of edges crossing this gap? (for any alternating cycle)

  14. Cycles: A lower bound 2 2 2 Minimum number of edges crossing this gap? (for any alternating cycle)

  15. Cycles: A lower bound 2 2 2 Minimum number of edges crossing this gap? (for any alternating cycle)

  16. Cycles: A lower bound 2 2 2 4 Minimum number of edges crossing this gap? (for any alternating cycle)

  17. Cycles: A lower bound 2 2 2 4 6 4 6 8 10 8 6 4 2 Lemma 1. Minimum number of edges crossing gap i is c i = 2 max {| r i − b i | , 1 } r i = red, b i = blue points before gap i

  18. Cycles: A lower bound 2 2 2 4 6 4 6 8 10 8 6 4 2 Lemma 1. Minimum number of edges crossing gap i is c i = 2 max {| r i − b i | , 1 } r i = red, b i = blue points before gap i Proof: Each cycle component to the left of gap i has the same number of red and blue points ± 1 .

  19. Cycles: A lower bound 2 2 2 4 6 4 6 8 10 8 6 4 2 Lemma 1. Minimum number of edges crossing gap i is c i = 2 max {| r i − b i | , 1 } r i = red, b i = blue points before gap i Cycle length ≥ � i c i | gap i |

  20. Cycles: Matching the lower bound with 2 bends Drawing Rules Invariants At gap i : 1. Number of red components = max { r i − b i , 0 } . 2. Number of blue components = max { b i − r i , 0 } . 3. If r i = b i , one red/blue component spans spine. 4. Two closest components to spine are not both above or below.

  21. Cycles: Matching the lower bound with 2 bends Drawing Rules

  22. Cycles: Matching the lower bound with 2 bends Drawing Rules

  23. Cycles: Matching the lower bound with 2 bends Drawing Rules

  24. Cycles: Matching the lower bound with 2 bends Drawing Rules

  25. Cycles: Matching the lower bound with 2 bends Drawing Rules

  26. Cycles: Matching the lower bound with 2 bends Drawing Rules

  27. Cycles: Matching the lower bound with 2 bends Drawing Rules

  28. Cycles: Matching the lower bound with 2 bends Drawing Rules

  29. Cycles: Matching the lower bound with 2 bends Drawing Rules

  30. Cycles: Matching the lower bound with 2 bends Drawing Rules

  31. Cycles: Matching the lower bound with 2 bends Drawing Rules

  32. Cycles: Matching the lower bound with 2 bends Drawing Rules

  33. Cycles: Matching the lower bound with 2 bends Drawing Rules

  34. Cycles: Matching the lower bound with 2 bends Drawing Rules

  35. Cycles: Matching the lower bound with 2 bends Drawing Rules

  36. Cycles: Matching the lower bound with 2 bends Drawing Rules

  37. Cycles: Matching the lower bound with 2 bends Drawing Rules

  38. Cycles: Matching the lower bound with 2 bends Drawing Rules

  39. Cycles: Matching the lower bound with 2 bends Drawing Rules

  40. Cycles: Matching the lower bound with 2 bends Drawing Rules

  41. Cycles: Matching the lower bound with 2 bends Drawing Rules

  42. Cycles: Matching the lower bound with 2 bends Drawing Rules

  43. Cycles: Matching the lower bound with 2 bends Drawing Rules

  44. Cycles: Matching the lower bound with 2 bends Drawing Rules

  45. Cycles: Matching the lower bound with 2 bends Drawing Rules

  46. Cycles: Matching the lower bound with 2 bends Drawing Rules

  47. Cycles: Matching the lower bound with 2 bends Drawing Rules

  48. Cycles: Matching the lower bound with 2 bends Drawing Rules Theorem 1. Exists O ( n log n ) -time algorithm to compute a shortest planar alternating cycle on colinear points. Each edge has ≤ 2 bends.

  49. Paths: A lower bound Given path endpoints r and b . 2 2 2 3 5 3 5 7 9 7 6 4 2 b r Lemma 2. Minimum number of edges crossing gap i is  2 max {| r i − b i | , 1 } if r, b same side  1+2 max { b i − r i , r i − b i − 1 } if r left of gap i c i = 1+2 max { r i − b i , b i − r i − 1 } if b left of gap i 

  50. Paths: A lower bound Given path endpoints r and b . 2 2 2 3 5 3 5 7 9 7 6 4 2 b r Lemma 2. Minimum number of edges crossing gap i is  2 max {| r i − b i | , 1 } if r, b same side  1+2 max { b i − r i , r i − b i − 1 } if r left of gap i c i = 1+2 max { r i − b i , b i − r i − 1 } if b left of gap i  Proof: Same. Component with red endpoint can have one more red than blue points, but zero more blue than red points.

  51. Paths: A lower bound Given path endpoints r and b . 2 2 2 3 5 3 5 7 9 7 6 4 2 b r Lemma 2. Minimum number of edges crossing gap i is  2 max {| r i − b i | , 1 } if r, b same side  1+2 max { b i − r i , r i − b i − 1 } if r left of gap i c i = 1+2 max { r i − b i , b i − r i − 1 } if b left of gap i  r to b Path length ≥ � i c i | gap i |

  52. Paths: Matching the lower bound with 2 bends Given path endpoints r and b . Use (almost) the same algorithm as for cycles to find a path whose length matches the lower bound.

  53. Paths: Matching the lower bound with 2 bends Given path endpoints r and b . Calculate the r to b Path length lower bound for all r and b and pick the minimum. O ( n 2 ) time Use (almost) the same algorithm as for cycles to find a path whose length matches the lower bound.

  54. Paths: Matching the lower bound with 2 bends Given path endpoints r and b . Calculate the r to b Path length lower bound for all r and b and pick the minimum. O ( n 2 ) time Use (almost) the same algorithm as for cycles to find a path whose length matches the lower bound. Theorem 2. Exists O ( n 2 ) -time algorithm to compute a shortest planar alternating path on colinear points. Each edge has ≤ 2 bends.

  55. Extending to more than two colors Lemma 3. Minimum number of edges crossing gap i is c i = 2 max {| r i − g i | , | g i − b i | , | b i − r i | , 1 } r i = red, g i = green, b i = blue points before gap i Similar algorithm achieves lower bound. ( O ( n ) bends)

  56. Extending to more than two colors Lemma 3. Minimum number of edges crossing gap i is c i = 2 max {| r i − g i | , | g i − b i | , | b i − r i | , 1 } r i = red, g i = green, b i = blue points before gap i Similar algorithm achieves lower bound. ( O ( n ) bends) Four colors Lower bound cannot be achieved.

  57. Open Problems • Shortest alternating path in o ( n 2 ) time. • Shortest 3-color path/cycle with o ( n ) bends. • Shortest 4-color path/cycle. • Shortest arbitrary (not alternating) 2-color path/cycle.

  58. Open Problems • Shortest alternating path in o ( n 2 ) time. • Shortest 3-color path/cycle with o ( n ) bends. • Shortest 4-color path/cycle. • Shortest arbitrary (not alternating) 2-color path/cycle. Thank you

Recommend


More recommend