Results 1 
2 of
2
A New Approach to Incremental Topological Ordering
"... Let G = (V,E) be a directed acyclic graph (dag) with n = V and m = E. We say that a total ordering ≺ on vertices V is a topological ordering if for every edge (u,v) ∈ E, we have u ≺ v. In this paper, we consider the problem of maintaining a topological ordering subject to dynamic changes to the ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
Let G = (V,E) be a directed acyclic graph (dag) with n = V and m = E. We say that a total ordering ≺ on vertices V is a topological ordering if for every edge (u,v) ∈ E, we have u ≺ v. In this paper, we consider the problem of maintaining a topological ordering subject to dynamic changes to the underlying graph. That is, we begin with an empty graph G =(V, /0) consisting of n nodes. The adversary adds m edges to the graph G, one edge at a time. Throughout this process, we maintain an online topological ordering of the graph G. In this paper, we present a new algorithm that has a total cost of O(n2 logn) for maintaining the topological ordering throughout all the edge additions. At the heart of our algorithm is a new approach for maintaining the ordering. Instead of attempting to place the nodes in an ordered list, we assign each node a label that is consistent with the ordering, and yet can be updated efficiently as edges are inserted. When the graph is dense, our algorithm is more efficient than existing algorithms. By way of contrast, the best known prior algorithms achieve only O(min(m1.5,n2.5)) cost.
Incremental Cycle Detection, Topological Ordering, and Strong Component Maintenance
, 2008
"... We present two online algorithms for maintaining a topological order of a directed nvertex acyclic graph as arcs are added, and detecting a cycle when one is created. Our first algorithm handles m arc additions in O(m 3/2) time. For sparse graphs (m/n = O(1)), this bound improves the best previou ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
(Show Context)
We present two online algorithms for maintaining a topological order of a directed nvertex acyclic graph as arcs are added, and detecting a cycle when one is created. Our first algorithm handles m arc additions in O(m 3/2) time. For sparse graphs (m/n = O(1)), this bound improves the best previous bound by a logarithmic factor, and is tight to within a constant factor among algorithms satisfying a natural locality property. Our second algorithm handles an arbitrary sequence of arc additions in O(n 5/2) time. For sufficiently dense graphs, this bound improves the best previous bound by a polynomial factor. Our bound may be far from tight; we conjecture that the algorithm actually runs in O(n² log n) time. A completely different algorithm running in Θ(n² log n) time was given recently by Bender, Fineman, and Gilbert. We extend both of our algorithms to the maintenance of strong components, without affecting the asymptotic time bounds.