A New Approach to Incremental Cycle Detection and Related Problems
Michael A. Bender, Jeremy T. Fineman, Seth Gilbert, and Robert E., Tarjan

TL;DR
This paper introduces two efficient algorithms for incremental cycle detection, topological order maintenance, and strong component identification in directed graphs, optimized for sparse and dense graphs respectively.
Contribution
It presents new algorithms that improve upon previous bounds for incremental cycle detection and related problems in directed graphs.
Findings
Sparse graph algorithm is simpler and faster for dense graphs.
Dense graph algorithm outperforms previous bounds, running in O(n^2 log n) time.
Algorithms leverage topological vertex numbering for efficiency.
Abstract
We consider the problem of detecting a cycle in a directed graph that grows by arc insertions, and the related problems of maintaining a topological order and the strong components of such a graph. For these problems, we give two algorithms, one suited to sparse graphs, and the other to dense graphs. The former takes the minimum of O(m^{3/2}) and O(mn^{2/3}) time to insert m arcs into an n-vertex graph; the latter takes O(n^2 log(n)) time. Our sparse algorithm is considerably simpler than a previous O(m^{3/2})-time algorithm; it is also faster on graphs of sufficient density. The time bound of our dense algorithm beats the previously best time bound of O(n^{5/2}) for dense graphs. Our algorithms rely for their efficiency on topologically ordered vertex numberings; bounds on the size of the numbers give bound on running times.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Optimization and Search Problems · Advanced Graph Theory Research
