Large trees that maximize a six-leaf pattern start by shedding 16.16–19.55% of their leaves one at a time
Why it matters
Tree shapes help describe how species branch from common ancestors. To make one particular six-tip pattern as common as possible, a large tree must shed roughly 16 to 20 of every 100 tips one at a time before reaching a fork with at least two tips on each side.
How should a tree branch if we want a particular pattern to appear as often as possible among samples of its leaves? Consider a tree in which every fork has two branches. Pick six leaves and follow the forks that separate them, starting at their nearest common ancestor. The pattern we want has one leaf branching off first, another branching off next, and the remaining four dividing into two pairs. A bound on how often this pattern occurs tells us little about how to arrange the whole tree to achieve the maximum.
We prove that every sufficiently large tree attaining the maximum has the same kind of beginning. Starting at the root, successive forks each shed a single leaf until between 16.16% and 19.55% of all leaves have branched off. At the next fork, the smaller branch has two to four leaves. Knowing how many leaves remain at the end of the chain and how often four of them form two pairs narrows the chain length to at most two consecutive integers.
Counting the pattern
To read the shape of a sample, keep the branches from the sampled leaves back to their nearest common ancestor. Wherever only one child remains, replace the two edges through that point by a single edge. Leaf names and the left–right order of the branches do not matter. Call the four-leaf shape that splits into two pairs a balanced quartet, Q. Adding a fork above its root with a single leaf on the other side gives a five-leaf shape, A. That single leaf is called an outgroup. Adding another outgroup above A gives the six-leaf pattern, D. In parentheses, with a dot for a leaf and a pair of parentheses for a fork, D is (•(•((••)(••)))).
The density of a shape is the fraction of leaf subsets of the appropriate size that have that shape. As the tree grows, the maximum possible density of D can only stay the same or decrease: choosing a smaller tree by sampling leaves uniformly preserves the density on average. The limiting maximum I is called the inducibility of D [1]. Brosch and Puges [2] gave an upper bound of 0.1914539 for I. Here we study the trees that attain the maximum at each size.
The shortest chain in finite trees
Call the initial chain of single-leaf branches the stem, and the tree left at its end the core. For each of 160 tree sizes (6 through 160 leaves and five larger sizes through 384), we maximized the count of D over all possible splits. Where trees tied, we looked for the shortest stem. At 384 leaves even the shortest had length 64. The same calculation at 448 and 512 leaves gave shortest lengths of 75 and 85. Table 1 compares the observed frequency of balanced quartets in the core with a prediction based on stem length.
| Leaves | Shortest stem | Smaller arm at next fork | Quartet density in core | 6(\text{stem length}/\text{core size})^2 |
|---|---|---|---|---|
| 158 | 28 | 4 | 0.2413 | 0.2783 |
| 256 | 43 | 3 | 0.2326 | 0.2445 |
| 320 | 53 | 2 | 0.2294 | 0.2364 |
| 384 | 64 | 2 | 0.2303 | 0.2400 |
| 448 | 75 | 2 | 0.2311 | 0.2426 |
| 512 | 85 | 3 | 0.2299 | 0.2378 |
Table 1. Each row describes a tree with the shortest stem among those attaining the maximum at that size. An arm is one of the two branches at the first fork of the core. The last column evaluates the large-tree prediction derived below.
To get a lower bound on the limiting maximum, it suffices to exhibit trees with a known limiting density. We searched over stems attached to 399 branching shapes from the catalogue of Brosch and Puges [2]. Each tip of a shape held a subtree, or block, and each block initially had the same share of the core leaves. This reached a density of 0.190221. Searching seven grids of possible block sizes allowed unequal shares and raised the density to 0.191398.
The following family gives an explicit lower bound. Put 0.172 of the leaves on the single-leaf stem, then split off blocks of fractions 0.011, 0.022, 0.045 and 0.105 in that order, leaving 0.645 in the final block. Within each of the five blocks, keep dividing the leaves in half, rounding sizes to integers. Counting samples according to how many of their six leaves fall in each block gives a limiting density of
This is about 5.45\times10^{-5} below the published upper bound [2]. We found no published numerical lower bound stated specifically for D. For comparison, consider the four-block tree of Dossou-Olory and Wagner [3, proof of Theorem 1], designed for the five-leaf shape A. Evaluating our six-leaf target at their published block fractions gives 0.12272473 (rounded), which the stem construction improves. We use this construction only for its lower bound, I>L=0.19139; the arguments below allow the core to have any shape.
Changing the fork where the stem ends
The stem has a benefit and a cost. Fix four leaves that form a balanced quartet. To complete it to D, the two additional leaves (the outsiders) must come from different side branches along the path from the quartet’s common ancestor to the root of the whole tree. Separating leaves along that path makes more outside pairs usable. Joining two leaves into a pair, however, lets them form half of a new quartet. At the end of an optimal stem neither change can increase the count.
In a tree with n leaves, let e count the single leaves from the root down to the first split whose children both have at least two leaves. Such a split exists in any tree containing D. Let S be the core rooted at that split, s=n-e its size, and a\le b the sizes of its two children, with a+b=s. Write B for the larger child and C(U) for the number of balanced quartets in a tree U.

Figure 1. Orange dots are individual leaves. Triangles stand for arbitrary subtrees with the indicated numbers of leaves. The upper stem, omitted in all three drawings, stays fixed.
First join the last two stem leaves into a pair. This loses one outside pair per quartet in S. It also creates a quartet for every pair of leaves in S, and each such quartet can use any two of the other e-2 stem leaves. Write {m\choose k} for the number of ways to choose k leaves from m. Since the gain cannot exceed the loss in a maximizing tree,
Next dissolve the smaller arm into a successive singleton branches above B. Each quartet in B can now use both outsiders from the former small arm, gaining exactly {a\choose2} choices. Quartets spanning the old fork had two leaves on each side and both outsiders on the stem. For quartets wholly in the small arm we can bound the lost copies by allowing any two outsiders. Thus
The first inequality bounds the core’s quartet count from below. The second bounds the larger arm’s quartet count from above. These bounds approach each other in density if the smaller arm occupies a fraction of the tree that tends to zero. We first show why the arm must be that small.
Lemma 1. The smaller arm occupies a vanishing fraction of the tree
We write a=o(n) to mean that a/n tends to zero as tree size grows. To prove this for all maximizing trees, we need bounds on how often each of the three shapes can occur. For the limiting densities of A,D, round the upper bounds of Brosch and Puges [2, Table 3] outward to P=0.24716 and H=0.19146, respectively. For quartets we use K=3/7. To see why it works, count the quartets in a tree from the bottom up: at a split of sizes i,j, add {i\choose2}{j\choose2} to the two child quartet counts. Induction bounds their total including the new quartets by K(i+j)^4/24, since (i+j)^4-i^4-j^4\ge14i^2j^2.
Suppose the smaller arm keeps a positive fraction of the leaves along some sequence of growing maximizers. Within that sequence choose trees along which all the size fractions and densities converge. The core contains a positive fraction of the tree: every target needs at least four leaves there to form its quartet, and I>L. Its larger arm, of size b, therefore also contains a positive fraction. Use the larger arm as unit mass, and write x=\lim a/b, z=\lim e/b, M=1+x+z. Then 0\le x\le1, and (1) and the quartet bound give z/(1+x)\le\sqrt{K/6}<.27, including trivially z=0.
Under the assumption x>0, write q_i,p_i,d_i for the limiting densities of Q,A,D in the two arms, numbered 1 (smaller) and 2 (larger). Each is bounded by K,P,H, respectively; also p_i\le5q_i, d_i\le15q_i, by counting four-subsets of a sample. Count samples according to where their quartet lies. Multiplying the limiting density of D by M^6 removes the common denominator and gives
For example a quartet in the small arm can use two stem leaves or one stem leaf and one large-arm leaf as outsiders, but not two large-arm leaves. The last term counts quartets split across the arms with both outsiders on the stem. Terms with just one outside draw require the five draws inside the arm to induce A.
What happens if we lengthen the stem at the expense of the small arm? Hold the large arm and the total x+z fixed. In a finite tree, keep a uniform subset of the desired size in the small arm, remove the forks left with only one child, and reattach the removed leaves one at a time on the stem. Each internal pattern density is preserved in expectation, and (3) is linear in these densities with the other arm fixed. Thus for every fixed decrease of x, the new limiting expected score cannot beat I. The derivative in the direction of increasing x, with z+x held fixed, is nonnegative at the old value, even if z=0.
Differentiating (3) and dividing by 30x gives
In particular q_2\le h=\min(K,J), where
But (1), in the same units, requires q_2+q_1x^4+6x^2\ge 6z^2(1+x)^2. Substituting J, cancelling 6z^2 and dividing by x gives the necessary inequality
Finally (3) must exceed LM^6. Replacing each density by its upper bound gives one last necessary condition:
The conditions G\ge0, h\ge0 and (4) are incompatible. We checked the inequalities over whole rectangles using rational arithmetic. The bounds on x and z/(1+x) place every candidate pair (x,z) in [0,1]\times[0,.54]. Start with this rectangle. In each monomial with positive coefficient substitute the upper endpoints for an upper bound; use lower endpoints in negative terms. First bound G, then h, then the right side of (4) using the upper bound on h; bound its left side from below. Discard a rectangle when the upper bound on either of the first two quantities is negative or when the upper bound on the score is less than the lower bound required. Otherwise bisect both coordinates and repeat. The test discarded 51 rectangles by G, 63 by h, and 97 by (4), accounting for the entire closed rectangle. Dividing by x when deriving G is valid for every positive limiting arm size, however small. The contradiction rules out all such sizes and leaves a=o(n).
The quartet density sets the stem length
Write q(S)=C(S)/{s\choose4} for the quartet density in the core. We show that in the limit this density equals six times the square of the stem-to-core size ratio. As before, consider any sequence of growing maximizers along which the size fractions and densities converge. The core size s grows proportionally to n because a sample of shape D needs at least four core leaves and its probability exceeds L.
By Lemma 1, a=o(n), so S and B have the same limiting densities (q,p,d) of Q,A,D, respectively: a fixed sample from S misses the small arm with probability tending to one. Divide (2) by {a\choose2}; the error term is O(a^2n^2)=o(n^4), meaning it is bounded by a constant times a^2n^2 and becomes negligible relative to n^4. With r=\lim e/s, multiplying the resulting bound by 24/s^4 gives q\le6r^2, while (1) gives the reverse inequality, which is trivial if r=0. This proves the endpoint identity up to an error tending to zero. In particular r>0: otherwise q=0, hence p=d=0 because both larger shapes contain a quartet, and the vanishing stem could supply no positive target density.
Now keep the core and change only the stem length. If the new stem has y leaves per core leaf in the limit, a sample of shape D can take zero, one or two leaves from the stem. These cases give the three terms in the numerator of its density:
Any y\ge0 is feasible simply by changing the number of singleton leaves above the same cores. Thus f(r)=I, f'(r)=0. Together with q=6r^2, this fixes the other two densities in terms of r,I:
Each sample of shape A or D contains a quartet, so counting four-subsets gives p\le5q and d\le15q. The quartet bound q\le3/7 gives r\le\sqrt{(3/7)/6}<0.27. A short stem requires a core with too high a five-leaf density: it would exceed the published upper bound or, for very small r, even 5q. A long stem would require too high a six-leaf density. Substituting L\le I\le H, 0\le p\le\min(P,30r^2), d\le H excludes r/(1+r)\le .1616 and r/(1+r)\ge .1955 in 0\le r\le .27.
We verified the exclusions by bounding the required core densities over intervals of stem-to-core ratios, again using rational arithmetic. For an interval [l,u], bound p between L(1+l)^5-30u^3 and H(1+u)^5-30l^3. Discard if this range misses [0,\min(P,30u^2)]. Otherwise bound (1-5r)p below by the least of the four endpoint products and add 30l^3(1-2u); discard if the sum exceeds H. Starting separately with the low and high excluded ranges of r, repeated bisection discards 28 and 13 subintervals, respectively. Thus every subsequential limit r/(1+r) of e/n lies strictly between 0.1616 and 0.1955. The same strict bounds hold at every sufficiently large size.
The first nonsingleton arm has at most four leaves
Moving a single leaf gives a sharper comparison than dissolving the entire arm. Remove one uniformly random leaf from the small arm, suppress its parent, and put it on the innermost end of the singleton stem. Write E_j={j\choose2}. For each quartet of B, the number of pairs with both outsiders drawn from beyond B increases by a-1: it was E_e+ea and becomes E_{e+1}+(e+1)(a-1). The count with a quartet across the fork changes from E_aE_bE_e to E_{a-1}E_bE_{e+1}, a loss of (a-1)E_b[E_e-(a-2)e/2]. For a copy whose quartet lies inside the small arm, the move can destroy the copy only if it removes one of its selected small-arm leaves. The expected number of such losses is at most
The three terms count possible samples with six, five and four leaves in the small arm, weighting each by the chance that one of those leaves moves. The number of outside choices for any surviving pattern cannot decrease. The displayed quantity divided by a-1 is O(a^2n^2) uniformly for a\ge2. Since the move cannot improve an optimum, it follows that
On the other hand C(S)=C(B)+C(\text{small arm})+E_aE_b, where the last two terms are O(a^2n^2). Using (1) and E_e-E_{e-2}=2e-3 gives
Divide by ab^2e. We already know a=o(n) and both b,e are of order n, so the right side tends to zero. Dropping nonnegative terms and expanding the binomials on the left yields
If a\ge5 occurred infinitely often the left side would stay positive, since e/b\ge e/(n-e)>.19 eventually. Thus 2\le a\le4.
With a bounded, (1) and (2) sandwich C(S) between s^2 e^2/4-O(n^3) and s^2 e^2/4+O(n^3), giving q(S)=6(e/s)^2+O(1/n). In fact the quartet count leaves at most two consecutive integer possibilities for the stem length given the core size. Put u=s\sqrt{q(S)/6} and \rho=e/s. By (1),
By (2) and bounded a, C(S)\le E_e E_b+O(n^2); taking the square root gives
Here the errors are uniform because e,s both grow linearly. Since .19<\rho<.25 and a\ge2, eventually u+.3<e<u+2.1, an interval of width less than two. For scale, the 427-leaf core in the last row of Table 1 gives u=83.59; the two integers in that interval are 84 and 85, and the observed stem has 85 leaves.
Scope of the result
The stem is compulsory for trees attaining the exact maximum at every sufficiently large size. The proof gives no explicit size threshold; the counts through 512 leaves are separate finite results. Trees that merely approach the limiting density can look different. For example, join successive pairs of stem leaves so that the two leaves in each pair share a parent. The long stem disappears, but a six-leaf sample sees a change only if it contains both members of a joined pair, an event of probability O(1/n). Whether the fraction of leaves on the stem converges to a single number, as the finite counts might suggest, depends on whether all optimal cores approach the same quartet density.
Computational methods
For the finite calculation, a subtree’s score counts the copies of D whose quartet lies in that subtree, allowing outsiders anywhere they can complete the pattern. We built up the best scores from smaller subtrees. For a subtree, record its size m and the number k of pairs in the same outside branch on its path to the root. The number of usable outside pairs is then {n-m\choose2}-k. For every candidate split i+j=m, multiply this number by {i\choose2}{j\choose2} to count copies whose quartet first spans the split. Add the best scores for the two children: their same-branch pair counts are k+{j\choose2} and k+{i\choose2}, respectively. Starting with score zero for one leaf, take the largest total at each state in increasing order of size. Each copy is counted once, at the common ancestor of its four quartet leaves. Start reconstruction at (n,0); choosing the largest smaller arm among tied splits ends the stem as soon as any optimum permits. As a check on both the maximum count and the shortest stem, we examined every six-leaf subset directly in every catalogue tree with six through eleven leaves.
To calculate the lower bound from the five-block construction, count how many sampled leaves fall in each child of a fork. If all fall in one child, use its probability for the same target shape. If both children are sampled, sum over the ordered pairs of child shapes that give the target when joined. Weight their probabilities by the binomial probability of drawing the required number of leaves on each side. Repeated halving gives internal probabilities 3/7,1/7,6/217 for Q,A,D by this recursion. Join the five blocks from the bottom up. For zero, one or two draws from the stem, the draws from the core must induce D,A,Q, respectively; more than two stem draws cannot work. Summing these three probabilities gives the limiting density stated for the construction.
References
- É. Czabarka, L. A. Székely and S. Wagner. Inducibility in binary trees and crossings in random tanglegrams. SIAM Journal on Discrete Mathematics 31 (2017), 1732–1750.
- D. Brosch and D. Puges. Getting to the root of the problem: sums of squares for limits of trees. Mathematical Programming. Table 3 gives the upper bounds used here; the appendix gives the catalogue of trees through eleven leaves.
- A. A. V. Dossou-Olory and S. Wagner. On the inducibility of small trees. Discrete Mathematics & Theoretical Computer Science 21(4), 2019.