# The exact Turán density for the six-leaf outgroup problem is (25√10 − 70)/36

How often can six leaves of a large branching tree have one pattern of relationships if another pattern almost never occurs? Each pattern has a frequency of its own, but both must come from the same tree. Brosch and Puges found a numerical boundary suggesting that, for the two patterns in Figure 1, one frequency can rise only so far before the other has to rise with it. We prove that the threshold is $(25\sqrt{10}-70)/36$, or about 25.16% of six-leaf samples. A tree attains it by splitting its leaves about 16.78:83.22 at the root and then dividing each side equally. Beyond the threshold, the least possible frequency of the excluded pattern grows in proportion to the excess, up to constant factors.

![Two six-leaf trees, one splitting first as 1:5 then as 2:3, the other shedding two single leaves above a balanced quartet; an attaining tree has four terminal combs of masses 8.39%, 8.39%, 41.61% and 41.61%.](results/splits.png)

Figure 1. Read the trees from the root down. In the target, one leaf branches off before the other five split into two and three. In the excluded pattern, two leaves branch off in succession before the remaining four split into two pairs. On the right, each percentage is a fraction of all leaves. Each final branch is a comb: it sheds one leaf at each split until only a pair remains.

## The question

Choose six distinct leaves uniformly from a rooted binary tree. Trace them back to their lowest common ancestor and keep only the splits that separate chosen leaves. The resulting shape ignores leaf names, branch lengths and the order of siblings. The probability of a shape is its *density*: two different sets of six leaves count separately even when their shapes agree. The *profile* of two shapes is the set of frequency pairs $(x,y)$ attainable in the limit as the number of leaves grows.

[Brosch and Puges](https://doi.org/10.1007/s10107-025-02305-1) computed outer approximations to such profiles. In their Figure 23 successive approximations showed a sharp angle where the lower boundary met the horizontal axis. An outer approximation can contain frequency pairs that no sequence of trees realizes. In their concluding remarks they asked for the “exact Turán number” of an outgroup above a 2:3 split when a balanced quartet below two successive outgroups is excluded. Our threshold answers that question: it is the right endpoint of the axis segment, where $x$ counts the target in Figure 1 and $y$ counts the excluded shape. A point on the axis requires only that $y$ tend to zero; the trees need not be free of the excluded shape.

## The six-leaf endpoint

Literal exclusion confines all splits that can produce two pairs to the first two levels of the tree. Call a node a fork if both its child branches have at least two leaves. A balanced quartet (two pairs) can be rooted at any fork by taking two leaves from each side. If the fork has two ancestors, choose one additional leaf from the off-path branch at each ancestor. These six leaves induce the excluded shape. Conversely, every excluded copy identifies such a fork and two distinct ancestors. Thus in an avoiding tree every branch below the root's children is a comb.

This leaves only three split proportions to optimize. Let $p$ and $q=1-p$ be the root shares. A target in an avoiding tree must cross the root: its 2:3 split needs a fork below its outgroup (the leaf that branches off first), and no such fork is available within either root branch below its top node. The six leaves must therefore split 1:5 or 5:1 at the root. Given five on one side, their chance of splitting 2:3 between its two combs of relative masses $u$ and $1-u$ is
$$
\binom52[u^2(1-u)^3+u^3(1-u)^2]=10u^2(1-u)^2.
$$
These are limiting probabilities: for any fixed number of draws the chance of drawing the same leaf twice tends to zero. The five-leaf probability is largest at $u=1/2$, where it equals $5/8$. Whichever side supplies five leaves, an equal subdivision helps, so both secondary splits should be equal.

At the root, by contrast, an equal split gives the target in at most 11.72% of samples. The best density at root share $p$ is
$$
x(p)=\tfrac58\,6(pq^5+qp^5)=\tfrac{15}{4}z(1-4z+2z^2),\qquad z=pq .
$$
The derivative in $z$ changes from positive to negative at $z=(4-\sqrt{10})/6$ on $[0,1/4]$. Substitution gives the maximum $A=(25\sqrt{10}-70)/36=0.25158170845\ldots$ and the smaller root share $p=0.1677657302\ldots$. Rounding the four comb sizes in Figure 1 to whole leaves realizes this limit. Varying $p$ from zero to the maximizing share realizes the whole axis segment $[0,A]$.

Allowing rare excluded copies leaves the endpoint unchanged. Write $d(P,T)$ for the density of shape $P$ in host $T$. Fix $m\ge6$ and sample $m$ leaves from $T$. The chance that their tree contains any excluded sextet is at most $\binom m6 y$, the expected number of such sextets. Its expected target density is exactly $x$, since six random leaves of a random $m$-sample are six random leaves of $T$. Thus if $y\to0$, the limiting $x$ cannot exceed the greatest target density in an avoiding $m$-leaf tree, for any $m$. As $m$ grows, the four-comb calculation bounds this maximum by $A+O(1/m)$: the error in replacing six draws without replacement by independent draws is at most $\binom62/m$, uniformly in the branch sizes. This proves the bound without having to locate a split in a tree that contains rare excluded copies.

## Successive outgroups

Adding one outgroup to each pattern multiplies the endpoint by the best chance of splitting off exactly one sampled leaf at the root. To state this for all depths, let $Q$ be the balanced quartet, $F$ the 2:3 tree, and $U(P)$ the tree obtained by joining a single leaf to $P$ at a new root. The target at depth $r$ is $X_r=U^r(F)$ and the exclusion is $Y_r=U^{r+1}(Q)$; both have $k=r+5$ leaves. Figure 1 corresponds to $r=1$. Write $A_r$ for the largest limiting target density when the excluded density tends to zero.

Table 1. Optimal root splits and target densities. At depth zero the sample needs a 2:3 split. At every later depth it needs a 1:$(k-1)$ split followed by the previous target on the larger sampled side.

| Outgroups on target | Smaller root share | Multiplier | Endpoint |
|---:|---:|---:|---:|
| 0 | 0.500000 | — | 0.625000 |
| 1 | 0.167766 | 0.402531 | 0.251582 |
| 2 | 0.142949 | 0.396621 | 0.099782 |
| 3 | 0.125006 | 0.392699 | 0.039185 |
| 4 | 0.111111 | 0.389745 | 0.015272 |

The fork argument extends exactly: an avoiding tree has no fork deeper than level $r$, counting the root at zero. Each ancestor of a quartet root supplies one possible outgroup. Let $M_r(n)$ be the largest target count in an avoiding $n$-leaf tree, zero below target size. With maxima over positive root branch sizes $a+b=n$, we obtain
$$
\begin{aligned}
 M_0(n)&=\max_{a+b=n}\left[\binom a2\binom b3+\binom a3\binom b2\right],\\
 M_r(n)&=\max_{a+b=n}\left[aM_{r-1}(b)+bM_{r-1}(a)\right]\qquad(r\ge1).
\end{aligned}
$$
At depth zero both root branches must be combs, and every 2:3 choice works. At later depths each branch must avoid $Y_{r-1}$, and joining any two such branches suffices. Neither branch alone can supply $X_r$, because deleting a leaf from its three-leaf arm would leave $U^r(Q)=Y_{r-1}$. The target uses one leaf from one side and $X_{r-1}$ from the other. Both child counts can be maximized at once.

Dividing by the number of samples gives the limiting rule
$$
 A_0=5/8,\qquad A_r=A_{r-1}B_k,\qquad
 B_k=\max_{0\le p\le1} k\big[p(1-p)^{k-1}+(1-p)p^{k-1}\big].
$$
Indeed the base count at split $a:b$ is $a(a-1)b(b-1)(n-4)/12$, largest at a nearest equal split for $n\ge5$. Suppose the child maximum at size $s$ is $A_{r-1}s^{k-1}/(k-1)!+O_r(s^{k-2})$. Substitution into the count recurrence gives a uniform $O_r(n^{k-1})$ error. Rounding a maximizing $p$ to a multiple of $1/n$ costs at most the same order since the polynomial has bounded derivative at fixed $k$. Induction yields $M_r(n)=A_r n^k/k!+O_r(n^{k-1})$. The fixed-$m$ sampling argument applies with $k$ in place of six. To attain $A_r$, use the maximizing split and repeat the construction for $r-1$ in both children.

There is a unique smaller maximizing share at each depth $r\ge1$. In the odds $t=p/(1-p)$ the derivative has the sign of $D(t)=1-(k-1)t+(k-1)t^{k-2}-t^{k-1}$. Since $D(0)=1$, $D(1)=0$ and $D'(1)=(k-1)(k-4)>0$, there is a root in $(0,1)$. Its reciprocal is a root too, and Descartes' rule of signs permits only three positive roots counting multiplicities. This gives the optimizer used in Table 1. At large $k$, the first term $kp(1-p)^{k-1}$ peaks at $p=1/k$ with value $b_k=(1-1/k)^{k-1}$. On $p\le1/2$ the other term is at most $k2^{1-k}$. Hence $b_k\le B_k\le b_k+k2^{1-k}$: each extra outgroup eventually costs a factor approaching $1/e$. More precisely $A_r\sim C\sqrt r\,e^{-r}$ for some $C>0$, since $\prod_{k\ge6}(B_k/b_k)$ converges and $\log b_k=-1+1/(2k)+O(k^{-2})$.

## The boundary just beyond the endpoint

A tree cannot exceed the endpoint by a small amount while paying a much smaller cost in excluded sextets. The reason is that near the endpoint both sides of the root must contribute targets. This forces a balanced eight-leaf shape to occur with positive frequency. Its leaves then serve as markers: they bound the cost of exceeding the endpoint and identify the limiting shapes of samples at the endpoint.

To quantify this, let $H$ be the eight-leaf shape consisting of two balanced quartets joined at their roots, and let $h=d(H,T)$. In an avoiding tree of size $m$ let $a,b,c,d$ now denote the *fractions* of leaves in the four combs, with $p=a+b$, $q=c+d$ (a missing comb has mass zero). The two orientations of the target have independent-draw probabilities $S=60pq(ab)^2$ and $R=60pq(cd)^2$, from the 1:5 and 5:1 choices. The eight-leaf shape requires exactly two leaves per comb, so $h=2520(abcd)^2+O(1/m)$. Either orientation alone contributes at most $L=(5/8)(5/6)^5$: for instance $S\le (60/16)p^5q$, largest at $p=5/6$. This is strictly less than $A$, since at that split the other orientation adds a positive contribution when both secondary splits are equal. Also $\min(S,R)\le\sqrt{SR}=60pq\,abcd$. Consequently
$$
 x\le L+\frac{15}{\sqrt{2520}}\sqrt h+O(m^{-1/2})
$$
in every avoiding $m$-leaf tree. In any larger tree the same bound holds with an additional $\binom m6 y$: apply it to avoiding $m$-samples, bound $x$ by one on the others, and use concavity to bound the expected square root by $\sqrt h$. Choose $m\ge8$ large enough that the error is below $(A-L)/4$. Then $h$ is bounded below by a fixed $\eta>0$ whenever $x$ is sufficiently close to or above $A$ and $y$ is sufficiently small.

*Marker inequality.* For any limiting densities $x,y,h$ of the target, the exclusion and the balanced eight-leaf shape,
$$
 h(x-A)\le\binom{14}{6}y.
$$

Use eight random leaves as markers and draw six more without replacement. When the markers form $H$, locate the two quartet roots in the host. Their four child branches define four classes of leaves. Build a comparison tree by putting each class in a comb under its designated quartet root and joining the two roots; assign any leaves outside the classes to the first comb. This comparison always avoids the excluded shape. If the joint fourteen-leaf sample avoids it too, the six fresh leaves have the same shape in both trees. Indeed, the quartet roots survive as incomparable forks in the joint sample. Both must be at depth one, so they are the two root children, all sampled leaves lie in their four branches, and those sampled branches are combs. Within a comb the number of selected leaves determines their shape.

Given the markers, the chance of a target in the comparison tree is at most $A+O(1/n)$ for host size $n$; excluding eight marked leaves changes a six-leaf probability by only $O(1/n)$. The chance of disagreement while the markers form $H$ is at most the probability of an excluded sextet among fourteen leaves, at most $\binom{14}6 y$. The joint chance of $H$ and a fresh target in the original tree is $hx+O(1/n)$, by comparison with independent samples. Passing to limits gives the marker inequality (take a subsequence for $h$ if needed).

Since $h\ge\eta$ near the endpoint, the inequality gives $x\le A+Ky$ there with $K=\binom{14}{6}/\eta$. The gap forcing $h$ to be positive is only $A-L\approx0.000408$. It gives a very large bound on $K$; we do not compute it, and the proof gives no useful numerical estimate of the boundary slope. The inequality for $x$ holds throughout the limiting profile after increasing $K$: for $x\le A$ it is automatic, and for $y$ bounded away from zero use $x\le1$.

The same markers identify what is unique about the optimal tree. Along a sequence approaching $(A,0)$, fix any sample size $j$. Conditional on markers forming $H$, the mean probability of disagreement on $i$ fresh leaves is at most $\binom{8+i}{6}y/h$ for $i=j,6$, by the joint-sample argument. The conditional mean of the sum of the two errors tends to zero because $h$ stays bounded below. Some single marker set has a sum no greater than this mean. Each error is nonnegative, so both vanish for that choice, and allowing the fresh sample to hit a marker costs only $O_j(1/n)$. The resulting comparison trees must approach target density $A$. Their four mass fractions lie in a compact simplex, and the split calculation has a unique maximum up to exchanges of siblings. Their masses therefore converge, up to those exchanges, to the fractions in Figure 1. Every fixed-size sample has the same limiting distribution of shapes as in that construction. The literal root can differ: attaching one extra leaf above the whole tree changes the root but leaves every limiting sample probability intact.

To see that a cost proportional to $x-A$ is attainable, attach a new comb of small mass $s$ as a sibling to the entire optimal tree. In the old tree the five-leaf 2:3 shape has density
$$
 f=10p^2q^2+\tfrac58(p^5+q^5)=0.444543\ldots .
$$
The first term counts samples crossing the old root, the second those lying within one side. A target in the enlarged tree either stays in the old tree or takes just its outgroup from the new comb. Thus $x=(1-s)^6 A+6s(1-s)^5 f$, with positive derivative $6(f-A)$ at zero. An excluded sample must likewise take just its first outgroup from the new comb. The old tree must supply a single leaf on one side of its root and a balanced quartet on the other. Four leaves on that side form a quartet with probability $\binom42/2^4=3/8$. Thus $y=6s(1-s)^5g$, where $g=(15/8)(pq^4+qp^4)$. The positive derivative of $x$ gives every sufficiently small excess, and along this construction
$$
 \lim_{s\downarrow0}\frac{y}{x-A}=\frac{g}{f-A}=0.78842\ldots .
$$
This gives an asymptotic upper bound on the minimum cost per unit excess. The marker inequality bounds that cost away from zero; its optimal value remains unknown.

## Computational evidence and methods

We checked the recurrence against direct counts on all unordered rooted binary shapes through 16 leaves. We generated the shapes by joining pairs of smaller shapes and identifying sibling exchanges. Starting from the indicator of each target at its own size $k$, we counted copies in larger trees by summing the counts after each single-leaf deletion and dividing by $n-k$: each copy survives precisely that many deletions. Filtering on zero excluded count and maximizing target count gave the predicted integer in all 78 size–depth comparisons. At 16 leaves and depth one the maximum was 2,940 sextets among 79 avoiding shapes. In all 53 avoiding fourteen-leaf shapes we also restricted literally to each balanced eight-leaf marker set and its complement. All 2,478 complements agreed with the four-class prediction. These are finite checks; the bounds on limiting frequencies follow from sampling and the split argument.

## Reference

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*, Figure 23 and concluding remarks.
