---
title: Nonsimple Butterfly Trees
url: https://www.emergentmind.com/topics/nonsimple-butterfly-trees
type: topic
---

# Nonsimple Butterfly Trees

Searching arXiv for the relevant butterfly-tree literature to ground the article in current papers.
arXiv search query: butterfly trees nonsimple butterfly permutations Horton-Strahler number heights butterfly trees
“Nonsimple butterfly trees” denotes, in the context of butterfly permutations, the rooted-tree structure underlying the nonsimple butterfly groups \(B_n^{(p)}\) and the random permutations drawn from them. In the primary formulation, these objects arise from Gaussian elimination with partial pivoting on nonsimple scalar butterfly matrices, whose permutation factors form iterated wreath products and, for prime \(p\), realize \(p\)-Sylow subgroups of \(S_{p^n}\) [2410.20952]. In later work on binary search trees and Horton–Strahler complexity, the same recursive permutation class induces “general” or “nonsimple” butterfly trees as binary tree shapes obtained from the associated permutations, with markedly different behavior from both simple butterfly trees and classical random trees [2507.04505], [2509.11384].

## 1. Algebraic origin and basic definition

For \(N=2^n\), a scalar butterfly matrix is built recursively as
\[
B=(R_\theta\otimes I_{N/2})(A_1\oplus A_2),
\]
with
\[
R_\theta=\begin{bmatrix}\cos\theta & \sin\theta\\ -\sin\theta & \cos\theta\end{bmatrix},
\]
and \(A_1,A_2\) butterfly matrices of size \(N/2\). Applying GEPP produces a permutation factor \(\sigma(B)\in S_N\), called a butterfly permutation [2410.20952].

The simple–nonsimple distinction is structural. Simple scalar butterfly matrices satisfy \(A_1=A_2\) recursively and can be written as
\[
B_s(N)=\bigotimes_{j=1}^n R_{\theta_j}.
\]
Their permutation group is
\[
B_{s,N}=\bigotimes_{j=1}^n S_2\subset S_N,\qquad B_{s,N}\cong C_2^n.
\]
Nonsimple scalar butterfly matrices allow \(A_1\) and \(A_2\) to differ, and their permutation set forms a group
\[
B_N=(B_{N/2}\oplus B_{N/2})\rtimes_\varphi \langle (1\ 2)\otimes 1_{N/2}\rangle,
\qquad
\varphi(\sigma_1\oplus \sigma_2)=\sigma_2\oplus \sigma_1.
\]
Hence
\[
B_N\cong B_{N/2}\wr C_2\cong C_2\wr C_2\wr\cdots\wr C_2,
\]
an \(n\)-fold wreath product, with \(B_{s,N}\) normal in \(B_N\) [2410.20952].

For general base \(m\), the same pattern persists:
\[
B_{s,n}^{(m)}=\bigotimes_{j=1}^n \langle \tau_m\rangle,\qquad
B_n^{(m)}=\left(\bigoplus_{j=1}^m B_{n-1}^{(m)}\right)\rtimes_{\varphi_m}\langle \tau_m\otimes 1_{N/m}\rangle.
\]
When \(m=p\) is prime,
\[
|B_n^{(p)}|=p^{(p^n-1)/(p-1)},
\]
so these groups are \(p\)-Sylow subgroups of \(S_{p^n}\) [2410.20952].

## 2. Rooted-tree interpretation

The rooted-tree viewpoint is the most direct meaning of “nonsimple butterfly trees.” The structure of \(B_n^{(p)}\) is exactly the group of automorphisms of a rooted \(p\)-ary tree of depth \(n\). The vertices are words of length \(\le n\) over \(\{1,\dots,p\}\), and each level corresponds to one digit in base \(p\). An element of \(B_n^{(p)}\) acts by independently permuting depth-1 subtrees via elements of \(B_{n-1}^{(p)}\), followed by a cyclic permutation of the \(p\) children through \(\tau_p\otimes 1\) [2410.20952].

In the binary case, the tree is a full binary tree of depth \(n\). At each node, one either keeps the left and right subtrees in place or swaps them. The essential difference from the simple model is locality. In the simple group \(B_{s,n}^{(2)}\), the choice at depth \(j\) is global: all nodes at that depth use the same transposition or identity. In the nonsimple group \(B_n^{(2)}\), each node chooses independently, producing a much larger group and more intricate permutations [2410.20952].

| Object | Group structure | Tree interpretation |
|---|---|---|
| Simple butterfly | \(B_{s,n}^{(p)}\cong C_p^n\) | one global choice per level |
| Nonsimple butterfly | iterated wreath product \(B_n^{(p)}\) | local choices at each node |

This tree interpretation is also the bridge to later binary-search-tree models. Given a butterfly permutation \(\pi\), one may form the BST \(\mathcal T(\pi)\) by inserting the values of \(\pi\) in order. For butterfly permutations, the resulting binary tree shape is called a butterfly tree; simple trees arise from iterated gluing of identical copies, whereas nonsimple butterfly trees arise by gluing different butterfly trees at successive levels [2509.11384].

## 3. Random generation, uniformity, and Sylow subgroups

The random nonsimple model is tied to GEPP. If \(B\sim B(N,\Sigma_S)\) is a nonsimple scalar butterfly matrix built with independent uniform angles \(\theta\) at each level, then
\[
\sigma(B)\sim \mathrm{Unif}(B_N).
\]
Thus GEPP on such matrices produces a Haar-uniform element of the nonsimple butterfly group \(B_N\) [2410.20952].

This uniformity rests on an explicit block GEPP factorization,
\[
B=(R_\theta\otimes I_m)(A_1\oplus A_2),\qquad
P=(P_1\oplus P_2)(P_\theta\otimes I_m),
\]
combined with the recursive wreath-product structure and the Diaconis–Shahshahani subgroup algorithm [2410.20952].

For prime \(p\), the \(p\)-ary formulation is expressed directly in group-theoretic terms: \(\sigma\sim\mathrm{Unif}(B_n^{(p)})\) is a uniform random element of a \(p\)-Sylow subgroup of \(S_{p^n}\). Because all \(p\)-Sylow subgroups of \(S_{p^n}\) are conjugate and the number of cycles is conjugation-invariant, distributional results for \(\mathrm{Unif}(B_n^{(p)})\) transfer immediately to any uniform \(p\)-Sylow subgroup [2410.20952].

A recurrent misconception is to identify these random objects with uniform permutations in \(S_N\). They are instead highly constrained hierarchical permutations. This distinction is decisive for longest increasing subsequences, cycle counts, tree height, and Horton–Strahler behavior.

## 4. Longest increasing subsequences, cycles, and height

For nonsimple permutations \(\sigma_n\sim\mathrm{Unif}(B_n^{(m)})\), the longest increasing subsequence \(L(\sigma_n)\) is encoded by a recursive process \(X_n\) with \(X_0=1\) and
\[
X_{n+1}=
\begin{cases}
\sum_{j=1}^m X_n^{(j)}, & \text{if } \sigma_\theta=1,\\[4pt]
\max\left(\sum_{j=1}^k X_n^{(j)},\sum_{j=k+1}^m X_n^{(j)}\right), & \text{if } \sigma_\theta=\tau_m^k,\ k=1,\dots,m-1,
\end{cases}
\]
where the \(X_n^{(j)}\) are iid copies of \(X_n\). In the binary case,
\[
X_{n+1}=
\begin{cases}
X_n^{(1)}+X_n^{(2)}, & \text{w.p. }1/2,\\
\max(X_n^{(1)},X_n^{(2)}), & \text{w.p. }1/2.
\end{cases}
\]
This is the tree recursion in probabilistic form: if the root permutation is identity, LIS contributions from both subtrees can concatenate; if the root swaps blocks, monotonicity forces the LIS into one side [2410.20952].

The expected LIS obeys a power law. If \(N=m^n\), then there exist constants
\[
\frac12<\alpha_m<\beta_m<1
\]
such that
\[
N^{\alpha_m}\le \mathbb E L(\sigma_n)\le N^{\beta_m},
\qquad
\alpha_m=1-O\!\left(\frac1{\ln m}\right)=1-o_m(1),
\]
and \(\beta_m-\alpha_m=O(1/\ln m)\). In the binary case,
\[
\alpha_2=\log_2(3/2)\approx 0.58496,\qquad
\mathbb E L(\sigma_n)\le N^{\beta_2^*},\ \beta_2^*\approx 0.83255,
\]
and numerical estimation gives \(\hat\alpha\approx 0.682\) [2410.20952]. This contrasts with uniform permutations, for which \(\mathbb E L(\sigma)\sim 2N^{1/2}\).

The cycle count is even more explicitly tree-recursive. In the binary nonsimple case, if \(Y_n=C(\sigma_n)\), then
\[
Y_0=1,\qquad
Y_{n+1}=Y_n+\eta_n Y_n',
\]
where \(Y_n,Y_n'\stackrel{d}=Y_n\) are iid and \(\eta_n\sim\mathrm{Bern}(1/2)\). Hence
\[
\mathbb EY_n=\left(\frac32\right)^n,\qquad
\mathrm{Var}(Y_n)=\frac13\left[\left(\frac32\right)^{2n}-\left(\frac32\right)^n\right].
\]
With
\[
W_n=\left(\frac23\right)^n Y_n,
\]
one has
\[
W_n\xrightarrow{d}W,
\]
where \(W\) has support \((0,\infty)\) and integer moments determined by
\[
m_1=1,\qquad
m_k=\frac{\lambda-1}{\lambda^k-\lambda}\sum_{j=1}^{k-1}\binom{k}{j}m_jm_{k-j},
\qquad \lambda=\frac32.
\]
For prime \(p\), the normalization becomes
\[
W_n^{(p)}=\frac{C(\sigma_n)}{(2-1/p)^n}\xrightarrow{d}W^{(p)},
\]
with \(W^{(p)}\) supported on \((0,\infty)\) and uniquely determined by its recursively defined moments [2410.20952].

The BST height induced by nonsimple butterfly permutations also grows polynomially. If \(\boldsymbol\pi_n\sim\mathrm{Unif}(B_n)\) and \(\mathcal T(\boldsymbol\pi_n)\) is the associated BST, then
\[
2N^\alpha(1+o(1))\le \mathbb E h(\mathcal T(\boldsymbol\pi_n))\le d\,N^\beta(1+o(1)),
\]
with
\[
\alpha=\log_2(3/2)\approx 0.58496,\qquad
\beta\approx 0.913189,\qquad
d\approx 2.60958.
\]
The lower bound matches the simple butterfly mean height, while the upper bound reflects the max-type recursion in the wreath-product model [2507.04505].

## 5. Horton–Strahler number and rigidity in the nonsimple model

The Horton–Strahler number \(HS\) provides a distinct tree-complexity statistic. For a rooted binary tree, it is defined recursively by
\[
HS(v)=
\begin{cases}
0, & \text{if } v \text{ is a leaf},\\[4pt]
\max\big(HS(v_\ell),HS(v_r)\big)+\mathbf 1_{\{HS(v_\ell)=HS(v_r)\}}, & \text{otherwise}.
\end{cases}
\]
For butterfly trees, \(HS\) measures how deeply perfect binary branching can be embedded in the tree shape [2509.11384].

In the nonsimple case, exact analysis remains open, but one rigorous global bound is known: for any butterfly tree \(\mathcal T_n^B\) with \(N=2^n\) nodes,
\[
HS(\mathcal T_n^B)\le \lfloor \log_4 N\rfloor,
\]
and this bound is sharp [2509.11384]. This support bound is substantially smaller than the maximum possible Horton–Strahler number for arbitrary binary trees on \(N\) nodes.

The obstruction to a simple theory is structural. In the simple model, the gluing of identical subtrees collapses the \(HS\) evolution to an 8-state Markov chain. In the general nonsimple model, one must track how maximal \(HS\) paths run along both top edges, including escape information into internal subtrees; the natural state becomes an evolving combinatorial object whose state space grows with tree size, and no finite-state Markov representation is known [2509.11384].

Empirical sampling nevertheless shows striking concentration. For \(N=1024=2^{10}\), 10,000 uniform nonsimple butterfly trees yielded the following observed \(HS\) distribution [2509.11384]:

| HS | count |
|---|---:|
| 3 | 494 |
| 4 | 9,040 |
| 5 | 466 |

For the same experiment, the empirical mean was \(\widehat{\mathbb E}[HS]\approx 3.9972\), and the empirical variance was \(\widehat{\operatorname{Var}(HS)}\approx 0.096\) with standard deviation \(\approx 0.31\) [2509.11384]. Since \(\lfloor\log_4 1024\rfloor=5\), this suggests concentration tightly below the structural upper bound. A plausible implication is that nonsimple butterfly trees are more rigid in \(HS\) than simple butterfly trees, even though they are larger and combinatorially more varied.

## 6. Comparisons, alternate usages, and open problems

The contrast with simple butterflies is sharp. Simple butterfly permutations form an abelian group \(B_{s,n}^{(p)}\cong C_p^n\), corresponding to “one global choice per level,” and in the binary BST setting they produce an exact height law
\[
h_n^B\stackrel{d}{=}2^{X_n}+2^{n-X_n}-2,\qquad X_n\sim \mathrm{Binom}(n,1/2),
\]
with
\[
\mathbb E h_n^B=2\left(\frac32\right)^n-2=2N^\alpha(1+o(1)),
\qquad \alpha=\log_2(3/2)\approx 0.58496
\]
[2507.04505]. Nonsimple butterflies replace this exact tensor-product structure by an iterated wreath product, yielding only bounds for height and for LIS exponents, but a full scaling limit for cycle counts [2410.20952], [2507.04505].

The contrast with uniform permutations in \(S_N\) is equally strong. Uniform random permutations have \(\mathbb E L(\sigma)\sim 2\sqrt N\), Tracy–Widom LIS fluctuations, and cycle counts of order \(\log N\), whereas nonsimple butterfly permutations have LIS and cycle counts that scale as powers of \(N\) with exponents strictly larger than \(1/2\) for LIS and \(\log_p(2-1/p)\) for cycles [2410.20952]. This suggests that the rooted-tree hierarchy imposes long-range order rather than washing it out.

The terminology is not universal across arXiv. In “Building the Butterfly Fractal: The Eightfold Way,” a “butterfly tree” is an octonary Diophantine tree for the Hofstadter butterfly, generated by eight unimodular \(3\times 3\) integer matrices acting on \((q_R,q_L,\Delta\sigma)\); that object belongs to spectral topology rather than permutation groups or BSTs [2406.00068]. In “Superconcentration on a Pair of Butterflies,” the relevant tree-like object is the binary hierarchy of sub-butterflies in a layered routing network, where a \(d\)-dimensional butterfly recursively splits into \(0*\), \(1*\), then \(00*,01*,10*,11*\), and so on [1401.7263]. These usages are mathematically distinct from nonsimple butterfly trees arising from \(B_n^{(p)}\).

Several central problems remain open. For general nonsimple butterfly trees, the order of growth and limit law of the Horton–Strahler number are unproved; the variance may be bounded, logarithmic, or intermediate, and the empirical concentration near \(\lfloor\log_4 N\rfloor\) lacks a rigorous mechanism [2509.11384]. For BST height, identifying a single exponent \(\gamma\) such that \(\mathbb E h_n^B\sim cN^\gamma\) remains open [2507.04505]. For the permutation model more broadly, the LIS is controlled only by power-law bounds rather than an exact exponent or limit law [2410.20952].

Taken together, these results place nonsimple butterfly trees in an intermediate regime between maximally structured simple butterflies and fully random symmetric-group behavior. Their governing principle is recursive local randomness on a rooted tree: sufficiently rigid to force anomalously large LIS, cycle counts, and BST heights, yet sufficiently rich to defeat the finite-state methods that solve the simple case.

Source: https://www.emergentmind.com/topics/nonsimple-butterfly-trees