A Faster and Simpler Fully Dynamic Transitive Closure

被引:22
作者
Roditty, Liam [1 ]
机构
[1] Weizmann Inst Sci, Fac Math & Comp Sci, IL-76100 Rehovot, Israel
关键词
Dynamic graph algorithms; reachability; directed graph;
D O I
10.1145/1328911.1328917
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
We obtain a new fully dynamic algorithm for maintaining the transitive closure of a directed graph. Our algorithm maintains the transitive closure matrix in a total running time of O(mn + (ins + del) . n(2)), where ins (del) is the number of insert (delete) operations performed. Here n is the number of vertices in the graph and m is the initial number of edges in the graph. Obviously, reachability queries can be answered in constant time. The algorithm uses only O(n(2)) time which is essentially optimal for maintaining the transitive closure matrix. Our algorithm can also support path queries. If v is reachable from u, the algorithm can produce a path from u to v in time proportional to the length of the path. The best previously known algorithm for the problem is due to Demetrescu and Italiano [2000]. Their algorithm has a total running time of O(n(3) + (ins + del) . n(2)). The query time is also constant. In addition, we also present a simple algorithm for directed acyclic graphs (DAGs) with a total running time of O(mn + ins . n(2) + del). Our algorithms are obtained by combining some new ideas with techniques of Italiano [1986, 1988], King [1999], King and Thorup [2001] and Frigioni et al. [2001]. We also note that our algorithms are extremely simple and can be easily implemented.
引用
收藏
页数:16
相关论文
共 11 条
[1]  
BASWANA S, 2002, P 34 ANN ACM S THEOR
[2]  
Cormen T. H., 2001, Introduction to Algorithms, V2nd
[3]   Fully dynamic transitive closure:: Breaking through the O(n2) barrier [J].
Demetrescu, C ;
Italiano, GF .
41ST ANNUAL SYMPOSIUM ON FOUNDATIONS OF COMPUTER SCIENCE, PROCEEDINGS, 2000, :381-389
[4]  
FRIGIONI D, 2001, ACM J EXPT ALGORITHM, P6
[5]   AMORTIZED EFFICIENCY OF A PATH RETRIEVAL DATA STRUCTURE [J].
ITALIANO, GF .
THEORETICAL COMPUTER SCIENCE, 1986, 48 (2-3) :273-281
[6]   FINDING PATHS AND DELETING EDGES IN DIRECTED ACYCLIC GRAPHS [J].
ITALIANO, GF .
INFORMATION PROCESSING LETTERS, 1988, 28 (01) :5-11
[7]  
King V., 1999, Proceedings of the Thirty-First Annual ACM Symposium on Theory of Computing, P492, DOI 10.1145/301250.301380
[8]  
KING V, 1999, P 40 IEEE S FDN COMP, P81
[9]  
KING V, 2001, P 7 ANN INT COMP COM, P269
[10]  
LAPOUTRE J, 1987, P 13 INT WORKSH GRAP, V314