Results 1 
8 of
8
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 12 (2 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.
Faster algorithms for incremental topological ordering
 In ICALP
, 2008
"... Abstract. We present two online algorithms for maintaining a topological order of a directed acyclic graph as arcs are added, and detecting a cycle when one is created. Our first algorithm takes O(m 1/2) amortized time per arc and our second algorithm takes O(n 2.5 /m) amortized time per arc, where ..."
Abstract

Cited by 10 (1 self)
 Add to MetaCart
(Show Context)
Abstract. We present two online algorithms for maintaining a topological order of a directed acyclic graph as arcs are added, and detecting a cycle when one is created. Our first algorithm takes O(m 1/2) amortized time per arc and our second algorithm takes O(n 2.5 /m) amortized time per arc, where n is the number of vertices and m is the total number of arcs. For sparse graphs, our O(m 1/2) bound improves the best previous bound by a factor of log n and is tight to within a constant factor for a natural class of algorithms that includes all the existing ones. Our main insight is that the twoway search method of previous algorithms does not require an ordered search, but can be more general, allowing us to avoid the use of heaps (priority queues). Instead, the deterministic version of our algorithm uses (approximate) medianfinding; the randomized version of our algorithm uses uniform random sampling. For dense graphs, our O(n 2.5 /m) bound improves the best previously published bound by a factor of n 1/4 and a recent bound obtained independently of our work by a factor of log n. Our main insight is that graph search is wasteful when the graph is dense and can be avoided by searching the topological order space instead. Our algorithms extend to the maintenance of strong components, in the same asymptotic time bounds. 1
Faster algorithms for online topological ordering
, 2007
"... We present two algorithms for maintaining the topological order of a directed acyclic graph with n vertices, under an online edge insertion sequence of m edges. Efficient algorithms for online topological ordering have many applications, including online cycle detection, which is to discover the fir ..."
Abstract

Cited by 7 (2 self)
 Add to MetaCart
(Show Context)
We present two algorithms for maintaining the topological order of a directed acyclic graph with n vertices, under an online edge insertion sequence of m edges. Efficient algorithms for online topological ordering have many applications, including online cycle detection, which is to discover the first edge that introduces a cycle under an arbitrary sequence of edge insertions in a directed graph. The current fastest algorithms for the online topological ordering problem run in time O(min(m 3/2 logn,m 3/2 + n 2 logn)) and O(n 2.75) (the latter algorithm is faster for dense graphs, i.e., when m> n 11/6). In this paper we present faster algorithms for this problem. We first present a simple algorithm with running time O(n 5/2) for the online topological ordering problem. This is the current fastest algorithm for this problem on dense graphs, i.e., when m> n 5/3. We then present an algorithm with running time O((m + nlogn) √ m), which is an improvement over the O(min(m 3/2 logn,m 3/2 + n 2 logn)) algorithm it is a strict improvement when m is sandwiched between ω(n) and O(n 4/3). Our results yield an improved upper bound of O(min(n 5/2,(m+nlogn) √ m)) for the online topological ordering problem.
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 6 (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.
Averagecase analysis of online topological ordering
 of Lecture Notes in Computer Science
, 2007
"... Many applications like pointer analysis and incremental compilation require maintaining a topological ordering of the nodes of a directed acyclic graph (DAG) under dynamic updates. All known algorithms for this problem are either only analyzed for worstcase insertion sequences or only evaluated exp ..."
Abstract

Cited by 6 (2 self)
 Add to MetaCart
(Show Context)
Many applications like pointer analysis and incremental compilation require maintaining a topological ordering of the nodes of a directed acyclic graph (DAG) under dynamic updates. All known algorithms for this problem are either only analyzed for worstcase insertion sequences or only evaluated experimentally on random DAGs. We present the first averagecase analysis of online topological ordering algorithms. We prove an expected runtime of O(n 2 polylog(n)) under insertion of the edges of a complete DAG in a random order for the algorithms of Alpern et
An Õ(n2.5 )time algorithm for online topological ordering
, 2008
"... We present an Õ(n2.5)time algorithm for maintaining the topological order of a directed acyclic graph with n vertices while inserting m edges. This is an improvement over the previous result of O(n 2.75) by Ajwani, Friedrich, and Meyer. ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
(Show Context)
We present an Õ(n2.5)time algorithm for maintaining the topological order of a directed acyclic graph with n vertices while inserting m edges. This is an improvement over the previous result of O(n 2.75) by Ajwani, Friedrich, and Meyer.
Incremental Topological Ordering and Strong Component Maintenance
, 2008
"... Abstract. We present an online algorithm for maintaining a topological order of a directed acyclic graph as arcs are added, and detecting a cycle when one is created. Our algorithm takes O(m 1/2) amortized time per arc, where m is the total number of arcs. For sparse graphs, this bound improves the ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
(Show Context)
Abstract. We present an online algorithm for maintaining a topological order of a directed acyclic graph as arcs are added, and detecting a cycle when one is created. Our algorithm takes O(m 1/2) amortized time per arc, where m is the total number of arcs. For sparse graphs, this bound improves the best previous bound by a logarithmic factor and is tight to within a constant factor for a natural class of algorithms that includes all the existing ones. Our main insight is that the bidirectional search method of previous algorithms does not require an ordered search, but can be more general. This allows us to avoid the use of heaps (priority queues) entirely. Instead, the deterministic version of our algorithm uses (approximate) medianfinding. The randomized version of our algorithm avoids this complication, making it very simple. We extend our topological ordering algorithm to give the first detailed algorithm for maintaining the strong components of a directed graph, and a topological order of these components, as arcs are added. This extension also has an amortized time bound of O(m 1/2) per arc. 1
A NEW APPROACH TO INCREMENTAL CYCLE DETECTION AND RELATED PROBLEMS
, 2013
"... We consider the problem of detecting a cycle in a directed graph that grows by arc insertions, and the related problems of maintaining a topological order and the strong components of such a graph. For these problems we give two algorithms, one suited to sparse graphs, the other to dense graphs. T ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
(Show Context)
We consider the problem of detecting a cycle in a directed graph that grows by arc insertions, and the related problems of maintaining a topological order and the strong components of such a graph. For these problems we give two algorithms, one suited to sparse graphs, the other to dense graphs. The former takes O(min{m 1/2, n 2/3}m) time to insert m arcs into an nvertex graph; the latter takes O(n 2 log n) time. Our sparse algorithm is substantially simpler than a previous O(m 3/2)time algorithm; it is also faster on graphs of sufficient density. The time bound of our dense algorithm beats the previously best time bound of O(n 5/2) for dense graphs. Our algorithms rely for their efficiency on vertex numberings weakly consistent with topological order: we allow ties. Bounds on the size of the numbers give bounds on running time.