Years and Authors of Summarized Original Work
-
1984; Gabow, Bentley, Tarjan
-
1984; Harel, Tarjan
-
1989; Berkman, Breslauer, Galil, Schieber, Vishkin
-
2000; Bender, Farach-Colton
Problem Definition
One of the most fundamental algorithmic problems on trees is how to find the lowest common ancestor (LCA) of a pair of nodes. The LCA of nodes u and v in a tree is the shared ancestor of u and v that is located farthest from the root. More formally, the lowest common ancestor (LCA) problem is:
- Preprocess: :
-
A rooted tree T having n nodes.
- Query: :
-
For nodes u and v of tree T, query lca T (u, v) returns the least common ancestor of u and v in T, that is, it returns the node farthest from the root that is an ancestor of both u and v. (When the context is clear, we drop the subscript T on the lca.)
The goal is to optimize both the preprocessing time and the query time. We will therefore refer to the running time of an algorithm with preprocessing time T P (N) and query time of T Q (N) as having run...
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Recommended Reading
Alstrup S, Gavoille C, Kaplan H, Rauhe T (2004) Nearest common ancestors: a survey and a new algorithm for a distributed environment. Theory Comput Syst 37(3):441–456
Bender MA, Farach-Colton M (2000) The LCA problem revisited. In: Proceedings of Latin American theoretical informatics (LATIN), Montevideo, pp 88–94
Berkman O, Breslauer D, Galil Z, Schieber B, Vishkin U (1989) Highly parallelizable problems. In: Proceedings of the 21st annual ACM symposium on theory of computing, New Orleans, pp 309–319
Bille P (2014) Nearest common ancestors. http://massivedatasets.files.wordpress.com/2014/02/nearestcommonancestors_2014.pdf
Fischer J (2010) Optimal succinctness for range minimum queries. In: Proceedings of LATIN, Oaxaca, pp 158–169
Gabow HN, Bentley JL, Tarjan RE (1984) Scaling and related techniques for geometry problems. In: Proceedings of the 16th annual ACM symposium on theory of computing, New York, vol 67, pp 135–143
Harel D, Tarjan RE (1984) Fast algorithms for finding nearest common ancestors. SIAM J Comput 13(2):338–355
Navarro G, Sadakane K (2014) Fully functional static and dynamic succinct trees. ACM Trans Algorithms 10(3)
Sadakane K (2002) Space-efficient data structures for flexible text retrieval systems. In: International symposium on algorithms and computation (ISAAC), Vancouver, pp 14–24
Sadakane K (2002) Succinct representations of lcp information and improvements in the compressed suffix arrays. In: Proceedings of the 13th annual ACM-SIAM symposium on discrete algorithms, San Francisco, pp 225–232
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer Science+Business Media New York
About this entry
Cite this entry
Farach-Colton, M. (2016). Lowest Common Ancestors in Trees. In: Kao, MY. (eds) Encyclopedia of Algorithms. Springer, New York, NY. https://doi.org/10.1007/978-1-4939-2864-4_630
Download citation
DOI: https://doi.org/10.1007/978-1-4939-2864-4_630
Published:
Publisher Name: Springer, New York, NY
Print ISBN: 978-1-4939-2863-7
Online ISBN: 978-1-4939-2864-4
eBook Packages: Computer ScienceReference Module Computer Science and Engineering