fully dynamic all pairs shortest paths with worst case
play

Fully dynamic all-pairs shortest paths with worst-case update-time - PowerPoint PPT Presentation

Fully dynamic all-pairs shortest paths with worst-case update-time revisited Ittai Abraham 1 Shiri Chechik 2 Sebastian Krinninger 3 1 Hebrew University of Jerusalem 2 Tel-Aviv University 3 Max Planck Institute for Informatics Saarland Informatics


  1. Fully dynamic all-pairs shortest paths with worst-case update-time revisited Ittai Abraham 1 Shiri Chechik 2 Sebastian Krinninger 3 1 Hebrew University of Jerusalem 2 Tel-Aviv University 3 Max Planck Institute for Informatics Saarland Informatics Campus since Jan: University of Vienna SODA 2017 1 / 14

  2. Dynamic model G undergoing updates: Dynamic algorithm 2 / 14

  3. Dynamic model G undergoing updates: Dynamic algorithm 2 / 14

  4. Dynamic model G undergoing updates: Dynamic algorithm Update 2 / 14

  5. Dynamic model G undergoing updates: Dynamic algorithm s Update t Query dist G ( s , t )? 2 / 14

  6. Dynamic model G undergoing updates: Dynamic algorithm s Update update time t Query dist G ( s , t )? query time 2 / 14

  7. Dynamic model G undergoing updates: Dynamic algorithm s Update update time t Query dist G ( s , t )? query time Here: Small query time O (1) or O (log n ) 2 / 14

  8. Dynamic model G undergoing updates: Dynamic algorithm s Update update time t Query dist G ( s , t )? query time Here: Small query time O (1) or O (log n ) Goal: Minimize update time T ( n ) 2 / 14

  9. Dynamic model G undergoing updates: Dynamic algorithm s Update update time t Query dist G ( s , t )? query time Here: Small query time O (1) or O (log n ) Goal: Minimize update time T ( n ) Worst-case: After each update, spend time ≤ T ( n ) 2 / 14

  10. Dynamic model G undergoing updates: Dynamic algorithm s Update update time t Query dist G ( s , t )? query time Here: Small query time O (1) or O (log n ) Goal: Minimize update time T ( n ) Worst-case: After each update, spend time ≤ T ( n ) Amortized: For a sequence of k updates, spend time ≤ kT ( n ) 2 / 14

  11. Question: Can worst-case bounds match amortized bounds? 3 / 14

  12. Prior work on dynamic APSP approx. update time type of graphs reference ˜ exact O ( mn ) weighted directed [Dijkstra] O ( n 2 . 5 √ ˜ exact W ) weighted directed [King ’99] O ( n 2 log W ) ˜ 1 + ǫ weighted directed [King ’99] O ( n 2 ) ˜ 2 + ǫ weighted directed [King ’99] O ( n 2 . 5 √ ˜ exact W ) weighted directed [Demetrescu/Italiano ’01] ˜ O ( n 2 ) exact weighted directed [Demetrescu/Italiano ’03] ˜ O ( n 2 . 75 ) (*) exact weighted directed [Thorup ’05] ˜ 2 + ǫ O ( m log W ) weighted undirected [Bernstein ’09] O ( √ mn 1 / k ) 2 O ( k ) ˜ unweighted undirected [Abr./Chechik/Talwar ’14] (*) worst case ˜ O : ignores log n -factors n : number of nodes m : number of edges W : largest edge weight 4 / 14

  13. Our result Theorem (for this talk) There is an algorithm for maintaining a distance matrix under insertions and deletions of nodes in unweighted undirected graphs with a worst-case update time of ˜ O ( n 2 . 75 ) . 5 / 14

  14. Our result Theorem (for this talk) There is an algorithm for maintaining a distance matrix under insertions and deletions of nodes in unweighted undirected graphs with a worst-case update time of ˜ O ( n 2 . 75 ) . Toy example! ( O ( n ω ) in unweighted graphs) 5 / 14

  15. Our result Theorem (for this talk) There is an algorithm for maintaining a distance matrix under insertions and deletions of nodes in unweighted undirected graphs with a worst-case update time of ˜ O ( n 2 . 75 ) . Toy example! ( O ( n ω ) in unweighted graphs) More sophisticated use of our technique: O ( n 2 . 67 ) in weighted directed graphs (randomized) ˜ Improves ˜ O ( n 2 . 75 ) of [Thorup ’05] (Arguably) simpler than [Thorup ’05] (which is a deamortization of [Demetrescu/Italiano ’03] ) 5 / 14

  16. Batch deletion problem Preprocessing phase: Preprocess a graph G in time P ( n ) Deletion phase: A (single) set D of ≤ ∆ nodes is deleted from the graph Compute APSP in G \ D in time D ( n ) 6 / 14

  17. Batch deletion problem Preprocessing phase: Preprocess a graph G in time P ( n ) Deletion phase: A (single) set D of ≤ ∆ nodes is deleted from the graph Compute APSP in G \ D in time D ( n ) Lemma (Thorup ’05) If there is a batch deletion APSP algorithm supporting up to ∆ deletions with proprocessing time P ( n ) and batch deletion time D ( n ) , then there is a fully dynamic APSP algorithm with worst-case update time ˜ O ( P ( n ) / ∆ + D ( n ) + ∆ n 2 ) . 6 / 14

  18. Batch deletion problem Preprocessing phase: Preprocess a graph G in time P ( n ) Deletion phase: A (single) set D of ≤ ∆ nodes is deleted from the graph Compute APSP in G \ D in time D ( n ) Lemma (Thorup ’05) If there is a batch deletion APSP algorithm supporting up to ∆ deletions with proprocessing time P ( n ) and batch deletion time D ( n ) , then there is a fully dynamic APSP algorithm with worst-case update time ˜ O ( P ( n ) / ∆ + D ( n ) + ∆ n 2 ) . Restart batch deletion algorithm periodically, spread out preprocessing time over ∆ updates 6 / 14

  19. Batch deletion problem Preprocessing phase: Preprocess a graph G in time P ( n ) Deletion phase: A (single) set D of ≤ ∆ nodes is deleted from the graph Compute APSP in G \ D in time D ( n ) Lemma (Thorup ’05) If there is a batch deletion APSP algorithm supporting up to ∆ deletions with proprocessing time P ( n ) and batch deletion time D ( n ) , then there is a fully dynamic APSP algorithm with worst-case update time ˜ O ( P ( n ) / ∆ + D ( n ) + ∆ n 2 ) . Restart batch deletion algorithm periodically, spread out preprocessing time over ∆ updates Insertions are easy: O (∆ n 2 ) (Floyd-Warshall) 6 / 14

  20. Batch deletion problem Preprocessing phase: Preprocess a graph G in time P ( n ) Deletion phase: A (single) set D of ≤ ∆ nodes is deleted from the graph Compute APSP in G \ D in time D ( n ) Suffices to compute shortest paths consisting of ≤ h nodes Lemma (Thorup ’05) If there is a batch deletion APSP algorithm supporting up to ∆ deletions with proprocessing time P ( n ) and batch deletion time D ( n ) , then there is a fully dynamic APSP algorithm with worst-case update time O ( P ( n ) / ∆ + D ( n ) + ∆ n 2 + hn 2 + n 3 / h ) . ˜ Restart batch deletion algorithm periodically, spread out preprocessing time over ∆ updates Insertions are easy: O (∆ n 2 ) (Floyd-Warshall) Hitting set of size ˜ O ( n / h ) for all shortest paths with ≤ h nodes 6 / 14

  21. Repairing a shortest path tree s Given: shortest path tree from s 7 / 14

  22. Repairing a shortest path tree s Given: shortest path tree from s Node v is deleted Shortest path destroyed only for nodes in subtree of v v 7 / 14

  23. Repairing a shortest path tree s Given: shortest path tree from s Node v is deleted Shortest path destroyed only for nodes in subtree of v Run Dijkstra’s algorithm to v reattach these nodes to the tree Charge time O ( deg ( u )) ≤ O ( n ) to every node u in subtree of v 7 / 14

  24. Multiple shortest path trees Goal: shortest paths from a set of source nodes S s 1 s 2 s 3 s 4 s 5 8 / 14

  25. Multiple shortest path trees Goal: shortest paths from a set of source nodes S s 1 s 2 s 3 s 4 s 5 v v v v v Deletion of v 8 / 14

  26. Multiple shortest path trees Goal: shortest paths from a set of source nodes S s 1 s 2 s 3 s 4 s 5 v v v v v Deletion of v Total work: (number of nodes in subtrees of v ) × n 8 / 14

  27. Multiple shortest path trees Goal: shortest paths from a set of source nodes S s 1 s 2 s 3 s 4 s 5 v v v v v Deletion of v Total work: (number of nodes in subtrees of v ) × n Goal: limit sizes of subtrees of each node 8 / 14

  28. Preprocessing Construct shortest path tree up to depth h for all sources one by one: G s 1 v u Count size of subtrees for every node Rule: If number of nodes in subtrees of v exceeds λ : v is added to set of heavy nodes H v is deleted from graph, i.e., not considered in future trees 9 / 14

  29. Preprocessing Construct shortest path tree up to depth h for all sources one by one: G G s 1 s 2 v u v u Count size of subtrees for every node Rule: If number of nodes in subtrees of v exceeds λ : v is added to set of heavy nodes H v is deleted from graph, i.e., not considered in future trees 9 / 14

  30. Preprocessing Construct shortest path tree up to depth h for all sources one by one: G G G \ { v } s 1 s 2 s 3 v u v u u Count size of subtrees for every node Rule: If number of nodes in subtrees of v exceeds λ : v is added to set of heavy nodes H v is deleted from graph, i.e., not considered in future trees 9 / 14

  31. Preprocessing Construct shortest path tree up to depth h for all sources one by one: G G G \ { v } G \ { v } s 1 s 2 s 3 s 4 v u u v u u Count size of subtrees for every node Rule: If number of nodes in subtrees of v exceeds λ : v is added to set of heavy nodes H v is deleted from graph, i.e., not considered in future trees 9 / 14

  32. Preprocessing Construct shortest path tree up to depth h for all sources one by one: G G G \ { v } G \ { v } G \ { u , v } s 1 s 2 s 3 s 4 s 5 v u u v u u Count size of subtrees for every node Rule: If number of nodes in subtrees of v exceeds λ : v is added to set of heavy nodes H v is deleted from graph, i.e., not considered in future trees 9 / 14

Recommend


More recommend