Abstract
Let G be an undirected graph. We address the problem of fault tolerant depth first search (DFS) tree defined as follows. Build a compact data structure that, given any set \({{\mathcal {F}}}\) of failed vertices or edges, can efficiently report a DFS tree of \(G{\backslash } {{\mathcal {F}}}\). We present an algorithm which is drastically simpler and yet more efficient than the current state-of-the-art algorithms for this problem. Additionally, for achieving efficiency, the current-state-of-the-algorithms have to crucially rely on sophisticated data structures. The simplicity of our algorithm also enables us to replace these sophisticated data structures with much simpler and lighter data structures that occupy optimal space and take optimal preprocessing time. Our algorithm for the fault tolerant DFS tree also leads to a better time complexity for maintaining a DFS tree in a fully dynamic environment.
Similar content being viewed by others
Notes
One word stores \(\lceil \log m \rceil \) bits.
References
Aggarwal, A., Anderson, R.J., Kao, M.: Parallel depth-first search in general directed graphs. SIAM J. Comput. 19(2), 397–409 (1990). https://doi.org/10.1137/0219025
Baswana, S., Chaudhury, S.R., Choudhary, K., Khan, S.: Dynamic DFS in undirected graphs: Breaking the O(m) barrier. SIAM J. Comput. 48(4), 1335–1363 (2019). (A preliminary version appeared in Proceedings of the Twenty-Seventh Annual ACM-SIAM Symposium on Discrete Algorithms, SODA, pp. 730–739, 2016). https://doi.org/10.1137/17M114306X
Baswana, S., Choudhary, K.: On dynamic DFS tree in directed graphs. In: MFCS, Proceedings, Part II, pp. 102–114 (2015). https://doi.org/10.1007/978-3-662-48054-0_9
Baswana, S., Goel, A., Khan, S.: Incremental DFS algorithms: a theoretical and experimental study. In: Czumaj, A. (ed.) Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2018, New Orleans, LA, USA, January 7–10, 2018, pp. 53–72. SIAM (2018). https://doi.org/10.1137/1.9781611975031.4
Baswana, S., Gupta, S.K., Tulsyan, A.: Fault tolerant and fully dynamic DFS in undirected graphs: simple yet efficient. In: Rossmanith, P., Heggernes, P., Katoen, J.P. (eds.) 44th International Symposium on Mathematical Foundations of Computer Science, MFCS 2019, August 26–30, 2019, Aachen, Germany, LIPIcs, vol. 138, pp. 65:1–65:16. Schloss Dagstuhl—Leibniz Center for Computer Science (2019). https://doi.org/10.4230/LIPIcs.MFCS.2019.65
Baswana, S., Khan, S.: Incremental algorithm for maintaining a DFS tree for undirected graphs. Algorithmica 79(2), 466–483 (2017). https://doi.org/10.1007/s00453-016-0204-1
Bernstein, A., Karger, D.R.: A nearly optimal oracle for avoiding failed vertices and edges. In: Proceedings of the 41st Annual ACM Symposium on Theory of Computing, STOC 2009, Bethesda, MD, USA, May 31–June 2, 2009, pp. 101–110 (2009). https://doi.org/10.1145/1536414.1536431
Chan, T.M.: Dynamic subgraph connectivity with geometric applications. In: Proceedings on 34th Annual ACM Symposium on Theory of Computing, May 19–21, 2002, Montréal, Québec, Canada, pp. 7–13 (2002). https://doi.org/10.1145/509907.509911
Chazelle, B., Guibas, L.J.: Fractional cascading: I. A data structuring technique. Algorithmica 1(2), 133–162 (1986). https://doi.org/10.1007/BF01840440
Chechik, S., Langberg, M., Peleg, D., Roditty, L.: Fault tolerant spanners for general graphs. SIAM J. Comput. 39(7), 3403–3423 (2010). https://doi.org/10.1137/090758039
Chen, L., Duan, R., Wang, R., Zhang, H.: Improved algorithms for maintaining DFS tree in undirected graphs. CoRR arXiv:1607.04913v2 (2016)
Chen, L., Duan, R., Wang, R., Zhang, H., Zhang, T.: An improved algorithm for incremental DFS tree in undirected graphs. In: SWAT, pp. 16:1–16:12 (2018). https://doi.org/10.4230/LIPIcs.SWAT.2018.16
Demetrescu, C., Thorup, M., Chowdhury, R.A., Ramachandran, V.: Oracles for distances avoiding a failed node or link. SIAM J. Comput. 37(5), 1299–1318 (2008). https://doi.org/10.1137/S0097539705429847
Duan, R., Zhang, L.: Faster worst-case update time for dynamic subgraph connectivity. CoRR arXiv:1611.09072 (2016)
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). https://doi.org/10.1016/S0020-0190(96)00202-5
Frigioni, D., Italiano, G.F.: Dynamically switching vertices in planar graphs. Algorithmica 28(1), 76–103 (2000). https://doi.org/10.1007/s004530010032
Grossi, R., Gupta, A., Vitter, J.S.: High-order entropy-compressed text indexes. In: Symposium on Discrete Algorithms, SODA, pp. 841–850 (2003). https://dl.acm.org/citation.cfm?id=644108.644250
Nakamura, K., Sadakane, K.: Space-efficient fully dynamic DFS in undirected graphs. Algorithms 12(3), 52 (2019). https://doi.org/10.3390/a12030052
Sleator, D.D., Tarjan, R.E.: A data structure for dynamic trees. J. Comput. Syst. Sci. 26(3), 362–391 (1983). https://doi.org/10.1016/0022-0000(83)90006-5
Smith, J.R.: Parallel algorithms for depth-first searches I. planar graphs. SIAM J. Comput. 15(3), 814–830 (1986)
Tarjan, R.E.: Depth-first search and linear graph algorithms. SIAM J. Comput. 1(2), 146–160 (1972). https://doi.org/10.1137/0201010
Acknowledgements
Part of this research work was carried out while the first author was at Heinz Nixdorf Institute, on sabbatical leave from IIT Kanpur. His research work at the Heinz Nixdorf Institute was supported by a fellowship from Alexander von Humboldt Foundation. He is extremely grateful to Friedhelm Meyer auf der Heide who, as a host for this fellowship, provided him a highly supportive, encouraging, and free atmosphere conducive for this research work. The authors are thankful to one of the reviewers for providing very insightful comments.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
A preliminary version of this article appeared in the Proceedings of 44th International Symposium on Mathematical Foundations of Computer Science (MFCS), August 26–30, 2019, Aachen, Germany [5].
This research work was partially supported by Alexander von Humboldt Foundation.
Rights and permissions
About this article
Cite this article
Baswana, S., Gupta, S. & Tulsyan, A. Fault Tolerant Depth First Search in Undirected Graphs: Simple Yet Efficient. Algorithmica 84, 2028–2049 (2022). https://doi.org/10.1007/s00453-022-00947-7
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-022-00947-7