Affiliation:
1. Microsoft Research, New York, NY
2. Princeton University and Intertrust Technologies, Sunnyvale, CA
3. University of Chicago, Chicago, IL
Abstract
We address the vexing issue of deletions in balanced trees. Rebalancing after a deletion is generally more complicated than rebalancing after an insertion. Textbooks neglect deletion rebalancing, and many B-tree--based database systems do not do it. We describe a relaxation of AVL trees in which rebalancing is done after insertions but not after deletions, yet worst-case access time remains logarithmic in the number of insertions. For any application of balanced trees in which the number of updates is polynomial in the tree size, our structure offers performance competitive with that of classical balanced trees. With the addition of periodic rebuilding, the performance of our structure is theoretically superior to that of many, if not all, classic balanced tree structures. Our structure needs lg lg
m
+ 1 bits of balance information per node, where
m
is the number of insertions and lg is the base-two logarithm, or lg lg
n
+ O(1) with periodic rebuilding, where
n
is the number of nodes. An insertion takes up to two rotations and O(1) amortized time, not counting the time to find the insertion position. This is the same as in standard AVL trees. Using an analysis that relies on an exponential potential function, we show that rebalancing steps occur with a frequency that is exponentially small in the height of the affected node. Our techniques apply to other types of balanced trees, notably B-trees, as we show in a companion article, and particularly red-black trees, which can be viewed as a special case of B-trees.
Funder
AFOSR MURI grant
NSF
US-Israel Binational Science Foundation
Publisher
Association for Computing Machinery (ACM)
Subject
Mathematics (miscellaneous)
Reference39 articles.
1. Zipf’s law and the Internet;Adamic Lada A.;Glottometrics,2002
2. An algorithm for the organization of information;Adel’son-Vel’skii G. M.;Soviet Mathematics Doklady,1962
3. Binary B-trees for virtual memory
4. Symmetric binary B-Trees: Data structure and maintenance algorithms
Cited by
5 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献