Skip to main content

Unique Lowest Common Ancestors in Dags Are Almost as Easy as Matrix Multiplication

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4698))

Abstract

We consider the problem of determining for each pair of vertices of a directed acyclic graph (dag) on n vertices whether or not it has a unique lowest common ancestor, and if so, finding such an ancestor. We show that this problem can be solved in time O(n ωlogn), where ω< 2.376 is the exponent of the fastest known algorithm for multiplication of two n×n matrices.

We show also that the problem of determining a lowest common ancestor for each pair of vertices of an arbitrary dag on n vertices is solvable in time \(\widetilde{O}(n^2p+n^{\omega})\), where p is the minimum number of directed paths covering the vertices of the dag. With the help of random bits, we can solve the latter problem in time \(\widetilde{O}(n^2p)\).

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Alon, N., Naor, M.: Derandomization, witnesses for Boolean matrix multiplication and construction of perfect hash functions. Algorithmica 16, 434–449 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  2. Becker, A., Geiger, D., Schaeffer, A.A.: Automatic Selection of Loop Breakers for Genetic Linkage Analysis.

    Google Scholar 

  3. Bender, M.A., Farach-Colton, M.: The LCA problem revisited. In: Gonnet, G.H., Viola, A. (eds.) LATIN 2000. LNCS, vol. 1776, pp. 88–93. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  4. Bender, M.A., Farach-Colton, M., Pemmasani, G., Skiena, S., Sumazin, P.: Lowest common ancestors in trees and directed acyclic graphs. Journal of Algorithms, 57(2), 75–94 (2005) (a preliminary version in Proc. SODA 2001, pp. 845–853)

    Google Scholar 

  5. Björklund, A., Lingas, A.: Fast Boolean matrix multiplication for highly clustered data. In: Dehne, F., Sack, J.-R., Tamassia, R. (eds.) WADS 2001. LNCS, vol. 2125, Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  6. Cole, R., Hariharan, R.: Dynamic LCA queries in trees. SIAM Journal on Computing 34(4), 894–923 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  7. Coppersmith, D.: Rectangular matrix multiplication revisited. Journal of Symbolic Computation 13, 42–49 (1997)

    MATH  MathSciNet  Google Scholar 

  8. Coppersmith, D., Winograd, S.: Matrix multiplication via arithmetic progression. Journal of Symbolic Computation 9, 251–290 (1990)

    Article  MATH  MathSciNet  Google Scholar 

  9. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn. McGraw-Hill Book Company, Boston, MA (2001)

    MATH  Google Scholar 

  10. Cottingham Jr., R.W., Idury, R.M., Shäffer, A.A.: Genetic linkage computations. American Journal of Human Genetics 53, 252–263 (1993)

    Google Scholar 

  11. Czumaj, A., Kowaluk, M., Lingas, A.: Faster algorithms for finding lowest common ancestors in directed acyclic graphs. Theoretical Computer Science 380(1-2), 37–46 (2007)

    Article  MATH  MathSciNet  Google Scholar 

  12. Czumaj, A., Lingas, A.: Improved algorithms for the all-pairs lowest common ancestor problem in directed acyclic graphs. Manuscript (2005)

    Google Scholar 

  13. Gasieniec, L., Lingas, A.: An improved bound on Boolean matrix multiplication for highly clustered data. In: Dehne, F., Sack, J.-R., Smid, M. (eds.) WADS 2003. LNCS, vol. 2748, pp. 329–339. Springer, Heidelberg (2003)

    Google Scholar 

  14. Gabow, H.N., Kaplan, H., Tarjan, R.E.: Unique Maximum Matching Algorithms. In: Proc. 31st Annual ACM Symposium on Theory of Computing (STOC 1999) (1999)

    Google Scholar 

  15. Galil, Z., Margalit, O.: Witnesses for Boolean matrix multiplication and for transitive closure. Journal of Complexity 9, 201–221 (1993)

    Article  MATH  MathSciNet  Google Scholar 

  16. Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestors. SIAM Journal on Computing 13(2), 338–355 (1984)

    Article  MATH  MathSciNet  Google Scholar 

  17. Huang, X., Pan, V.Y.: Fast rectangular matrix multiplications and applications. Journal of Complexity 14, 257–299 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  18. Indyk, P., Motwani, R.: Approximate Nearest Neighbors: Towards Removing the Curse of Dimensionality. In: Proc. 30th ACM Symposium on Theory of Computing (STOC 1998) (1998)

    Google Scholar 

  19. 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)

    Google Scholar 

  20. Nykänen, M., Ukkonen, E.: Finding lowest common ancestors in arbitrarily directed trees. Information Processing Letters 50(6), 307–310 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  21. Seidel, R. (ed.): On the All-Pairs-Shortest-Path Problem, pp. 745–749. ACM Press, New York (1992)

    Google Scholar 

  22. Shapira, A., Yuster, R., Zwick, U.: All-Pairs Bottleneck Paths in Vertex Weighted Graphs. In: Proc. 18th Ann. ACM-SIAM Symposium on Discrete Algorithms (SODA 2007), pp. 978–985 (2007)

    Google Scholar 

  23. Shäffer, A.A., Gupta, S.K., Shriram, K., Cottingham Jr., R.W.: Avoiding recomputation in linkage analysis. Human Heredity 44, 225–237 (1994)

    Article  Google Scholar 

  24. Tarjan, R.E.: Applications of path compression on balanced trees. Journal of the ACM 26(4), 690–715 (1979)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Lars Arge Michael Hoffmann Emo Welzl

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kowaluk, M., Lingas, A. (2007). Unique Lowest Common Ancestors in Dags Are Almost as Easy as Matrix Multiplication. In: Arge, L., Hoffmann, M., Welzl, E. (eds) Algorithms – ESA 2007. ESA 2007. Lecture Notes in Computer Science, vol 4698. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-75520-3_25

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-75520-3_25

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-75519-7

  • Online ISBN: 978-3-540-75520-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics