Abstract
In this paper we present an algorithm for solving two problems in dynamically maintaining the transitive closure of a digraph: In the first problem a sequence of edge insertions is performed on an initially empty graph, interspersed withp transitive closure queries of the form: “is there a path froma tob in the graph”. Our algorithm solves this problem in timeO (dm *+p), whered is the maximum outdegree of the resulting graphG andm * is the number of edges in the transitive closure ofG. In the second problem, a sequence of edge deletions is performed on anacyclic graph, interspersed withp transitive closure queries. Once again we solve this problem in timeO (dm *+p), whered is the maximum outdegree of the initial graphG andm * is the number of edges in the transitive closure ofG. For bounded degree graphs, this improves upon previous results. Our algorithms also work when insertions and deletions to the graph are intermixed. Finally, we show how to implement the operation findpath (x, y) which retrieves some path fromx toy in time proportional to the length of the path.
Similar content being viewed by others
References
Aho, A., Hopcroft, J., Ullman, J.: The design and analysis of computer algorithms. Reading, Mass.: Addison Wesley 1974
Burke, M., Ryder, B.G.: Incremental iterative data flow analysis algorithms. Technical Report LCSR-TR-96, Rutgers University, Department of Computer Science, August 1987
Driscoll, J.R., Sarnak, N., Sleator, D.D., Tarjan, R.E.: Making data structures persistent. J. Comput. System Sci.38 (1), 86–124 (1989)
Horspool, N.: Incremental generation of LR parsers. Technical report, University of Victoria, Computer Science Department, March 1988
Ibaraki, T., Katoh, N.: On-line computation of transitive closure of graphs. Inf. Process. Lett.16, 95–97 (1983)
Italiano, G.F.: Amortized efficiency of a path retrieval data structure. Theor. Comput. Sci.48, 273–281 (1986)
Italiano, G.F.: Finding paths and deleting edges in directed acyclic graphs. Inf. Process. Lett.28 (1), 13–19 (1988)
Italiano, G.F., Spaccamela, A.M., Nanni, U.: Dynamic data structures for series parallel digraphs. Columbia University, January 1989
Jagadish, H.V.: A compressed transitive closure technique for efficient fixed-point query processing. In: Proceedings of the Second International Conference on Expert Database Systems, Tysons Corner, VA, April 1988
La Poutre, J.A., van Leeuwen, J.: Maintenance of transitive closures and transitive reductions of graphs. In: Gottler, H., Schneider, H.J. (eds.) Graph-theoretic concepts in computer science 1987. (Lect. Notes Comput. Sci., vol. 314, pp. 106–120) Berlin Heidelberg New York: Springer 1988
Preparata, F.P., Tamassia, R.: Fully dynamic techniques for point location and transitive closure in planar structures. In: Proceedings of the 29th Annual Symposium on Foundations of Computer Science, p. 558–567, 1988
Tarjan, R.E.: Data structures and network algorithms.Philadephia, PA: Siam 1983
Yellin, D.M., Strom, R.: INC: A language for incremental computations. ACM Trans. Programming Languages and Syst.13 (2), 211–236 (1991)
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Yellin, D.M. Speeding up dynamic transitive closure for bounded degree graphs. Acta Informatica 30, 369–384 (1993). https://doi.org/10.1007/BF01209711
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF01209711