Bottom-up rebalancing binary search trees by flipping a coin

Rebalancing schemes for dynamic binary search trees are numerous in the literature, where the goal is to maintain trees of low height, either in the worst-case or expected sense. In this paper we study randomized rebalancing schemes for sequences of n insertions into an initially empty binary search tree, under the assumption that a tree only stores the elements and the tree structure without any additional balance information. Seidel (2009) presented a top-down randomized insertion algorithm, where insertions take expected O(lg<sup>2</sup>n) time, and the resulting trees have the same distribution as inserting a uniform random permutation of n elements into a binary search tree without rebalancing. Seidel states as an open problem if a similar result can be achieved with bottom-up insertions. In this paper we fail to answer this question. We consider two simple canonical randomized bottom-up insertion algorithms on binary search trees, assuming that an insertion is given the position where to insert the next element. The subsequent rebalancing is performed bottom-up in expected O(1) time, uses expected O(1) random bits, performs at most two rotations, and the rotations appear with geometrically decreasing probability in the distance from the leaf. For some insertion sequences the expected depth of each node is proved to be O(lgn). On the negative side, we prove for both algorithms that there exist simple insertion sequences where the expected depth is Ω(n), i.e., the studied rebalancing schemes are not competitive with (most) other rebalancing schemes in the literature.

Authors

Publication Details

Journal
Theoretical Computer Science
Published
2025-09-09
DOI
https://doi.org/10.1016/j.tcs.2025.115543
Primary Topic
Algorithms and Data Compression
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Bottom-up rebalancing binary search trees by flipping a coin

Gerth Stølting Brodal
Theoretical Computer Science
Algorithms and Data Compression
article

Bottom-up rebalancing binary search trees by flipping a coin

Gerth Stølting Brodal
article en

Abstract

Rebalancing schemes for dynamic binary search trees are numerous in the literature, where the goal is to maintain trees of low height, either in the worst-case or expected sense. In this paper we study randomized rebalancing schemes for sequences of n insertions into an initially empty binary search tree, under the assumption that a tree only stores the elements and the tree structure without any additional balance information. Seidel (2009) presented a top-down randomized insertion algorithm, where insertions take expected O(lg<sup>2</sup>n) time, and the resulting trees have the same distribution as inserting a uniform random permutation of n elements into a binary search tree without rebalancing. Seidel states as an open problem if a similar result can be achieved with bottom-up insertions. In this paper we fail to answer this question. We consider two simple canonical randomized bottom-up insertion algorithms on binary search trees, assuming that an insertion is given the position where to insert the next element. The subsequent rebalancing is performed bottom-up in expected O(1) time, uses expected O(1) random bits, performs at most two rotations, and the rotations appear with geometrically decreasing probability in the distance from the leaf. For some insertion sequences the expected depth of each node is proved to be O(lgn). On the negative side, we prove for both algorithms that there exist simple insertion sequences where the expected depth is Ω(n), i.e., the studied rebalancing schemes are not competitive with (most) other rebalancing schemes in the literature.

Theoretical Computer ScienceVol. 1055
Openalex Percentile: Top 87%
Algorithms and Data Compression
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.