Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

A New Approach to Incremental Cycle Detection and Related Problems

Published: 08 December 2015 Publication History
  • Get Citation Alerts
  • Abstract

    We consider the problem of detecting a cycle in a directed graph that grows by arc insertions and the related problems of maintaining a topological order and the strong components of such a graph. For these problems, we give two algorithms, one suited to sparse graphs, the other to dense graphs. The former takes O(min {m1/2, n2/3}m) time to insert m arcs into an n-vertex graph; the latter takes O(n2log n) time. Our sparse algorithm is substantially simpler than a previous O(m3/2)-time algorithm; it is also faster on graphs of sufficient density. The time bound of our dense algorithm beats the previously best time bound of O(n5/2) for dense graphs. Our algorithms rely for their efficiency on vertex numberings weakly consistent with topological order: we allow ties. Bounds on the size of the numbers give bounds on running time.

    References

    [1]
    Deepak Ajwani and Tobias Friedrich. 2007. Average-case analysis of online topological ordering. In ISAAC (Lecture Notes in Computer Science), Takeshi Tokuyama (Ed.), Vol. 4835. Springer, 464--475.
    [2]
    Deepak Ajwani, Tobias Friedrich, and Ulrich Meyer. 2006. An O(n2.75) algorithm for online topological ordering. In Proceedings of the 10th Scandinavian Workshop on Algorithm Theory (Lecture Notes in Computer Science), Vol. 4059. Springer, 53--64.
    [3]
    Deepak Ajwani, Tobias Friedrich, and Ulrich Meyer. 2008. An O(n2.75) algorithm for online topological ordering. ACM Transactions on Algorithms 4, 4, Article 39 (Aug. 2008), 39:1--39:14 pages.
    [4]
    Bowen Alpern, Roger Hoover, Barry K. Rosen, Peter F. Sweeney, and F. Kenneth Zadeck. 1990. Incremental evaluation of computational circuits. In Proceedings of the 1st Annual ACM-SIAM Symposium on Discrete Algorithms. 32--42.
    [5]
    Michael A. Bender, Richard Cole, Erik D. Demaine, Martin Farach-Colton, and Jack Zito. 2002. Two simplified algorithms for maintaining order in a list. In Proceedings of the European Symposium on Algorithms. 152--164.
    [6]
    Michael A. Bender, Jeremy T. Fineman, and Seth Gilbert. 2009. A new approach to incremental topological ordering. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms.
    [7]
    Boris V. Cherkassky, Andrew V. Goldberg, and Craig Silverstein. 1997. Buckets, heaps, lists, and monotone priority queues. In Proceedings of the 8th Annual ACM-SIAM Symposium on Discrete Algorithms. Society for Industrial and Applied Mathematics, Philadelphia, PA, 83--92.
    [8]
    Eric V. Denardo and Bennett L. Fox. 1979. Shortest-route methods: 1. Reaching, pruning, and buckets. Operations Research 27 (1979), 161--186.
    [9]
    Paul F. Dietz and Daniel D. Sleator. 1987. Two algorithms for maintaining order in a list. In Proceedings of the ACM Symposium on the Theory of Computing. 365--372.
    [10]
    Bernhard Haeupler, Telikepalli Kavitha, Rogers Mathew, Siddhartha Sen, and Robert E. Tarjan. 2008. Faster algorithms for incremental topological ordering. In Proceedings of the 35th International Colloquium on Automata, Languages, and Programming. 421--433.
    [11]
    Bernhard Haeupler, Telikepalli Kavitha, Roger Mathew, Siddhartha Sen, and Robert E. Tarjan. 2012. Incremental cycle detection, topological ordering, and strong component maintenance. ACM Transactions on Algorithms 8, 1, Article 3 (Jan. 2012), 3:1--3:33 pages.
    [12]
    Frank Harary, Robert Z. Norman, and Dorwin Cartwright. 1965. Structural Models: An Introduction to the Theory of Directed Graphs. John Wiley & Sons.
    [13]
    A. B. Kahn. 1962. Topological sorting of large networks. Communications of the ACM 5, 11 (Nov. 1962), 558--562.
    [14]
    Irit Katriel. 2004. On Algorithms for Online Topological Ordering and Sorting. Technical Report MPI-I-2004-003. Max-Planck-Institut für Informatik, Saarbrücken, Germany.
    [15]
    Irit Katriel and Hans L. Bodlaender. 2005. Online topological ordering. In Proceedings of the 16th ACM-SIAM Symposium on Discrete Algorithms. Vancouver, British Columbia, Canada, 443--450.
    [16]
    Irit Katriel and Hans L. Bodlaender. 2006. Online topological ordering. ACM Transactions on Algorithms 2, 3 (July 2006), 364--379.
    [17]
    Donald E. Knuth. 1973. The Art of Computer Programming, Volume 1: Fundamental Algorithms (2nd ed.). Addison Wesley, Reading, MA.
    [18]
    Donald E. Knuth. 1998. The Art of Computer Programming, Volume 3: Sorting and Searching (2nd ed.). Addison Wesley Longman Publishing Co., Redwood City, CA, USA.
    [19]
    Donald E. Knuth and Jayme L. Szwarcfiter. 1974. A structured program to generate all topological sorting arrangements. Information Processing Letters 2, 6 (1974), 153--157.
    [20]
    Hsiao-Fei Liu and Kun-Mao Chao. 2007. A tight analysis of the Katriel--Bodlaender algorithm for online topological ordering. Theoretical Computer Science 389, 1--2 (2007), 182--189.
    [21]
    Alberto Marchetti-Spaccamela, Umberto Nanni, and Hans Rohnert. 1996. Maintaining a topological order under edge insertions. Information Processing Letters 59, 1 (1996), 53--58.
    [22]
    David J. Pearce, Paul H. J. Kelly, and Chris Hankin. 2003. Online cycle detection and difference propagation for pointer analysis. In Proceedings of the 3rd International Workshop on Source Code Analysis and Manipulation. 3--12.
    [23]
    David J. Pearce. 2005. Some Directed Graph Problems and Their Application to Pointer Analysis. Ph.D. Dissertation. University of London.
    [24]
    David J. Pearce and Paul H. J. Kelly. 2003. Online Algorithms for Topological Order and Strongly Connected Components. Technical Report. Imperial College, London.
    [25]
    David J. Pearce and Paul H. J. Kelly. 2004. A dynamic algorithm for topologically sorting directed acyclic graphs. In Proceedings of the 3rd International Workshop on Efficient Experimental Algorithms (Lecture Notes in Computer Science), Vol. 3059. Springer, 383--398.
    [26]
    David J. Pearce and Paul H. J. Kelly. 2006. A dynamic topological sort algorithm for directed acyclic graphs. Journal of Experimental Algorithms 11, Article 1.7 (Feb. 2006).
    [27]
    David J. Pearce and Paul H. J. Kelly. 2010. A batch algorithm for maintaining a topological order. In Proceedings of the 33rd Australasian Conference on Computer Science (ACSC’10). 79--88.
    [28]
    Liam Roditty and Uri Zwick. 2008. Improved dynamic reachability algorithms for directed graphs. SIAM Journal on Computing 37, 5 (2008), 1455--1471.
    [29]
    Edward Szpilrajn. 1930. Sur l’Extension de l’Ordre Partiel. Fundamenta Mathematicae 16 (1930), 386--389.
    [30]
    Robert E. Tarjan. 1972. Depth-first search and linear graph algorithms. SIAM Journal on Computing 1, 2 (1972), 146--160.
    [31]
    Robert E. Tarjan. 1974. Finding dominators in directed graphs. SIAM Journal on Computing 3, 1 (1974), 62--89.
    [32]
    Robert E. Tarjan. 1975. Efficiency of a good but not linear set union algorithm. Journal of the Association for Computing Machinery 22, 2 (1975), 215--225.
    [33]
    Robert Endre Tarjan. 1983. Data Structures and Network Algorithms. Society for Industrial and Applied Mathematics, Philadelphia, PA.
    [34]
    Robert E. Tarjan and Jan van Leeuwen. 1984. Worst-case analysis of set union algorithms. Journal of the Association for Computing Machinery 31, 2 (March 1984), 245--281.
    [35]
    J. W. J. Williams. 1964. Algorithm 232: Heapsort. Communications of the ACM 7, 6 (1964), 347--348.

    Cited By

    View all
    • (2024)Minimum Strongly Connected Subgraph Collection in Dynamic GraphsProceedings of the VLDB Endowment10.14778/3648160.364817317:6(1324-1336)Online publication date: 3-May-2024
    • (2024)Efficient Distributed Hop-Constrained Path Enumeration on Large-Scale GraphsProceedings of the ACM on Management of Data10.1145/36392772:1(1-25)Online publication date: 26-Mar-2024
    • (2024)Almost-Linear Time Algorithms for Incremental Graphs: Cycle Detection, SCCs, s-t Shortest Path, and Minimum-Cost FlowProceedings of the 56th Annual ACM Symposium on Theory of Computing10.1145/3618260.3649745(1165-1173)Online publication date: 10-Jun-2024
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Transactions on Algorithms
    ACM Transactions on Algorithms  Volume 12, Issue 2
    February 2016
    385 pages
    ISSN:1549-6325
    EISSN:1549-6333
    DOI:10.1145/2846106
    Issue’s Table of Contents
    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: 08 December 2015
    Accepted: 01 April 2015
    Revised: 01 February 2015
    Received: 01 March 2014
    Published in TALG Volume 12, Issue 2

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Topological ordering
    2. cycle detection
    3. incremental data structure
    4. strongly connected components

    Qualifiers

    • Research-article
    • Research
    • Refereed

    Funding Sources

    • National Science Foundation
    • MOEARC-2
    • U.S.-Israel Binational Science Foundation
    • NSF/CRA- sponsored CIFellows program
    • Distinguished Visitor program in the Stanford University Computer Science Department

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)62
    • Downloads (Last 6 weeks)4
    Reflects downloads up to 09 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Minimum Strongly Connected Subgraph Collection in Dynamic GraphsProceedings of the VLDB Endowment10.14778/3648160.364817317:6(1324-1336)Online publication date: 3-May-2024
    • (2024)Efficient Distributed Hop-Constrained Path Enumeration on Large-Scale GraphsProceedings of the ACM on Management of Data10.1145/36392772:1(1-25)Online publication date: 26-Mar-2024
    • (2024)Almost-Linear Time Algorithms for Incremental Graphs: Cycle Detection, SCCs, s-t Shortest Path, and Minimum-Cost FlowProceedings of the 56th Annual ACM Symposium on Theory of Computing10.1145/3618260.3649745(1165-1173)Online publication date: 10-Jun-2024
    • (2024)Using reactive links to propagate changes across engineering modelsSoftware and Systems Modeling10.1007/s10270-024-01186-wOnline publication date: 10-Jun-2024
    • (2023)Satisfiability Modulo Ordering Consistency Theory for SC, TSO, and PSO Memory ModelsACM Transactions on Programming Languages and Systems10.1145/357983545:1(1-37)Online publication date: 17-Jan-2023
    • (2023)Conflict recognition in CSCL sessions through the identification of cycles in conversational graphsEducation and Information Technologies10.1007/s10639-022-11576-628:9(11615-11629)Online publication date: 1-Sep-2023
    • (2023)Incremental Dead State Detection in Logarithmic TimeComputer Aided Verification10.1007/978-3-031-37703-7_12(241-264)Online publication date: 18-Jul-2023
    • (2023)SMT-Based Verification of Persistency Invariants of Px86 ProgramsVerified Software. Theories, Tools and Experiments.10.1007/978-3-031-25803-9_6(92-110)Online publication date: 1-Feb-2023
    • (2022)SHARP: fast incremental context-sensitive pointer analysis for JavaProceedings of the ACM on Programming Languages10.1145/35273326:OOPSLA1(1-28)Online publication date: 29-Apr-2022
    • (2022)Subquadratic dynamic path reporting in directed graphs against an adaptive adversaryProceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing10.1145/3519935.3520058(1643-1656)Online publication date: 9-Jun-2022
    • Show More Cited By

    View Options

    Get Access

    Login options

    Full Access

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media