Given a node x at depth d 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).
CITATION STYLE
Alstrup, S., & Holm, J. (2000). Improved algorithms for finding level ancestors in dynamic trees. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 1853, pp. 73–84). Springer Verlag. https://doi.org/10.1007/3-540-45022-x_8
Mendeley helps you to discover research relevant for your work.