A Path Cover Technique for LCAs in Dags

We develop a path cover technique to solve lowest common ancestor (LCA for short) problems in a directed acyclic graph (dag). Our method yields improved upper bounds for two recently studied problem variants, computing one (representative) LCA for all pairs of vertices and computing all LCAs for all pairs of vertices. The bounds are expressed in terms of the number nof vertices and the so called width w(G) of the input dag G. For the first problem we achieve $\widetilde{O}(n^2 w(G))$ time which improves the upper bound of [18] for dags with w(G) = O( n0.376 i¾? i¾?) for a constant i¾?> 0. For the second problem our $\widetilde{O}(n^2 w(G)^2)$ upper time bound subsumes the O(n3.334) bound established in [11] for w(G) = O(n0.667 i¾? i¾?). As a second major result we show how to combine the path cover technique with LCA solutions for dags with small depth [9]. Our algorithm attains the best known upper time bound for this problem of O(n2.575). However, most notably, the algorithm performs better on a vast amount of input dags, i.e. dags that do not have an almost linear-sized subdag of extremely regular structure. Finally, we apply our technique to improve the general upper time bounds on the worst case time complexity for the problem of reporting LCAs for each triple of vertices recently established by Yuster[26].

[1]  R. P. Dilworth,et al.  A DECOMPOSITION THEOREM FOR PARTIALLY ORDERED SETS , 1950 .

[2]  D. R. Fulkerson,et al.  Flows in Networks. , 1964 .

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

[4]  Piotr Sankowski,et al.  Maximum matchings via Gaussian elimination , 2004, 45th Annual IEEE Symposium on Foundations of Computer Science.

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

[6]  Raphael Yuster All-pairs disjoint paths from a common ancestor in O~(ninfinit) time , 2008, Theor. Comput. Sci..

[7]  Richard M. Karp,et al.  A n^5/2 Algorithm for Maximum Matchings in Bipartite Graphs , 1971, SWAT.

[8]  Victor Y. Pan,et al.  Fast Rectangular Matrix Multiplication and Applications , 1998, J. Complex..

[9]  A A Schäffer,et al.  Avoiding recomputation in linkage analysis. , 1994, Human heredity.

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

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

[12]  Stefan Felsner,et al.  Recognition Algorithms for Orders of Small Width and Graphs of Small Dilworth Number , 2003, Order.

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

[14]  Johannes Nowak,et al.  Fast Lowest Common Ancestor Computations in Dags , 2007, ESA.

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

[16]  Clifford Stein,et al.  Introduction to Algorithms, 2nd edition. , 2001 .

[17]  R. K. Shyamasundar,et al.  Introduction to algorithms , 1996 .

[18]  Andrzej Lingas,et al.  Unique Lowest Common Ancestors in Dags Are Almost as Easy as Matrix Multiplication , 2007, ESA.

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

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

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

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

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

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

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

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