An Improved Algorithm for Incremental Cycle Detection and Topological Ordering in Sparse Graphs
Sayan Bhattacharya, Janardhan Kulkarni
Abstract
We consider the problem of incremental cycle detection and topological ordering in a directed graph G = (V, E) with |V | = n nodes. In this setting, initially the edge-set E of the graph is empty. Subsequently, at each time-step an edge gets inserted into G. After every edge-insertion, we have to report if the current graph contains a cycle, and as long as the graph remains acyclic, we have to maintain a topological ordering of the node-set V . Let m be the total number of edges that get inserted into G. We present a randomized algorithm for this problem with Õ(m 4/3 ) total expected update time.
Our result improves the Õ(m • min(m 1/2 , n 2/3 )) total update time bound of [BFGT16; HKMST08; HKMST12; CFKR13]. Furthermore, whenever m = o(n 3/2 ), our result improves upon the recently obtained Õ(m √ n) total update time bound of [BC18]. We note that if m = Ω(n 3/2 ), then the algorithm of [BFGT16; BFG09; CFKR13], which has Õ(n 2 ) total update time, beats the performance of the Õ(m √ n) time algorithm of [BC18]. It follows that we improve upon the total update time of the algorithm of [BC18] in the "interesting" range of sparsity where m = o(n 3/2 ).
Our result also happens to be the first one that breaks the Ω(n √ m) lower bound of [HKMST08] on the total update time of any local algorithm for a nontrivial range of sparsity. Specifically, the total update time of our algorithm is o(n √ m) whenever m = o(n 6/5 ). From a technical perspective, we obtain our result by combining the algorithm of [BC18] with the balanced search framework of [HKMST12].
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
12 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Almost-Linear Time Algorithms for Incremental Graphs: Cycle Detection, SCCs, s-t Shortest Path, and Minimum-Cost Flow cites New algorithms and hardness for incremental single-source shortest paths in directed graphs
- Almost-Linear Time Algorithms for Incremental Graphs: Cycle Detection, SCCs, s-t Shortest Path, and Minimum-Cost Flow cites Deterministic Decremental SSSP and Approximate Min-Cost Flow in Almost-Linear Time
- Deterministic Decremental SSSP and Approximate Min-Cost Flow in Almost-Linear Time cites New algorithms and hardness for incremental single-source shortest paths in directed graphs
- Efficient Distributed Hop-Constrained Path Enumeration on Large-Scale Graphs cites PathEnum: Towards Real-Time Hop-Constrained s-t Path Enumeration
Cited by top-tier papers12
- PathEnum: Towards Real-Time Hop-Constrained s-t Path EnumerationShixuan Sun, Yuhang Chen, Bingsheng He, Bryan HooiSIGMOD 2021 · 28 citations
- Deterministic Decremental SSSP and Approximate Min-Cost Flow in Almost-Linear TimeAaron Bernstein, Maximilian Probst Gutenberg, Thatchaphol SaranurakFOCS 2021 · 27 citations
- New algorithms and hardness for incremental single-source shortest paths in directed graphsMaximilian Probst Gutenberg, Virginia Vassilevska Williams, Nicole WeinSTOC 2020 · 21 citations
- Almost-Linear Time Algorithms for Incremental Graphs: Cycle Detection, SCCs, s-t Shortest Path, and Minimum-Cost FlowLi Chen, Rasmus Kyng, Yang P. Liu, Simon Meierhans et al.STOC 2024 · 11 citations
- Efficient Distributed Hop-Constrained Path Enumeration on Large-Scale GraphsYuanyuan Zeng, Yixiang Fang, Chenhao Ma, Xu Zhou et al.SIGMOD 2024 · 7 citations
Related papers
- Incremental Topological Ordering and Cycle Detection with PredictionsSamuel McCauley, Benjamin Moseley, Aidin Niaparast, Shikha SinghICML 2024 · 6 citations
- Incremental Single Source Shortest Paths in Sparse DigraphsShiri Chechik, Tianyi ZhangSODA 2021 · 5 citations
- Incremental Shortest Paths in Almost Linear Time via a Modified Interior Point MethodYang P. LiuSTOC 2026 · 1 citation
- Incremental Approximate Maximum Flow on Undirected Graphs in Subpolynomial Update TimeJan van den Brand, Li Chen, Rasmus Kyng, Yang P. Liu et al.SODA 2024 · 3 citations
- Dynamic Maxflow via Dynamic Interior Point MethodsJan van den Brand, Yang P. Liu, Aaron SidfordSTOC 2023 · 5 citations
