Affiliation:
1. Carnegie Mellon University, PA, United States
2. Microsoft Research, New York, NY, United States
3. Princeton University and Intertrust Technologies, Princeton, NJ, United States
Abstract
Since the invention of AVL trees in 1962, many kinds of binary search trees have been proposed. Notable are red-black trees, in which bottom-up rebalancing after an insertion or deletion takes O(1) amortized time and O(1) rotations worst-case. But the design space of balanced trees has not been fully explored. We continue the exploration. Our contributions are three: We systematically study the use of
ranks
and
rank differences
to define height-based balance in binary trees. Different invariants on rank differences yield AVL trees, red-black trees, and other kinds of balanced trees. By relaxing AVL trees, we obtain a new kind of balanced binary tree, the
weak AVL tree (wavl tree)
, whose properties we develop. Bottom-up rebalancing after an insertion or deletion takes O(1) amortized time and at most two rotations, improving the three or more rotations per deletion needed in all other kinds of balanced trees of which we are aware. The height bound of a wavl tree degrades gracefully from that of an AVL tree as the number of deletions increases and is never worse than that of a red-black tree. Wavl trees also support top-down, fixed look-ahead rebalancing in O(1) amortized time. Finally, we use exponential potential functions to prove that in wavl trees rebalancing steps occur exponentially infrequently in rank. Thus, most of the rebalancing is at the bottom of the tree, which is crucial in concurrent applications and in those in which rotations take time that depends on the subtree size.
Funder
NSF CCF grant “Distributed Algorithms for Near-Planar Networks”
AFOSR MURI
NSF
US-Israel Binational Science Foundation
Publisher
Association for Computing Machinery (ACM)
Subject
Mathematics (miscellaneous)
Reference28 articles.
1. An algorithm for the organization of information;Adel’son-Vel’skii G. M.;Sov. Math. Dokl.,1962
2. Alfred V. Aho John E. Hopcroft and Jeffrey D. Ullman. 1983. Data Structures and Algorithms. Addison-Wesley. Alfred V. Aho John E. Hopcroft and Jeffrey D. Ullman. 1983. Data Structures and Algorithms. Addison-Wesley.
3. Binary B-trees for virtual memory
4. Symmetric binary B-Trees: Data structure and maintenance algorithms
Cited by
16 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献