Abstract
The main advantages of Tarjan's strongly connected component (SCC) algorithm are its linear time complexity and ability to return SCCs on-the-fly, while traversing or even generating the graph. Until now, most parallel SCC algorithms sacrifice both: they run in quadratic worst-case time and/or require the full graph in advance.
The current paper presents a novel parallel, on-the-fly SCC algorithm. It preserves the linear-time property by letting workers explore the graph randomly while carefully communicating partially completed SCCs. We prove that this strategy is correct. For efficiently communicating partial SCCs, we develop a concurrent, iterable disjoint set structure (combining the union-find data structure with a cyclic list).
We demonstrate scalability on a 64-core machine using 75 real-world graphs (from model checking and explicit data graphs), synthetic graphs (combinations of trees, cycles and linear graphs), and random graphs. Previous work did not show speedups for graphs containing a large SCC. We observe that our parallel algorithm is typically 10-30× faster compared to Tarjan's algorithm for graphs containing a large SCC. Comparable performance (with respect to the current state-of-the-art) is obtained for graphs containing many small SCCs.
Supplemental Material
Available for Download
- Aggarwal, A., Anderson, R. J., & Kao, M. Y. (1989). Parallel depth-first search in general directed graphs. In Proceedings of the ACM symposium on Theory of computing (pp. 297--308). ACM. Google Scholar
Digital Library
- Anderson, R. J., & Woll, H. (1991). Wait-free Parallel Algorithms for the Union-find Problem. In Proceedings of the Twenty-third Annual ACM Symposium on Theory of Computing (pp. 370--380). ACM. Google Scholar
Digital Library
- Backstrom, L., Huttenlocher, D., Kleinberg, J., & Lan, X. (2006). Group Formation in Large Social Networks: Membership, Growth, and Evolution. KDD. Google Scholar
Digital Library
- Barnat, J., Chaloupka, J., & van de Pol, J. (2009). Distributed algorithms for SCC decomposition. Journal of Logic and Computation. Google Scholar
Digital Library
- Barnat, J., Brim, L., & Ročkai, P. (2010). Parallel partial order reduction with topological sort proviso. In Software Engineering and Formal Methods (SEFM), 2010 8th IEEE International Conference on (pp. 222--231). IEEE. Google Scholar
Digital Library
- Barnat, J., Bauch, P., Brim, L., & Ceška, M. (2011). Computing strongly connected components in parallel on CUDA. in Proc. 25th Int. Parallel and Distributed Processing Symp. (IPDPS). IEEE, pp. 544--555. Google Scholar
Digital Library
- Berry, A., Krueger, R., & Simonet, G. (2005). Ultimate generalizations of LexBFS and LEX M. In Graph-theoretic concepts in computer science (pp. 199--213). Springer. Google Scholar
Digital Library
- Bloemen, V. (2015). On-The-Fly parallel decomposition of strongly connected components. Master's thesis, University of Twente.Google Scholar
- Bondy, J. A., & Murty, U. S. R. (1976). Graph theory with applications (Vol. 290). London: Macmillan. Google Scholar
Digital Library
- Brim, L., Černá, I., Krčál, P., & Pelánek, R. (2001). Distributed LTL model checking based on negative cycle detection. In FST TCS 2001: Foundations of Software Technology and Theoretical Computer Science (pp. 96--107). Springer Berlin Heidelberg. Google Scholar
Digital Library
- Černá, I., & Pelánek, R. (2003). Distributed explicit fair cycle detection (set based approach). In Model Checking Software (pp. 49-73). Springer Berlin Heidelberg. Google Scholar
Digital Library
- Clarke, E. M., Grumberg, O., & Peled, D. (1999). Model checking. MIT press. Google Scholar
Digital Library
- Coppersmith, D., Fleischer, L., Hendrickson, B., & Pιnar, A. (2003). A divide-and-conquer algorithm for identifying strongly connected components. Technical Report RC23744, IBM Research, 2005.Google Scholar
Cross Ref
- Cormen, T. H. (2009). Introduction to algorithms. MIT press. Google Scholar
Digital Library
- Corneil, D. G., & Krueger, R. M. (2008). A unified view of graph searching. SIAM Journal on Discrete Mathematics, 22(4), 1259--1276. Google Scholar
Digital Library
- Courcoubetis, C., Vardi, M., Wolper, P., & Yannakakis, M. (1993). Memory-efficient algorithms for the verification of temporal properties. In Computer-aided Verification (pp. 129--142). Springer US. Google Scholar
Digital Library
- Dijkstra, E. W. (1976). A discipline of programming (Vol. 1). Englewood Cliffs: prentice-hall. Google Scholar
Digital Library
- Evangelista, S., Laarman, A., Petrucci, L., & van de Pol, J. (2012). Improved multi-core nested depth-first search. In Automated Technology for Verification and Analysis (pp. 269--283). Springer Berlin Heidelberg. Google Scholar
Digital Library
- Evangelista, S., Petrucci, L., & Youcef, S. (2011). Parallel nested depth-first searches for LTL model checking. In Automated Technology for Verification and Analysis (pp. 381--396). Springer Berlin Heidelberg. Google Scholar
Digital Library
- Fleischer, L. K., Hendrickson, B., & Pιnar, A. (2000). On identifying strongly connected components in parallel. In Parallel and Distributed Processing (pp. 505--511). Springer Berlin Heidelberg. Google Scholar
Digital Library
- Freeman, J. (1991). Parallel algorithms for depth-first search. Technical Report MS-CIS-91-71, University of PennsylvaniaGoogle Scholar
- Gabow, H. N. (2000), Path-based depth-first search for strong and biconnected components. Information Proc. Letters, 74(3-4): 107--114. Google Scholar
Digital Library
- Goel, A., Khanna, S., Larkin, D. H., & Tarjan, R. E. (2014). Disjoint set union with randomized linking. In Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA '14). SIAM 1005--1017. Google Scholar
Digital Library
- Hong, S., Chafi, H., Sedlar, E., & Olukotun, K., (2012). Green-Marl: A DSL for easy and efficient graph analysis, ASPLOS 2012. Google Scholar
Digital Library
- Hong, S., Rodia, N. C., & Olukotun, K. (2013). On fast parallel detection of strongly connected components (SCC) in small-world graphs. In High Performance Computing, Networking, Storage and Analysis (SC), 2013 International Conference for (pp. 1--11). IEEE. Google Scholar
Digital Library
- Hopcroft, J., & Tarjan, R. E.(1974). Efficient planarity testing. Journal of the ACM (JACM), 21(4), 549--568. Google Scholar
Digital Library
- Kahn, A. B. (1962). Topological sorting of large networks. Communications of the ACM, 5(11), 558--562. Google Scholar
Digital Library
- Kant, G., Laarman, A., Meijer, J., van de Pol, J., Blom, S., & van Dijk, T. (2015). LTSmin: High-Performance Language-Independent Model Checking. In TACAS.Google Scholar
- Kaplan, H., Shafrir, N., & Tarjan, R. E. (2002). Union-find with deletions. In Proceedings of the thirteenth annual ACM-SIAM symposium on Discrete algorithms (pp. 19--28). Google Scholar
Digital Library
- Kaveh, A. (2014). Computational structural analysis and finite element methods. Wien: Springer.Google Scholar
- Laarman, A. W. (2014). Scalable multi-core model checking. Ph.D. thesis, University of Twente.Google Scholar
- Laarman, A., & Faragó, D. (2013). Improved on-the-fly livelock detection. In NASA Formal Methods (pp. 32-47). Springer.Google Scholar
- Laarman, A., & Wijs, A. (2014). Partial-order reduction for multicore LTL model checking. In Hardware and Software: Verification and Testing (pp. 267--283). Springer.Google Scholar
- Leskovec, J., Kleinberg, J., & Faloutsos, C. (2005). Graphs over Time: Densification Laws, Shrinking Diameters and Possible Explanations. ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD). Google Scholar
Digital Library
- Leskovec, J. SNAP: Stanford network analysis project. http://snap.stanford.edu/index.html, last accessed 9 Sep 2015.Google Scholar
- Lowe, G. (2015). Concurrent depth-first search algorithms based on Tarjan's Algorithm. International Journal on Software Tools for Technology Transfer, 1--19.Google Scholar
- Liu, Y., Sun, J., & Dong, J. S. (2009). Scalable multi-core model checking fairness enhanced systems. In Formal Methods and Software Engineering (pp. 426--445). Springer Berlin Heidelberg. Google Scholar
Digital Library
- Madduri, K., & Bader, D. A. GTgraph: A suite of synthetic graph generators. http://www.cse.psu.edu/kxm85/software/GTgraph/, last accessed 9 Sep 2015.Google Scholar
- McLendon III, W., Hendrickson, B., Plimpton, S., & Rauchwerger, L. (2005). Finding strongly connected components in distributed graphs. Journal of Parallel and Distributed Computing, 65(8):901--910. Google Scholar
Digital Library
- Munro, I. (1971). Efficient determination of the transitive closure of a directed graph. Information Processing Letters, 1(2), 56--58. Google Scholar
Digital Library
- Nuutila, E., & Soisalon-Soininen, E. (1993). Efficient transitive closure computation. Technical Report TKO-B113, Helsinki University of Technology, Laboratory of Information Processing Science.Google Scholar
- Orzan, S. M. (2004). On distributed verification and verified distribution. Ph.D. dissertation, Vrije Universiteit.Google Scholar
- Pelánek, R. (2007). BEEM: Benchmarks for Explicit Model Checkers. In SPIN, volume 4595 of LNCS, pp. 263--267. Springer Google Scholar
Digital Library
- Purdom Jr, P. (1970). A transitive closure algorithm. BIT Numerical Mathematics, 10(1), 76--94.Google Scholar
Cross Ref
- Reif, J. H. (1985). Depth-first search is inherently sequential. Information Processing Letters, 20(5), 229--234.Google Scholar
- Renault, E., Duret-Lutz, A., Kordon, F., & Poitrenaud, D. (2015). Parallel explicit model checking for generalized Büchi automata. In Tools and Algorithms for the Construction and Analysis of Systems (pp. 613--627). Springer Berlin Heidelberg.Google Scholar
- Savage, C. (1982). Depth-first search and the vertex cover problem. Information Processing Letters, 14(5).Google Scholar
- Schudy, W. (2008). Finding strongly connected components in parallel using O(log2 n) reachability queries. In Parallelism in algorithms and architectures (pp. 146--151). ACM. Google Scholar
Digital Library
- Slota, G. M., Rajamanickam, S., & Madduri, K. (2014). BFS and coloring-based parallel algorithms for strongly connected components and related problems. In Parallel and Distributed Processing Symposium, 2014 IEEE 28th International (pp. 550--559). IEEE. Google Scholar
Digital Library
- Spencer, T. H. (1991). More time-work tradeoffs for parallel graph algorithms. In Proceedings of the third annual ACM symposium on Parallel algorithms and architectures (pp. 81--93). ACM. Google Scholar
Digital Library
- Takac, L., & Zábovský, M. Data Analysis in Public Social Networks, International Scientific Conference & International Workshop Present Day Trends of Innovations, May 2012 Lomza, Poland.Google Scholar
- Tarjan, R. E. (1972). Depth-first search and linear graph algorithms. SIAM. Comput. 1:146--60.Google Scholar
Cross Ref
- Tarjan, R. E. (1976). Edge-disjoint spanning trees and depth-first search. Acta Informatica, 6(2), 171--185. Google Scholar
Digital Library
- Tarjan, R. E., & van Leeuwen, J. (1984). Worst-case analysis of set union algorithms. Journal of the ACM (JACM), 31(2), 245--281. Google Scholar
Digital Library
- de la Torre, P., & Kruskal, C. (1991). Fast and efficient parallel algorithms for single source lexicographic depth-first search, breadth-first search and topological-first search. In International Conference on Parallel Processing (Vol. 3, pp. 286--287).Google Scholar
- Träff, J. L. (2013). A Note on (Parallel) Depth-and Breadth-First Search by Arc Elimination. arXiv preprint arXiv:1305.1222.Google Scholar
- Vardi, M. Y., & Wolper, P. (1986). An automata-theoretic approach to automatic program verification. In 1st Symposium in Logic in Computer Science (LICS). IEEE Computer Society.Google Scholar
- Wyllie, J. C. (1979). The complexity of parallel computations. Technical Report TR79-387, Cornell University. Google Scholar
Digital Library
Recommendations
Multi-core on-the-fly SCC decomposition
PPoPP '16: Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel ProgrammingThe main advantages of Tarjan's strongly connected component (SCC) algorithm are its linear time complexity and ability to return SCCs on-the-fly, while traversing or even generating the graph. Until now, most parallel SCC algorithms sacrifice both: ...
Graph Decomposition is NP-Complete: A Complete Proof of Holyer's Conjecture
An H-decomposition of a graph G=(V,E) is a partition of E into subgraphs isomorphic to H. Given a fixed graph H, the H-decomposition problem is to determine whether an input graph G admits an H-decomposition.In 1980, Holyer conjectured that H-...
Gallai’s path decomposition conjecture for triangle-free planar graphs
AbstractA path decomposition of a graph G is a collection of edge-disjoint paths of G that covers the edge set of G. Gallai (1968) conjectured that every connected graph on n vertices admits a path decomposition of cardinality at most ⌊ ( n + ...






Comments