skip to main content
10.1145/1007352.1007387acmconferencesArticle/Chapter ViewAbstractPublication PagesstocConference Proceedingsconference-collections
Article

A fully dynamic reachability algorithm for directed graphs with an almost linear update time

Published: 13 June 2004 Publication History

Abstract

We obtain a new fully dynamic algorithm for the reachability problem in directed graphs. Our algorithm has an amortized update time of O(m+n log n) and a worst-case query time of O(n), where m is the current number of edges in the graph, and n is the number of vertices in the graph. Each update operation either inserts a set of edges that touch the same vertex, or deletes an arbitrary set of edges. The algorithm is deterministic and uses fairly simple data structures. This is the first algorithm that breaks the O(n2) update barrier for all graphs with o(n2) edges.One of the ingredients used by this new algorithm may be interesting in its own right. It is a new dynamic algorithm for strong connectivity in directed graphs with an interesting persistency property. Each insert operation creates a new version of the graph. A delete operation deletes edges from emphall versions. Strong connectivity queries can be made on each version of the graph. The algorithm handles each update in O((m,n)) amortized time, and each query in O(1) time, where α(m,n) is a functional inverse of Ackermann's function appearing in the analysis of the union-find data structure. Note that the update time of O((m,n)), in case of a delete operation, is the time needed for updating all versions of the graph.

References

[1]
S. Alstrup, C. Gavoille, H. Kaplan, and T. Rauhe. Nearest common ancestors: A survey and a new distributed algorithm. In Proceedings of SPAA'02, pages 258--264, 2002.
[2]
M. Bender and M. Farach-Colton. The LCA problem revisited. In Proceedings of LATIN'00, pages 88--94, 2000.
[3]
T. Cormen, C. Leiserson, R. Rivest, and C. Stein. Introduction to algorithms. The MIT Press, second edition, 2001.
[4]
C. Demetrescu and G. Italiano. Fully dynamic transitive closure: Breaking through the O(n2) barrier. In Proceedings of FOCS'00, pages 381--389, 2000.
[5]
D. Frigioni, T. Miller, U. Nanni, and C. Zaroliagis. An experimental study of dynamic algorithms for transitive closure. ACM Journal of Experimental Algorithmics, 6, 2001.
[6]
H. Gabow. Path-based depth-first search for strong and biconnected components. Information Processing Letters, 74(3--4):107--114, 2000.
[7]
D. Harel and R. Tarjan. Fast algorithms for finding nearest common ancestors. SIAM Journal on Computing, 13:338--355, 1984.
[8]
M. Henzinger and V. King. Fully dynamic biconnectivity and transitive closure. In Proceedings of the FOCS'95, pages 664--672, 1995.
[9]
G. Italiano. Finding paths and deleting edges in directed acyclic graphs. Information Processing Letters, 28(1):5--11, 1988.
[10]
V. King. Fully dynamic algorithms for maintaining all-pairs shortest paths and transitive closure in digraphs. In Proceedings of FOCS'99, pages 81--91, 1999.
[11]
L. Roditty. A faster and simpler fully dynamic transitive closure. In Proceedings of SODA'03, pages 404 -- 412, 2003.
[12]
L. Roditty and U. Zwick. Improved dynamic reachability algorithms for directed graphs. In Proceedings of FOCS'02, pages 679--689, 2002.
[13]
B. Schieber and U. Vishkin. On finding lowest common ancestors: Simplification and parallelization. SIAM Journal on Computing, 17:1253--1262, 1988.
[14]
M. Sharir. A strong-connectivity algorithm and its application in data flow analysis. Computers and Mathematics with Applications, 7(1):67--72, 1981.
[15]
R. Tarjan. Depth first search and linear graph algorithms. SIAM Journal on Computing, 11:146--159, 1982.
[16]
R. E. Tarjan. Efficiency of a good but not linear set union algorithm. Journal of the ACM, 22(2):215--225, 1975.

Cited By

View all

Index Terms

  1. A fully dynamic reachability algorithm for directed graphs with an almost linear update time

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      STOC '04: Proceedings of the thirty-sixth annual ACM symposium on Theory of computing
      June 2004
      660 pages
      ISBN:1581138520
      DOI:10.1145/1007352
      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 ACM 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]

      Sponsors

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 13 June 2004

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. directed graphs
      2. dynamic graphs algorithms
      3. reachability
      4. transitive closure

      Qualifiers

      • Article

      Conference

      STOC04
      Sponsor:
      STOC04: Symposium of Theory of Computing 2004
      June 13 - 16, 2004
      IL, Chicago, USA

      Acceptance Rates

      Overall Acceptance Rate 1,469 of 4,586 submissions, 32%

      Upcoming Conference

      STOC '25
      57th Annual ACM Symposium on Theory of Computing (STOC 2025)
      June 23 - 27, 2025
      Prague , Czech Republic

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)46
      • Downloads (Last 6 weeks)4
      Reflects downloads up to 19 Feb 2025

      Other Metrics

      Citations

      Cited By

      View all
      • (2024)LM-SRPQ: Efficiently Answering Regular Path Query in Streaming GraphsProceedings of the VLDB Endowment10.14778/3641204.364121417:5(1047-1059)Online publication date: 1-Jan-2024
      • (2023)An Overview of Reachability Indexes on GraphsCompanion of the 2023 International Conference on Management of Data10.1145/3555041.3589408(61-68)Online publication date: 4-Jun-2023
      • (2022)DLCRProceedings of the VLDB Endowment10.14778/3529337.352934815:8(1645-1657)Online publication date: 22-Jun-2022
      • (2022)Efficient algorithms for dynamic bidirected Dyck-reachabilityProceedings of the ACM on Programming Languages10.1145/34987246:POPL(1-29)Online publication date: 12-Jan-2022
      • (2021)Systemizing Interprocedural Static Analysis of Large-scale Systems Code with GraspanACM Transactions on Computer Systems10.1145/346682038:1-2(1-39)Online publication date: 29-Jul-2021
      • (2018)On Resource Pooling and Separation for LRU CachingProceedings of the ACM on Measurement and Analysis of Computing Systems10.1145/31794082:1(1-31)Online publication date: 3-Apr-2018
      • (2017)GraspanACM SIGARCH Computer Architecture News10.1145/3093337.303774445:1(389-404)Online publication date: 4-Apr-2017
      • (2017)GraspanACM SIGPLAN Notices10.1145/3093336.303774452:4(389-404)Online publication date: 4-Apr-2017
      • (2017)GraspanACM SIGOPS Operating Systems Review10.1145/3093315.303774451:2(389-404)Online publication date: 4-Apr-2017
      • (2017)GraspanProceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3037697.3037744(389-404)Online publication date: 4-Apr-2017
      • Show More Cited By

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Figures

      Tables

      Media

      Share

      Share

      Share this Publication link

      Share on social media