Table of Contents
Fetching ...

Probabilistic AVL Trees (p-AVL): Relaxing Deterministic Balancing

Hayagriv Desikan

Abstract

This paper studies the empirical behaviour of the p-AVL tree, a probabilistic variant of the AVL tree in which each imbalance is repaired with probability $p$. This gives an exact continuous interpolation from $p = 0$, which recovers the BST endpoint, to $p = 1$, which recovers the standard AVL tree. Across random-order insertion experiments, we track rotations per node, total imbalance events, average depth, average height, and a global imbalance statistic $σ$. The main empirical result is that even small nonzero p already causes a strong structural change. The goal here is empirical rather than fully theoretical: to document the behaviour of the p-AVL family clearly and identify the main patterns.

Probabilistic AVL Trees (p-AVL): Relaxing Deterministic Balancing

Abstract

This paper studies the empirical behaviour of the p-AVL tree, a probabilistic variant of the AVL tree in which each imbalance is repaired with probability . This gives an exact continuous interpolation from , which recovers the BST endpoint, to , which recovers the standard AVL tree. Across random-order insertion experiments, we track rotations per node, total imbalance events, average depth, average height, and a global imbalance statistic . The main empirical result is that even small nonzero p already causes a strong structural change. The goal here is empirical rather than fully theoretical: to document the behaviour of the p-AVL family clearly and identify the main patterns.

Paper Structure

This paper contains 4 sections, 4 equations, 22 figures, 5 tables.

Figures (22)

  • Figure 1: Rotations per node (rotations/$N$) versus $p$ for $N$ ranging from 8,000 to 512,000. Logarithmic spacing in $p$ is used, with dense sampling in the small-$p$ regime. The curves exhibit near-collapse across $N$.
  • Figure 2: Residual $R(p) = \text{rot}/N - f(p)$ after subtracting the base exponential model, showing structured cubic-like behaviour before the nonlinear warp is applied.
  • Figure 3: Left: the combined model of $\mathrm{Rot}/N = f(p) + R(p)$, indicating a high-quality visual fit. Right: the fit of the residual with the non linear warp,indicating how we recover a regular cubic from a warped one in p-space into the warp
  • Figure 4: Total imbalance count scaled with p for various N compared with raw rotation count
  • Figure 5: Residual of the imbalance interaction model in original $p$-space. The structure resembles a stretched, warped cubic, analogous to the residual seen in the rotations/$N$ model.
  • ...and 17 more figures