Incremental Topological Ordering and Cycle Detection with Predictions

Samuel McCauley,Benjamin Moseley,Aidin Niaparast,Shikha Singh
2024-02-17
Abstract:This paper leverages the framework of algorithms-with-predictions to design data structures for two fundamental dynamic graph problems: incremental topological ordering and cycle detection. In these problems, the input is a directed graph on $n$ nodes, and the $m$ edges arrive one by one. The data structure must maintain a topological ordering of the vertices at all times and detect if the newly inserted edge creates a cycle. The theoretically best worst-case algorithms for these problems have high update cost (polynomial in $n$ and $m$). In practice, greedy heuristics (that recompute the solution from scratch each time) perform well but can have high update cost in the worst case.
Data Structures and Algorithms
What problem does this paper attempt to address?