1 / 15

Finding Strongly Connected Components and Topological Sort in Parallel using O(log ² n) reachability queries

Finding Strongly Connected Components and Topological Sort in Parallel using O(log ² n) reachability queries. Warren Schudy Brown University Work done while interning at Google Research Mountain View. A Scheduling Problem. To-do List Topological sort (TS)

jude
Download Presentation

Finding Strongly Connected Components and Topological Sort in Parallel using O(log ² n) reachability queries

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. Finding Strongly Connected Components and Topological Sort in Parallel using O(log² n) reachability queries Warren Schudy Brown University Work done while interning at Google Research Mountain View

  2. A Scheduling Problem • To-do List • Topological sort (TS) • Strongly connected components (SCC) • Reachability •  SCC application in scientific computing requiring parallelism [McLendon et al. 01]

  3. Previous Results for TS, SCC and Reachability • Assume sparse graph with n vertices using 1 ≤ p ≤ n4/3 processors: • Question: is reachability fundamentally easier to parallelize than SCC and TS? (In Transactions of Information Processing Society of Japan ’99 ’04, Akio, Masahiro and Ryozo claim runtime n/p for TS & SCC)

  4. Answer: no (up to logs) • Our main result: a reduction of SCC and TS to O(log2 n) reachability queries • Remainder of talk focuses on SCC problem

  5. A simple SCC algorithm • Choose random vertex s V • Determine SCC(s) and output it • Determine the vertices Desc(s) reachable from s • Recurse (in parallel) on: • Desc(s) \ SCC(s) • V \ Desc(s) Desc(s) SCC(s) V \ Desc(s) s (Similar to [Coppersmith, Fleischer, Hendrickson and Pinar ’05])

  6. High-runtime instance s Desc(s)

  7. Algorithmic Idea • If this algorithm divided the graph roughly in two, recursion depth would be log n • So pick many source vertices instead of 1 (number chosen later) Desc( )

  8. Outputting SCCs • Make one pivot vertex s special, and output its SCC SCC(s) s Recurse on blue, green, yellow and unreached subgraphs Desc(s) Desc( )

  9. Our Multipivot Algorithm • Permute the vertices randomly • Determine the smallest s s.t. {1,2,…s} together reach at least half the edges (binary search) • Output SCC(s) • Recurse on: • V \ Desc(1…s) • (Desc(1…s-1)Desc(s)) \ SCC(s) • Desc(1…s-1) \ Desc(s) • Desc(s) \ (Desc(1…s-1)SCC(s)) SCC(s) s= 4 3 1 2 Desc(s) Desc(1…s-1)

  10. Runtime Analysis SCC(s) s= 4 k 3 1 2 Desc(s) Desc(1…s-1) k2 Each contains less than half the edges by definition of s May contain almost all the edges, but will contain only some of the transitive closure edges (due to random order)

  11. Key Lemma 9 • Number of edges in transitive closure of Desc(s) \ (Desc(1…s-1)SCC(s)) is at most 3/4 that of the parent subgraph V • Correction for proof of Lemma 10:"vertices strictly between g(v) and v"other than v after

  12. Open question • Are there better parallel algorithms for reachability? • E.g. can reachability on a 3-regular digraph be computed in o(√n) time using n processors? Ullman & Yannakakis takes O~(√n) time.

  13. Acknowledgements & Questions • D. Sivakumar • Claire Mathieu • Maurice Herlihy • Glencora Borradaile

  14. **Extra slides**

  15. Combining Reachability Queries on subgraphs Super-source Sources Subgraph 1 Subgraph 2

More Related