Online topological ordering

  • Authors:
  • Irit Katriel;Hans L. Bodlaender

  • Affiliations:
  • BRICS, University of Aarhus, Århus, Denmark;Utrecht University, Utrecht, The Netherlands

  • Venue:
  • ACM Transactions on Algorithms (TALG)
  • Year:
  • 2006

Quantified Score

Hi-index 0.01

Visualization

Abstract

It is shown that the problem of maintaining the topological order of the nodes of a directed acyclic graph while inserting m edges can be solved in O(min{m3/2logn, m3/2 + n2logn}) time, an improvement over the best known result of O(mn). In addition, we analyze the complexity of the same algorithm with respect to the treewidth k of the underlying undirected graph. We show that the algorithm runs in time O(mklog2n) for general k and that it can be implemented to run in O(nlog n) time on trees, which is optimal. The algorithm also detects cycles in the input.