Supertrees

A $k$-universal permutation, or $k$-superpermutation, is a permutation that contains all permutations of length $k$ as patterns. The problem of finding the minimum length of a $k$-superpermutation has recently received significant attention in the field of permutation patterns. One can ask analogous questions for other classes of objects. In this paper, we study $k$-supertrees. For each $d\geq 2$, we focus on two types of rooted plane trees called $d$-ary plane trees and $[d]$-trees. Motivated by recent developments in the literature, we consider"contiguous"and"noncontiguous"notions of pattern containment for each type of tree. We obtain both upper and lower bounds on the minimum possible size of a $k$-supertree in three cases; in the fourth, we determine the minimum size exactly. One of our lower bounds makes use of a recent result of Albert, Engen, Pantone, and Vatter on $k$-universal layered permutations.

1. Introduction 1.1. Background. Let S n denote the set of permutations of the set [n] = {1, . . . , n}. We write permutations as words in one-line notation. Given µ ∈ S m , we say that the permutation σ = σ 1 · · · σ n ∈ S n contains the pattern µ if there are indices i 1 < · · · < i m such that σ i 1 · · · σ im has the same relative order as µ. Otherwise, we say that σ avoids µ. Consecutive pattern containment and avoidance are defined similarly by requiring the indices i 1 , . . . , i m to be consecutive integers. An enormous amount of research in the past half-century has focused on pattern containment and pattern avoidance in permutations [7,30,31]. Plenty of particularly popular permutation pattern problems possess the following form: What is the minimum length of a permutation that contains all patterns of a certain type?
For example, one can ask for the smallest size of a permutation containing all length-k patterns; such a permutation is often called a k-universal permutation or a k-superpermutation [4,20,32]. The analogous question for consecutive pattern containment has also received attention [5,[27][28][29]. Rather than discuss all of the variants of this problem that have emerged, we refer the reader to the beautiful article [19], which surveys many of the results in this area.
In recent years, the notion of pattern containment has spread to other combinatorial objects. It is natural to ask about the minimum possible sizes of "universal objects" in these contexts. This idea dates back to 1964, when Rado [34] asked for the minimum number of vertices in a graph that contains all k-vertex graphs as induced subgraphs. A vast amount of literature has been devoted to "Rado's problem" alone (see [2,3,8,9,21] and the references therein).
In this paper, we focus on rooted plane trees. Several variations on the theme of contiguous and noncontiguous pattern containment in rooted plane trees have appeared in [6, 15, 18, 23-25, 33, 35]. The purpose of the present article is to investigate the minimum possible size of a k-universal tree, or k-supertree, in some of these contexts. Similar questions about universal trees have been studied since the 1960's [10][11][12][13][14]26]. However, our notions of universal rooted plane trees are new and are inspired by more recent definitions of pattern containment in trees.

Main Definitions and Terminology.
Let d ≥ 2 be an integer. A d-ary plane tree is either an empty tree or a root vertex with d subtrees that are linearly ordered from left to right and are themselves d-ary plane trees. A 2-ary plane tree is also called a binary plane tree. Note that the subtrees of a vertex can be empty. By the "i th subtree" of a vertex, we simply mean the i th subtree from the left. We say an edge has "type i" if it connects a vertex to the root of its i th subtree. A d-ary plane tree is called full if every vertex has either 0 or d children (or, equivalently, if only leaves have empty subtrees).
Every connected induced subgraph T * of a d-ary plane tree T can be viewed as a d-ary plane tree in the obvious way. If T * is isomorphic as a d-ary plane tree to another d-ary plane tree T , then we say that T * is a contiguous embedding of T in T and that T contiguously contains T . For example, the 3-ary plane tree contiguously contains but does not contiguously contain .
Rowland [35] defined contiguous pattern containment in full binary plane trees, and the authors of [25] made a similar definition for full 3-ary plane trees. In general, for any k ≥ 0, the operation of removing (pruning) all leaves provides a natural bijection from the set of full d-ary plane trees with dk + 1 vertices to the set of d-ary plane trees with k vertices. Using this bijection, one can easily see that our definition of contiguous pattern containment for d-ary plane trees corresponds to the definitions in [25,35] when d ∈ {2, 3}. Our formulation has the advantage of working with smaller trees so that diagrams are not cluttered with unnecessary leaves.
Given a vertex u in a d-ary plane tree, let χ(u) be the set of all i ∈ [d] such that u has a nonempty i th subtree. Suppose e is an edge of type i that connects u to one of its children v (meaning i ∈ χ(u)). We can consider the operation of contracting the edge e. We call this operation a legal contraction if every element of χ(u) \ {i} is either strictly smaller than min(χ(v)) or strictly greater than max(χ(v)). Informally speaking, this definition ensures that edges do not "overlap" or "cross" each other during a legal contraction. After legally contracting an edge in a d-ary plane tree, we are left with a new d-ary plane tree. Given d-ary plane trees T and T , we say that T noncontiguously contains T if we can obtain T from T through a sequence of legal edge contractions. For example, the 3-ary plane tree noncontiguously contains but does not noncontiguously contain .
When d = 2, we can use the pruning bijection mentioned above to show that our definition of noncontiguous pattern containment in binary plane trees is consistent with the notion considered in [15,33].
Given a set S of positive integers, an S-tree is a rooted tree in which the children of each vertex are linearly ordered from left to right and the number of children of each vertex is an element of S ∪ {0}. One can think of a [d]-tree as a tree obtained from a d-ary plane tree by forgetting about empty subtrees and the types of edges. What we term [2]-trees are more commonly called "unary-binary trees" or "Motzkin trees." A contiguous k-universal d-ary plane tree is a d-ary plane tree that contiguously contains all d-ary plane trees with k vertices. Similarly, a noncontiguous k-universal d-ary plane tree is a dary plane tree that noncontiguously contains all d-ary plane trees with k vertices. Let N con d-ary (k) (respectively, N non d-ary (k)) denote the minimum number of vertices in a contiguous (respectively, noncontiguous) k-universal d-ary plane tree. Contiguous and noncontiguous k-universal [d]-trees are defined analogously. We refer to k-universal trees as "k-supertrees" when the type of tree and the type of containment are clear from context. Let N con [d] (k) (respectively, N non [d] (k)) denote the minimum number of vertices in a contiguous (respectively, noncontiguous) k-universal [d]-tree.
We say the root of a rooted plane tree has depth 0; a nonroot vertex has depth r if its parent has depth r − 1. The height of a rooted plane tree is the maximum depth of its vertices. We write |T | for the number of vertices in T . The perfect tree P (d) h is the unique d-ary plane tree of height h that has exactly d r vertices of depth r for each r ∈ {0, . . . , h}.
It will be useful to have a formally defined "gluing" operation for combining trees. Suppose T is a rooted plane tree and v is a leaf of T . If T is another rooted plane tree (of the same type as T , of course), then we can glue T to v by attaching T to T , where we identify the root of T with v. For example, if T and v are and T is , then the result of gluing T to v is .
1.3. Main Results. Let η 2 = 1, and let η d = 1 2 for every d ≥ 3. In Section 3, we will define numbers ρ d , which arise as reciprocals of roots of certain polynomials. The purpose of the subsequent sections is to prove the following estimates (where d ≥ 2 is a fixed integer): (1)) .
Some remarks are in order regarding these estimates. First of all, note that it is unusual to be able to prove an exact formula for the minimum size of a universal object, as we have done in (I). Next, a contiguous k-universal d-ary plane (respectively, [d]-) tree is certainly also a noncontiguous k-universal d-ary plane (respectively, [d]-) tree, so we trivially have N con d-ary (k) ≥ N non d-ary (k) and N con(k) [d] ≥ N non(k) [d] . Furthermore, one can change a d-ary plane tree into a [d]-tree by simply forgetting about empty subtrees and edge types. Doing so allows us to view a contiguous (respectively, noncontiguous) k-universal d-ary plane tree as a contiguous (respectively, noncontiguous) k-universal [d]-tree. Therefore, it follows from (I) that N non d-ary (k), N con [d] (k), and N non [d] (k) are all at most d k−1 + k − 1. However, the upper bounds in (II), (III), and (IV) greatly improve upon this observation. Indeed, the upper bounds in (II) and (IV) are subexponential in k, and the base of the exponential in the upper bound in (III) is much smaller than d. In Section 3, we will see that Compare this with the exponential lower bound in (III), in which the base of the exponential is However, the subexponential upper bound in (IV) greatly improves upon this. Similarly, the lower bound in (III) beats the lower bound in (IV). We will show in Section 3 that N non d-ary (k) and N non [d] (k) differ by at most a constant factor (for each fixed d); this fact explains why (II) and (IV) look similar.
Producing nontrivial lower bounds for the sizes of noncontiguous k-universal trees is fairly difficult; this is analogous to the permutation setting, where nontrivial lower bounds are scarce. For example, the best known lower bound for the length n of a permutation that contains all length-k patterns is given by n ≥ k 2 /e 2 ; this is a consequence of the simple observation that n k ≥ k!. The number of d-ary plane trees with k vertices is 1 (d−1)k+1 dk k , so a similar argument in our setting shows that dk k . This translates to a lower bound of roughly dk for N non d-ary (k). Although many of the lower bounds in the (noncontiguous) permutation setting are trivial, there is a noteworthy exception: Albert, Engen, Pantone, and Vatter managed to obtain an explicit formula for the minimum length of a permutation that (noncontiguously) contains all length-k layered permutations. Making use of a bijection between 231-avoiding permutations and binary plane trees, we will invoke this result in order to prove the lower bound in (II).

d-ary plane trees
2.1. Contiguous containment. In the case of contiguous containment for d-ary plane trees, we obtain the exact size of the smallest k-supertree. The upper bound comes from an explicit construction, and the lower bound comes from considering the family of paths. Proof. We first show that d k−1 + k − 1 is a lower bound for the size of a k-supertree. Let T be a contiguous k-universal d-ary plane tree. Let T 1 , . . . , T d k−1 be the d-ary plane trees on k vertices in which each nonleaf vertex has exactly one child (i.e., the d-ary plane trees that are paths on k vertices). For each i ∈ {1, . . . , d k−1 }, there is a contiguous embedding T * i of T i in T. Let v * i denote the vertex in T that corresponds to the unique leaf of T i under this embedding. Starting at v * i and tracing up k − 1 edges, we immediately recover all of the edges of T * i , so the location of v * i in T completely determines the isomorphism class of T * i . Because the trees T * 1 , . . . , T * d k−1 are pairwise nonisomorphic, the vertices v * 1 , . . . , v * d k−1 are pairwise distinct. Thus, T contains at least d k−1 vertices at depth at least k − 1. Since T contains vertices at depth k − 1, it must also contain at least one vertex at each depth j for 0 ≤ j ≤ k − 2. This gives at least k − 1 additional vertices, so T contains at least d k−1 + k − 1 vertices, as desired.
We now construct a contiguous k-universal d-ary plane tree ∆ d (k) on exactly d k−1 +k−1 vertices. First, the tree ∆ d (1) consists of a single vertex. Now, consider k ≥ 2. To construct ∆ d (k), first consider a d-ary plane tree that is a path on k − 1 vertices in which every edge is of type 1. Let v denote the unique leaf of this path. For each 2 ≤ i ≤ d, attach a copy of the perfect tree P (d) k−2 in the i th subtree of v. (Recall the definition of perfect trees from the introduction.) Note that each of these d − 1 added trees contains exactly 1 + d + · · · + d k−2 vertices, which means that together they have d k−1 − 1 vertices in total. Next, consider the leftmost leaf in the copy of P  Finally, we show that ∆ d (k) is in fact a k-supertree. Fix any d-ary plane tree T with k vertices. If T is not a path, then it has height at most k − 2, so it fits into one of the copies of P If T is a path whose edges are all of type 1, then we can embed T in ∆ d (k) by mapping the root of T to the root of the second subtree (i.e., the leftmost nonempty subtree) of v. Now, suppose T is a path in which at least one edge is not of type 1. Let m be the smallest element of {1, . . . , k − 1} such that the m th edge from the top of T is not of type 1. We can embed T into ∆ d (k) by mapping the unique vertex in T of depth m − 1 to v. This exhausts all cases and shows that ∆ d (k) is k-universal.

Noncontiguous containment.
2.2.1. Lower bounds. Recall that η 2 = 1 and η d = 1 2 for all d ≥ 3. In this subsection we will prove the following theorem.
The first step is to show that it suffices to consider the specific case in which d = 2.
Proof. Fix d ≥ 3, and consider the d-ary plane tree path on m vertices in which every edge has type 1. Place a single child in the d th subtree of each nonleaf vertex in this path to obtain a new d-ary plane tree, which we call J m .
Let T be a d-ary plane tree. Choose a vertex v 1 of T that has at least 3 children, say exactly m 1 children. Replace v 1 with a copy of J m 1 in the following manner. Detach the subtrees of v 1 , and glue J m 1 to v 1 . Then glue the (detached) i th nonempty subtree (counted from the left) of v 1 to the i th leaf (again counted from the left) of the copy of J m 1 . Choose another vertex v 2 that has m 2 ≥ 3 children, and replace it in the same fashion with a copy of J m 2 . Continue this process until reaching a tree T in which each vertex has at most 2 children. We can naturally associate T with a binary plane tree T . If there is an only child of type 1 in T , it becomes an only child of type 1 in T . If there is an only child of type other than 1 in T , it becomes an only child of type 2 in T . See Figure 2 for an example when d = 4. Our construction guarantees that T noncontiguously contains T , so it also noncontiguously contains every d-ary plane tree that T noncontiguously contains. Let T be a noncontiguous k-universal d-ary plane tree with α = N non d -ary (k) vertices. The tree T obtained via the above construction is also a noncontiguous k-universal d-ary plane tree, so T is a noncontiguous k-universal binary plane tree. The trees T and T have the same number of vertices, say β. We know that β ≥ N non 2 -ary (k). We will show that β < 2α, establishing the desired result.
Let f r denote the number of vertices in T with exactly r children. We obtained T from T by substituting a copy of J m for each vertex v of T with m ≥ 3 children. Note that each such substitution increased the number of vertices in the tree by m − 2.
Furthermore, counting the α − 1 edges in T according to the number of children of their parent vertices gives α − 1 = d m=0 mf m . Consequently, For the proof of Theorem 2.2, it now remains only to show that (1) N non 2-ary (k) ≥ (k + 1) log 2 (k + 1) − 2 log 2 (k+1) + 1. Let us first establish some terminology and notation concerning labeled trees and tree traversals. Let PT (2) n denote the set of binary plane trees with n vertices. A decreasing binary plane tree is a binary plane tree whose vertices are labeled with distinct positive integers so that the label of each nonroot vertex is smaller than the label of its parent. Let DPT (2) n be the set of decreasing binary plane trees with n vertices in which the labels form the set [n]. We can read the labels of a decreasing binary plane tree in in-order by first reading the labels of the left subtree of the root in in-order, then reading the label of the root, and finally reading the labels of the right subtree of the root in in-order. Let I(Υ) denote the in-order reading of the decreasing binary plane tree Υ. The map I : DPT (2) n → S n is a bijection [7,Chapter 8]. Alternatively, we can read the labels of a decreasing binary plane tree in postorder by first reading the labels of the left subtree of the root in postorder, then reading the labels of the right subtree of the root in postorder, and finally reading the label of the root.
For each unlabeled tree T ∈ PT (2) n , there is a unique way to label the vertices of T so that the resulting labeled tree ω(T ) ∈ DPT (2) n has postorder reading 123 · · · n (the increasing permutation). This gives us a map ω : PT (2) n → DPT (2) n . Let ψ(T ) = I(ω(T )). It is not difficult to check that the permutation ψ(T ) avoids the pattern 231. In fact, we have the following useful proposition.
Proposition 2.4. The map ψ is a bijection from the set of binary plane trees with n vertices to the set of 231-avoiding permutations in S n . If T is a binary plane tree that noncontiguously contains the binary plane tree T , then the permutation ψ(T ) contains the pattern ψ(T ).
Proof. The map ψ is injective because ω and I are injective. The first statement of the proposition now follows from the fact that the number of binary plane trees with n vertices and the number of 231-avoiding permutations in S n are both equal to the n th Catalan number. 1 To prove the second statement, we need to understand the effect of legal edge contractions on the corresponding permutations. Let T ∈ PT (2) n be a binary plane tree, and let e be an edge of T that can be legally contracted. Let a and b be, respectively, the labels of the upper and lower endpoints of e in ω(T ). Let T /e ∈ PT (2) n−1 denote the tree that is obtained by contracting the edge e in T . One can check that if e is a type-1 edge, then ψ(T /e) is the permutation obtained by deleting the entry b from ψ(T ) and then normalizing to obtain a permutation in S n−1 . Similarly, if e is a type-2 edge, then ψ(T /e) is the permutation obtained by deleting the entry a from ψ(T ) and then normalizing. In either case, ψ(T ) contains ψ(T /e) as a pattern. If T noncontiguously contains a binary plane tree T (meaning T is obtained from T via a sequence of legal edge contractions), then ψ(T ) contains ψ(T ) as a pattern.
Let us illustrate the proof of the second statement of Proposition 2.4 with an example. If , and ψ(T /e) = I(ω(T /e)) = 1632547.
Note that since e is a left edge, the permutation ψ(T /e) = 1632547 is obtained by deleting the entry b = 4 from the permutation ψ(T ) = 17324658 and then normalizing.
We can finally deduce inequality (1). Suppose T is a noncontiguous k-universal binary plane tree with N non 2-ary (k) vertices. Proposition 2.4 tells us that ψ(T ) contains every 231-avoiding permutation in S k . A permutation is called layered if it avoids both 231 and 312. Thus, ψ(T ) is a permutation of length N non 2-ary (k) that contains all layered permutations in S k . The authors of [1] proved that the minimum size of a permutation that contains all layered permutations in S k is (k+1) log 2 (k + 1) − 2 log 2 (k+1) + 1. This establishes (1) and hence completes the proof of Theorem 2.2.

Upper bounds.
For every d ≥ 2 and k ≥ 1, we now construct a noncontiguous k-universal d-ary plane tree ξ d (k). The construction is natural but fairly intricate. We begin by defining a few specific d-ary plane trees that will form the building blocks in our construction of ξ d (k). The d-crescent is the path on d + 1 vertices in which the vertex at depth i is connected to its parent by an edge of type i. Now, take three copies of the d-crescent. Remove the lowest vertex from the first of these d-crescents, and glue the remaining tree to the vertex of depth 1 in the second crescent. Next, remove the root vertex from the third d-crescent, and glue the remaining tree to the root of the second d-crescent. We call the resulting tree the d-vertebra and denote it by V d . Note that V d has exactly 3 leaves, which we call the left, center, and right leaves (in the obvious fashion). For m ≥ 1, we obtain the m th d-spine by consecutively gluing m copies of the d-vertebra V d under a single copy of the d-crescent: the first V d is glued to the single leaf of the d-crescent, and each subsequent V d is glued to the center leaf of the previous V d . We speak of the first, second, etc. d-vertebra beginning with the highest one.
At last, we recursively define the families ξ d (k). We first describe the following base cases: • Let ξ d (1) consist of a single vertex.
• Let ξ d (2) be the d-crescent. The construction for larger k is recursive and differs for d = 2 and d > 2. (The d = 2 construction is a slight improvement on the d > 2 construction.) If d = 2, then for k ≥ 4, we obtain ξ 2 (k) from the k 2 − 1 th 2-spine as follows: (1) For each 1 ≤ i ≤ k 2 − 2, glue a copy of ξ 2 (i) to each of the left and right leaves of the i th 2-vertebra.
If d > 2, then for k ≥ 4, we obtain ξ d (k) from the k 2 th d-spine as follows: (1) For each 1 ≤ i ≤ k 2 − 2, glue a copy of ξ d (i) to each of the left and right leaves of the i th d-vertebra.
(3) Glue a copy of ξ d ( k 2 − 1) to the left leaf of the k 2 − 1 th d-vertebra.
(4) Glue a copy of ξ d ( k 2 ) to the center leaf of the k 2 th (i.e., lowest) d-vertebra. For k ≥ 4, the tail of ξ d (k) is the copy of ξ d ( k 2 ) that is glued to the center leaf of the bottom of the spine in step (4) (in both the d = 2 and d > 2 constructions). Figure 4 shows ξ 2 (k) for some small values of k. Figure 4. The trees ξ 2 (k) for 1 ≤ k ≤ 5, along with ξ 2 (9). In ξ 2 (4), ξ 2 (5), and ξ 2 (9), the pink edges represent the spine. The orange edges represent the copies of the previously-constructed trees that are glued to the spine, and the green edges represent the tail.
We now show that ξ d (k) noncontiguously contains every d-ary plane tree with k vertices. The big-picture idea is that we can "siphon off" small subtrees of the tree that we are trying to contain until what remains fits into the tail. Many of the arguments are the same for d = 2 and d > 2, so we present the proofs together. The reader may find it helpful to bear in mind the example of ξ 2 (9) (as shown in Figure 4). Theorem 2.5. For all integers d ≥ 2 and k ≥ 1, the tree ξ d (k) noncontiguously contains every d-ary plane tree with k vertices.
Proof. Fix d. We proceed by strong induction on k. The statement is obviously true for k ≤ 3. Now, consider k ≥ 4. Let T be a d-ary plane tree on k vertices. We will show that ξ d (k) noncontiguously contains T by showing that ξ d (k) noncontiguously contains a larger tree T , which in turn noncontiguously contains T .
We construct T from T by defining a finite sequence of pairs (T i , v i ), where T i is a tree and v i is a vertex of T i ; we then let T be the last T i . We will see that we can naturally view the vertices v 0 , . . . , v i as vertices in the tree T i+1 . In particular, we can view all of the vertices v i as vertices in the last tree T . First, let T 0 = T , and let v 0 be the root of T 0 . If at any time the subtree in T i below v i (including v i itself) contains at most k 2 vertices, then the sequence terminates. As long as this situation is not achieved, we obtain (T i+1 , v i+1 ) from (T i , v i ) as follows. If v i has only a single child, then we let v i+1 denote this child and let T i+1 = T i . If v i has exactly 2 children, then we let v i+1 denote the child with the larger subtree (breaking ties with preference for the right child) and let T i+1 = T i .
Otherwise, v i has at least 3 children. (This possibility of course pertains only to d > 2.) We consider the leftmost and rightmost nonempty subtrees of v i and obtain T i+1 by performing the following operations. If the leftmost nonempty subtree contains fewer vertices than the rightmost nonempty subtree or these two subtrees contain the same number of vertices, then detach all of the subtrees of v i except the leftmost nonempty one, add a new child v i+1 in the d th subtree of v i via a red edge of type d, and reattach the detached subtrees as new subtrees of v i+1 (so that the reattached edges have the same types that they originally had). If the rightmost nonempty subtree contains fewer vertices than the leftmost nonempty subtree, then detach all of the subtrees of v i except the rightmost nonempty one, add a new child v i+1 in the 1 st subtree of v i via a red edge of type 1, and reattach the detached subtrees as new subtrees of v i+1 . This sequence terminates in some (T m , v m ) with 1 ≤ m ≤ k 2 since each v i+1 has strictly fewer vertices below it than v i . Note that each T i is either the same as T i+1 or else can be obtained from T i+1 by (legally) contracting the added red edge between v i and v i+1 . In particular, T noncontiguously contains T . (When d = 2, T equals T because we did not add any red edges.) Each vertex v i , for 0 ≤ i ≤ m − 1, has at most 2 children in T . When v i has exactly 2 children in T , we think of the subtree containing v i+1 as continuing down the main "trunk" of T and the other (smaller) subtree, which we call τ i , as "branching off." In this case, we let s i = |τ i |. If v i has only 1 child, then we let s i = 0. Note that the difference between the number of non-red edges below v i and the number of non-red edges below v i+1 is given by if v i has two children in T and the edge between v i and v i+1 is red s i + 1, if v i has two children in T and the edge between v i and v i+1 is not red.
We can write this number of non-red edges more concisely as (2) max{1, s i } + 1, if v i has two children and the edge between v i and v i+1 is not red max{1, s i }, otherwise.
This characterization will be useful later. Now, we condition on m: if m = 1, then it is in fact easier to embed T in ξ d (k) directly; if m > 1, then we describe the embedding of T in ξ d (k).
First, suppose m = 1, i.e., the algorithm terminates after a single step. If k is even, then the root of T must have two children, with k 2 and k 2 − 1 vertices, respectively. We identify the root of T with the top vertex of the k 2 − 1 th vertebra. If the subtree with k 2 − 1 vertices is the right (respectively, left) child of the root, then we can embed this subtree in the copy of ξ d (ii) There are two subtrees, with k−3 2 and k+1 2 vertices, respectively. If the subtree with k−3 2 vertices is the right (respectively, left) child of the root, then we can embed this subtree in the right (respectively, left) tree that is glued to the k−3 2 th vertebra; and we embed the subtree with k+1 2 vertices in the tail.
We now turn to the case m > 1. We will describe how to noncontiguously embed T into ξ d (k). We first define functions f 2 : {0, . . . , m} → {0, . . . , k 2 } and f >2 : {0, . . . , m} → {0, . . . , k 2 + 1} that, roughly speaking, tell us how far down ξ d (k) to embed each v i . Unsurprisingly, f 2 will be for the d = 2 case, and f >2 will be for the d > 2 case. In what follows, we will write f * in statements that apply to both f 2 and f >2 . Let Finally, let f 2 (m) = k 2 and f >2 (m) = k 2 + 1. We will see that f * is strictly increasing and in fact has the claimed codomain; before establishing these facts, we show that they will let us embed T in ξ d (k). Consider any i with s i > 0 and f * (i) ≤ k 2 − 1. If τ i is the left subtree of v i , then the inductive hypothesis and the definition of f * guarantee that we can embed τ i into the copy of ξ d (f * (i)) that is glued to the left leaf of the f * (i) th vertebra. Contract this glued subtree to a copy of τ i ; then contract the right subtree of this vertebra to a point; then contract the vertebra itself to the edge connecting v i to τ i and one other edge below v i of the same type as the edge connecting v i and v i+1 in T . The exact same procedure can be done in the case where τ i is the right subtree of v i . If s i = 0 and i = m, then we contract everything in the f * (i) th vertebra except for a single edge of the type that connects v i and v i+1 in T . Things are even easier for i > 0 with s i = 0 and f * (i) ≤ k 2 − 1: in this case, we simply embed the (unique) edge below v i in the "center" crescent of the i th vertebra (i.e., the crescent whose bottom is the center leaf of the vertebra). When i = 0 and s 0 = 0, we embed this edge into the crescent at the top of the spine.
For d = 2, we finish by contracting the tail of ξ 2 (k) to a copy of the tree below v m in T . This completes the contraction of ξ 2 (k) to T , which, as remarked earlier, can be further contracted to T . Now, we turn to d > 2. We will later show that if f >2 (m − 1) = k 2 , then s m−1 ≤ k+1 4 , so we can embed τ m−1 at the level of the k 2 th d-vertebra as in the previous paragraph. And then we contract the tail of ξ d (k) to a copy of the tree below v m in T , which completes the contraction of ξ d (k) to T .
The next order of business is showing that f 2 and f >2 have the desired properties for the embedding described above. We first show that Both functions are strictly increasing on i ≤ m − 1, so this will also prove that they are injective. Easy induction on r shows that with equality exactly when s 0 ≥ 1 and s i ≤ 1 for all 1 ≤ i ≤ r. In particular, At the same time, recall that max{1, s i } is controlled by the number of edges of T (non-red edges of T ) that "peel away" at the vertex v i (compare with (2)), so the condition for the termination of the sequence (T i , v i ) implies that This immediately implies the claim about f >2 (m − 1).
Next, we can show that the inequalities (3) and (4) cannot both be tight for d = 2; this will imply that f 2 (m − 2) ≤ k 2 − 2, and the inequality f 2 (m − 1) ≤ k 2 − 1 will immediately follow from the definition of f 2 . To see that this improvement is in fact achieved, note that the first condition in equation (2) (which implies an improvement to (4)) always occurs somewhere unless T consists of a path on k 2 + 1 vertices with a tree on k 2 vertices glued to the bottom. But in this exceptional case, we have s 0 = 0, so inequality (3) is not tight. This completes the proof for d = 2.
We remark that in the d = 2 case, ad hoc arguments show that this construction is in fact optimal for k ≤ 5; however, small refinements are possible for sufficiently large k.
Now that we have shown that the ξ d (k)'s are in fact noncontiguous k-universal d-ary plane trees, we focus on their sizes. Let M d (k) denote the number of vertices in ξ d (k). The following proposition, whose proof we omit, follows from counting the various parts of ξ d (k) as described in the recursive construction above. Let δ x,y denote the Kronecker delta, which has the value 1 when x = y and the value 0 otherwise. Note that the −1's below account for "overlap" vertices that are contained in multiple parts.
We can use Proposition 2.6 and an argument similar to one of the proofs in [26] to obtain asymptotics for M d (k). Proof. Fix d. It will be convenient to work with natural logarithms, so note that k 1 2 log 2 (k) = exp 1 2 log 2 log 2 k . We first prove that there is some constant C (depending on d) such that M d (k) < C exp 1 2 log 2 log 2 k for all k. We proceed by induction on k, where making C large deals with any base cases. It is obvious (by construction) that M d (k) = |ξ d (k)| is monotonically increasing in k. We compute (for sufficiently large k): < C exp 1 2 log 2 log 2 (k − 2) + 5C exp 1 2 log 2 log 2 k + 1 2 = C exp 1 2 log 2 log 2 (k − 2) 1 + 5 exp 1 2 log 2 log (k + 1)(k − 2) 2 log k + 1 2(k − 2)

Upper bounds.
As mentioned in the introduction, the quantity N con d -ary (k) = d k−1 + k − 1 is an upper bound for N con [d] (k). We can dramatically improve the base of the exponential by describing an explicit construction for a family {Λ d (k)} of contiguous k-universal [d]-trees.
The construction of Λ d (k) is recursive. We first let Λ d (1) be a single vertex. For 2 ≤ k ≤ d, we construct Λ d (k) by attaching the subtrees (1) to the root, in that order from left to right. For k > d, to the root, in that order from left to right. The proof that these trees are in fact k-supertrees is similar in spirit to the proof of Theorem 2.5. Proof. We proceed by strong induction on k, where the base case k = 1 is trivial. For the induction step, we begin with the case in which 2 ≤ k ≤ d. Let T be a [d]-tree on k vertices. Let T 1 , . . . , T be the subtrees of the root of T , from left to right. Of these trees, let T m be one with the most vertices. We embed T 1 , . . . , T into the subtrees of the root of Λ d (k) in a greedy way, with a preference for subtrees farther to the left. We consider two cases based on the size of T m . If |T m | ≥ k 2 , then by the induction hypothesis, we can embed T m in the subtree of the root of Λ d (k) that is isomorphic to Λ d (k − 1) (with the roots coinciding). The remaining subtrees, which contain at most k 2 − 1 vertices in total, can easily be embedded in the smaller subtrees of the root of In this case, we let f (1) = |T 1 | and, for 2 ≤ i ≤ , let f (i) = max{1 + f (i − 1), |T i |}. Note that f is strictly increasing. We have for each r, where the second inequality uses the fact that |T i | ≥ 1 for all i. In particular, f ( ) ≤ k−1.
We now claim that we can embed each T r in the f (r) th subtree of the root of Λ d (k) (with the roots coinciding). This is certainly possible when f (r) ≤ k 2 by the induction hypothesis because f (r) ≥ |T r |. It is also possible when f (r) > k 2 because f (r) ≤ k − 1 − ( − r). (These two statements also use the fact that |T m | ≤ k 2 .) This completes the argument when 2 ≤ k ≤ d.
We now assume k > d. Let T be a [d]-tree on k vertices, and let T 1 , . . . , T be the subtrees of its root, from left to right. Again, we have |T 1 | + · · · + |T | = k − 1. As above, it is easy to dispense with the case in which some |T i | ≥ k − d 2 , so we restrict our attention to the case where Note that g is strictly increasing and for every r. In particular, if we let h s denote the number of trees in the set T 1 , . . . , T with exactly s vertices, then for r = we get If h s ≥ 1 for some s ≥ k − d + 1, then this shows that g( ) ≤ d. Otherwise, we have In either case, g( ) ≤ d. Since g is strictly increasing, g(r) ≤ d − ( − r) for all r ∈ {1, . . . , }.
We now claim that we can embed each T r in the g(r) th subtree of the root of Λ d (k) (with the roots coinciding). As above, this is possible whenever g(r) We can also describe the sizes of these k-universal [d]-trees. Let L d (k) denote the number of vertices in Λ d (k). The following enumeration follows directly from the definition of Λ d (k).
For k > d, we have the recurrence Corollary 3.4. Let x i .
Proof. The inequality N con Using the recurrence in Proposition 3.3, it is straightforward to check that G d (x) is a rational function with denominator p d (x). Since G d (x) has nonnegative coefficients, it follows from Pringsheim's theorem [22,Chapter IV] that x d is the radius of convergence of G d (x). This means that L d (k) = (ρ d + o(1)) k .
To prove the last statement of the corollary, we consider only the case in which d is odd; the argument is similar when d is even. All asymptotics are as d → ∞. First, note that and (1)).
Rearranging, we find that Therefore, where W is the Lambert W function. The desired result follows.
3.2. Noncontiguous containment. The following theorem relates noncontiguous k-universal [d]trees with noncontiguous k-universal d-ary plane trees. In particular, it shows that the minimum sizes of these trees differ by at most a constant factor. Proof. The first inequality is straightforward because if we are given a noncontiguous k-universal d-ary plane tree T , then we can obtain a noncontiguous k-universal [d]-tree T by "forgetting" the exact types of all of the edges in T . In other words, we interpret T as a [d]-tree.
For the second inequality, suppose T is a noncontiguous k-universal [d]-tree on n vertices. We obtain a noncontiguous k-universal d-ary plane tree T on d(n−1)+1 vertices by doing the following for each edge e in T. Among all edges with the same parent vertex as e, suppose e is the i th from the left. We replace the edge e (along with its endpoints) with a d-ary plane tree path on d edges whose topmost edge has type i and whose remaining edges have types 1 through d, skipping i. Note that |T | = d(|T| − 1) + 1 since each of the |T| − 1 edges in T has become d edges in T .
We claim that T is in fact a noncontiguous k-universal d-ary plane tree. Let T be a d-ary plane tree on k vertices, and let T be the corresponding [d]-tree that is obtained by forgetting the types of the edges in T . By hypothesis, T noncontiguously contains T . For each edge e in T , let e be the corresponding edge in T . Let e be the edge in T that corresponds to e in the noncontiguous embedding of T in T. Recall that e becomes d edges, one of each type, in T ; let e be the edge among these with the same type as e . Color every such edge e blue, and color all other edges of T red. It is clear that if we contract away all of the red edges, the blue edges will form a copy of T , so it remains only to show that a sequence of legal contractions exists.
We begin by contracting every red edge whose bottom vertex is a leaf. We continue this process until every leaf is incident to a blue edge. We contract the remaining red edges, starting with those at the greatest depth (i.e., farthest from the root) and working our way upwards. So we can always assume that all edges of greater depth than our red edges of interest are blue. If the top vertex of a red edge has no other nonempty subtree, then we can legally contract that red edge. We are now left with the case where the top vertex v of our red edge r has multiple children. Consider the nonempty subtrees of v, from left to right. If r is not adjacent to another red edge, then we can contract r immediately. Otherwise, there are consecutive red edges r 1 , . . . , r s (s ≥ 2). We will show that there is some r i that we can legally contract; we will then be able to sequentially contract the remaining edges by induction.
Let each r i have edge type a i . Let b i denote the minimum type of a (necessarily blue) edge directly below r i , and let c i denote the maximum type of a (necessarily blue) edge directly below r i . It follows from our construction that The condition for being able to legally contract r 1 is c 1 < a 2 , and the condition for being able to legally contract r s is a s−1 < b s . For 2 ≤ i ≤ s − 1, the conditions for being able to contract r i are a i−1 < b i and c i < a i+1 . Assume (for contradiction) that we cannot legally contract any of the edges r 1 , . . . , r s . Since we cannot contract r 1 , we must have c 1 ≥ a 2 . Since we cannot contract r 2 , we must have either a 1 ≥ b 2 or c 2 ≥ a 3 . In the first case, we get which is a contradiction, so we conclude that c 2 ≥ a 3 . Similarly, since we cannot contract a 3 , we have either a 2 ≥ b 3 or c 3 ≥ a 4 , and the first possibility yields a contradiction in the same way. Continuing this line of reasoning, we arrive at c s−1 ≥ a s . Then a s−1 < a s ≤ c s−1 < b s tells us that we can legally contract r s , so we are done. This demonstrates that we can legally contract all of the red edges. Now that we have established this connection between d-ary plane trees and [d]-trees, we revisit the construction of the trees ξ d (k) from Section 2.2. Because [d]-trees have more "flexibility" than d-ary plane trees, we can use a slightly better (and simpler!) construction to beat the first inequality in Theorem 3.5. We call these new noncontiguous k-universal [d]-trees Ξ d (k).
First, we use the path on 2 vertices instead of the d-crescent. If d > 2, we define the modified d-vertebra to be the [d]-tree on 4 vertices in which the root has 3 children; when d = 2, the modified 2-vertebra is the [2]-tree with 5 vertices in which the root has 2 children and the left child of the root has 2 children. As in the case of the d-vertebra, we can identify the left, middle, and right children of the modified vertebra in the obvious way. We then construct the m th spine exactly as in Section 2.2.
Our recursive definition of the families Ξ d (k) resembles the presentation of Section 2.2. We begin with the following base cases: • Let Ξ d (1) consist of a single vertex.
• Let Ξ d (2) be the path on 2 vertices (scil., the analogue of the crescent).
• Obtain Ξ d (3) from the path on 2 vertices by giving the bottom vertex 2 children.
The construction for larger k is recursive and differs for d = 2 and d > 2. If d = 2, then for k ≥ 4, we obtain Ξ 2 (k) from the k 2 − 1 th 2-spine as follows: (1) For each 1 ≤ i ≤ k 2 − 2, glue a copy of Ξ 2 (i) to each of the left and right leaves of the i th modified 2-vertebra.
(4) Glue a copy of Ξ 2 ( k 2 ) to the center leaf of the k 2 − 1 th modified 2-vertebra.
If d > 2, then for k ≥ 4, we obtain Ξ d (k) from the k 2 − 1 th d-spine as follows: (1) For each 1 ≤ i ≤ k 2 − 2, glue a copy of Ξ d (i) to each of the left and right leaves of the i th modified d-vertebra.
(2) Glue a copy of Ξ d ( k 2 − 1) to the right leaf of the k 2 − 1 th (i.e., second-lowest) modified d-vertebra. (4) Glue a copy of Ξ d ( k 2 ) to the center leaf of the k 2 th (i.e., lowest) modified d-vertebra. For k ≥ 4, we still say that the tail of Ξ d (k) is the copy of Ξ d ( k 2 ) that is glued to the center leaf of the bottom of the spine in step (4). We remark that the trees Ξ 3 (k), Ξ 4 (k), . . . are all identical.
We omit the proof of the following theorem because it is identical to the proof of Theorem 2.5. Also as before, simple counting gives a recursive formula for the number of vertices in Ξ d (k), which we denote M d (k).

Conclusions
In Section 2, we found the exact values of N con d -ary (k) for all d ≥ 2 and k ≥ 1. Furthermore, the lower and upper bounds that we obtained for N con [d] (k) are relatively close to each other. By contrast, our lower and upper bounds for N non d -ary (k) and N non [d] (k) are far apart. This is largely because it is difficult to obtain good lower bounds for the sizes of noncontiguous universal objects, which is also true in the setting of universal permutations. It would be nice to have better methods for producing lower bounds. Of course, we also encourage the interested reader to try improving our upper bounds.
Theorem 3.5 leads us naturally to ask the following. The articles [10][11][12][13][14] investigate universal trees, where the trees under consideration are unrooted and nonplane. In this setting, a tree T contains a tree T if T is an induced subgraph of T . It would likely be interesting to consider analogous questions in a noncontiguous framework. More precisely, say that a tree T noncontiguously contains a tree T if it is possible to obtain T by performing a sequence of edge contractions on T . In this setting, what is the smallest size of a tree that noncontiguously contains all k-vertex trees?
There has also been recent interest in pattern containment/avoidance in labeled rooted trees [6,18]. It would be interesting to examine universal trees in these contexts, as well.