Abstract
Depth-first search (DFS) is a well-known graph traversal algorithm and can be performed in \(O(n+m)\) time for a graph with n vertices and m edges. We consider dynamic DFS problem, that is, to maintain a DFS tree of an undirected graph G when edges and vertices are gradually inserted into or deleted from G. We present an algorithm for this problem which takes worst case \(O(\sqrt{mn}\cdot \mathrm {polylog}(n))\) time per update and requires only \((3m+o(m))\log n+O(m)\) bits of space. This is the first sublinear worst case update time algorithm for this problem which requires only \(O(m\log n)\) bits. Moreover, the time complexity of this algorithm is close to, or under particular condition better than, the state-of-the-art algorithm of Chen et al. [5], which requires \(O(m\log ^2 n)\) bits of space.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
However, in their paper there is a bit too strong assumption on queries used in their algorithms, and we succeed to remove this assumption. details are in Sect. 4.
References
Baswana, S., Chaudhury, S.R., Choudhary, K., Khan, S.: Dynamic DFS in undirected graphs: breaking the \({O}(m)\) barrier. In: Proceedings of SODA, pp. 730–739 (2016)
Baswana, S., Choudhary, K.: On dynamic DFS tree in directed graphs. In: Italiano, G.F., Pighizzini, G., Sannella, D.T. (eds.) MFCS 2015. LNCS, vol. 9235, pp. 102–114. Springer, Heidelberg (2015). doi:10.1007/978-3-662-48054-0_9
Baswana, S., Khan, S.: Incremental algorithm for maintaining DFS tree for undirected graphs. In: Esparza, J., Fraigniaud, P., Husfeldt, T., Koutsoupias, E. (eds.) ICALP 2014. LNCS, vol. 8572, pp. 138–149. Springer, Heidelberg (2014). doi:10.1007/978-3-662-43948-7_12
Bender, M.A., Farach-Colton, M.: The LCA problem revisited. In: Gonnet, G.H., Viola, A. (eds.) LATIN 2000. LNCS, vol. 1776, pp. 88–94. Springer, Heidelberg (2000). doi:10.1007/10719839_9
Chen, L., Duan, R., Wang, R., Zhang, H.: Improved algorithms for maintaining DFS tree in undirected graphs (2016). arXiv:1607.04913v2
Franciosa, P.G., Gambosi, G., Nanni, U.: The incremental maintenance of a Depth-First-Search tree in directed acyclic graphs. Inf. Process. Lett. 61, 113–120 (1997)
Grossi, R., Gupta, A., Vitter, J.S.: High-order entropy-compressed text indexes. In: Proceedings of SODA, pp. 841–850 (2003)
Kreft, S., Navarro, G.: Self-indexing based on LZ77. In: Giancarlo, R., Manzini, G. (eds.) CPM 2011. LNCS, vol. 6661, pp. 41–54. Springer, Heidelberg (2011). doi:10.1007/978-3-642-21458-5_6
Munro, J.I., Nekrich, Y., Vitter, J.S.: Fast construction of wavelet trees. Theor. Comput. Sci. 638, 91–97 (2016)
Navarro, G.: Wavelet trees for all. J. Discrete Algorithms 25, 2–20 (2014)
Navarro, G., Sadakane, K.: Fully-functional static and dynamic succinct trees. ACM TALG 10(3), 16 (2014)
Raman, R., Raman, V., Rao, S.S.: Succinct indexable dictionaries with applications to encoding \(k\)-ary trees, prefix sums and multisets. ACM TALG 3(4), 43 (2007)
Sleator, D.D., Tarjan, R.E.: A data structure for dynamic trees. J. Comput. Syst. Sci. 26, 362–391 (1983)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
Cite this paper
Nakamura, K., Sadakane, K. (2017). A Space-Efficient Algorithm for the Dynamic DFS Problem in Undirected Graphs. In: Poon, SH., Rahman, M., Yen, HC. (eds) WALCOM: Algorithms and Computation. WALCOM 2017. Lecture Notes in Computer Science(), vol 10167. Springer, Cham. https://doi.org/10.1007/978-3-319-53925-6_23
Download citation
DOI: https://doi.org/10.1007/978-3-319-53925-6_23
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-53924-9
Online ISBN: 978-3-319-53925-6
eBook Packages: Computer ScienceComputer Science (R0)