Abstract
In this paper we provide a characterization of a DFS-forest on directed graphs in terms of a relaxed planar embedding of its structure.
We propose an incremental algorithm, based on that characterization, to maintain a DFS-forest in a directed acyclic graph with n nodes and m edges, achieving O(nm) total time in the worst case for any sequence of arc insertions, that is O(n) amortized time per arc insertion in a sequence of Θ(m) such operations. This favorably compares with the time required to recompute DFS from scratch by using Tarjan's Θ(n+m) algorithm [19].
The graph is represented by means of adjacency lists and the dfs tree is maintained by using for each node a pointer to its parent, and a rank according to a suitable ordering: the whole data structure requires O(n+ m) space.
This is the first algorithm for dynamic DFS for nontrivial classes of graphs.
Partially supported by the ESPRIT Basic Research Action no.7141 (Alcom II) and by MURST national project “Algoritmi e Strutture di Calcolo”.
Preview
Unable to display preview. Download preview PDF.
References
A. V. Aho, J. E. Hopcroft, and J. D. Ullman. The design and analysis of computer algorithms. Addison-Wesley, Reading, MA, 1974.
G. Ausiello, G. F. Italiano, A. Marchetti-Spaccamela, and U. Nanni, Incremental Algorithms for Minimal Length Paths, Journal of Algorithms, 12, 4 (1991), 615–638.
T. H. Cormen, C. E. Leiserson, and R. L. Rivest. Introduction to algorithms. MIT Press, Cambridge, MA & McGraw-Hill, New York, NY, 1990.
S. Even. Graph algorithms. Pittman, London, UK, 1976.
S. Even, and H. Gazit, Updating distances in dynamic graphs, Methods of Operations Research 49 (1985), 371–387.
D. Eppstein, Z. Galil, G. F. Italiano, A. Nissenzweig. Sparsification-A technique for speeding up dynamic graph algorithms. Proceedings 33th IEEE Symposium on Foundations of Computer Science (1992), 60–69.
Z. Galil, G. F. Italiano, and N. Sarnak. Fully Dynamic Planarity Test. Proceedings 24th ACM Symposium on Theory of Computing, (1992), 495–506.
J. Hopcroft, R. E. Tarjan. Efficient algorithms for graph manipulation. Communications of the ACM, 16 (1973), 372–378.
G. F. Italiano. Amortized efficiency of a path retrieval data structure. Theoretical Computer Science, 48 (1986), 273–281.
G. F. Italiano. Finding paths and deleting edges in directed acyclic graphs. Information Processing Letters, 28 (1988), 5–11.
P. N. Klein, S. Rao, M. Rauch and S. Subramanian. Faster shortest-path algorithms for planar graphs. Proceedings 26th ACM Symposium on Theory of Computing, 1994, to appear.
J. A. La Poutré. Alpha-algorithms for incremental planarity testing. Proceedings 26th ACM Symposium on Theory of Computing, 1994, to appear.
J. A. La Poutré and J. van Leeuwen. Maintenance of transitive closure and transitive reduction of graphs. Proceedings International Workshop on Graph-Theoretic Concepts in Computer Science (WG 88), Lecture Notes in Computer Science, 314, Springer-Verlag (1988), 106–120.
A. Marchetti-Spaccamela, U. Nanni, H. Rohnert. On-line graph algorithms for incremental compilation. Proceedings International Workshop on Graph-Theoretic Concepts in Computer Science (WG 93), Utrecht (NL), June 16–18, 1993, Lecture Notes in Computer Science, Springer-Verlag.
J. H. Reif. Depth-First Search is Inherently Sequential. Information Processing Letters, 20, 1985.
J. H. Reif. A Topological Approach to Dynamic Graph Connectivity. Information Processing Letters, 25, 1987.
H. Rohnert, A dynamization of the all-pairs least cost path problem, Proceedings 2nd Annual Symposium on Theoretical Aspects of Computer Science, Lecture Notes in Computer Science, 182, Springer-Verlag (1990), 279–286.
S. Subramanian. A fully dynamic data structure for reachability in planar graphs. Proceedings 1st Annual European Symposium on Algorithms (1993).
R. E. Tarjan. Depth-first search and linear graph algorithms. SIAM Journal on Computing, 1 (1972), 146–160.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Franciosa, P.G., Gambosi, G., Nanni, U. (1994). On the structure of DFS-forests on directed graphs and the dynamic maintenance of DFS on DAG's. In: van Leeuwen, J. (eds) Algorithms — ESA '94. ESA 1994. Lecture Notes in Computer Science, vol 855. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0049421
Download citation
DOI: https://doi.org/10.1007/BFb0049421
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-58434-6
Online ISBN: 978-3-540-48794-4
eBook Packages: Springer Book Archive