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).
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
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.
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.
S. Alstrup, J. Holm, and M. Thorup. Maintaining center and median in dynamic trees. In 7th Scan. Work. on Algo. Theo., LNCS, 2000.
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.
P. Beame and F. Fich. Optimal bounds for the predecessor problem. In 31th ACM Symp. on Theo. of Comp., pages 295ā304, 1999.
O. Berkman and U. Vishkin. Recursive star-tree parallel data structure. SIAM J. on Comp., 22(2):221ā242, 1993.
O. Berkman and U. Vishkin. Finding level-ancestors in trees. J. of Comp. and Sys. Scie., 48(2):214ā230, 1994.
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.
B. Chazelle. Computing on a free tree via complexity-preserving mappings. Algorithmica, 2:337ā361, 1987.
P. Dietz. Finding level-ancestors in dynamic trees. In 2nd Work. on Algo. and Data Struc., volume 1097 of LNCS, pages 32ā40, 1991.
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.
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.
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.
H. Gabow. A scaling algorithm for weighted matching on general graphs. In 26th Symp. on Found. of Comp. Sci., pages 90ā100, 1985.
H. Gabow. Data structure for weighted matching and nearest common ancestors with linking. In 1st Symp. on Dis. Algo., pages 434ā443, 1990.
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.
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.
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.
D. Harel and R. Tarjan. Fast algorithms for finding nearest common ancestors. Siam J. on Comp., 13(2):338ā355, 1984.
V. King. A simpler minimum spanning tree verification algorithm. Algorithmica, 18(2):263ā270, 1997.
U. Manber. Recognizing breadth-first search trees in linear time. Information Processing Letters, 34(4):167ā171, 1990.
B. Schieber and U. Vishkin. On finding lowest common ancestors: Simplification and parallelization. SIAM J. on Comp., 17:1253ā1262, 1988.
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.
R. Tarjan. Applications of path compression on balanced trees. J. of the ACM, 26(4):690ā715, 1979.
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.
M. Thorup. Parallel shortcutting of rooted trees. J. of Algo., 23(1):139ā159, 1997.
A. Tsakalidis. The nearest common ancestor in a dynamic tree. Acta informatica, 25(1):37ā54, 1988.
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.
J. van Leeuwen. Finding lowest common ancestors in less than logarithmic time. Unpublish technical report, 1976.
A. Yao. Space-time tradeo_for answering range queries. In 14th ACM Symp. on Theo. of Comp., pages 128ā136, 1982.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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