# Two joined combs maximize even six-leaf splits for comb counts on four to six leaves, but not from seven onward

Suppose you can see only small samples of leaves from a large branching tree. Some samples look like a comb, with one leaf branching off at each successive split. If you know how often a sample of a given size forms a comb, how often could six leaves from the same tree split evenly, three on each side? Two combs joined under a common root give a candidate answer: vary their relative sizes and you can trade one shape frequency for the other. For trees with increasingly many leaves, earlier work confirmed the maximum for equal-sized combs at three sample sizes, but left open whether unequal combs also achieve it.

The answer changes at seven leaves. When the comb frequency is measured with four, five or six leaves, two joined combs give the highest possible frequency of even six-leaf splits at every point on their curve. For every sample size from seven onward, dividing the smaller comb into two gives more even six-leaf splits at the same comb frequency over an interval just below one.

## The two shape frequencies

Consider a rooted tree in which each internal vertex has two children. Choose leaves uniformly without replacement. Trace their paths back to the first ancestor they all share, and remove vertices where only one path continues, joining the paths on either side. This gives the sample's shape; leaf names and left–right order play no part. A *caterpillar* is the comb shape: every internal vertex has at least one leaf child. A *balanced six*, denoted $E_6$, is a six-leaf shape with three leaves in each branch at its root. The split specifies the whole shape because there is only one rooted binary tree on three leaves.

Let $x_k$ be the probability that $k$ sampled leaves form a caterpillar, and $y$ the probability that six sampled leaves form $E_6$. As the number of leaves in the tree grows, these probabilities can approach different pairs of values. The set of attainable limiting pairs is the *profile*. Its upper boundary gives the largest $y$ at each $x_k$.

Brosch and Puges [1] computed outer bounds on the profile for $k=4,5,6$. Joining two caterpillars at a common root and varying their relative sizes traced part of the numerical boundary. Brosch and Puges proved that the point for equal arms lies on the boundary at each of the three sizes. They conjectured that the entire curve for this *double caterpillar* lies on the upper boundary for every $k\ge4$.

![Five-leaf comb, balanced six-leaf tree, and the two host constructions](results/shapes.png)

Figure 1. At left, dots mark individual sampled leaves. At right, each triangle stands for a caterpillar arm, labeled by its fraction of all leaves in the tree. Splitting the smaller arm leaves the proportions at the root unchanged.

Let $p$ and $q=1-p$ be the limiting fractions of leaves in the two arms, with $p$ the smaller fraction. A sample forms a caterpillar exactly when one arm receives at most one sampled leaf. A balanced six requires three leaves in each arm, which can happen in $\binom63=20$ ways among six draws. The resulting curve is
\[
 (x_k,y)=(D_k(p),20[pq]^3),\qquad
 D_k(p)=p^k+q^k+k(pq^{k-1}+qp^{k-1}),\quad 0\le p\le1/2 .
\]
As the arms become more equal, $y$ increases and $x_k$ decreases: the derivative $D'_k(p)=-k(k-1)pq(q^{k-3}-p^{k-3})$ is negative in the interior. The curve thus gives one value of $y$ for each $x_k$ in $[(k+1)/2^{k-1},1]$.

Writing $S=y/20$, we obtain three sharp bounds:
\[
 1-x_4\ge6 S^{2/3},\qquad 1-x_5\ge10 S^{2/3},\qquad
 1-x_6\ge15 S^{2/3}-10S.
\]
The left side of each inequality is the frequency of samples that are *not* combs. At a fixed comb frequency, increasing $y$ increases the right side: each expression is strictly increasing on $0\le S\le1/20$, since $y\le1$. The double caterpillar attains equality along its entire curve in all three cases, so no tree can give a higher $y$ there. For each fixed $k\ge7$, every comb frequency sufficiently close to but below one admits a higher $y$.

## Comparing two arms with three

To see where a third arm makes a difference, we joined caterpillars with leaf fractions $a/64$ and $b/64$, then joined that pair to a caterpillar with fraction $c/64$. We tested all 992 positive integer triples with $a+b+c=64$ and $a\le b$ for each $k$ from 4 through 32 (28,768 cases). The middle column counts trees whose $x_k$ could be matched by a double caterpillar. The last column counts those with a larger $y$ than the matching double caterpillar, using the exact probability comparison described under Computational methods.

| Sample size | In the proposed range | Above the curve |
|---:|---:|---:|
| 4 | 841 | 0 |
| 5 | 745 | 0 |
| 6 | 739 | 0 |
| 7 | 739 | 1 |
| 8 | 744 | 23 |
| 9–32 combined | 18,128 | 4,741 |

At seven leaves, only $(1,1,62)$ beat the curve. Its exact frequencies are
\[
 (x_7,y)=(1079204477619/1099511627776,\;9533125/17179869184).
\]
Both are larger than the corresponding frequencies for the double caterpillar whose smaller arm has fraction $39062507/1250000000$. Matching the higher $x_7$ requires making that arm even smaller, which lowers its $y$ further. The extra split can produce balanced sixes, yet it leaves every comb sample with at most one leaf in the small arm unchanged.

## Counting samples that cannot be combs

A split that produces balanced sixes also forces some other samples to depart from the comb shape. To count them, start with a finite rooted binary tree, the *skeleton*. Fill each tip with a caterpillar whose share of the leaves, called its mass, is positive. The tip masses sum to one. Each draw independently picks a tip according to its mass; leaves drawn within that tip form a caterpillar. Finite trees approach this sampling model if we round the caterpillar sizes to whole numbers of leaves and let the total grow.

A bound proved in this model also applies to limits of arbitrary binary trees. Take any tree with $n$ leaves as the skeleton and give each tip mass $1/n$. Unless two independent draws choose the same tip, the sampled shape has the same distribution as under sampling without replacement. For $m$ draws the probability of such a collision is at most $\binom m2/n$, which vanishes for both the comb and the balanced-six samples.

At an internal vertex, let $a,b$ be the masses in its two child branches. Write $z=ab$ for their product, $s=a+b$ for the mass below the vertex and $e=1-s$ for the mass outside. The probability that six draws split three against three at this vertex is $20z^3$. A sample can split this way at only one vertex, so $S=\sum z^3$, where sums run over internal vertices of the skeleton.

Call a vertex a *fork* of the sample if each child branch receives at least two draws. Every sample that is not a caterpillar has a fork. With at most six draws, all its forks lie along one path: forks in disjoint subtrees would require eight leaves. Count the sample at the fork nearest the root. To identify that fork, follow its path up to the root. At each step the branch off the path, called a sibling subtree, must contain at most one draw; otherwise the parent at that step would be a higher fork. The masses $t_i$ of these sibling subtrees sum to the exterior mass $e$.

With four draws the fork must split $2+2$. With five draws the split is $2+3$ in either order, or $2+2$ with one draw outside. Counting the ways to assign draws to these branches gives
\[
 1-x_4=6\sum z^2,\qquad
 1-x_5=10\sum z^2(s+3e).
\]
Since $s+3e\ge1$ and $\sum z^2\ge(\sum z^3)^{2/3}$, the four- and five-leaf bounds follow.

With six draws, if all fall below the fork, the splits $2+4$, $4+2$ and $3+3$ contribute $15z^2s^2-10z^3$. One outside draw gives a contribution of $60z^2se$. Two outside draws give $90z^2(e^2-\sum_i t_i^2)$: they must fall in different sibling subtrees or the sample would already count at a higher fork. Summing the three cases and collecting the $z^3$ terms gives
\[
 (1-x_6+10S)/15=\sum z^2 C,\qquad
 C=s^2+4se+6(e^2-\sum_i t_i^2).
\]

### Why the six-leaf bound holds

It remains to show that $\sum z^2 C\ge S^{2/3}$. If every coefficient $C$ were at least one, the inequality used for four leaves would suffice. But at the split inside the small arm of the seven-leaf example, $s=1/32$ and all the exterior mass lies in one sibling branch. There $C=s^2+4s(1-s)<1$.

The large sibling that makes $C$ small also gives an ancestor a large contribution to $S$. To use that contribution, visit vertices in any order that puts ancestors first. Let $U$ be the sum of $z^3$ over vertices already visited. Adding the current vertex increases the running value of $U^{2/3}$ by $(U+z^3)^{2/3}-U^{2/3}$. We show that the vertex contributes at least this much to $\sum z^2 C$.

The increment is at most $z^2$, since raising a sum to the power $2/3$ gives at most the sum of the separate powers. This handles $C\ge1$, including the root where $C=1$. For $C<1$, let $L=\max_i t_i$ be the largest sibling mass. Since $\sum_i t_i^2\le eL$,
\[
 C-1\ge e(2s+5e-6L).
\]
Hence $L>(2s+5e)/6\ge1/3$. Where that sibling branches off, the other branch contains the entire mass $s$. This ancestor has child mass product at least $sL$, already included in $U$ as a cube, so $U^{1/3}\ge sL$. Concavity of the power $2/3$ bounds the increment by the slope at $U$ times $z^3$. Using $z\le s^2/4$ gives
\[
 (U+z^3)^{2/3}-U^{2/3}
 \le \frac{2z^3}{3sL}
 \le z^2\frac{s}{6L}
 \le z^2 C ,
\]
where the last step uses $L>1/3$ and $C\ge s^2+4se\ge s$. Summing the increments from the first vertex to the last proves $\sum Cz^2\ge S^{2/3}$ and hence the six-leaf bound. The double caterpillar has only one internal skeleton vertex, its root, with $s=C=1$. It attains equality in all three bounds. The vanishing collision probability transfers the bounds to limits of arbitrary binary trees.

## Why a third arm wins from seven leaves onward

Divide the smaller arm of mass $p$ into two caterpillars of mass $p/2$. The original root still produces balanced sixes at the same rate. The new split adds exactly $20p^6/64$ to that probability. Let $X_k(p)$ be the new comb frequency. A sample that used to be a comb can lose that shape only if at least $k-1$ leaves enter the small arm: two or more leaves on each side of the original root already ruled out a comb, and a single leaf in the small arm cannot reveal the new split. The loss therefore satisfies
\[
 0\le D_k(p)-X_k(p)\le p^k+k(1-p)p^{k-1}.
\]

To compare balanced sixes at the *same* comb frequency, increase the double caterpillar's smaller arm from $p$ to a mass $r$ such that $D_k(r)=X_k(p)$. Fix $k\ge7$ and take $p$ small and positive. Doubling the arm would reduce its comb frequency by $D_k(p)-D_k(2p)$, which is asymptotic to $3\binom k2 p^2$ by the formula for $D'_k$. The loss from the new split is only $O(p^{k-1})$, meaning it is bounded in magnitude by a constant times $p^{k-1}$ as $p$ tends to zero. The constants in these bounds may depend on $k$. Thus the matching mass $r$ lies between $p$ and $2p$.

Throughout this interval $|D'_k|$ is at least a positive constant times $p$, so a mass change of $r-p=O(p^{k-2})$ suffices to match the comb frequency. The derivative of the balanced-six probability $20[p(1-p)]^3$ is $O(p^2)$ there. The adjustment therefore gains the double caterpillar only $O(p^k)$ in balanced-six probability. The three-arm tree's lead over the matched double caterpillar is
\[
 (5/16)p^6+O(p^k)>0
\]
for all sufficiently small $p>0$: the gain from the extra split exceeds the gain from adjusting the arm size. Since $X_k$ is continuous, starts at one and is strictly below one for small positive $p$, it takes every value in an interval just below one. At six leaves the two gains no longer separate by powers of $p$; the fork count gives the sharp bound there.

## Computational methods

For each triple in the grid, we started with the comb probability for a double caterpillar of masses $(a+b)/64$ and $c/64$. We subtracted the samples that ceased to be combs when the first arm was split: all or all but one of the $k$ draws fell in that arm, and at least two fell in each of its two parts. We weighted each allocation by its multinomial probability, which counts every ordering of the draws that gives those branch totals. For $y$, we added the probabilities of a three-against-three split at either internal vertex.

When $y$ lay within the double caterpillar's vertical range, we located the double caterpillar with that same $y$. Using integer arithmetic, we repeatedly halved the search interval until the matching mass lay between adjacent multiples of $2^{-92}$. If the three-arm tree had a higher $x_k$ than both endpoints, it lay above the curve at its own $x_k$ because the curve slopes down. We also counted a tree as above the curve if $y$ exceeded the vertical range and $x_k$ lay within the horizontal range. No comparison remained undecided.

We checked the bounds separately by classifying the sampled shapes on all 399 tree skeletons in the [public appendix to the Brosch and Puges study](https://arxiv.org/src/2404.12838v3). We filled each tip with a caterpillar and tested two sets of tip masses. One gave every tip equal weight. The other, numbering tips from $j=0$ in their listed order, gave each tip weight proportional to $1+j+19(j\bmod 2)$, where the remainder $j\bmod 2$ distinguishes odd from even indices. For each allocation of four, five or six draws, we pruned empty branches, replaced occupied tips by caterpillars of the sampled sizes and identified the shape up to interchange of children. All 798 profiles satisfied the three inequalities under exact integer comparison (7,105,746 weighted allocations). The same shape count gave the exact fractions reported for the seven-leaf example.

For four, five and six leaves, the bounds determine the maximum only over the comb frequencies spanned by the two-arm curve. For larger samples, the third arm shows that the proposed maximum is too low near comb frequency one. Which tree achieves the maximum there remains open in this comparison.

## Reference

[1] Daniel Brosch and Diane Puges. [Getting to the root of the problem: sums of squares for limits of trees](https://doi.org/10.1007/s10107-025-02305-1). *Mathematical Programming*, §5.2, Conjecture 1.
