skip to main content
research-article

Rank-Balanced Trees

Published: 02 June 2015 Publication History

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.

References

[1]
G. M. Adel’son-Vel’skii and E. M. Landis. 1962. An algorithm for the organization of information. Sov. Math. Dokl. 3 (1962), 1259--1262.
[2]
Alfred V. Aho, John E. Hopcroft, and Jeffrey D. Ullman. 1983. Data Structures and Algorithms. Addison-Wesley.
[3]
Arne Andersson. 1993. Balanced search trees made simple. In Workshop on Algorithms and Data Structures, Vol. 709. 60--71.
[4]
Rudolf Bayer. 1971. Binary B-trees for virtual memory. In SIGFIDET Workshop on Data Description, Access and Control. 219--235.
[5]
Rudolf Bayer. 1972. Symmetric binary B-trees: Data structure and maintenance algorithms. Acta Informatica 1 (1972), 290--306.
[6]
Rudolf Bayer and Edward M. McCreight. 1972. Organization and maintenance of large ordered indexes. Acta Informatica 1, 3 (1972), 173--189.
[7]
Norbert Blum and Kurt Mehlhorn. 1980. On the average number of rebalancing operations in weight-balanced trees. Theoretical Computer Science 11, 3 (1980), 303--320.
[8]
Joan Boyar, Rolf Fagerberg, and Kim S. Larsen. 1997. Amortization results for chromatic search trees, with an application to priority queues. Journal of Computer and System Sciences 55, 3 (1997), 504--521.
[9]
Mark R. Brown. 1978. A storage scheme for height-balanced trees. Information Processing Letters 7, 5 (1978), 231--232.
[10]
M. L. Fredman, R. Sedgewick, D. D. Sleator, and R. E. Tarjan. 1986. The pairing heap: A new form of self-adjusting heap. Algorithmica 1, 1 (1986), 111--129.
[11]
Leo J. Guibas and Robert Sedgewick. 1978. A dichromatic framework for balanced trees. In Symposium on Foundations of Computer Science. 8--21.
[12]
Bernhard Haeupler, Siddhartha Sen, and Robert E. Tarjan. 2009. Rank-balanced trees. In International Symposium on Algorithms and Data Structures. 351--362.
[13]
S. Huddleston and K. Mehlhorn. 1981. Robust balancing in B-trees. In GI-Conference on Theoretical Computer Science (LNCS), Vol. 104. 234--244.
[14]
Scott Huddleston and Kurt Mehlhorn. 1982. A new data structure for representing sorted lists. Acta Informatica 17, 2 (1982), 157--184.
[15]
Donald E. Knuth. 1973. The Art of Computer Programming, Volume 3: Sorting and Searching. Addison-Wesley.
[16]
K. S. Larsen and R. Fagerberg. 1996. Efficient rebalancing of B-trees with relaxed balance. International Journal of the Foundation of Computer Science 7, 2 (1996), 169--186.
[17]
Edward M. McCreight. 1985. Priority search trees. SIAM Journal on Computing 14, 2 (1985), 257--276.
[18]
Kurt Mehlhorn. 1984. Data Structures and Algorithms 1: Sorting and Searching. Vol. 1. Springer-Verlag. Pages 198--199.
[19]
Kurt Mehlhorn and Athanasios Tsakalidis. 1986. An amortized analysis of insertions into AVL-trees. SIAM Journal on Computing 15, 1 (1986), 22--33.
[20]
J. Metzger. 1975. Managing Simultaneous Operations in Large Ordered Indexes. Technical Report. Technische Universität München, Institut für Informatik, TUM-Math.
[21]
J. Nievergelt and E. M. Reingold. 1973. Binary search trees of bounded balance. SIAM Journal on Computing 2, 1 (1973), 33--43.
[22]
Henk J. Olivié. 1982. A new class of balanced search trees: Half balanced binary search trees. ITA 16, 1 (1982), 51--71.
[23]
Behrokh Samadi. 1976. B-trees in a system with multiple users. Information Processing Letters 5, 4 (1976), 107--112.
[24]
Robert Sedgewick. 2008. Left-leaning Red-Black Trees. Retrieved from http://www.cs.princeton.edu/ rs/talks/LLRB/LLRB.pdf.
[25]
Steven S. Skiena. 1998. The Algorithm Design Manual. Springer-Verlag.
[26]
Robert Endre Tarjan. 1983. Updating a balanced search tree in O(1) rotations. Information Processing Letters 16, 5 (1983), 253--257.
[27]
R. E. Tarjan. 1985a. Amortized computational complexity. SIAM Journal on Algebraic and Discursive Methods 6 (1985), 306--318.
[28]
Robert Endre Tarjan. 1985b. Efficient Top-Down Updating of Red-Black Trees. Technical Report TR-006-85. Department of Computer Science, Princeton University.
[29]
Hans van der Laan. 1997. Le Nombre Plastique: Quinze Lecons Sur L’Ordonnance Architectonique. Brill Academic.
[30]
Jan van Leeuwen and Mark H. Overmars. 1983. Stratified balanced search trees. Acta Informatica 18, 4 (1983), 345--359.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Algorithms
ACM Transactions on Algorithms  Volume 11, Issue 4
June 2015
302 pages
ISSN:1549-6325
EISSN:1549-6333
DOI:10.1145/2756876
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 02 June 2015
Accepted: 01 November 2013
Revised: 01 September 2013
Received: 01 December 2012
Published in TALG Volume 11, Issue 4

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. AVL trees
  2. Balanced binary trees
  3. amortized complexity
  4. data structures
  5. exponential potential function
  6. red-black trees
  7. search trees

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

  • NSF CCF grant “Distributed Algorithms for Near-Planar Networks”
  • AFOSR MURI
  • NSF
  • US-Israel Binational Science Foundation

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)41
  • Downloads (Last 6 weeks)3
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2022)Partitioned Binary Search Trees (P(h)‐BST): A Data Structure for Computer RAMData Science with Semantic Technologies10.1002/9781119865339.ch6(139-177)Online publication date: 25-Oct-2022
  • (2021)Zip TreesACM Transactions on Algorithms10.1145/347683017:4(1-12)Online publication date: 4-Oct-2021
  • (2021)A Survey on Balanced Binary Search Trees methods2021 International Conference on Information Systems and Advanced Technologies (ICISAT)10.1109/ICISAT54145.2021.9678439(1-5)Online publication date: 27-Dec-2021
  • (2021)Fast and efficient address search in System-on-a-Programmable-Chip using binary treesComputers and Electrical Engineering10.1016/j.compeleceng.2021.10740396:PBOnline publication date: 1-Dec-2021
  • (2020)ASA-graphs for efficient data representation and processingInternational Journal of Applied Mathematics and Computer Science10.34768/amcs-2020-005330:4(717-731)Online publication date: 1-Dec-2020
  • (2020)Development and benchmarking a parallel Data AcQuisition framework using MPI with hash and hash+tree structures in a cluster environment2020 19th International Symposium on Parallel and Distributed Computing (ISPDC)10.1109/ISPDC51135.2020.00031(164-171)Online publication date: Jul-2020
  • (2020)Crumple Trees2020 10th Annual Computing and Communication Workshop and Conference (CCWC)10.1109/CCWC47524.2020.9031134(0031-0037)Online publication date: Jan-2020
  • (2019)Zip TreesAlgorithms and Data Structures10.1007/978-3-030-24766-9_41(566-577)Online publication date: 5-Aug-2019
  • (2019)Splaying Preorders and PostordersAlgorithms and Data Structures10.1007/978-3-030-24766-9_37(510-522)Online publication date: 5-Aug-2019
  • (2016)Deletion Without Rebalancing in Binary Search TreesACM Transactions on Algorithms10.1145/290314212:4(1-31)Online publication date: 2-Sep-2016
  • Show More Cited By

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media