skip to main content
research-article

Near Optimal Parallel Algorithms for Dynamic DFS in Undirected Graphs

Published:02 November 2019Publication History
Skip Abstract Section

Abstract

Depth first search (DFS) tree is a fundamental data structure for solving various graph problems. The classical algorithm [54] for building a DFS tree requires O(m+n) time for a given undirected graph G having n vertices and m edges. Recently, Baswana et al. [5] presented a simple algorithm for updating the DFS tree of an undirected graph after an edge/vertex update in Õ(n)1 time. However, their algorithm is strictly sequential. We present an algorithm achieving similar bounds that can be easily adopted to the parallel environment.

In the parallel environment, a DFS tree can be computed from scratch in expected Õ(1) time [2] on an EREW PRAM, whereas the best deterministic algorithm takes Õ(√ n) time [2, 27] on a CRCW PRAM. Our algorithm can be used to develop optimal time (to poly log n factors) deterministic parallel algorithms for maintaining fully dynamic DFS and fault tolerant DFS of an undirected graph.

(1) Parallel Fully Dynamic DFS: Given an arbitrary online sequence of vertex or edge updates, we can maintain a DFS tree of an undirected graph in Õ(1) time per update using m processors on an EREW PRAM.

(2) Parallel Fault tolerant DFS: An undirected graph can be preprocessed to build a data structure of size O(m), such that for any set of k updates (where k is constant) in the graph, a DFS tree of the updated graph can be computed in Õ(1) time using n processors on an EREW PRAM. For constant k, this is also work optimal (to poly log n factors).

Moreover, our fully dynamic DFS algorithm provides, in a seamless manner, nearly optimal (to poly log n factors) algorithms for maintaining a DFS tree in the semi-streaming environment and a restricted distributed model. These are the first parallel, semi-streaming, and distributed algorithms for maintaining a DFS tree in the dynamic setting.

References

  1. Alok Aggarwal and Richard J. Anderson. 1988. A random NC algorithm for depth first search. Combinatorica 8, 1 (1988), 1--12.Google ScholarGoogle ScholarCross RefCross Ref
  2. Alok Aggarwal, Richard J. Anderson, and Ming-Yang Kao. 1990. Parallel depth-first search in general directed graphs. SIAM J. Comput. 19, 2 (1990), 397--409.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Kook Jin Ahn, Sudipto Guha, and Andrew McGregor. 2012. Analyzing graph structure via linear measurements. In Proceedings of the 23rd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’12). 459--467.Google ScholarGoogle ScholarCross RefCross Ref
  4. Baruch Awerbuch, Israel Cidon, and Shay Kutten. 2008. Optimal maintenance of a spanning tree. J. ACM 55, 4 (2008).Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Surender Baswana, Shreejit Ray Chaudhury, Keerti Choudhary, and Shahbaz Khan. 2015. Dynamic DFS tree in undirected graphs: Breaking the O(m) barrier. SIAM J. Comput. 48, 4 (2019), 1335--1363.Google ScholarGoogle ScholarCross RefCross Ref
  6. Surender Baswana, Shreejit Ray Chaudhury, Keerti Choudhary, and Shahbaz Khan. 2016. Dynamic DFS in undirected graphs: Breaking the O(m) barrier. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA’16). 730--739.Google ScholarGoogle ScholarCross RefCross Ref
  7. Surender Baswana and Keerti Choudhary. 2015. On dynamic DFS tree in directed graphs. In Proceedings of the International Symposium on Mathematical Foundations of Computer Science (MFCS’15). 102--114.Google ScholarGoogle ScholarCross RefCross Ref
  8. Surender Baswana and Shahbaz Khan. 2014. Incremental algorithm for maintaining DFS tree for undirected graphs. In Proceedings of the International Colloquium on Automata, Languages and Programming (ICALP’14). 138--149.Google ScholarGoogle ScholarCross RefCross Ref
  9. Surender Baswana, Sumeet Khurana, and Soumojit Sarkar. 2012. Fully dynamic randomized algorithms for graph spanners. ACM Trans. Algor. 8, 4 (2012), 35.Google ScholarGoogle Scholar
  10. Sayan Bhattacharya, Monika Henzinger, Danupon Nanongkai, and Charalampos Tsourakakis. 2015. Space-and time-efficient algorithm for maintaining dense subgraphs on one-pass dynamic streams. In Proceedings of the 47th Annual ACM Symposium on Theory of Computing. ACM, 173--182.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. P. Chaudhuri. 1990. Finding and updating depth-first spanning trees of acyclic digraphs in parallel. Comput. J. 33, 3 (1990), 247--251.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Israel Cidon. 1988. Yet another distributed depth-first-search algorithm. Inf. Process. Lett. 26, 6 (1988), 301--305.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Richard Cole. 1988. Parallel merge sort. SIAM J. Comput. 17, 4 (1988), 770--785.Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Richard Cole. 1993. Correction: Parallel merge sort. SIAM J. Comput. 22, 6 (1993), 1349.Google ScholarGoogle ScholarCross RefCross Ref
  15. Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. 2009. Introduction to Algorithms, 3rd ed. MIT Press.Google ScholarGoogle Scholar
  16. Sajal K. Das and Paolo Ferragina. 1999. An EREW PRAM algorithm for updating minimum spanning trees. Parallel Process. Lett. 9, 1 (1999), 111--122.Google ScholarGoogle ScholarCross RefCross Ref
  17. Martin E. Dyer and Alan M. Frieze. 1991. Probabilistic analysis of a parallel algorithm for finding the lexicographically first depth first search tree in a dense random graph. Rand. Struct. Algor. 2, 2 (1991), 233--240.Google ScholarGoogle ScholarCross RefCross Ref
  18. Michael Elkin. 2007. A near-optimal distributed fully dynamic algorithm for maintaining sparse spanners. In Proceedings of the 26th Annual ACM Symposium on Principles of Distributed Computing (PODC’07). 185--194.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Paul Erdős and Alfréd Rényi. 1959. On random graphs I.Publ. Math. (Debrecen) 6 (1959), 290--297.Google ScholarGoogle ScholarCross RefCross Ref
  20. Shimon Even and Robert Endre Tarjan. 1975. Network flow and testing graph connectivity. SIAM J. Comput. 4, 4 (1975), 507--518.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Martin Farach-Colton, Tsan-sheng Hsu, Meng Li, and Meng-Tsung Tsai. 2015. Finding articulation points of large graphs in linear time. In Proceedings of the Conference on Algorithms and Data Structures (WADS’15). 363--372.Google ScholarGoogle ScholarCross RefCross Ref
  22. Paolo Ferragina and Fabrizio Luccio. 1996. Three techniques for parallel maintenance of a minimum spanning tree under batch of updates. Parallel Process. Lett. 6, 2 (1996), 213--222.Google ScholarGoogle ScholarCross RefCross Ref
  23. Paolo Giulio Franciosa, Giorgio Gambosi, and Umberto Nanni. 1997. The incremental maintenance of a depth-first-search tree in directed acyclic graphs. Inf. Process. Lett. 61, 2 (1997), 113--120.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Jon Freeman. October 1991. Parallel algorithms for depth-first search. Technical Report, University of Pennsylvania (October 1991).Google ScholarGoogle Scholar
  25. Mohsen Ghaffari and Merav Parter. 2016. Near-optimal distributed algorithms for fault-tolerant tree structures. In Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA’16). 387--396.Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Ratan K. Ghosh and G. P. Bhattacharjee. 1984. A parallel search algorithm for directed acyclic graphs. BIT Numerical Mathematics 24, 2 (1984), 134--150.Google ScholarGoogle ScholarCross RefCross Ref
  27. Andrew V. Goldberg, Serge A. Plotkin, and Pravin M. Vaidya. 1993. Sublinear-time parallel algorithms for matching and related problems. J. Algor. 14, 2 (1993), 180--213.Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Torben Hagerup. 1990. Planar depth-first search in O(log n) parallel time. SIAM J. Comput. 19, 4 (1990), 678--704.Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Monika Henzinger, Sebastian Krinninger, and Danupon Nanongkai. 2013. Sublinear-time maintenance of breadth-first spanning tree in partially dynamic networks. In Proceedings of the International Colloquium on Automata, Languages and Programming (ICALP’13). 607--619.Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Giuseppe F. Italiano. 1991. Distributed algorithms for updating shortest paths (extended abstract). In Proceedings of the 5th International Workshop on Distributed Algorithms (WDAG’91). 200--211.Google ScholarGoogle Scholar
  31. Joseph JáJá. 1992. An Introduction to Parallel Algorithms. Addison-Wesley.Google ScholarGoogle Scholar
  32. Ming-Yang Kao. 1988. All graphs have cycle separators and planar directed depth-first search is in DNC. In Proceedings of the 3rd Aegean Workshop on Computing, VLSI Algorithms and Architectures (AWOC’88). 53--63.Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Michael Kapralov, Yin Tat Lee, Cameron Musco, Christopher Musco, and Aaron Sidford. 2017. Single pass spectral sparsification in dynamic streams. SIAM J. Comput. 46, 1 (2017), 456--477.Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Shahbaz Khan. 2017. Near optimal parallel algorithms for dynamic DFS in undirected graphs. In Proceedings of the 29th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA’17). 283--292.Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Shahbaz Khan and Shashank K. Mehta. 2019. Depth first search in the semi-streaming model. In Proceedings of the 36th International Symposium on Theoretical Aspects of Computer Science (STACS’19). 42:1--42:16.Google ScholarGoogle Scholar
  36. Taenam Kim and Kyungyong Chwa. 1986. Parallel algorithms for a depth first search and a breadth first search. Int. J. Comput. Math. 19, 1 (1986), 39--54.Google ScholarGoogle ScholarCross RefCross Ref
  37. Valerie King, Shay Kutten, and Mikkel Thorup. 2015. Construction and impromptu repair of an MST in a distributed network with o(m) communication. In Proceedings of the 2015 ACM Symposium on Principles of Distributed Computing (PODC’15). 71--80.Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Devendra Kumar, S. Sitharama Iyengar, and Mohan B. Sharma. 1990. Corrigenda: Corrections to a distributed depth-first search algorithm. Inf. Process. Lett. 35, 1 (1990), 55--56.Google ScholarGoogle ScholarCross RefCross Ref
  39. K. B. Lakshmanan, N. Meenakshi, and Krishnaiyan Thulasiraman. 1987. A time-optimal message-efficient distributed algorithm for depth-first-search. Inf. Process. Lett. 25, 2 (1987), 103--109.Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Weifa Liang, Brendan D. McKay, and Hong Shen. 1996. NC algorithms for dynamically solving the all pairs shortest paths problem and related problems. Inf. Process. Lett. 58, 3 (1996), 149--155.Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. S. A. M. Makki and George Havas. 1996. Distributed algorithms for depth-first search. Inf. Process. Lett. 60, 1 (1996), 7--12.Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Andrew McGregor. 2014. Graph stream algorithms: A survey. SIGMOD Rec. 43, 1 (May 2014), 9--20.Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Andrew McGregor. 2017. Graph sketching and streaming: New approaches for analyzing massive graphs. In Proceedings of the 12th International Computer Science Symposium on Computer Science, Theory and Applications. 20--24.Google ScholarGoogle ScholarCross RefCross Ref
  44. Thomas C. O’Connell. 2009. A survey of graph algorithms under extended streaming models of computation. In Fundamental Problems in Computing: Essays in Honor of Professor Daniel J. Rosenkrantz. 455--476.Google ScholarGoogle Scholar
  45. Chao-Wei Ou and Sanjay Ranka. 1997. Parallel incremental graph partitioning. IEEE Trans. Parallel Distrib. Syst. 8, 8 (1997), 884--896.Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Shaunak Pawagi and I. V. Ramakrishnan. 1986. An O(log n) algorithm for parallel update of minimum spanning trees. Inf. Process. Lett. 22, 5 (1986), 223--229.Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. David Peleg. 2000. Distributed Computing: A Locality-sensitive Approach. Society for Industrial and Applied Mathematics, Philadelphia, PA.Google ScholarGoogle ScholarCross RefCross Ref
  48. K. V. S. Ramarao and S. Venkatesan. 1992. On finding and updating shortest paths distributively. J. Algor. 13, 2 (1992), 235--257.Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. John H. Reif. 1985. Depth-first search is inherently sequential. Inf. Process. Lett. 20, 5 (1985), 229--234.Google ScholarGoogle ScholarCross RefCross Ref
  50. Jan Matthias Ruhl. 2003. Efficient Algorithms for New Computational Models. Ph.D. Dissertation, Department of Computer Science, MIT, Cambridge, MA (2003).Google ScholarGoogle Scholar
  51. Baruch Schieber and Uzi Vishkin. 1988. On finding lowest common ancestors: Simplification and parallelization. SIAM J. Comput. 17, 6 (1988), 1253--1262.Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. Mohan B. Sharma and S. Sitharama Iyengar. 1989. An efficient distributed depth-first-search algorithm. Inf. Process. Lett. 32, 4 (1989), 183--186.Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. Justin R. Smith. 1986. Parallel algorithms for depth-first searches I. planar graphs. SIAM J. Comput. 15, 3 (1986), 814--830.Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. Robert Endre Tarjan. 1972. Depth-first search and linear graph algorithms. SIAM J. Comput. 1, 2 (1972), 146--160.Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. Robert Endre Tarjan. 1974. Finding dominators in directed graphs. SIAM J. Comput. 3, 1 (1974), 62--89.Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. Robert Endre Tarjan. 1976. Edge-disjoint spanning trees and depth-first search. Acta Inf. 6, 2 (1976), 171--185.Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. Robert Endre Tarjan and Uzi Vishkin. 1984. Finding biconnected components and computing tree functions in logarithmic parallel time (extended summary). In Proceedings of the 25th Annual Symposium on Foundations of Computer Science. 12--20.Google ScholarGoogle Scholar
  58. Yung H. Tsin. 2002. Some remarks on distributed depth-first search. Inf. Process. Lett. 82, 4 (2002), 173--178.Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. Y. Zhang. 1986. Parallel Algorithms for Problems Involving Directed Graphs. Ph.D. Dissertation, Drexel University, Philadelphia, PA (1986).Google ScholarGoogle Scholar

Index Terms

  1. Near Optimal Parallel Algorithms for Dynamic DFS in Undirected Graphs

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM Transactions on Parallel Computing
            ACM Transactions on Parallel Computing  Volume 6, Issue 3
            Special Issue on SPAA 2017
            September 2019
            185 pages
            ISSN:2329-4949
            EISSN:2329-4957
            DOI:10.1145/3366783
            Issue’s Table of Contents

            Copyright © 2019 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 2 November 2019
            • Accepted: 1 August 2019
            • Revised: 1 July 2019
            • Received: 1 October 2017
            Published in topc Volume 6, Issue 3

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article
            • Research
            • Refereed

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader

          HTML Format

          View this article in HTML Format .

          View HTML Format