English

Should Static Search Trees Ever Be Unbalanced?

Data Structures and Algorithms 2010-06-21 v1

Abstract

In this paper we study the question of whether or not a static search tree should ever be unbalanced. We present several methods to restructure an unbalanced k-ary search tree TT into a new tree RR that preserves many of the properties of TT while having a height of logkn+1\log_k n +1 which is one unit off of the optimal height. More specifically, we show that it is possible to ensure that the depth of the elements in RR is no more than their depth in TT plus at most logklogkn+2\log_k \log_k n +2. At the same time it is possible to guarantee that the average access time P(R)P(R) in tree RR is no more than the average access time P(T)P(T) in tree TT plus O(logkP(T))O(\log_k P(T)). This suggests that for most applications, a balanced tree is always a better option than an unbalanced one since the balanced tree has similar average access time and much better worst case access time.

Keywords

Cite

@article{arxiv.1006.3715,
  title  = {Should Static Search Trees Ever Be Unbalanced?},
  author = {Prosenjit Bose and Karim Douïeb},
  journal= {arXiv preprint arXiv:1006.3715},
  year   = {2010}
}
R2 v1 2026-06-21T15:38:13.563Z