Abstract
Three standard subtree transfer operations for binary trees, used in particular for phylogenetic trees, are: tree bisection and reconnection (TBR), subtree prune and regraft (SPR), and rooted subtree prune and regraft (rSPR). We show that for a pair of leaflabelled binary trees with n leaves, the maximum number of such moves required to transform one into the other is \(n\Theta (\sqrt{n})\), extending a result of Ding, Grünewald, and Humphries, and this holds also if one of the trees is fixed arbitrarily. If the pair is chosen uniformly at random, then the expected number of moves required is \(n\Theta (n^{2/3})\). These results may be phrased in terms of agreement forests: we also give extensions for more than two binary trees.
1 Introduction
A standard way to transform one binary tree into another is by performing ‘subtreepruneandregraft’ (SPR) moves (definitions are given below). These operations are of particular interest for phylogenetic trees. For a pair of binary trees with n labelled leaves, it was shown by Allen and Steel [2] in 2001 that the maximum number of SPR moves required to change one into the other, \(D_{SPR}(n)\), is between \(\frac{n}{2}o(n)\) and \(n3\) (for \(n \ge 3\)). Martin and Thatte [11] show the existence of a common (unrooted) subtree of size \(\Omega \left( \sqrt{\log n}\right) \), which brings the upper bound for \(D_{SPR}(n)\) down to \(n  \Omega \big (\sqrt{ \log n}\big )\).
Ding, Grünewald, and Humphries [6] show that \(D_{SPR}(n)\) is actually \(n\Theta \left( \sqrt{n}\right) \). Our Theorem 1.9 is an extended version of this result for the rooted as well as the unrooted cases. It says also that if one of the trees is fixed arbitrarily and the other is chosen to maximise the number of SPR moves required to turn one into the other, then still \(n\Theta (\sqrt{n})\) moves are required. We prove the last result by showing that for a fixed pair of binary trees, we can label the leaves in such a way that \(n  \Theta (\sqrt{n})\) moves are required to turn one into the other. This result is set in a more general context of agreement forests for sets of \(k \ge 2\) trees.
We also consider the case when two trees are chosen independently, with an exchangeable distribution (for example, the uniform or the Yule–Harding distribution). We show that, if X is the number of moves required to transform one into the other, then \(\mathbb {E}[X] = n\Theta \left( n^{2/3}\right) \) and indeed \(X = n\Theta \big (n^{2/3}\big )\) with high probability; see Corollary 1.11. This implies that the expected size of a largest common (unrooted) subtree of two random trees is \(\mathcal {O}\big (n^{2/3}\big )\), where we measure size by the number of leaves. It is known, see [3] and [5], that this expected size is \(\Omega \big (n^{1/8}\big )\) in the uniform case and \(\Omega \big (n^{0.344}\big )\) in the Yule–Harding case; and it is \(\mathcal {O}\big (n^{1/2}\big )\) in both cases. Our results generalise the upper bound to random sets of \(k \ge 2\) trees with n leaves in the following way. The expected size of a minimum agreement forest of such a random set of k trees is \(n  \Theta \big (n^{2/(k+1)}\big )\), and the expected size of a maximum agreement subtree is \(\mathcal {O}\big (n^{2/(k+1)}\big )\); see Eqs. (5.2) and (5.3).
Subtree transfer operations are subtly different when acting on rooted trees as opposed to unrooted trees. Some papers have considered SPR and rSPR moves as acting on different types of binary trees. We give a unified treatment here, and consider TBR, SPR, and rSPR to be three different classes of moves which act on the same class of trees. We work on the class \(\mathcal {B}(n)\) of unrooted trees defined below, where always one of the leaf labels is 0. The leaf labelled 0 acts as the root of the tree for rootedsubtreepruneandregraft (rSPR) moves, and it behaves in exactly the same manner as the other leaves for SPR and TBR moves.^{Footnote 1}
In the subsections below, we define binary trees, the three subtree transfer operations TBR, SPR, and rSPR, and the corresponding metrics they induce over the class of binary trees, and present our main theorems.
1.1 Binary Trees
Definition 1.1
Let S be a nonempty, finite set. If \(S>1\), then a binary leaflabelled tree with leaflabel set S is a finite tree which has 2 types of vertices:

tree vertices of degree 3, and

leaf vertices of degree 1, labelled with the set S (there is a bijection between the leaves and S).
If \(0 \in S\), the leaf labelled 0 is called the root of the tree. In the trivial case, when \(S = \{ \alpha \}\) is a singleton, the trivial graph containing only one vertex, labelled \(\alpha \), is considered to be a binary leaflabelled tree, and its vertex is called a leaf.
Definition 1.2
For any nonempty set S, let \(\mathcal {B}(S)\) be the set of all binary leaflabelled trees, with label set S. For a leaflabelled tree A, let L(A) denote the label set of A; so if \(A \in \mathcal {B}(S),\) then \(L(A) = S\). To simplify notation, for any positive integer n, let \([n]_0 = \{ 0,\,1,\,2, \ldots ,\,n1 \}\) and let \(\mathcal {B}(n)\) be given by
So, a tree in \(\mathcal {B}(n)\) has n leaves and, for \(n \ge 2\), it has \(n2\) treevertices (giving \(2n2\) vertices in total) and \(2n3\) edges.
For trees T and \(T^\prime \) in \(\mathcal {B}(S)\), we say T is isomorphic to \(T^\prime \) (denoted \(T \equiv T^\prime \)) if there is a graph isomorphism preserving leaf labels; that is, if there is a bijection \(\psi :V(T) \rightarrow V(T^\prime )\) such that uv is an edge in T, if and only if \(\psi (u)\psi (v)\) is an edge in \(T^\prime \), and for each leaf v of T, v and \(\psi (v)\) are labelled with the same element of S. We identify isomorphic trees, as is customary. For nonempty \(S\,^\prime \subseteq L(A)\), let \(A  S\,^\prime \) be the minimal subtree of A that contains all the leaves with labels in \(S\,^\prime \). Let \(A / S\,^\prime \) be the tree formed by suppressing any vertices of degree 2 from \(A  S\,^\prime \). So,
For a given tree \(T \in \mathcal {B}(n)\) and a permutation \(\pi \in S_{n1}\), let \(T^\pi \) denote the tree in \(\mathcal {B}(n)\) obtained from T by using \(\pi \) to permute the nonroot leaf labels.
1.2 Tree Bisection and Reconnection
Definition 1.3
A treebisectionandreconnection (TBR) move on a tree \(T \in \mathcal {B}(n)\), for \(n \ge 3\), is a twostep process:

(1)
(Bisection step) Delete an edge e from T (this edge is called the bisection edge) and then suppress all degree 2 vertices (the edges created by these suppressions are called new edges) to obtain a pair \(T_1,\,T_2\) of binary trees with \(L(T_1) \sqcup L(T_2) = [n]_0\). (The number of new edges is 2, unless the bisection edge was incident with a leaf. In the latter case, there is only one new edge and either \(T_1\) or \(T_2\) is an isolated vertex.)

(2)
(Reconnection step) Connect \(T_1\) and \(T_2\) by creating an edge between the midpoint of an edge in \(T_1\) and the midpoint of an edge in \(T_2\). This edge is called the reconnecting edge. (In the case that \(T_1\) or \(T_2\) is an isolated vertex, the reconnecting edge is incident to this vertex.) See Fig. 1: on the left, the dark vertical edge is the bisection edge, and the diagonal grey edges will form the new edges; and on the right, the dark vertical edge is the reconnection edge, and the horizontal grey edges are the new edges. If \(A \in \mathcal {B}(n)\), and B is the result of performing a TBR on A, then \(B \in \mathcal {B}(n)\) because B must be connected, acyclic, and all nonleaf vertices have degree 3.
Definition 1.4
Let \(\mathcal {TBR}= \mathcal {TBR}(n)\) denote the set of pairs \((A,\,B) \in \mathcal {B}(n)^2\) such that B can be obtained from A by performing a single TBR move.
It is well known that TBR moves are reversible [14]; that is, if B can be obtained from A via a TBR move, then A can be obtained from B via a TBR move. Thus,
1.3 Subtree Prune and Regraft
An SPR move (Definition 1.5) is an operation on binary trees, whereby a subtree is removed from one part of the tree and regrafted to another part of the tree. SPR moves are studied to measure similarity between different trees [2, 4, 10].
Definition 1.5
A subtreepruneandregraft (SPR) move taking xy from ab to cd is an operation which can be performed on a tree \(T \in \mathcal {B}(n)\), as long as \(xy,\,ax,\,xb,\,cd\) are distinct edges (vertices \(a,\,b,\,c,\,d\) need not be distinct, possibly \(a=c\), \(b=c\), \(a=d\), or \(b=d\)) and the path from c to y contains x. An SPR move is a twostep process:

(prune step) delete edges ax, xb and replace them with ab, then

(regraft step) delete edge cd and replace it with cx and xd.
Let \(\mathcal {SPR}= \mathcal {SPR}(n)\) denote the set of pairs \((A,\,B)\) such that \(A \in \mathcal {B}(n)\) and B is the result of an SPR move on A. If the path from 0 to y passes through x, then this is called a rootedsubtreepruneandregraft (rSPR) move. Let \(r\mathcal {SPR}= r\mathcal {SPR}(n)\) denote the set of pairs \((A,\,B) \in \mathcal {SPR}(n)\) such that B is the result of an rSPR move on A.
See Fig. 2. By definition, an rSPR move is a special case of an SPR move. It is not difficult to check that an SPR move is a special case of a TBR move. Informally, an SPR move is a TBR move in which one of \(T_1\) or \(T_2\) is an isolated vertex or one of the end points of the reconnecting edge is the midpoint of one of the new edges. Therefore, any valid SPR move performed on a binary tree in \(\mathcal {B}(n)\) will result in a tree in \(\mathcal {B}(n)\), and moreover:
These inclusions have been noted in many publications [2, 4, 14]. If we think of the edges as being oriented away from the root, then an rSPR move is an SPR move that preserves these orientations. It is also known that SPR moves and rSPR moves are reversible [14]. Thus,
Not all SPR moves can be achieved with a single rSPR move. Indeed, we may need an arbitrary number of rSPR moves to simulate one SPR move [4]. For example, the trees in Fig. 3 differ by a single SPR move by pruning off the single leaf labelled 0, and then regrafting it appropriately. In Example 2.3, we will show that at least \(\frac{n3}{2}\) rSPR moves are required to transform one into the other.
The following lemma appears as [2, Lemma 2.7 (2b)].
Lemma 1.6
[2]. Any TBR move can be achieved using at most 2 SPRs; that is, if \((A,\,B) \in \mathcal {TBR}\), then there exists some C such that \((A,\,C),\,(C,\,B) \in \mathcal {SPR}\).
1.4 Tree Metrics
The SPR distance (Definition 1.7) has been the subject of several publications, for example, [2, 8]. The problem of determining the rSPR distance between a pair of trees was shown to be NPhard by Bordewich and Semple [4] in 2005. We shall see later, that all of the values in the following definition are finite.
Definition 1.7
Let \(n \ge 2\) be a fixed integer. For \(A,\,B \in \mathcal {B}(n)\) and any subtree transfer operation \(\chi \in \{ TBR ,\, SPR ,\, rSPR \}\), define the \(\chi \)distance between A and B\(\big (\)denoted \(d_\chi (A,\,B)\)\(\big )\), to be the minimum number of \(\chi \) moves required to change A into B. Let \(D_\chi (n)\) denote the \(\chi \)diameter of the class \(\mathcal {B}(n)\),
and moreover, let \(R_\chi (n)\) denote the \(\chi \)radius of the class \(\mathcal {B}(n)\),
The following is an immediate consequence of \(r\mathcal {SPR}\subseteq \mathcal {SPR}\subseteq \mathcal {TBR}\).
Proposition 1.8
For any \(\chi \in \{ TBR,\,SPR,\,rSPR \}\), and any integer \(n>1\), we have \(D_{\chi }(n) \ge R_{\chi }(n)\). Moreover,
1.5 Main Theorems
We give both the worstcase and the averagecase results on numbers of moves needed by each of the three subtree transfer operations, starting with the worstcase results. The values of the radius and diameter for \(n \le 9\) are given in Fig. 4. The asymptotic values of the radius and diameter are given in the following theorem.
Theorem 1.9
For each \(\chi \in \{ TBR,\,SPR,\,rSPR \}\), both \(D_\chi (n)\) and \(R_\chi (n)\) are \(n\Theta (\sqrt{n})\).
By Proposition 1.8, to prove Theorem 1.9, it suffices to give an upper bound for the rSPR diameter and a lower bound for the TBR radius, both of the form \(n\Theta (\sqrt{n})\). These bounds are given explicitly in the inequalities (2.2) and (4.3), respectively. One of the results contained within Theorem 1.9 is that \(D_{TBR}(n) = n  \Theta (\sqrt{n})\). This result is not new: it was shown recently in [6], where the proof uses a similar approach to ours, based on agreement forests. As well as considering other types of move, concerning TBR moves we see here also that \(R_{TBR}(n) = n  \Theta (\sqrt{n})\) and we generalise agreement forest results to arbitrary sets of trees.
Next, let us consider distances between random trees. The fundamental random distance to consider is that between one fixed tree and a second fixed tree with its leaves randomly relabelled. We shall see that the expected distance is \(n\Theta \big (n^{2/3}\big )\), and the same estimate holds with high probability for random distances. Recall that \(T^\pi \) denotes the tree obtained from T by using \(\pi \) to permute the nonroot leaf labels.
Theorem 1.10
Let \(\chi \in \{ TBR,\,SPR,\,rSPR \}\) be fixed. There exist constants \(c_1>c_2>0\) and \(c_3>0\) such that the following holds. Let \(n \ge 3\) be an integer, let \(T_1\) and \(T_2\) be trees in \(\mathcal {B}(n)\), and let the random permutation \(\pi \) be uniformly distributed over \(S_{n1}\). Then
and further
Again by Proposition 1.8, we will prove the statement (1.1) by demonstrating that the expected rSPR distance is at most \(n  \Omega \big (n^{2/3}\big )\) and the expected TBR distance is at least \(n\mathcal {O}\big (n^{2/3}\big )\); see the inequalities (3.3) and (5.1). The statement (1.2) will be proved from (1.1) and a lemma on concentration around the mean. In fact, since \(0 \le d_{\chi }(A,\,B) \le n\), the second statement (1.2) easily implies the first (1.1) (with \(c_1\) and \(c_2\) replaced by \(2c_1\) and \(\tfrac{1}{2} c_2\), respectively).
Define an equivalence relation \(\sim \) on \(\mathcal {B}(n)\) by setting \(T_1 \sim T_2\) when \(T_1=T_2^{\sigma }\) for some permutation \(\sigma \in S_{n1}\). A random tree T in \(\mathcal {B}(n)\) has an exchangeable distribution [1] if \(\mathbb {P}(T=T_1)=\mathbb {P}(T=T_2)\) whenever \(T_1 \sim T_2\). Exchangeability is also known as leafinvariance [13]. The uniform distribution and the Yule–Harding distribution [15] are both examples of exchangeable distributions. We shall deduce the following corollary quickly from Theorem 1.10. It shows in particular that
Corollary 1.11
Let \(\chi \in \{ TBR,\,SPR,\,rSPR \}\) be fixed. There exist constants \(c_1>c_2>0\) and \(c_3>0\) such that the following holds. Let \(n \ge 3\) be an integer, and let the random trees A and B in \(\mathcal {B}(n)\) be sampled independently, where B has an exchangeable distribution (and A may have any distribution). Then,
and further
The rest of this paper is devoted to proving the above results, or amplified versions of them.
2 Upper Bound for the rSPR Diameter
The upper bound in Theorem 1.9 is proved in this section using rooted agreement forests. The definition of a rooted agreement forest given here is equivalent to that used by Bordewich and Semple [4].
Definition 2.1
Let \(\mathcal {A}\subseteq \mathcal {B}(n)\) be a set of \(k \ge 2\) trees. A rooted agreement forest of \(\mathcal {A}\) is a partition \(L_1,\,L_2, \ldots ,\, L_m\) of the leaflabel set \([n]_0 = \{ 0,\,1,\,2, \ldots ,\,n1 \}\), such that for all A, B in \(\mathcal {A}\):

the subtrees \(AL_1,\, AL_2, \ldots ,\, AL_m\) are pairwise disjoint, and

\(A/(L_j \cup \{ 0 \}) \equiv B/(L_j \cup \{ 0 \})\) for \(j = 1,\,2, \ldots ,\,m\).
Let \(M_{\text {r}}(\mathcal {A})\) be the minimal possible value of m, the minimal number of parts in a rooted agreement forest of \(\mathcal {A}\). When \(k=2\), we write \(M_{\text {r}}(A,\,B)\) for \(M_{\text {r}}(\{ A,\,B \})\).
If \(L_j {\setminus } \{0\} \le 2\) for each j, then the ‘isomorphism’ condition above must be satisfied, though not necessarily the ‘disjointness’ condition. We can always construct a trivial rooted agreement forest with \(n2\) parts (when \(n \ge 3\)) by setting \(L_1 = \{ 0 ,\, 1 ,\, 2 \}\) and \(L_{i1} = \{ i \}\) for \(i = 3,\,4,\,5, \ldots ,\,n1\): thus, we always have \(M_{\text {r}}(\mathcal {A}) \le n2\). Three minimal agreement forests are depicted in Fig. 5.
The following result is proved by Bordewich and Semple [4], built on the work of Hein et al. [9].
Lemma 2.2
(Rooted Agreement Forest Lemma). If A and B are any two trees in \(\mathcal {B}(n)\), then
The rSPR distance between a pair of binary trees is often used as a measure of the discrepancy between them. So \(M_{\text {r}}(\mathcal {A})\) can be seen as generalisation of this notion from pairs of trees to arbitrary sets of trees.
Example 2.3
Let A and B be the two caterpillar trees in Fig. 3 (with A on the right), which differ only by a single SPR move changing the location of the root. The other leaves in A are ordered in the usual (\(1,\,2,\,3, \ldots ,\,n1\)) order from the root, while in B they are in the reverse order. Notice that \(A/\{ 0,\,a,\,b,\,c \}\) is never isomorphic to \(B/\{ 0,\,a,\,b,\,c \}\) because the leaf nearest to 0 in \(A/\{ 0,\,a,\,b,\,c \}\) is the smallest of \(\{ a,\,b,\,c \},\) while the leaf nearest to 0 in \(B/\{ 0,\,a,\,b,\,c \}\) is the largest. Therefore if \(\{ L_1,\,L_2, \ldots ,\,L_m\}\) is a rooted agreement forest for \(\{ A,\,B \}\), with \(0 \in L_1\), then \(L_1 \le 3\) and \(L_i \le 2\) for all \(i>1\). So, \(n \le 3+2(m1)\) and therefore \(m \ge \frac{n1}{2}\). By the rooted agreement forest lemma (Lemma 2.2), this means \(d_{{\text {r}}SPR}(A,\,B) \ge \frac{n3}{2}\) and so
The next two lemmas (Lemmas 2.4, 2.5) are used in the proof of Theorem 1.9 and the proof of (1.1) in Theorem 1.10. Essentially, the lemmas demonstrate that any binary tree can be divided into disjoint subtrees, each having roughly the same number of leaves.
Lemma 2.4
For an integer \(n \ge 2\), let \(S=n\), let \(T \in \mathcal {B}(S)\) be a binary tree with root \(0 \in S\), and let a be a real number with \(1 < a \le 2(n1)\). It is possible to remove a single edge from T, so that the number of leaves in the component not containing the root is in the interval \(\left[ \tfrac{a}{2} ,\, a \right) \).
Proof
For each vertex \(x \in T\), let g(x) be the set of leaves y such that x is on the path between the root and y. For every nonleaf vertex p, there is a natural partition of g(p), namely,
where \(c_1,\,c_2 \in \Gamma (p)\) are the neighbours of p which are not on the path from p to the root. Moreover, if v is a leaf then \(g(v)=1\) (unless v is the root, in which case \(g(v)=S\)). Therefore, for each tree node \(v_i\), there exists a neighbour \(v_{i+1}\) such that
Now, construct a path \((v_0,\,v_1, \ldots ,\,v_m)\), such that \(v_0\) is the root, \(v_1\) is the neighbour of the root and Eq. (2.1) holds for each \(i=1,\,2, \ldots ,\,m1\). This terminates when \(v_m\) is a leaf. So the sequence \(g(v_i)\) decreases from
and never decreases by a factor less than \(\frac{1}{2}\) in a single step. Hence, there must be some \(1 \le j \le m\) such that
If edge \(v_{j1}v_j\) is deleted, then \(g(v_j)\) is precisely the set of leaves in the component containing \(v_j\). \(\square \)
Lemma 2.5 is a direct consequence of Lemma 2.4.
Lemma 2.5
For an integer \(n \ge 2\), let \(T \in \mathcal {B}(n)\) and let \(a>1\). It is possible to find disjoint subtrees of T, such that: each leaf lies in a subtree, each subtree contains less than a leaves and every subtree that does not contain the root contains at least \(\frac{a}{2}\) leaves.
Proof
The case \(a>n\) is trivial. If \(n \ge a\), then we can use Lemma 2.4 iteratively to prune off subtrees with less than a\(\big (\)but at least \(\frac{a}{2}\)\(\big )\) leaves until the remaining tree has less than a leaves left \(\big (\)this remainder might have less than \(\frac{a}{2}\) leaves\(\big )\). This final remaining tree contains the root. \(\square \)
The following lemma is the crux of this section. In the proof, for any set of k binary trees, we find a large set of pairs of labels such that the paths between each pair are disjoint in each of the k trees. The rooted agreement forest which we construct in the proof contains only parts of size 1 or 2.
Lemma 2.6
For \(k \ge 2\), and any set \(\mathcal {A}= \{ A_1,\,A_2, \ldots ,\,A_k \}\) of trees in \(\mathcal {B}(n)\) where \(n \ge 3\),
Proof
Since \(M_{\text {r}}(\mathcal {A}) \le n2\) for \(n \ge 3\), we may assume, without loss of generality, that \(n \ge k+1\). With foresight, we define \(t = \big \lfloor \big ( \tfrac{n}{k+1} \big )^{1/k} \big \rfloor \). Divide each tree \(A_i\) into t (possibly empty) disjoint connected parts,
such that each part contains less than \(\frac{2n}{t}\) leaves. This is possible by letting \(a = \frac{2n}{t}\) in Lemma 2.5. Now, let us define a token to be a map \(\tau :[k] \rightarrow [t]\). Thus, a token specifies a part for each tree \(A_i\). For any token \(\tau \), define
For each label x, let \(\tau _x\) be the token where, for each \(i \in [k]\), we set \(\tau _x(i)= j\) when \(x \in L(A_{i,\,j})\). Observe that \(\tau _x\) is the unique token \(\tau \) such that \(x \in I(\tau )\). Thus, the nonempty sets \(I(\tau )\) partition the label set \([n]_0\). We say that the token \(\tau \) is nice if \(I(\tau ) \ge 2\), and we say a pair \(\tau ,\,\tau ^\prime \) are friendly if \(\tau (i) \not = \tau ^\prime (i)\) for all i. Now, if F is a set of pairwise friendly, nice tokens, then we can construct an agreement forest of \(nF\) parts in the following manner:

for each \(\tau \in F\), construct a part of size 2 using labels in \(I(\tau )\),

all other labels are put in their own part of size 1.
In each tree in \(\mathcal {A}\), the paths between labels in each part of this partition must be disjoint because the tokens are friendly. Hence, this is a valid agreement forest. So for any such set F, we have \(M_{\text {r}}(\mathcal {A}) \le nF\). Now, let F be any maximal set of friendly nice tokens (i.e. every nice token that is not in F is unfriendly with a token in F). If the label x is not in \(U(\tau )\) for any \(\tau \in F\), then the token \(\tau _x\) is not friendly with any \(\tau \in F\); and so by the maximality of F, \(\tau _x\) must not be nice \(\big (\)so \(I(\tau _x)=\{x\}\big )\). Thus for each label \(x \in [n]_0\) either \(x \in I(\sigma )\) for some notnice token \(\sigma \), or \(x \in U(\tau )\) for some \(\tau \in F\). So, let us count: there are

n labels in total,

at most \(t^k\) notnice tokens \(\sigma \), each with at most 1 label in \(I(\sigma )\), and

less than ka labels in \(U(\tau )\) for each token \(\tau \in F\).
Now, \(F \ne \emptyset \) since \(t^k<n\), so \(t^k + kaF > n\). Substituting the value of t, we obtain
Since the above inequality is strict and \(t,\,k\) are both integers, we can tighten the bound to:
Finally, since \(M_{\text {r}}(\mathcal {A}) \le nF\), we obtain the required inequality. \(\square \)
Set \(k=2\) in Lemma 2.6 and then apply the rooted agreement forest lemma (Lemma 2.2). We obtain
for each \(n \ge 2\), which is a suitable upper bound in Theorem 1.9.
3 Upper Bound for the Expectation
In this section, we prove the upper bound in statement (1.1) of Theorem 1.10. The main step is provided by the following lemma.
Lemma 3.1
Let \(k \ge 2\) be a fixed integer, and let \(\mathcal {T}\) be an arbitrary set of k trees in \(\mathcal {B}(n)\) (where \(n \ge 3\)). Let \(\mathcal {A}\) be obtained by performing a random permutation of the nonroot leaf labels of each \(T \in \mathcal {T}\), where the k permutations are chosen independently and uniformly from \(S_{n1}\). Then,
as \(n \rightarrow \infty \).
Proof
Since \(M_{\text {r}}(\mathcal {A}) \le n2\) when \(n \ge 3\), we may assume, without loss of generality, that n is sufficiently large where needed. Set \(b = \big \lfloor \big ( \frac{n^{k1}}{k} \big )^{1/(k+1)}\!\big \rfloor \) and note that \(b \ge 1\); and set \(s = \left\lfloor \frac{n}{2b} \right\rfloor \). For each \(T \in \mathcal {T}\), let \(T_1,\, T_2, \ldots ,\,T_s\) be disjoint subtrees of T such that the number of leaves in each \(T_i\) is exactly b and none of them contain the root. This is possible by Lemma 2.5 (with \(a=2b\)) and taking subtrees as necessary. Let \(A \in \mathcal {A}\) be the tree obtained by the random labelling of T, and let \(A_1,\,A_2, \ldots ,\,A_s\) be the subtrees of A corresponding to \(T_1,\,T_2, \ldots ,\,T_s\), respectively.
Let \(x_1, \ldots ,\,x_j\) be distinct nonroot labels (i.e. distinct elements of \(\{1,\ldots ,\,n1\}\)). Call the set \(\{ x_1, \ldots ,\,x_j \}\)good if for each \(A \in \mathcal {A}\), the leaves labelled \(x_1, \ldots ,\,x_j\) all lie in the same subtree \(A_i\) of A. We are most interested in good pairs, when \(j=2\). Observe that if \(\{x_1,\,x_2\}\) and \(\{x_1,\,x_3\}\) are good pairs, then the set \(\{x_1,\,x_2,\,x_3\}\) is good. For each \(A \in \mathcal {A}\), we say that a good pair \(\{ x_1,\,x_2 \}\) is spoiled inA if there is another good pair in the same subtree \(A_i\) of A as \(x_1\) and \(x_2\). We say that a good pair \(\{ x_1,\,x_2 \}\) is spoiled if it is spoiled in A for some \(A \in \mathcal {A}\). Note that a good pair \(\{x_1,\,x_2\}\) might be spoiled by a good pair \(\{x_1,\,x_3\}\) (with \(x_2 \not = x_3\)) or by a disjoint good pair \(\{ x_3,\,x_4 \}\). In the first case, we say that \(\{x_1,\,x_2\}\) is triply spoiled, and in the second case we say that it is disjointly spoiled. We call a pair super if it is good and not spoiled.
For distinct nonroot labels \(x_1\) and \(x_2\), we have
because for any \(A \in \mathcal {A}\) the probability that \(x_1 \in \bigcup _{i=1}^s L(A_i)\) is \(\frac{sb}{n1}\), and given that \(x_1 \in L(A_i)\) the probability that \(x_2 \in L(A_i)\) is \(\frac{b1}{n2}\). Similarly, if \(x_1\), \(x_2\), and \(x_3\) are distinct nonroot labels, we have
because the probability that \(\{ x_1,\,x_2\} \subseteq L(A_i)\) for some i is \(\frac{sb}{n1} \times \frac{b1}{n2}\), and given that \(\{ x_1,\,x_2 \} \subseteq L(A_i)\) the probability that \(x_3 \in L(A_i)\) is \(\frac{b2}{n3}\). Observe that \(\frac{b}{n} \le \frac{2}{3}\) for n sufficiently large, and then \(\frac{b2}{n3} \le \frac{b}{n}\).
Let \(x_1\) and \(x_2\) be distinct nonroot labels. Let \(\mathcal {B}\) be the collection of subsets of \(\{1,\ldots ,\,n1\}\) of size b which contain \(\{x_1,\,x_2\}\). For each \(A \in \mathcal {A}\) and \(B \in \mathcal {B}\), let \(E_{A,\,B}\) be the event that one of the subtrees \(A_i\) of A has \(L(A_i)=B\). We shall need to condition on these events to control dependence.
Now, let \(A \in \mathcal {A}\) and \(B \in \mathcal {B}\). Arguing as for (3.1) we may see that
Let \(x_3\) and \(x_4\) be distinct elements of \(B {\setminus } \{x_1,\,x_2\}\). Condition on \(E_{A,\,B}\) and on \(\{x_1,\,x_2\}\) being good. Then, for each \(A^\prime \ne A\) in \(\mathcal {A}\), the probability that \(x_3 \in \bigcup _{j=1}^s L\big (A_j^\prime \big )\) is \(\frac{sb2}{n3}\) and given that \(x_3 \in L\big (A_j^\prime \big )\), the probability that \(x_4 \in L\big (A_j^\prime \big )\) is at most \(\frac{b1}{n4}\). Therefore,
(for sufficiently large n). Hence, using a union bound,
by (3.1) and using \(\sum _{B \in \mathcal {B}} \mathbb {P}(E_{A,\,B}) = \frac{sb}{n1} \times \frac{b1}{n2}\). The sum above involving \(x_3,\,x_4\) is over unordered pairs (Figs. 6, 7).
Similarly, we may see that for each \(x_3 \in B\backslash \{x_1,\,x_2\},\)
and
Since \(\left( {\begin{array}{c}b2\\ 2\end{array}}\right) +(b2)= \left( {\begin{array}{c}b1\\ 2\end{array}}\right) \), using a union bound, we see that
But by our choice of b,
and so
Therefore, if S is the random number of super pairs, then
Now, let us partition the labels such that each super pair forms a part of size two (super pairs are disjoint by definition, see Fig. 8) and all other labels are in individual parts. To prove that this partition is a valid agreement forest, it suffices to show that for any distinct super pairs \({\varvec{x}}\) and \({\varvec{y}}\), and each \(A \in \mathcal {A}\), the paths \(A{\varvec{x}}\) and \(A{\varvec{y}}\) are disjoint. However, \(A{\varvec{x}}\) is contained within subtree \(A_i\) and \(A{\varvec{y}}\) is contained within subtree \(A_j\) for some \(i \not = j\); and since \(A_i\) and \(A_j\) are disjoint, the partition must be a valid rooted agreement forest. It has \(nS\) components, so \(M_{\text {r}}(\mathcal {A}) \le nS\) and hence
as required. \(\square \)
We shall deduce the required upper bound in statement (1.1) in Theorem 1.10 from Lemma 3.1. Initially, we phrase the argument generally, so we can reuse it later in the proof of the lower bound (Figs. 9, 10).
Fix \(\chi \in \{ r\mathcal {SPR},\, \mathcal {SPR},\, \mathcal {TBR}\}\). Let \(T_1,\,T_2 \in \mathcal {B}(n)\), and let \(\pi _1,\,\pi _2\) be independently and uniformly distributed over \(S_{n1}\). If we apply the same permutation \(\sigma \) to the nonroot leaf labels of two trees, then the \(\chi \)distance remains unchanged. Taking \(\sigma \) as \(\pi _1^{1},\) we see that
where \(\pi =\pi _2 \circ \pi _1^{1}\) (with \(\pi _2\) acting first). Further, \(\pi \) is uniformly distributed over \(S_{n1}\). To see this, let \(\tau \in S_{n1}\) be fixed. Then by conditioning on \(\pi _1\), using the independence of \(\pi _1\) and \(\pi _2\), and then the uniformity of \(\pi _2\), we find that
so indeed \(\pi \) is uniformly distributed over \(S_{n1}\).
By Lemma 3.1 with \(k=2\) and the rooted agreement forest lemma (Lemma 2.2), we obtain
But by (3.2) above,
where \(\pi \) is uniformly distributed over \(S_{n1}\); and so we have
which proves the upper bound in statement (1.1) of Theorem 1.10.
4 Lower Bound for the Radius
The lower bound in Theorem 1.9 is established in Lemma 4.5 at the end of this section. The proofs in this section use a notion similar to the rooted agreement forest from the previous section; Definition 4.1 and Lemma 4.2 below correspond, respectively, to Definition 2.1 and Lemma 2.2, for TBRs instead of rSPRs.
Definition 4.1
Let \(\mathcal {A}\subset \mathcal {B}(n)\) be a set of \(k \ge 2\) trees. An unrooted agreement forest of \(\mathcal {A}\) is a partition \(L_1, \ldots ,\, L_m\) of the label set \([n]_0 = \{ 0,\,1,\,2, \ldots ,\,n1 \}\), such that for all \(A,\,B \in \mathcal {A}\):

The subtrees \(AL_1,\, AL_2, \ldots ,\, AL_m\) are pairwise disjoint, and

\(A/L_j \equiv B/L_j\) for \(j = 1, \ldots ,\, m\).
Let \(M_u(\mathcal {A})\) be the minimal possible value for m, the minimal number of parts in an unrooted agreement forest of \(\mathcal {A}\) . When \(k=2\), we write \(M_u(A,\,B)\) for \(M_u(\{ A,\,B \})\).
Any rooted agreement forest is also an unrooted agreement forest, so we always have \(M_u(\mathcal {A}) \le M_{\text {r}}(\mathcal {A})\). The next result (the Unrooted Agreement Forest Lemma) appears in [2].
Lemma 4.2
(Unrooted Agreement Forest Lemma). If A and B are any two trees in \(\mathcal {B}(n)\), then,
We now present two preliminary lemmas, which we shall use in the proof of the main result of this section, Lemma 4.5. The first shows that by choosing k permutations, we may ensure that each pair of labels is spread well apart by at least one of the permutations.
Lemma 4.3
Let n, b, and k be integers such that \(b,\, k \ge 2\) and \(n \ge b^k\). Then there exist k permutations \(\{ \phi _j :[n]_0 \rightarrow [n]_0 \}_{j=1}^k\) such that for any distinct \(x,\,y \in [n]_0\),
Note that (4.1) gives \( \max _i \, \phi _i(x)\phi _i(y) \ge b\) when \(k=2\), and \(\max _i  \phi _i(x) \phi _i(y)\ge b^21\) when \(k=3\).
Proof
We may represent each \(x \in [n]_0\) uniquely by a ktuple \((x_1,\,x_2, \ldots ,\,x_k)\) of nonnegative integers such that

\(x = x_1b^{k1} + x_2b^{k2} + \cdots + x_k\), and

\(0 \le x_i < b\) for all \(1 < i \le k\).
If \(x < b^k\), then this exactly represents x in base b. For larger x, we allow the coefficient of \(b^{k1}\) to exceed \(b1\). Let \(\phi _1\) be the identity permutation, and for each \(2 \le i \le k\) define \(\phi _i\) so that
See Table 1 and Fig. 11 for illustrations. Given \(x,\, y \in [n]_0\), let \(d_i = x_i  y_i\) for each i. Now, let \(2 \le i \le k\) and suppose that \(\phi _i(x)>\phi _i(y)\) (so \(d_i \le 0\)). We claim that
We may establish this claim as follows. Define the function \(f_i\) on \([n]_0\) by setting
Thus, the claim (4.2) says that
Suppose first that \(d_i=0\), and say \(x_i=y_i =t\). Let \(S=\{z \in [n]_0 :z_i = t \}\). Restricted to S, \(f_i\) is a monotonic bijection onto the interval of integers \(\{0,\,1,\ldots ,\, S1\}\). Thus,
Now, suppose that \(x_i< y_i\). Let \(A_t= \{ z \in [n]_0:\phi _i(x) > \phi _i(z) \ge \phi _i(y) \text{ and } z_i=t \}\) and let \(a_t=A_t\). Thus, \(\phi _i(x)  \phi _i(y) = \sum _{t=x_i}^{y_i} a_t\). For any integer t with \(x_i+1 \le t \le y_i1\) we have \(a_t \ge b^{k1}\)\(\big (\)with equality if \(n=b^k\big )\), so the total contribution from such t is at least \((y_ix_i1)b^{k1}\). Now consider \(t=x_i\). Each \(z \in A_{x_i}\) satisfies \(\phi _i(z)>\phi _i(y)\), so \(A_{x_i}= \{ z \in [n]_0:\phi _i(x) > \phi _i(z) \text{ and } z_i=x_i \}\); and thus \(a_{x_i} = f_i(x)\). Finally, consider \(t=y_i\). Each \(z \in A_{y_i}\) satisfies \(\phi _i(z)<\phi _i(x)\), so \(A_{y_i}= \{ z \in [n]_0:\phi _i(z) \ge \phi _i(y) \text{ and } z_i=y_i\}\), and thus \(a_{y_i} = f_i(n\!\!1)  f_i(y)+1\). Thus,
\(\big (\)with equality if \(n=b^k\big )\). Now suppose that \(n=b^k\). Then, \(f_i(n1)+1=b^{k1}\) and we have
so (4.2) holds with equality. But \(f_i\) is an increasing function, so (4.2) holds for all \(n \ge b^k\), as required to establish the claim.
Now, we can prove the inequality (4.1). Fix distinct \(x,\,y \in [n]_0\). Suppose first that \(x_i  y_i > 1\) for some \(i \in \{1,\ldots ,\,k\}\). All \(z \in [n]_0\) such that \(z_i= \min \{x_i,\,y_i\}+1\) must have \(\phi _i(z)\) strictly between \(\phi _i(x)\) and \(\phi _i(y)\). But there are at least \(b^{k1}\) such values z, so (4.1) holds.
Thus, we may assume from now on that \(x_i  y_i \le 1\) for each i. Also, we may assume, without loss of generality, that \(x_1 \ge y_1\). We now treat three cases separately:

(1)
\(x_1=y_1\).

(2)
\(x_1=y_1+1\) and \(x_i \ge y_i\) for all i.

(3)
\(x_1=y_1+1\) and \(x_i<y_i\) for some \(i \ge 2\).

Case 1. We may assume, without loss of generality that \(x < y\). Then there is an \(i \ge 2\) such that \(d_i =1\) and \(d_j=0\) for each \(1 \le j <i\). Substituting this into Eq. (4.2) yields
$$\begin{aligned} \phi _i(x)\phi _i(y) \; \ge \; b^{k1}  \sum _{j=0}^{ki1} b^j \; \ge \; b^{k1}  \sum _{j=0}^{k3} b^j \; > \; b^{k1}  2 b^{k3}. \end{aligned}$$ 
Case 2. Since \(d_1=1\) and \(d_j \ge 0\) for all j, we have \(\phi _1(x)  \phi _1(y) = xy \ge b^{k1}\).

Case 3. We have \(d_1=1\), and there is some \(i \ge 2\) such that \(d_i=1\) and \(d_j \ge 0\) for all \(j<i\). Substituting this into Eq. (4.2) yields
$$\begin{aligned} \phi _i(x)\phi _i(y) \; \ge \; b^{k1} + b^{k2}  \sum _{j=0}^{k3} b^j \; > \; b^{k1}. \end{aligned}$$
Thus the inequality (4.1) holds in each case, which completes the proof of the lemma. \(\square \)
The second preliminary lemma gives a property of a set \(\mathcal {A}\) of trees which ensures that \(M_u(\mathcal {A})\) is large. It will be used in the proofs of both Lemmas 4.5 and 5.1.
Lemma 4.4
Let n, k, and t be positive integers, and let \(\mathcal {A}\subseteq \mathcal {B}(n)\) be a set of k trees. For each \(A \in \mathcal {A}\), let \(A = A_1 \sqcup A_2 \sqcup A_3 \sqcup \cdots \) be a partition of the vertices of A into at most t connected parts. Let \(z \ge 0\), and suppose that for all but at most z pairs of distinct labels \(x,\,y \in [n]_0\) there is at least one \(A \in \mathcal {A}\) such that the leaves labelled with x and y are in different parts of A. Then,
Proof
Let \(\{ L_1,\,L_2, \ldots ,\,L_m \}\) be an unrooted agreement forest of \(\mathcal {A}\). Let \(\tilde{A}\) be a tree in \(\mathcal {A}\), and let \(F = \tilde{A}/L_1 \sqcup \tilde{A}/L_2 \sqcup \cdots \sqcup \tilde{A}/L_m\) be the corresponding forest with leaves labelled by \([n]_0\) (by Definition 4.1 it will not matter which tree in \(\mathcal {A}\) we choose). Each tree \(A \in \mathcal {A}\) can be divided into the given forest \( A = A_1 \sqcup A_2 \sqcup A_3 \sqcup \cdots \) by deleting at most \(t1\) edges. Let these edges be called hot edges. There is a total of at most \(k(t1)\) hot edges (at most \(t1\) in each \(A \in \mathcal {A}\)). An edge in A might not correspond to any edge in F, moreover there may be several edges that correspond to the same edge in F. In any case, each edge corresponds to at most one edge in F; and in particular this holds for hot edges. Now form the forest \(F'\) by deleting from F all the edges in F corresponding to hot edges. Then we have deleted at most \(k(t1)\) edges (Fig. 12).
Consider two distinct leaves, labelled x and y, which are in the same component of \(F'\). The unique path in \(F'\) between these leaves must be contained in \(\tilde{A}/L_j\) for some j. Since no edge corresponding to a hot edge was deleted from this path, the leaves labelled x and y must be in the same component of each tree \(A \in \mathcal {A}\). Thus, the number p of pairs of distinct leaves which are in the same component of \(F'\) satisfies \(p \le z\). Suppose that \(F'\) has j components, and pick a leaf in each component. The remaining \(nj\) leaves each contribute at least 1 to p, so \(p \ge nj\) and \(j \ge np \ge n  z\); that is, \(F'\) has at least \(nz\) components. Therefore, F must have had \(m \ge nzk(t1)\) components. \(\square \)
Lemma 4.5
Let \(k \ge 2\) and \(n \ge (3k)^k\) be integers. If \(\mathcal {T}= \{ T_1,\,T_2, \ldots ,\,T_k \}\) is a set of binary trees with n leaves, then there exists \(\mathcal {A}= \{ A_1,\,A_2, \ldots ,\,A_k \} \subseteq \mathcal {B}(n)\) such that \(A_i\) is obtained by labelling the leaves of \(T_i\) (for each i), and
Proof
First set
Then, divide each tree \(T_i\) into at most t connected parts, \(T_i = T_{i\,1} \sqcup T_{i\,2} \sqcup T_{i\,3} \sqcup \cdots \) (using Lemma 2.5) so each part contains less than a leaves. We shall label the leaves of each \(T_i\) in such a way that, for each pair of distinct labels, there is some i such that the leaves with these labels are in different parts of \(T_i\), and then apply Lemma 4.4 (with \(z=0\)).
Since \(n \ge b^k\), by Lemma 4.3, we can find k permutations \(\phi _1,\ldots ,\, \phi _k\) of \([n]_0\) such that for any two distinct labels \(x,\,y \in [n]_0\) there is some \(1 \le i \le k\) such that \(\phi _i(x)\phi _i(y) \ge a\). For each tree \(T_i\), assign labels to the leaves of \(T_i\) in the order given by \(\phi _i\), firstly to all the leaves of \(T_{i\,1}\), then \(T_{i\,2}\), then \(T_{i\,3}\), and so on. For any distinct labels x and y, consider a permutation \(\phi _i\) in which \(\phi _i(x)\phi _i(y) \ge a\). If in the tree \(T_i\) some \(T_{ij}\) contained both x and y, then it would also have to contain all the labels z with \(\phi _i(z)\) between \(\phi _i(x)\) and \(\phi _i(y)\): but this is impossible since each \(T_{ij}\) has less than a leaves. Thus by Lemma 4.4,
For constant k, one can easily observe that \(t \sim 2 n^{1/k}\) as \(n \rightarrow \infty \). For an explicit bound \(\big (\)using \(n \ge (3k)^k\big )\), we can show that \(t < 3n^{1/k} + 1\), in the following manner. Observe that \(b = \left\lfloor n^{1/k} \right\rfloor \) satisfies \(b \ge 3k\) and
Thus,
where the last inequality holds since
Hence, by the definition of t,
Finally, we have
as required. \(\square \)
If \(\mathcal {A}\,^\prime = \left\{ A_1^\prime , \ldots ,\,A_k^\prime \right\} \) is obtained from \(\mathcal {A}\) by a single permutation \(\pi \) of the labels (i.e. the leaf labelled x in \(A_i\) is labelled \(\pi (x)\) in \(A_i^\prime \) for all \(x \in [n]_0\) and all \(i \in [k]\)), then \(M_u(\mathcal {A}\,^\prime ) = M_u(\mathcal {A})\). Therefore, in the above lemma, we could have constructed \(\mathcal {A}\) so that one of the trees has a particular labelling, say \(A_1\). Now if we set \(k=2\) and apply the unrooted agreement forest lemma (Lemma 4.2), then we find
for all integers \(n \ge 36\), and the result is trivially true for \(n<36\) since the right hand side is negative. This is a suitable lower bound for Theorem 1.9.
When \(k\ge 2\) is fixed and \(n \rightarrow \infty \), Lemmas 2.6 and 4.5 show that the maximum value of \(M(\mathcal {A})\) over any set \(\mathcal {A}\) of k trees in \(\mathcal {B}(n)\) is \(n  \Theta (n^{1/k})\), and the same holds for \(M_{\text {r}}(\mathcal {A})\).
We close this section by looking briefly at the general tool Lemma 4.3, again with \(k\ge 2\) fixed and \(n \rightarrow \infty \). The lemma shows that with k permutations, we can ensure a ‘spread’ of at least \((1+o(1))\, n^{(k1)/k}\). (Here “spread” refers to the value \(\max _i \phi _i (x) \phi _i(y)\).) Let us show that this bound cannot be much improved. Consider first \(k=2\). We may assume, without loss of generality, that \(\phi _1\) is the identity. Suppose that \(\max _i \phi _i(x)\phi _i(y) \ge a\) for each pair \(x,\,y\) of distinct labels. By a classical result of Erdős and Szekeres [7] in 1935, the nsequence corresponding to \(\phi _2\) has a monotonic subsequence of length \(t=\lceil \sqrt{n}\, \rceil \). By considering the \(t1\) gaps between successive terms in such a subsequence, we may see that \(\,(t\!\!1)/2 \cdot (a\!+\!1) \le n\!\!1\). This shows that \(a \le 2 \sqrt{n} +O(1)\). Thus, we cannot improve the bound in (4.1) by a factor greater than 2.
For general \(k \ge 2\), we cannot improve the bound by a factor \(\alpha > 4k(k+1)^{(k+1)/k}\). For, if we could, then in the proof of Lemma 4.5 we could take t about \((2/\alpha ) n^{1/k}\), and that would yield
which would contradict Lemma 2.6 for large n.
5 Lower Bound for the Expectation
In Lemma 5.1 below, we give a lower bound on the expected size of an unrooted maximum agreement forest, which asymptotically matches the upper bound in Lemma 3.1 for the rooted case; see (5.3). This will yield the required lower bound on the expected TBR distance in statement (1.1) of Theorem 1.10, and the upper bound (5.2) on the expected size of a maximum agreement subtree.
Lemma 5.1
Let \(k \ge 2\) and \(n \ge 2\) be integers, and let \(\mathcal {T}= \{ T_1,\,T_2, \ldots ,\,T_k \} \subseteq \mathcal {B}(n)\) be a set of k binary trees. For each \(i=1,\,2, \ldots ,\,k\), let \(A_i\) be the tree \(T_i^{\pi _i}\) obtained from \(T_i\) by a random relabelling \(\pi _i\) of the nonroot labels, where the \(\pi _i\) are sampled independently and uniformly from \(S_{n1}\). If \(\mathcal {A}= \{ A_1,\,A_2, \ldots ,\,A_k \}\) then
Proof
Set \(a = n^{\frac{k1}{k+1}}\) and \(t = \left\lceil \frac{2n}{a} \right\rceil \), so \(t1 < \frac{2n}{a} = 2n^{\frac{2}{k+1}}\). Now, using Lemma 2.5, divide each tree \(T_i\) into t (possibly empty) connected parts, so that each part has less than a leaves; and let \(A_i = A_{i\,1} \sqcup \cdots \sqcup A_{i\,t}\) be the corresponding partition of \(A_i\). For distinct \(x,\,y \in [n]_0\), notice that
Now, let Z be the set of pairs \(\{ x,\,y \}\) of distinct labels such that, for each i, x and y are in the same part \(A_{ij}\). Since the relabellings \(\pi _i\) are sampled independently, \(\mathbb {P}( \{ x,\,y \} \in Z ) < (n^{\frac{2}{k+1}})^k\) for all distinct \(x,\,y \in [n]_0\). By the linearity of expectation,
Since \(t1 < 2n^{\frac{2}{k+1}}\), we can apply Lemma 4.4 to get
as required. \(\square \)
Setting \(k=2\) in Lemma 5.1 gives \(\mathbb {E}\big [M_u\big (T_1^{\pi _1},\, T_2^{\pi _2}\big )\big ] > n \frac{9}{2} n^{2/3} \ge n5n^{2/3} +1\) for \(n \ge 3\). Applying the unrooted agreement forest lemma (Lemma 4.2), we get
for all positive integers n. Now, we may complete the proof of the lower bound in statement (1.1) of Theorem 1.10, as in the proof of the upper bound. By (3.2), \(d_{TBR}\big (T_1^{\pi _1},\,T_2^{\pi _2}\big ) = d_{TBR}(T_1,\,T_2^\pi ) \) where \(\pi \) is uniformly distributed over \(S_{n1}\), and we have
which is an explicit version of the required lower bound in (1.1).
Given a list \(\mathcal {A}\) of k trees, let \(\mathcal {MAST}(\mathcal {A})\) denote the maximum size of an(unrooted) agreement subtree, where we measure size by the number of leaves. Since \(M_u(\mathcal {A}) \le n+1\mathcal {MAST}(\mathcal {A})\), for \(\mathcal {A}\) as in Lemma 5.1, we have
We already noted that, for any set \(\mathcal {A}\) of \(k \ge 2\) trees in \(\mathcal {B}(n)\), we have \(M_u(\mathcal {A}) \le M_{\text {r}}(\mathcal {A})\). Putting together Lemmas 3.1 and 5.1, we see that, for \(\mathcal {A}\) as in these lemmas, we have both
6 Concentration Results
In this section, we shall prove statement (1.2) of Theorem 1.10 and deduce Corollary 1.11. Fix \(\chi \in \{ TBR,\, SPR,\, rSPR \}\). Let \(n \ge 2\) be an integer and let \(T_1\) and \(T_2\) be fixed trees in \(\mathcal {B}(n)\). We investigate the distribution of the random variable \(X = d_\chi (T_1,\,T_2^{\pi })\), where \(\pi \) is uniformly distributed on \(S_{n1}\). Specifically, we shall show that X is highly concentrated about its mean, using the following result from [12] (Theorem 7.4 applied to Example 7.2).
Lemma 6.1
[12]. Let \(S_{m}\) denote the group of all permutations of \(\{ 1,\,2, \ldots ,\,m \}\), and let \(k>0\) be a constant. Let \(f :S_{m} \rightarrow \mathbb {R}\) be a function such that for any \(\sigma \in S_{m}\) and any transposition \(\tau \), we have
Let \(\pi \) be chosen uniformly at random from \(S_{m}\), let X be the random variable \(X = f(\pi )\), and let \(\mu \) denote \(\mathbb {E}[X]\). Then for any \(\alpha >0\), we have
For any tree \(T \in \mathcal {B}(n)\), if \(T^\prime \) is the result of a transposition of the labels of two nonroot leaves of T, then \(d_{\chi }(T,\,T^\prime ) \le 2\) because we can obtain \(T^\prime \) from T by swapping the two leaves with 2 rSPR moves. Therefore, we can apply Lemma 6.1 to the random variable \(X = d_\chi (T_1,\,T_2^{\pi })\) with \(k=2\), and \(m=n1\). By statement (1.1) of Theorem 1.10, there are constants \(\lambda _1> \lambda _2 > 0\) such that
for all integers \(n \ge 2\). Let \(\alpha = \tfrac{1}{2} \lambda _2n^{2/3}\). Then by Lemma 6.1,
Choose constants \(c_1>c_2>0\) and \(c_3>0\) by setting \(c_1 = \lambda _1+\tfrac{1}{2}\lambda _2\) and \(c_2 = \tfrac{1}{2}\lambda _2\) and \(c_3 = \tfrac{1}{8}\lambda _2^2\). Then by the above,
Finally, recall that \(0 \le X \le n2\) for each \(n \ge 2\). Hence, by replacing \(c_3\) by \(\tfrac{1}{2} c_3\), and choosing \(c_1\) larger and \(c_2\) smaller if necessary, we may drop the factor 2 in the last term. This completes the proof of statement (1.2) of Theorem 1.10.
It remains to deduce Corollary 1.11. Observe first that, if the random tree T in \(\mathcal {B}(n)\) has an exchangeable distribution, and \(T_0\) is a fixed tree with \(\mathbb {P}(T=T_0)>0\), then conditioned on \(T \sim T_0\), T is uniformly distributed on the equivalence class of \(T_0\) under \(\sim \), and so T has the same distribution as \(T_0^{\pi }\) where \(\pi \) is uniformly distributed on \(S_{n1}\).
Let A and B be sampled independently in \(\mathcal {B}(n)\), where B has an exchangeable distribution. Let \(T_1\) be any tree in \(\mathcal {B}(n)\) with \(\mathbb {P}(A=T_1)>0\), and let \(T_2\) be any tree in \(\mathcal {B}(n)\) with \(\mathbb {P}(B=T_2)>0\). Conditioned on \(A=T_1\) and \(B \sim T_2\), \(d_\chi (A,\,B)\) has the same distribution as \(d_{\chi }(T_1,\,T_2^{\pi })\) where \(\pi \) is uniformly distributed on \(S_{n1}\). Let I be the interval \(\big (nc_1n^{2/3},\, nc_2n^{2/3}\big )\) in statement (1.1) of Theorem 1.10. Then by that result,
But \( \mathbb {E}[d_\chi (A,\,B)]\) is a weighted average of the terms on the left, so \(\mathbb {E}[d_\chi (A,\,B)] \in I\). Similarly, let J be the interval \(\big (nc_1n^{2/3},\, nc_2n^{2/3}\big )\) in statement (1.2) of Theorem 1.10. Then by that result,
But \( \mathbb {P}(d_\chi (A,\,B) \in J)\) is a weighted average of the terms on the far left, so
This completes the proof of Corollary 1.11.
7 Concluding Remarks
For each move \(\chi \in \{ TBR,\, SPR,\, rSPR \}\) we have estimated the diameter \(D_{\chi }(n)\) and the radius \(R_{\chi }(n)\) of the class \(\mathcal {B}(n)\) quite precisely: we saw in Theorem 1.9 that both \(D_{\chi }(n)\) and \(R_{\chi }(n)\) are \(n  \Theta (\sqrt{n})\). It would be interesting to learn about finer behaviour.

Can we separate diameter and radius? Are there constants \(0<c_{\chi }<c\,'_{\chi }\) such that
$$\begin{aligned} D_{\chi }(n) > n(c_{\chi }+o(1)) \sqrt{n} \quad \text{ and } \quad R_{\chi }(n) < n(c\,'_{\chi }+o(1)) \sqrt{n}? \end{aligned}$$ 
Can we separate, for example, rSPR diameter and (unrooted) SPR diameter? Are there constants \(0<c_{\text {r}}<c_{u}\) such that
$$\begin{aligned} D_{{\text {r}}SPR}(n) > n(c_{\text {r}}+o(1)) \sqrt{n} \; \text{ and } \; D_{SPR}(n) < n(c_{u}+o(1)) \sqrt{n}? \end{aligned}$$ 
What about even finer behaviour? Are there constants \(c_{\chi } > 0\) and \(c\,^\prime _{\chi } > 0\) such that
$$\begin{aligned} D_{\chi }(n) = n  \big ( c_{\chi } +o(1) \big ) \sqrt{n} \qquad \text{ and } \qquad R_{\chi }(n) = n  \big ( c\,^\prime _{\chi } +o(1) \big ) \sqrt{n} \; ? \end{aligned}$$If so, echoing the first two questions, is the inequality \(c_{\chi } \le c\,^\prime _{\chi }\) strict, and does \(c_{\chi }\) or \(c\,^\prime _{\chi }\) depend on \(\chi \)?
There are similar natural questions arising from Theorem 1.10 and Corollary 1.11 on the behaviour of random distances.
Notes
Sometimes, the root of a rootedbinarytree is defined to have degree 2. This is equivalent to our definition(see Definition 1.1). Simply add a new leaf, adjacent to the degree2 root, label it 0 and make it the new root.
References
Aldous, D.: Probability distributions on cladograms. In: Aldous, D., Pemantle, R. (eds.) Random Discrete Structures, IMA Vol. Math. Appl., Vol. 76, 1–18. Springer, New York (1996)
Allen, B., Steel, M.: Subtree transfer operations and their induced metrics on evolutionary trees. Ann. Combin. 5(1), 1–15 (2001)
Bernstein, D.I., Ho, L.S.T., Long, C., Steel, M., St. John, K., Sullivant, S.: Bounds on the expected size of the maximum agreement subtree. SIAM J. Discrete Math. 29(4), 2065–2074 (2015)
Bordewich, M., Semple, C.: On the computational complexity of the rooted subtree prune and regraft distance. Ann. Combin. 8(4), 409–423 (2005)
Bryant, D., McKenzie, A., Steel, M.: The size of a maximum agreement subtree for random binary trees. In: Janowitz, M.F., Lapointe, F.J., McMorris, F.R., Mirkin, B., Roberts, F.S. (eds.) BioConsensus, Discrete Math. Theoret. Comput. Sci., Vol. 61, 55–65. American Mathematical Society, Providence, RI (2003)
Ding, Y., Grünewald, S., Humphries, P.J.: On agreement forests. J. Combin. Theory Ser. A 118(7), 2059–2065 (2011)
Erdős, P., Szekeres, G.: A combinatorial problem in geometry. Compositio Math. 2, 463–470 (1935)
Hein, J.: Reconstructing evolution of sequences subject to recombination using parsimony. Math. Biosci. 98(2), 185–200 (1990)
Hein, J., Jiang, T., Wang, L., Zhang, K.: On the complexity of comparing evolutionary trees. Discrete Appl. Math. 71(13), 153–169 (1996)
Humphreys, P.J., Semple, C.: Note on the hybridization number and subtree distance in phylogenetics. App. Math. Lett. 22(4), 611–615 (2009)
Martin, D.M., Thatte, B.D.: The maximum agreement subtree problem. Discreat Appl. Math. 161(1314), 1805–1817 (2013)
McDiarmid, C.: On the method of bounded differences. In: Siemons, J. (ed.) Surveys in Combinatorics, London Mathematical Society Lecture Note Series, Vol. 141, pp. 148–188. Cambridge University Press, Cambridge (1989)
Penny, D., Steel, M.: Distributions of tree comparison metrics—some new results. Systematic Biol. 42(2), 126–141 (1993)
Semple, C., Steel, M.: Phylogenetics. Oxford University Press, Oxford (2003)
Zhu, S., Steel, M.: Does random tree puzzle produce YuleHarding trees in the manytaxon limit? Math. Biosci. 243(1), 109–116 (2013)
Acknowledgements
We would like to thank Charles Semple and the two anonymous referees for several helpful comments, and Mike Steel for drawing Ref. [6] to our attention.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Atkins, R., McDiarmid, C. Extremal Distances for Subtree Transfer Operations in Binary Trees. Ann. Comb. 23, 1–26 (2019). https://doi.org/10.1007/s0002601804104
Received:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s0002601804104
Keywords
 Phylogenetic tree
 Subtree prune and regraft
 Tree bisection and reconnection
 Binary tree
 Agreement forest
 Tree rearrangement
 Extremal distance
 Average distance
Mathematics Subject Classification
 05C05
 92D15