Abstract
Depth First Search (DFS) tree is a fundamental data structure for graphs used in solving various algorithmic problems. However, very few results are known for maintaining DFS tree in a dynamic environment—insertion or deletion of edges. We present the first algorithm for maintaining a DFS tree for an undirected graph under insertion of edges. For processing any arbitrary online sequence of edge insertions, this algorithm takes total \(O(n^2)\) time.
Similar content being viewed by others
References
Alstrup, S., Holm, J.: Improved algorithms for finding level ancestors in dynamic trees. In: Proceedings of Automata, Languages and Programming, 27th International Colloquium, ICALP 2000, Geneva, Switzerland, 9–15 July 2000, pp. 73–84 (2000)
Baswana, S., Choudhary, K.: On dynamic DFS tree in directed graphs. In: Proceedings of Part II Mathematical Foundations of Computer Science 2015—40th International Symposium, MFCS 2015, Milan, Italy, 24–28 Aug 2015, pp. 102–114 (2015)
Baswana, S., Khan, S.: Incremental algorithm for maintaining DFS tree for undirected graphs. In: Proceedings of Part I Automata, Languages, and Programming—41st International Colloquium, ICALP 2014, Copenhagen, Denmark, 8–11 July 2014, , pp. 138–149 (2014)
Baswana, S., Khurana, S., Sarkar, S.: Fully dynamic randomized algorithms for graph spanners. ACM Trans. Algorithms 8(4), 35 (2012)
Cole, R., Hariharan, R.: Dynamic lca queries on trees. SIAM J. Comput. 34(4), 894–923 (2005)
Demetrescu, C., Italiano, G.F.: A new approach to dynamic all pairs shortest paths. J. ACM 51(6), 968–992 (2004)
Eppstein, D., Galil, Z., Italiano, G.F., Nissenzweig, A.: Sparsification—a technique for speeding up dynamic graph algorithms. J. ACM 44(5), 669–696 (1997)
Erdős, P., Rényi, A.: On the evolution of random graphs. In: Publications of the Mathematical Institute of the Hungarian Academy of Sciences, vol. 5, pp. 17–61 (1960)
Franciosa, P.G., Gambosi, G., Nanni, U.: The incremental maintenance of a depth-first-search tree in directed acyclic graphs. Inf. Process. Lett. 61(2), 113–120 (1997)
Gottlieb, L., Roditty, L.: Improved algorithms for fully dynamic geometric spanners and geometric routing. In: Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA, vol. 2008 2008, pp. 591–600 (2008)
Henzinger, M.R., King, V.: Randomized fully dynamic graph algorithms with polylogarithmic time per operation. J. ACM 46(4), 502–516 (1999)
Holm, J., de Lichtenberg, K., Thorup, M.: Poly-logarithmic deterministic fully-dynamic algorithms for connectivity, minimum spanning tree, 2-edge, and biconnectivity. J. ACM 48(4), 723–760 (2001)
Kapron, B.M., King, V., Mountjoy, B.: Dynamic graph connectivity in polylogarithmic worst case time. In: Proceedings of the Twenty-Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2013, New Orleans, Louisiana, USA, 6–8 January 2013, pp. 1131–1142 (2013)
Krivelevich, M., Sudakov, B.: The phase transition in random graphs: a simple proof. Random Struct. Algorithms 43(2), 131–138 (2013)
Miltersen, P.B., Subramanian, S., Vitter, J.S., Tamassia, R.: Complexity models for incremental computation. Theor. Comput. Sci. 130(1), 203–236 (1994)
Reif, J.H.: Depth-first search is inherently sequential. Inf. Process. Lett. 20(5), 229–234 (1985)
Reif, J.H.: A topological approach to dynamic graph connectivity. Inf. Process. Lett. 25(1), 65–70 (1987)
Roditty, L.: Fully dynamic geometric spanners. Algorithmica 62(3–4), 1073–1087 (2012)
Roditty, L., Zwick, U.: Improved dynamic reachability algorithms for directed graphs. SIAM J. Comput. 37(5), 1455–1471 (2008)
Roditty, L., Zwick, U.: Dynamic approximate all-pairs shortest paths in undirected graphs. SIAM J. Comput. 41(3), 670–683 (2012)
Sankowski, P.: Dynamic transitive closure via dynamic matrix inverse (extended abstract). In: Proceedings of 45th Symposium on Foundations of Computer Science (FOCS 2004), pp. 509–517 (2004)
Tarjan, R.E.: Depth-first search and linear graph algorithms. SIAM J. Comput. 1(2), 146–160 (1972)
Thorup, M.: Fully-dynamic min-cut. Combinatorica 27(1), 91–127 (2007)
Author information
Authors and Affiliations
Corresponding author
Additional information
A preliminary version of this result appeared in ICALP 2014 [3].
This research work was partially supported by UGC-ISF (the University Grants Commission of India and Israel Science Foundation), IMPECS (the Indo-German Max Planck Center for Computer Science), and Google India under the Google India PhD Fellowship Award.
Rights and permissions
About this article
Cite this article
Baswana, S., Khan, S. Incremental Algorithm for Maintaining a DFS Tree for Undirected Graphs. Algorithmica 79, 466–483 (2017). https://doi.org/10.1007/s00453-016-0204-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-016-0204-1