Skip to main content

A Space-Efficient Algorithm for the Dynamic DFS Problem in Undirected Graphs

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 10167))

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

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 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

  1. 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)

    Google Scholar 

  2. 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

    Chapter  Google Scholar 

  3. 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

    Google Scholar 

  4. 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

    Chapter  Google Scholar 

  5. Chen, L., Duan, R., Wang, R., Zhang, H.: Improved algorithms for maintaining DFS tree in undirected graphs (2016). arXiv:1607.04913v2

  6. 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)

    Article  MathSciNet  MATH  Google Scholar 

  7. Grossi, R., Gupta, A., Vitter, J.S.: High-order entropy-compressed text indexes. In: Proceedings of SODA, pp. 841–850 (2003)

    Google Scholar 

  8. 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

    Chapter  Google Scholar 

  9. Munro, J.I., Nekrich, Y., Vitter, J.S.: Fast construction of wavelet trees. Theor. Comput. Sci. 638, 91–97 (2016)

    Article  MathSciNet  MATH  Google Scholar 

  10. Navarro, G.: Wavelet trees for all. J. Discrete Algorithms 25, 2–20 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  11. Navarro, G., Sadakane, K.: Fully-functional static and dynamic succinct trees. ACM TALG 10(3), 16 (2014)

    MathSciNet  MATH  Google Scholar 

  12. 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)

    Article  MathSciNet  MATH  Google Scholar 

  13. Sleator, D.D., Tarjan, R.E.: A data structure for dynamic trees. J. Comput. Syst. Sci. 26, 362–391 (1983)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kengo Nakamura .

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics