Table of Contents
Fetching ...

Heights of butterfly trees

John Peca-Medlin, Chenyang Zhong

Abstract

Binary search trees (BSTs) are fundamental data structures whose performance is largely governed by tree height. We introduce a block model for constructing BSTs by embedding internal BSTs into the nodes of an external BST -- a structure motivated by parallel data architectures -- corresponding to composite permutations formed via Kronecker or wreath products. Extending Devroye's result that the height $h_n$ of a random BST satisfies $h_n / \log n \to c^* \approx 4.311$, we show that block BSTs with $nm$ nodes and fixed external size $m$ satisfy $h_{n,m} / \log n \to c^* + h_m$ in distribution. We then study butterfly trees: BSTs with $N = 2^n$ nodes generated from permutations built using iterated Kronecker or wreath products. For simple butterfly trees (from iterated Kronecker products of $S_2$), we give a full distributional description showing polynomial height growth: $\mathbb{E} h_n^{\operatorname{B}} = Θ(N^α)$ with $α= \log_2(3/2) \approx 0.58496$. For nonsimple butterfly trees (from wreath products), we prove power-law bounds: $cN^α\cdot (1 + o(1)) \le \mathbb{E} h_n^{\operatorname{B}} \le dN^β\cdot (1 + o(1))$, with $β\approx 0.913189$.

Heights of butterfly trees

Abstract

Binary search trees (BSTs) are fundamental data structures whose performance is largely governed by tree height. We introduce a block model for constructing BSTs by embedding internal BSTs into the nodes of an external BST -- a structure motivated by parallel data architectures -- corresponding to composite permutations formed via Kronecker or wreath products. Extending Devroye's result that the height of a random BST satisfies , we show that block BSTs with nodes and fixed external size satisfy in distribution. We then study butterfly trees: BSTs with nodes generated from permutations built using iterated Kronecker or wreath products. For simple butterfly trees (from iterated Kronecker products of ), we give a full distributional description showing polynomial height growth: with . For nonsimple butterfly trees (from wreath products), we prove power-law bounds: , with .

Paper Structure

This paper contains 11 sections, 16 theorems, 72 equations, 9 figures, 1 table.

Key Result

Theorem 1

If $\pi \sim \operatorname{Unif}(S_n)$ and $h_n = h(\mathcal{T}(\pi))$, then $h_n/\log n$ converges in probability and in $L^p$ for $p \ge 1$ to $c^* \approx 4.311$ as $n \to \infty$, where $c^*$ denotes the unique solution to $x \log(2e/x) = 1$ for $x \ge 2$.

Figures (9)

  • Figure 1: Step-by-step construction of $\mathcal{T}(352416)$ next to $\mathcal{T}({\mathbf x})$
  • Figure 2: $\mathcal{T}(\pi)$ for $\pi \in S_{30}$, with $h(\mathcal{T}(\pi)) = 6$ and particular LIS (from nodes 12 to 30) and LDS (from nodes 25 to 3) dotted paths are shown over the BST in red and green, respectively.
  • Figure 3: $\mathcal{T}(216534)$ formed using $\mathcal{T}(132)$ with nodes replaced by copies of $\mathcal{T}(12)$ and $\mathcal{T}(21)$.
  • Figure 4: $\mathcal{T}(12 \otimes 2143)$ and $\mathcal{T}(21 \otimes 2143)$ formed from gluing two copies of $\mathcal{T}(2143)$ together with an extra edge (in blue) connecting the top-left edges or top-right paths of each parent BST to the root of the child BST.
  • Figure 5: Simple butterfly trees of minimal height with $N = 2^{10} = 1{,}024$ nodes
  • ...and 4 more figures

Theorems & Definitions (29)

  • Theorem 1: devroye1986note
  • Theorem 2
  • Theorem 3
  • Theorem 4
  • Theorem 5: Slutsky's theorem, slutsky1925stochastische
  • Theorem 6: Subgroup algorithm, DiSh87
  • Corollary 1
  • proof : Proof of \ref{['thm:1wr']}
  • Lemma 1
  • Corollary 2
  • ...and 19 more