I/O-Efficient Algorithms for Topological Sort and Related Problems
Authors:
Open Access
- 23 January 2022
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Algorithms
- Vol. 18 (1) , 1-24
Abstract
This article presents I/O-efficient algorithms for topologically sorting a directed acyclic graph and for the more general problem identifying and topologically sorting the strongly connected components of a directed graph G = ( V, E ). Both algorithms are randomized and have I/O-costs O ( sort ( E ) · poly(log V)), with high probability, where sort ( E ) = O( E / B log M / B ( E/B )) is the I/O cost of sorting an | E |-element array on a machine with size- B blocks and size- M cache/internal memory. These are the first algorithms for these problems that do not incur at least one I/O per vertex, and as such these are the first I/O-efficient algorithms for sparse graphs. By applying the technique of time-forward processing, these algorithms also imply I/O-efficient algorithms for most problems on directed acyclic graphs, such as shortest paths, as well as the single-source reachability problem on arbitrary directed graphs.Keywords
Funding Information
- NSF (CCF-1314633, CCF-1617727, and CCF-1718700)
This publication has 14 references indexed in Scilit:
- I/O-Efficient Contour Tree SimplificationLecture Notes in Computer Science, 2009
- Algorithms and Data Structures for External MemoryFoundations and Trends® in Theoretical Computer Science, 2008
- I/O-Efficient Planar SeparatorsSIAM Journal on Computing, 2008
- I/O-Efficient Undirected Shortest Paths with Unbounded Edge LengthsLecture Notes in Computer Science, 2006
- On external-memory MST, SSSP and multi-way planar graph separationJournal of Algorithms, 2004
- External Memory Algorithms for Diameter and All-Pairs Shortest-Paths on Sparse GraphsLecture Notes in Computer Science, 2004
- Sparsification—a technique for speeding up dynamic graph algorithmsJournal of the ACM, 1997
- The input/output complexity of transitive closureAnnals of Mathematics and Artificial Intelligence, 1991
- The input/output complexity of sorting and related problemsCommunications of the ACM, 1988
- Depth-First Search and Linear Graph AlgorithmsSIAM Journal on Computing, 1972