Nothing Special   »   [go: up one dir, main page]

skip to main content
10.5555/3174304.3175270acmconferencesArticle/Chapter ViewAbstractPublication PagessodaConference Proceedingsconference-collections
research-article

Incremental DFS algorithms: a theoretical and experimental study

Published: 07 January 2018 Publication History

Abstract

The depth first search (DFS) tree is a fundamental data structure used for solving various graph problems. For a given graph [Equation] on n vertices and m edges, a DFS tree can be built in O(m + n) time. In the last 20 years, a few algorithms have been designed for maintaining a DFS tree efficiently under insertion of edges. For undirected graphs, there are two prominent algorithms, namely, ADFS1 and ADFS2 [ICALP14] that achieve total update time of [Equation] and O(n2) respectively. For directed acyclic graphs, the only non-trivial algorithm, namely, FDFS [IPL97] requires total O(mn) update time. However, even after 20 years of this result, there does not exist any non-trivial incremental algorithm for maintaining a DFS tree in directed graphs with o(m2) worst case bound.
In this paper, we carry out extensive experimental and theoretical evaluation of the existing incremental DFS algorithms in random graphs and real world graphs and derive the following results.
1. For insertion of a uniformly random sequence of [Equation] edges, each of ADFS1, ADFS2 and FDFS perform equally well and are found to take Θ(n2) time experimentally. This is quite surprising because the worst case bounds of ADFS1 and FDFS are greater than Θ(n2) by a factor of [Equation] and m/n respectively, which are also proven to be tight. We complement this experimental result with a probabilistic analysis of these algorithms establishing Õ(n2)1 bound on their time complexity. For this purpose, we derive results about the structure of a DFS tree in a random graph. These results are of independent interest in the domain of random graphs.
2. The insight that we developed about DFS tree in random graphs leads us to design an extremely simple algorithm for incremental DFS that works for both undirected and directed graphs. Moreover, this algorithm theoretically matches and experimentally outperforms the state-of-the-art algorithm in dense random graphs. Furthermore, it can also be used as a single-pass semi-streaming algorithm for computing incremental DFS and strong connectivity for random graphs using O(n log n) space.

References

[1]
David Alberts, Giuseppe Cattaneo, and Giuseppe F. Italiano. An empirical study of dynamic graph algorithms. ACM Journal of Experimental Algorithmics, 2:5, 1997.
[2]
Paola Alimonti, Stefano Leonardi, and Alberto Marchetti-Spaccamela. Average case analysis of fully dynamic reachability for directed graphs. ITA, 30(4):305--318, 1996.
[3]
Holger Bast, Kurt Mehlhorn, Guido Schäfer, and Hisao Tamaki. Matching algorithms are fast in sparse random graphs. Theory Comput. Syst., 39(1):3--14, 2006.
[4]
Surender Baswana, Shreejit R. Chaudhury, Keerti Choudhary, and Shahbaz Khan. Dynamic DFS in undirected graphs: breaking the O(m) barrier. In SODA, pages 730--739, 2016.
[5]
Surender Baswana and Keerti Choudhary. On dynamic DFS tree in directed graphs. In MFCS, Proceedings, Part II, pages 102--114, 2015.
[6]
Surender Baswana and Shahbaz Khan. Incremental algorithm for maintaining a DFS tree for undirected graphs. Algorithmica, 79(2):466--183, 2017.
[7]
Béla Bollobás. The evolution of random graphs. Transactions of the American Mathematical Society, 286 (1):257--274, 1984.
[8]
Glencora Borradaile, Claire Mathieu, and Theresa Migler. Lower bounds for testing digraph connectivity with one-pass streaming algorithms. CoRR, abs/1404.1323, 2014.
[9]
Ulrik Brandes, Patrick Kenis, Jürgen Lerner, and Denise van Raaij. Network analysis of collaboration structure in wikipedia. In Proceedings of the 18th International Conference on World Wide Web, WWW, pages 731--740, 2009.
[10]
Giuseppe Cattaneo, Pompeo Faruolo, Umberto F. Petrillo, and Giuseppe F. Italiano. Maintaining dynamic minimum spanning trees: An experimental study. Discrete Applied Mathematics, 158(5):404--125, 2010.
[11]
Munmun D. Choudhury, Hari Sundaram, Ajita John, and Dore D. Seligmann. Social synchrony: Predicting mimicry of user actions in online social media. In Proc. Int. Conf. on Computational Science and Engineering, pages 151--158, 2009.
[12]
Daniel Cordeiro, Grégory Mounié, Swann Perarnau, Denis Trystram, Jean-Marc Vincent, and Frédéric Wagner. Random graph generation for scheduling simulations. In 3rd International Conference on Simulation Tools and Techniques, SIMUTools '10, Malaga, Spain - March 16 -- 18, 2010, page 60, 2010.
[13]
Steven T. Crocker. An experimental comparison of two maximum cardinality matching programs. In Network Flows And Matching, Proceedings of a DIMACS Workshop, New Brunswick, New Jersey, USA, October 14--16, 1991, pages 519--538, 1991.
[14]
Erik Demaine and Mohammad T. Hajiaghayi. BigDND: Big Dynamic Network Data. http://projects.csail.mit.edu/dnd/, 2014.
[15]
Camil Demetrescu and Giuseppe F. Italiano. Experimental analysis of dynamic all pairs shortest path algorithms. ACM Trans. Algorithms, 2(4):578--601, 2006.
[16]
Paul Erdős and Alfréd Rényi. On random graphs I. Publicationes Mathematicae (Debrecen), 6:290--297, 1959.
[17]
Paul Erdős and Alfréd Rényi. On the evolution of random graphs. In Publication of the Mathematical Institute of the Hungarian Academy of Sciences, pages 17--61, 1960.
[18]
Martin Farach-Colton, Tsan-sheng Hsu, Meng Li, and Meng-Tsung Tsai. Finding articulation points of large graphs in linear time. In Algorithms and Data Structures, WADS, pages 363--372, 2015.
[19]
Paolo G. Franciosa, Giorgio Gambosi, and Umberto Nanni. The incremental maintenance of a depth-first-search tree in directed acyclic graphs. Inf. Process. Lett., 61(2):113--120, 1997.
[20]
Alan M. Frieze and Michal Karonski. Introduction to Random Graphs. Cambridge University Press, 2015.
[21]
Vicen Gómez, Andreas Kaltenbrunner, and Vicente López. Statistical analysis of the social network and discussion threads in Slashdot. In Proc. Int. World Wide Web Conf., pages 645--654, 2008.
[22]
Robert Görke, Pascal Maillard, Andrea Schumm, Christian Staudt, and Dorothea Wagner. Dynamic graph clustering combining modularity and smoothness. ACM Journal of Experimental Algorithmics, 18, 2013.
[23]
Tad Hogg and Kristina Lerman. Social dynamics of Digg. EPJ Data Science, 1(5), 2012.
[24]
John E. Hopcroft and Richard M. Karp. An n5/2 algorithm for maximum matchings in bipartite graphs. SIAM J. Comput., 2(4):225--231, 1973.
[25]
John E. Hopcroft and Robert E. Tarjan. Efficient planarity testing. J. ACM, 21(4):549--568, 1974.
[26]
Michael Huang and Clifford Stein. Extending search phases in the Micali-Vazirani algorithm. In 16th International Symposium on Experimental Algorithms, SEA 2017, June 21--23, 2017, London, UK, pages 10:1--10:19, 2017.
[27]
Raj Iyer, David R. Karger, Hariharan Rahul, and Mikkel Thorup. An experimental study of polylogarithmic, fully dynamic, connectivity algorithms. ACM Journal of Experimental Algorithmics, 6:4, 2001.
[28]
Abhabongse Janthong. Streaming algorithm for determining a topological ordering of a digraph. UG Thesis, Brown University, 2014.
[29]
Sarantos Kapidakis. Average-case analysis of graph-searching algorithms. PhD Thesis, Princeton University, no. 286, 1990.
[30]
John D. Kececioglu and A. Justin Pecqueur. Computing maximum-cardinality matchings in sparse general graphs. In Algorithm Engineering, 2nd International Workshop, WAE '92, Saarbrücken, Germany, August 20--22, 1998, Proceedings, pages 121--132, 1998.
[31]
Bryan Klimt and Yiming Yang. The Enron corpus: A new dataset for email classification research. In Proc. European Conf. on Machine Learning, pages 217--226, 2004.
[32]
Jérôme Kunegis. KONECT - The Koblenz Network Collection. http://konect.uni-koblenz.de/networks/, October 2016.
[33]
Jure Leskovec, Daniel Huttenlocher, and Jon Kleinberg. Governance in social media: A case study of the Wikipedia promotion process. In Proc. Int. Conf. on Weblogs and Social Media, 2010.
[34]
Jure Leskovec, Jon Kleinberg, and Christos Faloutsos. Graph evolution: Densification and shrinking diameters. ACM Trans. Knowledge Discovery from Data, 1(1):1--40, 2007.
[35]
Jure Leskovec, Jon M. Kleinberg, and Christos Faloutsos. Graphs over time: densification laws, shrinking diameters and possible explanations. In Proceedings of the Eleventh ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Chicago, Illinois, USA, August 21--24, 2005, pages 177--187, 2005.
[36]
Jure Leskovec and Andrej Krevl. SNAP Datasets: Stanford large network dataset collection. http://snap.stanford.edu/data/, June 2014.
[37]
Michael Ley. The DBLP computer science bibliography: Evolution, research issues, perspectives. In Proc. Int. Symposium on String Processing and Information Retrieval, pages 1--10, 2002.
[38]
Paolo Massa and Paolo Avesani. Controversial users demand local trust metrics: an experimental study on epinions.com community. In Proc. American Association for Artificial Intelligence Conf., pages 121--126, 2005.
[39]
R. Bruce Mattingly and Nathan P. Ritchey. Implementing on O(/NM) cardinality matching algorithm. In Network Flows And Matching, Proceedings of a DIMACS Workshop, New Brunswick, New Jersey, USA, October 14--16, 1991, pages 539--556, 1991.
[40]
Guy Melancon. Just how dense are dense graphs in the real world?: A methodological note. In Proceedings of the 2006 AVI Workshop on BEyond Time and Errors: Novel Evaluation Methods for Information Visualization, BELIV '06, pages 1--7, 2006.
[41]
Ulrich Meyer. Single-source shortest-paths on arbitrary directed graphs in linear average-case time. In Proceedings of the Twelfth Annual Symposium on Discrete Algorithms, January 7--9, 2001, Washington, DC, USA., pages 797--806, 2001.
[42]
Silvio Micali and Vijay V. Vazirani. An o(sqrt(|v|) |e|) algorithm for finding maximum matching in general graphs. In 21st Annual Symposium on Foundations of Computer Science, Syracuse, New York, USA, 13--15 October 1980, pages 17--27, 1980.
[43]
Alan Mislove. Online Social Networks: Measurement, Analysis, and Applications to Distributed Information Systems. PhD thesis, Rice University, Department of Computer Science, May 2009.
[44]
Alan Mislove, Hema S. Koppula, Krishna P. Gummadi, Peter Druschel, and Bobby Bhattacharjee. Growth of the Flickr social network. In Proceedings of the 1st ACM SIGCOMM Workshop on Social Networks (WOSN'08), August 2008.
[45]
Rajeev Motwani. Average-case analysis of algorithms for matchings and related problems. J. ACM, 41(6):1329--1356, 1994.
[46]
Thomas C. O'Connell. A survey of graph algorithms under extended streaming models of computation. In Fundamental Problems in Computing: Essays in Honor of Professor Daniel J. Rosenkrantz, pages 455--476, 2009.
[47]
Tore Opsahl and Pietro Panzarasa. Clustering in weighted networks. Social Networks, 31(2):155--163, 2009.
[48]
Celso C. Ribeiro and Rodrigo F. Toso. Experimental analysis of algorithms for updating minimum spanning trees on graphs subject to changes on edge weights. In Experimental Algorithms, 6th International Workshop, WEA 2007, Rome, Italy, June 6--8, 2007, Proceedings, pages 393--405, 2007.
[49]
Matei Ripeanu, Adriana Iamnitchi, and Ian T. Foster. Mapping the gnutella network. IEEE Internet Computing, 6(1):50--57, 2002.
[50]
Jan M. Ruhl. Efficient Algorithms for New Computational Models. PhD thesis, Department of Computer Science, MIT, Cambridge, MA, 2003.
[51]
Dominik Schultes and Peter Sanders. Dynamic highway-node routing. In Experimental Algorithms, 6th International Workshop, WEA 2007, Rome, Italy, June 6--8, 2007, Proceedings, pages 66--79, 2007.
[52]
Jop F. Sibeyn. Depth First Search on Random Graphs, volume 6 of Report -. Department of Computing Science, Ume University, 2001.
[53]
Robert E. Tarjan. Depth-first search and linear graph algorithms. SIAM J. Comput., 1(2):146--160, 1972.
[54]
Robert E. Tarjan. Finding dominators in directed graphs. SIAM J. Comput., 3(1):62--89, 1974.
[55]
Robert E. Tarjan. Dynamic trees as search trees via Euler tours, applied to the network simplex algorithm. Mathematical Programming, 78:169--177, 1997.
[56]
Bimal Viswanath, Alan Mislove, Meeyoung Cha, and Krishna P. Gummadi. On the evolution of user interaction in facebook. In Proceedings of the 2nd ACM SIGCOMM Workshop on Social Networks (WOSN'09), August 2009.
[57]
Jeffery Westbrook and Robert E. Tarjan. Maintaining bridge-connected and biconnected components on-line. Algorithmica, 7(5&6):433--464, 1992.
[58]
Beichuan Zhang, Raymond Liu, Daniel Massey, and Lixia Zhang. Collecting the internet AS-level topology. SIGCOMM Computer Communication Review, 35(1):53--61, 2005.
  1. Incremental DFS algorithms: a theoretical and experimental study

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    SODA '18: Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms
    January 2018
    2859 pages
    ISBN:9781611975031
    • Program Chair:
    • Artur Czumaj

    Sponsors

    Publisher

    Society for Industrial and Applied Mathematics

    United States

    Publication History

    Published: 07 January 2018

    Check for updates

    Qualifiers

    • Research-article

    Conference

    SODA '18
    Sponsor:
    SODA '18: Symposium on Discrete Algorithms
    January 7 - 10, 2018
    Louisiana, New Orleans

    Acceptance Rates

    Overall Acceptance Rate 411 of 1,322 submissions, 31%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 117
      Total Downloads
    • Downloads (Last 12 months)5
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 12 Nov 2024

    Other Metrics

    Citations

    View Options

    Get Access

    Login options

    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