Abstract
This work studies (lowest) common ancestor problems in (weighted) directed acyclic graphs. We improve previous algorithms for the all-pairs representative LCA problem to O(n 2.575) by using fast rectangular matrix multiplication. We prove a first non-trivial upper bound of O( min {n 2 m, n 3.575 }) for the all-pairs all lowest common ancestors problem. Furthermore, classes of dags are identified for which the problem can be solved considerably faster. Our algorithms scale with the maximal number of LCAs for one pair and—based on the famous Dilworth’s theorem—with the size of a maximum antichain (i.e., width) of the dag. We extend and generalize previous results on computing shortest ancestral distances. It is shown that finding shortest distance common ancestors in weighted dags is not harder than computing all-pairs shortest distances, up to a polylogarithmic factor. Finally, we present a solution for the general all-pairs shortest distance LCA problem based on computing all-pairs all LCAs.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Aho, A., Hopcroft, J., Ullman, J.: On finding lowest common ancestors in trees. SIAM J. Comput. 5(1), 115–132 (1976)
Aït-Kaci, H., Boyer, R., Lincoln, P., Nasr, R.: Efficient implementation of lattice operations. ACM Trans. Program. Lang. Syst. 11(1), 115–146 (1989)
Alon, N., Naor, M.: Derandomization, witnesses for boolean matrix multiplication and construction of perfect hash functions. Algorithmica 16(4–5), 434–449 (1996)
Baumgart, M., Eckhardt, S., Griebsch, J., Kosub, S., Nowak, J.: All-pairs common-ancestor problems in weighted dags. Technical Report TUM-I0606, Institut für Informatik, TU München (April 2006)
Benczúr, A., Förster, J., Király, Z.: Dilworth’s theorem and its application for path systems of a cycle - implementation and analysis. In: Nešetřil, J. (ed.) ESA 1999. LNCS, vol. 1643, pp. 498–509. Springer, Heidelberg (1999)
Bender, M., Pemmasani, G., Skiena, S., Sumazin, P.: Finding least common ancestors in directed acyclic graphs. In: SODA 2001. Proc. 12th Annual Symposium on Discrete Algorithms, pp. 845–854 (2001)
Bender, M., Farach-Colton, M., Pemmasani, G., Skiena, S., Sumazin, P.: Lowest common ancestors in trees and directed acyclic graphs. J. Algorithms 57(2), 75–94 (2005)
Berkman, O., Vishkin, U.: Finding level-ancestors in trees. J. Comput. Syst. Sci. 48(2), 214–230 (1994)
Cole, R., Hariharan, R.: Dynamic LCA queries on trees. SIAM J. Comput. 34(4), 894–923 (2005)
Coppersmith, D., Winograd, S.: Matrix multiplication via arithmetic progressions. J. Symbolic Computation 9(3), 251–280 (1990)
Coppersmith, D.: Rectangular matrix multiplication revisited. J. Complexity 13(1), 42–49 (1997)
Czumaj, A., Kowaluk, M., Lingas, A.: Faster algorithms for finding lowest common ancestors in directed acyclic graphs. Electronic Colloquium on Computational Complexity (ECCC), TR06-111 (2006)
Gao, L.: On inferring autonomous system relationships in the Internet. IEEE/ACM Trans. Networking 9(6), 733–745 (2001)
Harel, D., Tarjan, R.: Fast algorithms for finding nearest common ancestors. SIAM J. Comput. 13(2), 338–355 (1984)
Kowaluk, M., Lingas, A.: LCA queries in directed acyclic graphs. In: Caires, L., Italiano, G.F., Monteiro, L., Palamidessi, C., Yung, M. (eds.) ICALP 2005. LNCS, vol. 3580, pp. 241–248. Springer, Heidelberg (2005)
Moret, B., Nakhleh, L., Warnow, T., Linder, C., Tholse, A., Padolina, A., Sun, J., Timme, R.: Phylogenetic networks: Modeling, reconstructibility, and accuracy. IEEE/ACM Trans. Comput. Biology Bioinform. 1(1), 13–23 (2004)
Nakhleh, L., Wang, L.: Phylogenetic networks: Properties and relationship to trees and clusters. In: Priami, C., Zelikovsky, A. (eds.) Transactions on Computational Systems Biology II. LNCS (LNBI), vol. 3680, pp. 82–99. Springer, Heidelberg (2005)
Nykänen, M., Ukkonen, E.: Finding lowest common ancestors in arbitrarily directed trees. Inf. Process. Lett. 50(1), 307–310 (1994)
Schieber, B., Vishkin, U.: On finding lowest common ancestors: Simplification and parallelization. SIAM J. Comput. 17(6), 1253–1262 (1988)
Seidel, R.: On the all-pairs-shortest-path problem in unweighted undirected graphs. J. Comput. Syst. Sci. 51(3), 400–403 (1995)
Tarjan, R.: Applications of path compression on balanced trees. J. ACM 26(4), 690–715 (1979)
Wang, B., Tsai, J., Chuang, Y.: The lowest common ancestor problem on a tree with an unfixed root. Inf. Sci. 119(1–2), 125–130 (1999)
Wen, Z.: New algorithms for the LCA problem and the binary tree reconstruction problem. Inf. Process. Lett. 51(1), 11–16 (1994)
Zwick, U.: All pairs shortest paths using bridging sets and rectangular matrix multiplication. J. ACM 49(3), 289–317 (2002)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Baumgart, M., Eckhardt, S., Griebsch, J., Kosub, S., Nowak, J. (2007). All-Pairs Ancestor Problems in Weighted Dags. In: Chen, B., Paterson, M., Zhang, G. (eds) Combinatorics, Algorithms, Probabilistic and Experimental Methodologies. ESCAPE 2007. Lecture Notes in Computer Science, vol 4614. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-74450-4_26
Download citation
DOI: https://doi.org/10.1007/978-3-540-74450-4_26
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-74449-8
Online ISBN: 978-3-540-74450-4
eBook Packages: Computer ScienceComputer Science (R0)