ACM Transactions on Algorithms · 2012 · 75 citations · 34 references
ComputingComputer ScienceMathematicsAlgorithmsCombinatoricsTopologyComputational ComplexityDirected Acyclic GraphsGraph AlgorithmsGraph TheoryAlgorithmic Graph TheoryComputational Complexity Of Graph AlgorithmsCycle DetectionLocality ConstraintsOnline Graph AlgorithmsRandomized Online AlgorithmsTopological OrderTopological Ordering
We present two online algorithms for maintaining a topological order of a directed n -vertex acyclic graph as arcs are added, and detecting a cycle when one is created. Our first algorithm handles m arc additions in O( m 3/2 ) time. For sparse graphs ( m / n = O(1)), this bound improves the best previous bound by a logarithmic factor, and is tight to within a constant factor among algorithms satisfying a natural locality property. Our second algorithm handles an arbitrary sequence of arc additions in O( n 5/2 ) time. For sufficiently dense graphs, this bound improves the best previous bound by a polynomial factor. Our bound may be far from tight: we show that the algorithm can take Ω( n 2 2 √2 lg n ) time by relating its performance to a generalization of the k -levels problem of combinatorial geometry. A completely different algorithm running in Θ( n 2 log n ) time was given recently by Bender, Fineman, and Gilbert. We extend both of our algorithms to the maintenance of strong components, without affecting the asymptotic time bounds.
34
Depth-First Search and Linear Graph Algorithms
Robert E. Tarjan · SIAM Journal on Computing · 1972 · 6K citations
Manuel Blum, Robert W. Floyd, Vaughan Pratt et al. · Journal of Computer and System Sciences · 1973 · 1.2K citations
Worst-case Analysis of Set Union Algorithms
Robert E. Tarjan, Jan Van Leeuwen · Journal of the ACM · 1984 · 458 citations · Full text