Skip to main content

Improved Algorithms for Finding Level Ancestors in Dynamic Trees

  • Conference paper
  • First Online:
Automata, Languages and Programming (ICALP 2000)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1853))

Included in the following conference series:

Abstract

Given a node x at depth itd in a rooted tree LevelAncestor (x, i) returns the ancestor to x in depth d ā€” i. We show how to maintain a tree under addition of new leaves so that updates and level ancestor queries are being performed in worst case constant time. Given a forest of trees with n nodes where edges can be added, m queries and updates take O(mĪ±(m, n)) time. This solves two open problems (P.F. Dietz, Finding level-ancestors in dynamic trees, LNCS, 519:32ā€“40, 1991). In a tree with node weights, min(x, y) report the node with minimum weight on the path between the nodes x and y. We can substitute the LevelAncestor query with min, without increasing the complexity for updates and queries. Previously such results have been known only for special cases (e.g. R.E. Tarjan. Applications of path compression on balanced trees. J.ACM, 26(4):690ā€“715, 1979).

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. S. Alstrup, A. Ben-Amram, and T. Rauhe. Worst-case and amortised optimality in union-find. In 31th ACM Symp. on Theo. of Comp., pages 499ā€“506, 1999.

    Google ScholarĀ 

  2. S. Alstrup, J. Holm, K. de Lichtenberg, and M. Thorup. Minimizing diameters of dynamic trees. In 24th Int. Col. on Auto., Lang. and Prog., volume 1256 of LNCS, pages 270ā€“280, 1997.

    Google ScholarĀ 

  3. S. Alstrup, J. Holm, and M. Thorup. Maintaining center and median in dynamic trees. In 7th Scan. Work. on Algo. Theo., LNCS, 2000.

    Google ScholarĀ 

  4. S. Alstrup and M. Thorup. Optimal pointer algorithms for finding nearest common ancestors in dynamic trees. In 5th Scan. Work. on Algo. Theo., volume 1097 of LNCS, pages 212ā€“222, 1996. To appear in J. of Algo.

    Google ScholarĀ 

  5. P. Beame and F. Fich. Optimal bounds for the predecessor problem. In 31th ACM Symp. on Theo. of Comp., pages 295ā€“304, 1999.

    Google ScholarĀ 

  6. O. Berkman and U. Vishkin. Recursive star-tree parallel data structure. SIAM J. on Comp., 22(2):221ā€“242, 1993.

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  7. O. Berkman and U. Vishkin. Finding level-ancestors in trees. J. of Comp. and Sys. Scie., 48(2):214ā€“230, 1994.

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  8. A. Buchsbaum, H. Kaplan, A. Rogers, and J. Westbrook. Linear-time pointer-machine algorithms for lcaā€™s, mst verification, and dominators. In 30th ACM Symp. on Theo. of Comp., pages 279ā€“288, 1998.

    Google ScholarĀ 

  9. B. Chazelle. Computing on a free tree via complexity-preserving mappings. Algorithmica, 2:337ā€“361, 1987.

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  10. P. Dietz. Finding level-ancestors in dynamic trees. In 2nd Work. on Algo. and Data Struc., volume 1097 of LNCS, pages 32ā€“40, 1991.

    ChapterĀ  Google ScholarĀ 

  11. B. Dixon, M. Rauch, and R. E. Tarjan. Verification and sensitivity analysis of minimum spanning trees in linear time. SIAM J. on Comp., 21(6):1184ā€“1192, 1992.

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  12. M. Fredman and M. Saks. The cell probe complexity of dynamic data structures. In 21st ACM Symp. on Theory of Comp., pages 345ā€“354, 1989.

    Google ScholarĀ 

  13. M. Fredman and D. Willard. Trans-dichotomous algorithms for minimum spanning trees and shortest paths. J. of Comp. and Sys. Sci., 48(3):533ā€“551, 1994.

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  14. H. Gabow. A scaling algorithm for weighted matching on general graphs. In 26th Symp. on Found. of Comp. Sci., pages 90ā€“100, 1985.

    Google ScholarĀ 

  15. H. Gabow. Data structure for weighted matching and nearest common ancestors with linking. In 1st Symp. on Dis. Algo., pages 434ā€“443, 1990.

    Google ScholarĀ 

  16. H. Gabow and R. Tarjan. A linear-time algorithm for a special case of disjoint set union. J. of Comp. and Sys. Sci., 30(2):209ā€“221, 1985.

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  17. H. N. Gabow, J. L. Bentley, and R. E. Tarjan. Scaling and related techniques for computational geometry. In 16th ACM Symp. on Theo. of Comp., pages 135ā€“143, 1984.

    Google ScholarĀ 

  18. D. Harel. A linear time algorithm for finding dominator in flow graphs and related problems. In 17th ACM Symp. on Theo. of Comp., pages 185ā€“194, 1985.

    Google ScholarĀ 

  19. D. Harel and R. Tarjan. Fast algorithms for finding nearest common ancestors. Siam J. on Comp., 13(2):338ā€“355, 1984.

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  20. V. King. A simpler minimum spanning tree verification algorithm. Algorithmica, 18(2):263ā€“270, 1997.

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  21. U. Manber. Recognizing breadth-first search trees in linear time. Information Processing Letters, 34(4):167ā€“171, 1990.

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  22. B. Schieber and U. Vishkin. On finding lowest common ancestors: Simplification and parallelization. SIAM J. on Comp., 17:1253ā€“1262, 1988.

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  23. D. Sleator and R. Tarjan. A data structure for dynamic trees. J. of Comp. and Sys. Sci., 26(3):362ā€“391, 1983. See also STOC 1981.

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  24. R. Tarjan. Applications of path compression on balanced trees. J. of the ACM, 26(4):690ā€“715, 1979.

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  25. R. Tarjan. A class of algorithms which require nonlinear time to maintain disjoint sets. J. of Comp. and Sys. Sci., 18(2):110ā€“127, 1979. See also STOC 1977.

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  26. M. Thorup. Parallel shortcutting of rooted trees. J. of Algo., 23(1):139ā€“159, 1997.

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  27. A. Tsakalidis. The nearest common ancestor in a dynamic tree. Acta informatica, 25(1):37ā€“54, 1988.

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  28. A. Tsakalidis and J. van Leeuwen. An optimal pointer machine algorithm for finding nearest common ansectors. Technical Report RUU-CS-88-17, Dep. of Comp. Sci., Uni. of Utrecht, 1988.

    Google ScholarĀ 

  29. J. van Leeuwen. Finding lowest common ancestors in less than logarithmic time. Unpublish technical report, 1976.

    Google ScholarĀ 

  30. A. Yao. Space-time tradeo_for answering range queries. In 14th ACM Symp. on Theo. of Comp., pages 128ā€“136, 1982.

    Google ScholarĀ 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

Ā© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Alstrup, S., Holm, J. (2000). Improved Algorithms for Finding Level Ancestors in Dynamic Trees. In: Montanari, U., Rolim, J.D.P., Welzl, E. (eds) Automata, Languages and Programming. ICALP 2000. Lecture Notes in Computer Science, vol 1853. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45022-X_8

Download citation

  • DOI: https://doi.org/10.1007/3-540-45022-X_8

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-67715-4

  • Online ISBN: 978-3-540-45022-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics