1 / 41

Improved Decremental Algorithms for

Improved Decremental Algorithms for. Transitive Closure All-Pairs Shortest Paths in Directed Graphs. Surender Baswana work supported by a fellowship from Infosys Tech. Bangalore Sandeep Sen work supported in part by an IBM UPP award I.I.T. Delhi India.

zeke
Télécharger la présentation

Improved Decremental Algorithms for

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Improved Decremental Algorithms for • Transitive Closure • All-Pairs Shortest Paths in Directed Graphs

  2. Surender Baswana work supported by a fellowship from Infosys Tech. Bangalore Sandeep Sen work supported in part by an IBM UPP award I.I.T. Delhi India Ramesh Hariharan I.I.Sc. Bangalore India 34th ACM STOC 2002

  3. Two Fundamental Algorithmic Graph Problems • Transitive Closure • All-Pairs Shortest Paths

  4. Transitive Closure • Process a given directed graph G(V,E) so that any query of the form, “ Is there a path from u to v in the graph?” can be answered efficiently

  5. ExistingStatic Algorithms • Classical Algorithms : O(mn) • Algorithms based on fast matrix multiplications : O(n2.575) (Zwick, FOCS 1998)

  6. Dynamic Maintenance of APSP (Transitive Closure) Given a directed graph G(V,E) followed by an online sequence of updates interspersed with queries Process each query and update efficiently

  7. Aim of Dynamic Algorithms for APSP (Transitive Closure) To Maintain a data-structure that • can answer each query efficiently • can be updated efficiently after each update (in time less than the best static algorithm)

  8. Two Types of Dynamic Algorithms • Fully Dynamic ( both insertion and deletion of edges allowed) • Partially Dynamic Incremental (only insertion) Deletion (only deletion)

  9. Decremental Algorithms for Transitive Closure 2 3

  10. Contribution of our Paper Decremental Algorithms for • Transitive Closure • APSP that achieve improved update time while keeping optimal query time

  11. Decremental Algorithm for transitive closure

  12. Main Idea A new data-structure that • stores transitive closure imformation implicitly • is more suitable for maintaining reachability for long paths

  13. Main Idea Contd. Suitably combine two data-structures • S: suitable for reachability corresponding to short paths. • L : suitable for reachability corresponding to long paths.

  14. Basic Data-structure Used Theorem : A BFS tree of depth d, rooted at a vertex can be maintained under deletion of edges that • takes O(1) query time • requires O(d) amortized update time per edge deletion.

  15. Explicit Maintenance of Transitive Closure v u

  16. Explicit Maintenance of Transitive Closure contd. v u

  17. Implicit Maintenance of Transitive Closure v u

  18. Implicit Maintenance of Transitive Closure v u

  19. Implicit Maintenance of Transitive Closure v u Out_tree In_tree

  20. Transitive closure corresponding to paths of length d passing through set of witnesses W

  21. Transitive closure corresponding to paths of length d passing through set of witnesses W

  22. Transitive closure corresponding to paths of length d passing through set of witnesses W v M u

  23. Transitive closure corresponding to paths of length d passing through set of witnesses W w v M u

  24. Handling Edge Deletion w W’ u v v M w u

  25. Handling Edge Deletion contd. w W’ u v v M w u W’ u v

  26. Handling Edge Deletion contd. w W’ u v v M w u W’ u v

  27. Handling Edge Deletion contd. • For each w, update in_tree(w) and out_tree(w) • For each pair (u,v) for which w has ceased to remain witness, search for new witness. • Update M[u,v] appropriately

  28. Handling Edge Deletion contd. • Invariant maintained : M[u,v] points to the first vertex in the witness list W that is a witness of reachability from u to v

  29. Total update time • For each pair (u,v), the witness list is scanned exactly once. O(n |W|) • Total update time for maintaining in_trees and out_trees O(md|W|) 2

  30. Maintaining all-pairs reachability corresponding to paths of length <d passing through W Theorem : All-pairs reachability corresponding to paths of length <d passing through vertices of set W can be maintained under deletion of edges in amortized time : O((n2/m + d)W) per edge deletion

  31. Random sampling to pick the witness vertices Theorem : Given a path puv of length l from u to v, if we sample cn/l log2 n vertices (for any c>0), then with probability 1-1/nc , at least one of the vertices will be picked from the path puv

  32. Maintaining all-pairs reachability corresponding to paths of length [d/2,d] • Form a set Wdof n/d log n vertices uniformly randomly. • Build and maintain in_trees and out_trees on vertices of set Wd. Update time : O((n3/(dm) + n)log n)

  33. Maintaining all-pairs reachability corresponding to paths of length [d,n] • For each interval [2id,2i+1d], build and maintain in_trees and out_trees on a collection of n/(2id) log n vertices. • Maintain the reachability matrix M Total Update time : O((n3/(dm) + n)log2 n)

  34. Explicit maintenance of transitive closure for path of length [1,d] Update time : O(nd) Implicit maintenance of transitive closure for paths of length [d,n] Update time : O((n3/(dm)+n)log2n) Comparing the two data-structures

  35. Explicit maintenance of transitive closure for path of length [1,d] Update time : O(nd) Suitable for short paths Implicit maintenance of transitive closure for paths of length [d,n] Update time : O((n3/(dm)+n)log2n) Suitable for long paths Comparing the two data-structures

  36. Improved algorithm for transitive closure

  37. Improved Decremental Algorithm for maintaining all-pairs 2-approximate paths

  38. w v u

  39. Invariant maintained : M[u,v] points to the first vertex in the witness list W that is a witness of reachability from u to v

  40. Improved update bounds for maintaining 2-approximate APSP

  41. Improved Update bounds for maintaining exact APSP

More Related