Skip to content

Dynamically optimal weight-balanced binary search trees

John Iacono, Akash Pareek

cs.DS

Abstract

In STOC 1972, J{ü}rg Nievergelt and Edward M.~Reingold introduced the BB[α]BB[α]-tree, also known as a \emph{weight-balanced} tree, which for any α∈(0,12]α\in (0,\frac{1}{2}] is a binary search tree where every node with induced subtree size ss has children with induced subtree sizes at least α(s+1)−1α(s+1)-1. A new rotation-based binary search tree, the \emph{PopTree}, is introduced. The PopTree stores nn elements and is a BB[120]BB[\tfrac1{20}]-tree after the execution of each search and a BB[1729]BB[\tfrac1{729}]-tree at all times, notably while rebalancing. For any constant αα, its performance on search sequences of length Ω(nlog⁡n)Ω(n \log n) is proved to be within a constant factor (which can depend on αα) of the optimal offline rotation-based binary search tree that maintains the BB[α]BB[α] balance invariant.

Create a lesson