Since the invention of AVL trees in 1962, a wide variety of ways to balance 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 introduce the rank-balanced tree, a relaxation of AVL trees. Rank-balanced trees can be rebalanced bottom-up after an insertion or deletion in O(1) amortized time and at most two rotations worst-case, in contrast to red-black trees, which need up to three rotations per deletion. Rebalancing can also be done top-down with fixed lookahead in O(1) amortized time. Using a novel analysis that relies on an exponential potential function, we show that both bottom-up and top-down rebalancing modify nodes exponentially infrequently in their heights.
KeywordsBinary Tree Current Node Search Step Search Path Rank Difference
Unable to display preview. Download preview PDF.
- 1.Adel’son-Vel’skii, G.M., Landis, E.M.: An algorithm for the organization of information. Sov. Math. Dokl. 3, 1259–1262 (1962)Google Scholar
- 3.Bayer, R.: Binary B-trees for virtual memory. In: SIGFIDET, pp. 219–235 (1971)Google Scholar
- 5.Brown, M.R.: A storage scheme for height-balanced trees. Inf. Proc. Lett., 231–232 (1978)Google Scholar
- 6.Foster, C.C.: A study of avl trees. Technical Report GER-12158, Goodyear Aerospace Corp. (1965)Google Scholar
- 7.Guibas, L.J., Sedgewick, R.: A dichromatic framework for balanced trees. In: FOCS, pp. 8–21 (1978)Google Scholar
- 9.Nievergelt, J., Reingold, E.M.: Binary search trees of bounded balance. SIAM J. on Comput., 33–43 (1973)Google Scholar
- 11.Sedgewick, R.: Left-leaning red-black trees, http://www.cs.princeton.edu/rs/talks/LLRB/LLRB.pdf
- 15.Tarjan, R.E.: Efficient top-down updating of red-black trees. Technical Report TR-006-85, Department of Computer Science, Princeton University (1985)Google Scholar