Papers
Topics
Authors
Recent
Search
2000 character limit reached

Simple Butterfly Trees in BST Analysis

Updated 6 July 2026
  • Simple Butterfly Trees are binary search trees defined by dyadic recursion using simple butterfly permutations, featuring a self-similar structure and exact height laws.
  • They exhibit an exact nonasymptotic height distribution and direct coupling to longest increasing/decreasing subsequences, distinctly differing from classical random BSTs.
  • Analytical results extend to precise Horton–Strahler number evaluations and scalable algorithms, offering actionable insights into recursive algebraic generation and tree statistic behaviors.

Searching arXiv for papers on simple butterfly trees and closely related butterfly-tree results. Simple butterfly trees are binary search trees whose insertion order is governed by simple butterfly permutations, namely permutations in the subgroup

Bn,s:=S2S2S2=S2nS2n.B_{n,s}:=S_2\otimes S_2\otimes\cdots\otimes S_2=S_2^{\otimes n}\subset S_{2^n}.

They form a canonical subclass of butterfly trees and of block BSTs, with a dyadic recursive structure motivated by parallel data architectures and closely related to butterfly permutations arising from Gaussian elimination with partial pivoting on simple butterfly matrices. Their recent study is notable for two exact solvable features: an explicit nonasymptotic law for BST height, and an additive-functional representation for the Horton–Strahler number, both of which sharply distinguish the model from classical random BSTs and from more general wreath-product butterfly constructions (Peca-Medlin et al., 6 Jul 2025, Peca-Medlin, 14 Sep 2025, Peca-Medlin et al., 2024).

1. Definition and recursive realization

For a permutation π\pi of {1,,n}\{1,\dots,n\}, the BST T(π)T(\pi) is obtained by inserting keys in the order prescribed by π\pi, and the height h(T(π))h(T(\pi)) is the maximal depth of any node. In the block BST model, an external BST generated by an external permutation ρSm\rho\in S_m has each node replaced by an internal BST generated by an internal permutation πjSn\pi_j\in S_n; the inter-block edges connect the parent’s top-left or top-right edge endpoint to the child’s root. This construction is encoded algebraically by Kronecker or wreath products of permutation matrices, with Kronecker products as the special case of wreath products with identical internal blocks (Peca-Medlin et al., 6 Jul 2025).

Simple butterfly trees specialize this framework to repeated binary Kronecker products. Writing N:=2nN:=2^n, the simple butterfly permutation group is

Bn,s=S2nSN,Bn,s=2n=N.B_{n,s}=S_2^{\otimes n}\subset S_N,\qquad |B_{n,s}|=2^n=N.

A simple butterfly tree with π\pi0 nodes is π\pi1 with π\pi2 uniformly sampled from π\pi3. Recursively, if π\pi4 and π\pi5, then

π\pi6

At the tree level, π\pi7 is formed by gluing two copies of π\pi8 along either the top-right edge if π\pi9 or the top-left edge if {1,,n}\{1,\dots,n\}0. The same recursion can be encoded by a bit string {1,,n}\{1,\dots,n\}1: at step {1,,n}\{1,\dots,n\}2, one glues a second copy of the level-{1,,n}\{1,\dots,n\}3 tree to the end of the current top-right edge if {1,,n}\{1,\dots,n\}4, or to the top-left edge if {1,,n}\{1,\dots,n\}5. In this formulation, the shape is completely determined by {1,,n}\{1,\dots,n\}6 and exhibits a self-similar, rectangular lattice structure (Peca-Medlin, 14 Sep 2025).

This dyadic recursion parallels the stage-by-stage organization of classical butterfly matrices and networks, but the combinatorial object is different. The resulting structure is a BST dictated by binary comparisons during insertion, and the gluing is along extremal paths rather than through a multistage interconnection graph. Algebraically, simple butterfly permutations form an abelian normal subgroup of the nonsimple butterfly group {1,,n}\{1,\dots,n\}7, the {1,,n}\{1,\dots,n\}8-Sylow subgroup of {1,,n}\{1,\dots,n\}9 (Peca-Medlin et al., 6 Jul 2025).

2. Exact height law

The central structural quantities are the extremal edge lengths. If T(π)T(\pi)0 and T(π)T(\pi)1 denote the lengths of the top-left and top-right edges of T(π)T(\pi)2, that is, the number of edges on the unique paths from the root to the nodes T(π)T(\pi)3 and T(π)T(\pi)4, then in the simple butterfly model these quantities satisfy a linear recursion together with the height. With T(π)T(\pi)5 denoting the height and extreme-edge lengths of T(π)T(\pi)6,

T(π)T(\pi)7

This implies the identity

T(π)T(\pi)8

which is special to simple butterfly trees (Peca-Medlin et al., 6 Jul 2025).

The same recursion matches permutation-subsequence statistics. For T(π)T(\pi)9,

π\pi0

Under iterated Kronecker products of π\pi1, π\pi2 and π\pi3 either double or remain unchanged at each stage, and they satisfy

π\pi4

Consequently, if π\pi5 and π\pi6, then

π\pi7

This is an exact nonasymptotic distributional description of the height (Peca-Medlin et al., 6 Jul 2025, Peca-Medlin et al., 2024).

Several immediate consequences follow. The support is

π\pi8

The minimum is

π\pi9

while the maximum is h(T(π))h(T(\pi))0. Small instances already show the discrete binomial structure: for h(T(π))h(T(\pi))1, the possible heights are h(T(π))h(T(\pi))2; for h(T(π))h(T(\pi))3, they are h(T(π))h(T(\pi))4 with multiplicities induced by h(T(π))h(T(\pi))5 (Peca-Medlin et al., 6 Jul 2025).

3. Asymptotic growth and comparison with random BSTs

The exact law yields

h(T(π))h(T(\pi))6

Thus

h(T(π))h(T(\pi))7

with exact leading constant h(T(π))h(T(\pi))8. The height therefore grows polynomially in the number of nodes h(T(π))h(T(\pi))9, in sharp contrast to the logarithmic height of uniformly random BSTs (Peca-Medlin et al., 6 Jul 2025).

The logarithmic scale of the random exponent is also explicit:

ρSm\rho\in S_m0

Equivalently,

ρSm\rho\in S_m1

This is a log-normal-type limit in base ρSm\rho\in S_m2 driven by the central limit theorem for ρSm\rho\in S_m3 (Peca-Medlin et al., 6 Jul 2025).

The contrast with classical random BSTs is substantial. Devroye’s theorem states that for ρSm\rho\in S_m4 and ρSm\rho\in S_m5,

ρSm\rho\in S_m6

in probability and in ρSm\rho\in S_m7 for ρSm\rho\in S_m8, where ρSm\rho\in S_m9 is the unique solution to

πjSn\pi_j\in S_n0

A one-layer block model preserves this logarithmic scaling: if πjSn\pi_j\in S_n1 or πjSn\pi_j\in S_n2 with πjSn\pi_j\in S_n3 fixed, then

πjSn\pi_j\in S_n4

where πjSn\pi_j\in S_n5 for πjSn\pi_j\in S_n6. Simple butterfly trees depart from this regime only after iterating the dyadic Kronecker structure across all levels (Peca-Medlin et al., 6 Jul 2025).

The nonsimple butterfly case is intermediate in tractability but not in growth. For wreath-product butterfly trees,

πjSn\pi_j\in S_n7

with

πjSn\pi_j\in S_n8

The larger upper exponent reflects the more flexible wreath-product structure, which introduces max-operations in the height recursion and stronger growth (Peca-Medlin et al., 6 Jul 2025).

From the algorithmic perspective, BST operations scale as πjSn\pi_j\in S_n9. For simple butterfly trees, typical traversal depth is therefore polynomial rather than logarithmic. This suggests a structural trade-off: the trees inherit deterministic recursive placement and predictable extreme-path gluing, but at the cost of deeper search, insertion, and deletion paths than in classical random BSTs (Peca-Medlin et al., 6 Jul 2025).

4. Horton–Strahler number

The Horton–Strahler number (HS), also called the register function, measures branching complexity. With the convention used in the butterfly-tree analysis, leaves have HS value N:=2nN:=2^n0, and for an internal node N:=2nN:=2^n1 with children N:=2nN:=2^n2 and N:=2nN:=2^n3,

N:=2nN:=2^n4

Equivalently, N:=2nN:=2^n5 is the height of the largest perfect binary subtree embedded in N:=2nN:=2^n6. For any butterfly tree with N:=2nN:=2^n7 nodes,

N:=2nN:=2^n8

and this upper bound is sharp (Peca-Medlin, 14 Sep 2025).

For simple butterfly trees, the HS process can be described directly from the bit string N:=2nN:=2^n9. Define increments

Bn,s=S2nSN,Bn,s=2n=N.B_{n,s}=S_2^{\otimes n}\subset S_N,\qquad |B_{n,s}|=2^n=N.0

Then

Bn,s=S2nSN,Bn,s=2n=N.B_{n,s}=S_2^{\otimes n}\subset S_N,\qquad |B_{n,s}|=2^n=N.1

In the biased model, where the bits are iid Bn,s=S2nSN,Bn,s=2n=N.B_{n,s}=S_2^{\otimes n}\subset S_N,\qquad |B_{n,s}|=2^n=N.2 with Bn,s=S2nSN,Bn,s=2n=N.B_{n,s}=S_2^{\otimes n}\subset S_N,\qquad |B_{n,s}|=2^n=N.3, the triplet

Bn,s=S2nSN,Bn,s=2n=N.B_{n,s}=S_2^{\otimes n}\subset S_N,\qquad |B_{n,s}|=2^n=N.4

is an Bn,s=S2nSN,Bn,s=2n=N.B_{n,s}=S_2^{\otimes n}\subset S_N,\qquad |B_{n,s}|=2^n=N.5-state, irreducible and aperiodic Markov chain, and HS is an additive functional of that chain. In the uniform case Bn,s=S2nSN,Bn,s=2n=N.B_{n,s}=S_2^{\otimes n}\subset S_N,\qquad |B_{n,s}|=2^n=N.6, the process reduces to a Bn,s=S2nSN,Bn,s=2n=N.B_{n,s}=S_2^{\otimes n}\subset S_N,\qquad |B_{n,s}|=2^n=N.7-state Markov chain for Bn,s=S2nSN,Bn,s=2n=N.B_{n,s}=S_2^{\otimes n}\subset S_N,\qquad |B_{n,s}|=2^n=N.8 with transition matrix

Bn,s=S2nSN,Bn,s=2n=N.B_{n,s}=S_2^{\otimes n}\subset S_N,\qquad |B_{n,s}|=2^n=N.9

This reduction yields exact means, variances, and fluctuation results (Peca-Medlin, 14 Sep 2025).

For uniform simple butterfly trees,

π\pi00

more precisely,

π\pi01

and

π\pi02

The weak law of large numbers strengthens to an π\pi03 law of large numbers, and

π\pi04

with a Berry–Esseen-type bound π\pi05. The paper identifies this as a genuine Gaussian limit law for HS in a nontrivial random tree model, in contrast with classical models where variance remains bounded and periodic fluctuations obstruct a CLT (Peca-Medlin, 14 Sep 2025).

The biased case remains explicit. If bits are iid π\pi06, then

π\pi07

and

π\pi08

Moreover, the partial-sum process satisfies a Donsker-type invariance principle:

π\pi09

These results place simple butterfly trees among the rare random-tree models for which HS fluctuations admit a full LLN/CLT/functional CLT package (Peca-Medlin, 14 Sep 2025).

The model also admits an π\pi10, hence π\pi11, algorithm for exact HS evaluation from the compressed bit string. If π\pi12 and the maximal runs of π\pi13’s in π\pi14 have lengths π\pi15, then

π\pi16

This is exponentially faster than the standard π\pi17 HS computation on the explicit tree (Peca-Medlin, 14 Sep 2025).

5. Origins in butterfly permutations and broader generalizations

Simple butterfly trees belong to a wider theory of butterfly permutations generated from butterfly matrices by Gaussian elimination with partial pivoting. For binary simple scalar butterfly matrices,

π\pi18

with π\pi19 iid uniform on π\pi20, GEPP produces

π\pi21

where each π\pi22 is either the identity or the transposition π\pi23 depending on whether π\pi24 or π\pi25. If the angles are iid uniform, then the induced permutation is uniform on the simple butterfly group. This provides a concrete numerical-linear-algebra origin for the model (Peca-Medlin et al., 2024).

The same paper formulates a π\pi26-ary generalization. For prime π\pi27,

π\pi28

so π\pi29. The corresponding simple butterfly tree is the rooted π\pi30-ary tree of depth π\pi31 in which the action at level π\pi32 is the same cyclic permutation π\pi33 applied uniformly across all π\pi34 subtrees at that level. If

π\pi35

then the induced action on leaves is

π\pi36

This rooted-tree action makes explicit that the binary simple butterfly model is the π\pi37 case of a broader levelwise cyclic construction (Peca-Medlin et al., 2024).

Within this broader setting, the longest increasing subsequence has an exact multiplicative structure:

π\pi38

Hence

π\pi39

where

π\pi40

In the binary case π\pi41, π\pi42 exactly, and

π\pi43

This is precisely the permutation statistic that reappears in the height formula through the identities π\pi44 and π\pi45 (Peca-Medlin et al., 2024).

The recent literature uses closely related terminology for several distinct objects, and this has generated a potential source of confusion. In the BST literature, simple butterfly trees are the Kronecker-product BSTs associated with π\pi46. By contrast, “simple staged trees” are staged trees in algebraic statistics for categorical random vectors, defined by the property that stages and positions coincide; the paper that studies them explicitly notes that the term “simple butterfly trees” does not appear there and treats it only as a possible synonym introduced by query ambiguity (Leonelli et al., 2022). Likewise, a later paper on “binary butterfly trees” studies full ordered binary trees produced by gluing two plane binary trees along the rightmost leaf and states that it does not introduce a separate subclass called “simple” (Prodinger, 21 Oct 2025). These are different models, with different size notions, probability distributions, and asymptotic questions.

Within the BST and butterfly-permutation framework, the main limitation of current exact theory is the gap between the simple and nonsimple cases. The simple model relies heavily on the abelian Kronecker-product structure and on the rigid coupling between tree geometry and permutation statistics. In the nonsimple wreath-product case, heterogeneous blocks and max-operators in the height recursion obstruct a clean exact law, and only power-law bounds are known for expected height (Peca-Medlin et al., 6 Jul 2025).

Several open problems are explicitly identified. For nonsimple butterfly trees, one goal is an exact expression or sharper asymptotics for π\pi47, or a full distributional description analogous to the simple case. For general block BSTs, another problem is to analyze π\pi48 beyond fixed π\pi49, especially when both π\pi50 and π\pi51 grow. The same work also proposes π\pi52-ary versions obtained by replacing π\pi53 by cyclic groups of order π\pi54, and biased models such as Mallows-type perturbations over butterfly/Kronecker-block permutations (Peca-Medlin et al., 6 Jul 2025).

The Horton–Strahler analysis raises a parallel set of questions. For general butterfly trees, the deterministic upper bound

π\pi55

remains, and empirical sampling suggests tight concentration near the upper edge of the support; for π\pi56 and π\pi57 samples, the recorded counts were HS π\pi58, HS π\pi59, and HS π\pi60, with sample mean π\pi61 and sample variance π\pi62. The paper highlights as open directions a dynamic description for top-edge profiles, rigorous concentration and variance bounds, and extensions of the LLN/CLT/functional CLT theory beyond the simple subclass (Peca-Medlin, 14 Sep 2025).

A broader implication is that simple butterfly trees serve as an exactly analyzable interface between recursive algebraic generation, permutation statistics, and random-tree functionals. The exact height law, the coupling to π\pi63, and the Markov-additive description of Horton–Strahler complexity together make them a reference model for studying how structured insertion orders alter the geometry of binary search trees (Peca-Medlin et al., 6 Jul 2025, Peca-Medlin, 14 Sep 2025, Peca-Medlin et al., 2024).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Simple Butterfly Trees.