An O(n2.75) algorithm for incremental topological ordering

We present a simple algorithm which maintains the topological order of a directed acyclic graph (DAG) with <i>n</i> nodes, under an online edge insertion sequence, in <i>O</i>(<i>n</i><sup>2.75</sup>) time, independent of the number <i>m</i> of edges inserted. For dense DAGs, this is an improvement over the previous best result of <i>O</i>(min{<i>m</i><sup>3/2</sup> log <i>n</i>, <i>m</i><sup>3/2</sup> + <i>n</i><sup>2</sup> log <i>n</i>}) by Katriel and Bodlaender [2006]. We also provide an empirical comparison of our algorithm with other algorithms for incremental topological sorting.

[1]  Paul F. Dietz,et al.  Two algorithms for maintaining order in a list , 1987, STOC.

[2]  Leonidas J. Guibas,et al.  A dichromatic framework for balanced trees , 1978, 19th Annual Symposium on Foundations of Computer Science (sfcs 1978).

[3]  Alan M. Frieze,et al.  Random graphs , 2006, SODA '06.

[4]  Bowen Alpern,et al.  Incremental evaluation of computational circuits , 1990, SODA '90.

[5]  Tobias Friedrich,et al.  Average-Case Analysis of Online Topological Ordering , 2007, ISAAC.

[6]  Paul Erdös,et al.  On the Maximal Number of Strongly Independent Vertices in a Random Acyclic Directed Graph , 1984 .

[7]  Robert E. Tarjan,et al.  Depth-First Search and Linear Graph Algorithms , 1972, SIAM J. Comput..

[8]  Alberto Marchetti-Spaccamela,et al.  On-line Graph Algorithms for Incremental Compilation , 1993, WG.

[9]  J PearceDavid,et al.  Online Cycle Detection and Difference Propagation , 2004 .

[10]  Hans L. Bodlaender,et al.  Online topological ordering , 2005, SODA '05.

[11]  Anna Pagh,et al.  Uniform hashing in constant time and linear space , 2003, STOC '03.

[12]  Jayme Luiz Szwarcfiter,et al.  A Structured Program to Generate all Topological Sorting Arrangements , 1974, Information Processing Letters.

[13]  Paul H. J. Kelly,et al.  A dynamic topological sort algorithm for directed acyclic graphs , 2007, ACM J. Exp. Algorithmics.

[14]  Alberto Marchetti-Spaccamela,et al.  Maintaining a Topological Order Under Edge Insertions , 1996, Inf. Process. Lett..

[15]  Kun-Mao Chao,et al.  A tight analysis of the Katriel-Bodlaender algorithm for online topological ordering , 2007, Theor. Comput. Sci..

[16]  Chris Hankin,et al.  Online cycle detection and difference propagation for pointer analysis , 2003, Proceedings Third IEEE International Workshop on Source Code Analysis and Manipulation.

[17]  Thomas W. Reps,et al.  On Competitive On-Line Algorithms for the Dynamic Priority-Ordering Problem , 1994, Inf. Process. Lett..