Improved Algorithms for Finding Level Ancestors in Dynamic Trees

  • Authors:
  • Stephen Alstrup;Jacob Holm

  • Affiliations:
  • -;-

  • Venue:
  • ICALP '00 Proceedings of the 27th International Colloquium on Automata, Languages and Programming
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

Given a node x at depth d in a rooted tree Level Ancestor(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 Level Ancestor 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).