Skip to main content

LCA Queries in Directed Acyclic Graphs

  • Conference paper

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

Abstract

We present two methods for finding a lowest common ancestor (LCA) for each pair of vertices of a directed acyclic graph (dag) on n vertices and m edges.

The first method is surprisingly natural and solves the all-pairs LCA problem for the input dag on n vertices and m edges in time O(nm). As a corollary, we obtain an O(n 2)-time algorithm for finding genealogical distances considerably improving the previously known O(n 2.575) time-bound for this problem.

The second method relies on a novel reduction of the all-pairs LCA problem to the problem of finding maximum witnesses for Boolean matrix product. We solve the latter problem and hence also the all-pairs LCA problem in time \(O(n^{{2}+\frac{1}{4-\omega}})\), where ω =2.376 is the exponent of the fastest known matrix multiplication algorithm. This improves the previously known \(O(n^{\frac{\omega+3}{2}})\) time-bound for the general all-pairs LCA problem in dags.

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. Bender, M.A., Pemmasani, G., Skiena, S., Sumazin, P.: Finding Least Common Ancestors in Directed Acyclic Graphs. In: Proc. the 12th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 845–853 (2001)

    Google Scholar 

  3. Galil, Z., Margalit, O.: Witnesses for Boolean Matrix Multiplication and Shortest Paths. Journal of Complexity, 417–426 (1993)

    Google Scholar 

  4. 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 

  5. Nykänen, M., Ukkonen, E.: Finding lowest common ancestors in arbitrarily directed trees. Inf. Process. Lett. 50(6), 307–310 (1994)

    Article  MATH  Google Scholar 

  6. 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 

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

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kowaluk, M., Lingas, A. (2005). LCA Queries in Directed Acyclic Graphs. In: Caires, L., Italiano, G.F., Monteiro, L., Palamidessi, C., Yung, M. (eds) Automata, Languages and Programming. ICALP 2005. Lecture Notes in Computer Science, vol 3580. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11523468_20

Download citation

  • DOI: https://doi.org/10.1007/11523468_20

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-27580-0

  • Online ISBN: 978-3-540-31691-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics