Simple Butterfly Trees in BST Analysis
- 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
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 of , the BST is obtained by inserting keys in the order prescribed by , and the height is the maximal depth of any node. In the block BST model, an external BST generated by an external permutation has each node replaced by an internal BST generated by an internal permutation ; 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 , the simple butterfly permutation group is
A simple butterfly tree with 0 nodes is 1 with 2 uniformly sampled from 3. Recursively, if 4 and 5, then
6
At the tree level, 7 is formed by gluing two copies of 8 along either the top-right edge if 9 or the top-left edge if 0. The same recursion can be encoded by a bit string 1: at step 2, one glues a second copy of the level-3 tree to the end of the current top-right edge if 4, or to the top-left edge if 5. In this formulation, the shape is completely determined by 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 7, the 8-Sylow subgroup of 9 (Peca-Medlin et al., 6 Jul 2025).
2. Exact height law
The central structural quantities are the extremal edge lengths. If 0 and 1 denote the lengths of the top-left and top-right edges of 2, that is, the number of edges on the unique paths from the root to the nodes 3 and 4, then in the simple butterfly model these quantities satisfy a linear recursion together with the height. With 5 denoting the height and extreme-edge lengths of 6,
7
This implies the identity
8
which is special to simple butterfly trees (Peca-Medlin et al., 6 Jul 2025).
The same recursion matches permutation-subsequence statistics. For 9,
0
Under iterated Kronecker products of 1, 2 and 3 either double or remain unchanged at each stage, and they satisfy
4
Consequently, if 5 and 6, then
7
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
8
The minimum is
9
while the maximum is 0. Small instances already show the discrete binomial structure: for 1, the possible heights are 2; for 3, they are 4 with multiplicities induced by 5 (Peca-Medlin et al., 6 Jul 2025).
3. Asymptotic growth and comparison with random BSTs
The exact law yields
6
Thus
7
with exact leading constant 8. The height therefore grows polynomially in the number of nodes 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:
0
Equivalently,
1
This is a log-normal-type limit in base 2 driven by the central limit theorem for 3 (Peca-Medlin et al., 6 Jul 2025).
The contrast with classical random BSTs is substantial. Devroye’s theorem states that for 4 and 5,
6
in probability and in 7 for 8, where 9 is the unique solution to
0
A one-layer block model preserves this logarithmic scaling: if 1 or 2 with 3 fixed, then
4
where 5 for 6. 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,
7
with
8
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 9. 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 0, and for an internal node 1 with children 2 and 3,
4
Equivalently, 5 is the height of the largest perfect binary subtree embedded in 6. For any butterfly tree with 7 nodes,
8
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 9. Define increments
0
Then
1
In the biased model, where the bits are iid 2 with 3, the triplet
4
is an 5-state, irreducible and aperiodic Markov chain, and HS is an additive functional of that chain. In the uniform case 6, the process reduces to a 7-state Markov chain for 8 with transition matrix
9
This reduction yields exact means, variances, and fluctuation results (Peca-Medlin, 14 Sep 2025).
For uniform simple butterfly trees,
00
more precisely,
01
and
02
The weak law of large numbers strengthens to an 03 law of large numbers, and
04
with a Berry–Esseen-type bound 05. 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 06, then
07
and
08
Moreover, the partial-sum process satisfies a Donsker-type invariance principle:
09
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 10, hence 11, algorithm for exact HS evaluation from the compressed bit string. If 12 and the maximal runs of 13’s in 14 have lengths 15, then
16
This is exponentially faster than the standard 17 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,
18
with 19 iid uniform on 20, GEPP produces
21
where each 22 is either the identity or the transposition 23 depending on whether 24 or 25. 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 26-ary generalization. For prime 27,
28
so 29. The corresponding simple butterfly tree is the rooted 30-ary tree of depth 31 in which the action at level 32 is the same cyclic permutation 33 applied uniformly across all 34 subtrees at that level. If
35
then the induced action on leaves is
36
This rooted-tree action makes explicit that the binary simple butterfly model is the 37 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:
38
Hence
39
where
40
In the binary case 41, 42 exactly, and
43
This is precisely the permutation statistic that reappears in the height formula through the identities 44 and 45 (Peca-Medlin et al., 2024).
6. Scope, related models, and open problems
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 46. 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 47, or a full distributional description analogous to the simple case. For general block BSTs, another problem is to analyze 48 beyond fixed 49, especially when both 50 and 51 grow. The same work also proposes 52-ary versions obtained by replacing 53 by cyclic groups of order 54, 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
55
remains, and empirical sampling suggests tight concentration near the upper edge of the support; for 56 and 57 samples, the recorded counts were HS 58, HS 59, and HS 60, with sample mean 61 and sample variance 62. 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 63, 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).