2000 | OriginalPaper | Buchkapitel
Improved Algorithms for Finding Level Ancestors in Dynamic Trees
verfasst von : Stephen Alstrup, Jacob Holm
Erschienen in: Automata, Languages and Programming
Verlag: Springer Berlin Heidelberg
Enthalten in: Professional Book Archive
Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.
Wählen Sie Textabschnitte aus um mit Künstlicher Intelligenz passenden Patente zu finden. powered by
Markieren Sie Textabschnitte, um KI-gestützt weitere passende Inhalte zu finden. powered by
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).