Fast Lowest Common Ancestor Computations in Dags

This work studies lowest common ancestor computations in directed acyclic graphs. We present fast algorithms for solving the ALL-PAIRS REPRESENTATIVE LCA and ALL-PAIRS ALL LCA problems with expected running time of O(n2 log n) and O(n3 log log n) respectively, where the expectation is taken over a distribution of input graphs. The speed-ups over recently developed methods are achieved by applying transitive reduction on the input dags. The algorithms are experimentally evaluated against previous approaches demonstrating a significant improvement. On the purely theoretical side, we improve the upper bound for ALL-PAIRS ALL LCA to O(n3.3399). We give first fully dynamic algorithms for both ALL-PAIRS REPRESENTATIVE LCA and ALL-PAIRS ALL LCA. Here, the non-trivial update complexities are O(n2.5) and O(n3) respectively, with constant query times.

[1]  Andrzej Lingas,et al.  Faster algorithms for finding lowest common ancestors in directed acyclic graphs , 2007, Theor. Comput. Sci..

[2]  Jiří Bečvář,et al.  Mathematical Foundations of Computer Science 1979 , 1979, Lecture Notes in Computer Science.

[3]  Steven Skiena,et al.  Lowest common ancestors in trees and directed acyclic graphs , 2005, J. Algorithms.

[4]  Paul Erdös,et al.  On the Maximal Number of Strongly Independent Vertices in a Random Acyclic Directed Graph , 1984 .

[5]  Jan Griebsch,et al.  All-Pairs Ancestor Problems in Weighted Dags , 2007, ESCAPE.

[6]  Don Coppersmith,et al.  Rectangular Matrix Multiplication Revisited , 1997, J. Complex..

[7]  Steven Skiena,et al.  Finding least common ancestors in directed acyclic graphs , 2001, SODA '01.

[8]  Mikkel Thorup,et al.  Fully-Dynamic All-Pairs Shortest Paths: Faster and Allowing Negative Cycles , 2004, SWAT.

[9]  Robin Milner,et al.  On Observing Nondeterminism and Concurrency , 1980, ICALP.

[10]  Jeannette Janssen,et al.  Combinatorial and Algorithmic Aspects of Networking, 4th Workshop, CAAN 2007, Halifax, Canada, August 14, 2007. Revised Papers , 2007, CAAN.

[11]  Robert E. Tarjan,et al.  Applications of Path Compression on Balanced Trees , 1979, JACM.

[12]  Andrzej Lingas,et al.  LCA Queries in Directed Acyclic Graphs , 2005, ICALP.

[13]  Václav Koubek,et al.  A Reduct-and-Closure Algorithm for Graphs , 1979, MFCS.

[14]  Uzi Vishkin,et al.  On Finding Lowest Common Ancestors: Simplification and Parallelization , 1988, AWOC.

[15]  Uzi Vishkin,et al.  Finding Level-Ancestors in Trees , 1994, J. Comput. Syst. Sci..

[16]  Robert E. Tarjan,et al.  Fast Algorithms for Finding Nearest Common Ancestors , 1984, SIAM J. Comput..

[17]  Piotr Sankowski,et al.  Dynamic transitive closure via dynamic matrix inverse: extended abstract , 2004, 45th Annual IEEE Symposium on Foundations of Computer Science.

[18]  Don Coppersmith,et al.  Matrix multiplication via arithmetic progressions , 1987, STOC.

[19]  D. Huson,et al.  Application of phylogenetic networks in evolutionary studies. , 2006, Molecular biology and evolution.

[20]  Klaus Simon,et al.  An Improved Algorithm for Transitive Closure on Acyclic Digraphs , 1986, Theor. Comput. Sci..

[21]  J. Griebsch,et al.  All-Pairs Common-Ancestor Problems in Weighted Dags , 2006 .

[22]  Biing-Feng Wang,et al.  The Lowest Common Ancestor Problem on a Tree with an Unfixed Root , 1999, Inf. Sci..

[23]  Sven Kosub,et al.  Acyclic Type-of-Relationship Problems on the Internet , 2006, CAAN.

[24]  Patrick Lincoln,et al.  Efficient implementation of lattice operations , 1989, TOPL.

[25]  Matti Nykänen,et al.  Finding Lowest Common Ancestors in Arbitrarily Directed Trees , 1994, Inf. Process. Lett..

[26]  Zhaofang Wen New Algorithms for the LCA Problem and the Binary Tree Reconstruction Problem , 1994, Inf. Process. Lett..

[27]  Yuan An,et al.  Characterizing and Mining Citation Graph of Computer Science Literature , 2001 .

[28]  Benjamin Hummel,et al.  Acyclic type-of-relationship problems on the internet: an experimental analysis , 2007, IMC '07.

[29]  Richard Cole,et al.  Dynamic LCA queries on trees , 1999, SODA '99.

[30]  Alfred V. Aho,et al.  The Transitive Reduction of a Directed Graph , 1972, SIAM J. Comput..

[31]  Alfred V. Aho,et al.  On Finding Lowest Common Ancestors in Trees , 1976, SIAM J. Comput..