1 Introduction and Preliminaries

Many combinatorial objects that are counted by the Catalan numbers have k-ary analogues. Heubach, Li and Mansour list several such examples in [2], among them k-ary trees, different families of lattice paths, nonintersecting arc sequences, and certain types of Young diagrams.

The family of k-plane trees, which was first considered in [1], is another example that leads to k-ary analogues of the Catalan numbers. It is the family of all labelled plane trees (rooted trees where the order of branches matters) with vertex labels in the set \([k] = \{1,2,\ldots ,k\}\) and the restriction that the sum of the labels along any edge is never greater than \(k+1\). Figure 1 shows an example of a 4-plane tree.

Note that 1-plane trees are simply plane trees where every vertex is labelled 1, which are counted by the Catalan numbers. Moreover, we note that a plane tree with vertex labels in \(\{1,2\}\) is a 2-plane tree if and only if the vertices labelled 2 form an independent set. Therefore, the total number of 2-plane trees is the same as the total number of independent sets in all plane trees, which was determined in [5].

The number of k-plane trees with n vertices is the generalised Catalan number

$$\begin{aligned} \frac{1}{n-1} \left( {\begin{array}{c}(k+1)(n-1)\\ n\end{array}}\right) = \frac{k}{n} \left( {\begin{array}{c}(k+1)(n-1)\\ n-1\end{array}}\right) , \end{aligned}$$

and there is a similar formula for the number of k-plane trees with n vertices whose root is labelled h:

$$\begin{aligned} \frac{k+1-h}{kn-h+1} \left( {\begin{array}{c}(k+1)n-h-1\\ n-1\end{array}}\right) . \end{aligned}$$

In particular, we obtain the number of \((k+1)\)-ary trees (trees where every internal vertex has precisely \(k+1\) children) with \(n-1\) internal vertices when \(h = k\). An explicit bijection is provided in [1].

Fig. 1
figure 1

An example of a 4-plane tree

The aim of this paper is to provide refined counting formulas for k-plane trees based on the number of occurrences of each label. Perhaps surprisingly, there is an explicit product formula for the number of k-plane trees with prescribed multiplicities of all labels. The main theorem reads as follows:

Theorem 1.1

Let \(n > 1\). The number of k-plane trees with root label h, \(\ell _i\) vertices labelled i (\(i \in [k]\)) and \(n = \ell _1+\ell _2 + \cdots + \ell _k\) vertices in total is given by

$$\begin{aligned}{} & {} \frac{\ell _h}{n(2n-1)} \prod _{r=1}^{\lceil k/2 \rceil } \left( {\begin{array}{c}2n-1-\sum _{j=1}^{r-1} \ell _j - \sum _{j=k+2-r}^k \ell _j\\ \ell _r\end{array}}\right) \\{} & {} \quad \prod _{r=1}^{h-1} \left( {\begin{array}{c}\sum _{j=1}^{r} \ell _j + \sum _{j=k+1-r}^k \ell _j - 1\\ \ell _{k+1-r}\end{array}}\right) \prod _{r=h}^{\lfloor k/2 \rfloor } \left( {\begin{array}{c}\sum _{j=1}^{r} \ell _j + \sum _{j=k+1-r}^k \ell _j\\ \ell _{k+1-r}\end{array}}\right) \end{aligned}$$

if \(h \le \lceil k/2 \rceil \), and by

$$\begin{aligned}{} & {} \frac{\ell _h}{(n-1)(2n-1)} \prod _{r=1}^{k+1-h} \left( {\begin{array}{c}2n-1-\sum _{j=1}^{r-1} \ell _j - \sum _{j=k+2-r}^k \ell _j\\ \ell _r\end{array}}\right) \\{} & {} \quad \prod _{r=k+2-h}^{\lceil k/2 \rceil } \left( {\begin{array}{c}2n-2-\sum _{j=1}^{r-1} \ell _j - \sum _{j=k+2-r}^k \ell _j\\ \ell _r\end{array}}\right) \\ {}{} & {} \quad \prod _{r=1}^{\lfloor k/2 \rfloor } \left( {\begin{array}{c}\sum _{j=1}^{r} \ell _j + \sum _{j=k+1-r}^k \ell _j - 1\\ \ell _{k+1-r}\end{array}}\right) \end{aligned}$$

otherwise. The total number of k-plane trees with \(\ell _i\) vertices labelled i (\(i \in [k]\)) and \(n = \ell _1+\ell _2 + \cdots + \ell _k\) vertices in total is

$$\begin{aligned}{} & {} \frac{1}{n-1} \prod _{r=1}^{\lceil k/2 \rceil } \left( {\begin{array}{c}2n-2-\sum _{j=1}^{r-1} \ell _j - \sum _{j=k+2-r}^k \ell _j\\ \ell _r\end{array}}\right) \\ {}{} & {} \quad \prod _{r=1}^{\lfloor k/2 \rfloor } \left( {\begin{array}{c}\sum _{j=1}^{r} \ell _j + \sum _{j=k+1-r}^k \ell _j - 1\\ \ell _{k+1-r}\end{array}}\right) . \end{aligned}$$

Let us remark here that empty products are always considered to be 1, and empty sums are considered to be 0. To illustrate the result in a special case, let us give the formula for the total number of 4-plane trees with \(\ell _1,\ell _2,\ell _3,\ell _4\) vertices labelled 1, 2, 3, 4 respectively and \(n = \ell _1 + \ell _2 + \ell _3 + \ell _4\) vertices in total:

$$\begin{aligned}{} & {} \frac{1}{n-1} \left( {\begin{array}{c}2n-2\\ \ell _1\end{array}}\right) \left( {\begin{array}{c}2n-2-\ell _1-\ell _4\\ \ell _2\end{array}}\right) \left( {\begin{array}{c}\ell _1 + \ell _2 + \ell _3 + \ell _4 - 1\\ \ell _3\end{array}}\right) \left( {\begin{array}{c}\ell _1 + \ell _4 - 1\\ \ell _4\end{array}}\right) \\{} & {} \quad = \frac{1}{n-1} \left( {\begin{array}{c}2n-2\\ \ell _1\end{array}}\right) \left( {\begin{array}{c}2n-2-\ell _1-\ell _4\\ \ell _2\end{array}}\right) \left( {\begin{array}{c}n-1\\ \ell _3\end{array}}\right) \left( {\begin{array}{c}\ell _1 + \ell _4 - 1\\ \ell _4\end{array}}\right) . \end{aligned}$$

Let us also mention again that 2-plane trees are precisely \(\{1,2\}\)-labelled plane trees where the vertices labelled 2 form an independent set. Therefore, for \(k=2\), we obtain formulas due to Kirschenhofer et al. [4] for the total number of independent sets of a given size (containing the root, not containing the root, and total) in plane trees with n vertices as special cases.

Theorem 1.1 will be proven in Sect. 2 by first establishing a system of functional equations, which can be solved explicitly by means of a suitable substitution. The formula finally follows by an application of the Lagrange–Bürmann formula. We will derive a number of corollaries from the formula in Theorem 1.1, in particular on the average number of occurrences of a specific label.

The family of k-plane trees can also be bijectively related to lattice paths with up-steps of the form (1, 1) and down-steps of the form \((1,-k)\), see [1]. In [3], such paths are enumerated by the y-coordinates of the down-steps modulo k. Interestingly, the number of paths with exactly \(a_i\) down-steps at level i modulo k for every i turns out to be given by a similar, albeit somewhat different, product formula as those in Theorem 1.1.

In Sect. 3, we consider a similar family of trees called k-noncrossing trees: recall that a noncrossing tree is a tree whose vertices \(v_1,v_2,\ldots ,v_n\) can be arranged as points on a circle (in this order) with the edges represented by line segments between these points that do not intersect at interior points. In analogy to k-plane trees, one defines k-noncrossing trees as noncrossing trees whose vertices are labelled with labels in [k] in such a way that the labels of two adjacent vertices \(v_i, v_j\) with \(i < j\) cannot add up to a sum greater than \(k+1\) if the path from the root \(v_1\) to \(v_j\) contains \(v_i\) (this includes the case that \(i = 1\)). Figure 2 shows an example of a 3-noncrossing tree. Note that it contains two edges between vertices labelled 2 and 3 respectively that would not be allowed in a k-plane tree, but are allowed here because the path from the root moves from the vertex with higher index to the vertex with lower index.

The special case \(k = 2\) was considered in [9], where a bijection between 2-noncrossing trees with a root labelled 2 and 5-ary trees was constructed. The more general case was studied in [7], see also [6].

Fig. 2
figure 2

An example of a 3-noncrossing tree

In analogy to Theorem 1.1, we will also be counting k-noncrossing trees by the number of vertices of each label. The resulting formulas are quite similar and again surprisingly explicit.

Theorem 1.2

Let \(n > 1\). The number of k-noncrossing trees with root label h, \(\ell _i\) vertices labelled i (\(i \in [k]\)) and \(n = \ell _1+\ell _2 + \cdots + \ell _k\) vertices in total is given by

$$\begin{aligned}&\frac{2\ell _h}{(2n-1)(4n-3)} \prod _{r=1}^{\lceil k/2 \rceil } \left( {\begin{array}{c}3n-2-\sum _{j=1}^{r-1} \ell _j - \sum _{j=k+2-r}^k \ell _j\\ \ell _r\end{array}}\right) \\&\qquad \prod _{r=1}^{h-1} \left( {\begin{array}{c}n - 2 + \sum _{j=1}^{r} \ell _j + \sum _{j=k+1-r}^k \ell _j\\ \ell _{k+1-r}\end{array}}\right) \\ {}&\quad \prod _{r=h}^{\lfloor k/2 \rfloor } \left( {\begin{array}{c}n - 1 + \sum _{j=1}^{r} \ell _j + \sum _{j=k+1-r}^k \ell _j\\ \ell _{k+1-r}\end{array}}\right) \\&\quad - \frac{\ell _h }{(4n-3)(3n-2-\sum _{j=1}^{h-1} \ell _j - \sum _{j=k+2-h}^k \ell _j)} \\ {}&\quad \prod _{r=1}^{\lfloor k/2 \rfloor } \left( {\begin{array}{c}n - 1 + \sum _{j=1}^{r} \ell _j + \sum _{j=k+1-r}^k \ell _j\\ \ell _{k+1-r}\end{array}}\right) \\&\qquad \prod _{r=1}^{h-1} \left( {\begin{array}{c}3n-3-\sum _{j=1}^{r-1} \ell _j - \sum _{j=k+2-r}^k \ell _j\\ \ell _r\end{array}}\right) \\ {}&\quad \prod _{r=h}^{\lceil k/2 \rceil } \left( {\begin{array}{c}3n-2-\sum _{j=1}^{r-1} \ell _j - \sum _{j=k+2-r}^k \ell _j\\ \ell _r\end{array}}\right) \end{aligned}$$

if \(h \le \lceil k/2 \rceil \), and by

$$\begin{aligned}&\frac{\ell _h}{(n-1)(4n-3)} \prod _{r=1}^{\lfloor k/2 \rfloor } \left( {\begin{array}{c}n - 2 + \sum _{j=1}^{r} \ell _j + \sum _{j=k+1-r}^k \ell _j\\ \ell _{k+1-r}\end{array}}\right) \\&\qquad \prod _{r=1}^{k+1-h} \left( {\begin{array}{c}3n-2-\sum _{j=1}^{r-1} \ell _j - \sum _{j=k+2-r}^k \ell _j\\ \ell _r\end{array}}\right) \\ {}&\quad \prod _{r=k+2-h}^{\lceil k/2 \rceil } \left( {\begin{array}{c}3n-3-\sum _{j=1}^{r-1} \ell _j - \sum _{j=k+2-r}^k \ell _j\\ \ell _r\end{array}}\right) \\&\quad - \frac{\ell _h }{(4n-3)(n - 1 + \sum _{j=1}^{k+1-h} \ell _j + \sum _{j=h}^k \ell _j)} \\ {}&\quad \prod _{r=1}^{\lceil k/2 \rceil } \left( {\begin{array}{c}3n-3-\sum _{j=1}^{r-1} \ell _j - \sum _{j=k+2-r}^k \ell _j\\ \ell _r\end{array}}\right) \\&\qquad \prod _{r=1}^{k+1-h} \left( {\begin{array}{c}n - 1 + \sum _{j=1}^{r} \ell _j + \sum _{j=k+1-r}^k \ell _j\\ \ell _{k+1-r}\end{array}}\right) \\ {}&\quad \prod _{r=k+2-h}^{\lfloor k/2 \rfloor } \left( {\begin{array}{c}n - 2 + \sum _{j=1}^{r} \ell _j + \sum _{j=k+1-r}^k \ell _j\\ \ell _{k+1-r}\end{array}}\right) \end{aligned}$$

otherwise. The total number of k-noncrossing trees with \(\ell _i\) vertices labelled i (\(i \in [k]\)) and \(n = \ell _1+\ell _2 + \cdots + \ell _k\) vertices in total is

$$\begin{aligned}{} & {} \frac{1}{n-1} \prod _{r=1}^{\lceil k/2 \rceil } \left( {\begin{array}{c}3n-3-\sum _{j=1}^{r-1} \ell _j - \sum _{j=k+2-r}^k \ell _j\\ \ell _r\end{array}}\right) \\ {}{} & {} \quad \prod _{r=1}^{\lfloor k/2 \rfloor } \left( {\begin{array}{c}n - 2 + \sum _{j=1}^{r} \ell _j + \sum _{j=k+1-r}^k \ell _j\\ \ell _{k+1-r}\end{array}}\right) \\{} & {} \quad - \frac{1}{2n-1} \prod _{r=1}^{\lceil k/2 \rceil } \left( {\begin{array}{c}3n-2-\sum _{j=1}^{r-1} \ell _j - \sum _{j=k+2-r}^k \ell _j\\ \ell _r\end{array}}\right) \\ {}{} & {} \quad \prod _{r=1}^{\lfloor k/2 \rfloor } \left( {\begin{array}{c}n - 1 + \sum _{j=1}^{r} \ell _j + \sum _{j=k+1-r}^k \ell _j\\ \ell _{k+1-r}\end{array}}\right) . \end{aligned}$$

This theorem will be proven in Sect. 3, using similar techniques as in the proof of Theorem 1.1, and several corollaries will follow as well. Let us again illustrate the formula in the special case \(k=4\), where the formula for the total number of 4-noncrossing trees with \(\ell _1,\ell _2,\ell _3,\ell _4\) vertices labeled 1, 2, 3, 4 respectively and n vertices in total is

$$\begin{aligned}{} & {} \frac{1}{n-1} \left( {\begin{array}{c}3n-3\\ \ell _1\end{array}}\right) \left( {\begin{array}{c}3n-3-\ell _1 -\ell _4\\ \ell _2\end{array}}\right) \left( {\begin{array}{c}2n - 2\\ \ell _3\end{array}}\right) \left( {\begin{array}{c}n - 2 + \ell _1 + \ell _4\\ \ell _4\end{array}}\right) \\{} & {} \quad - \frac{1}{2n-1} \left( {\begin{array}{c}3n-2\\ \ell _1\end{array}}\right) \left( {\begin{array}{c}3n-2-\ell _1 - \ell _4\\ \ell _2\end{array}}\right) \left( {\begin{array}{c}2n - 1\\ \ell _3\end{array}}\right) \left( {\begin{array}{c}n - 1 + \ell _1 + \ell _4\\ \ell _4\end{array}}\right) . \end{aligned}$$

2 Plane Trees

The key to proving Theorem 1.1 is a system of equations for the multivariate generating functions of k-plane trees with a given root label. We fix k and let \({\mathcal {P}}_r\) denote the set of k-plane trees whose root is labelled r. Moreover, we let \(h_i(T)\) be the number of vertices labelled i in a tree T, and |T| the total number of vertices of T. Define

$$\begin{aligned} P_r = P_r(z,x_1,x_2,\ldots ,x_k) = \sum _{T \in {\mathcal {P}}_r} z^{|T|} \prod _{i=1}^k x_i^{h_i(T)}. \end{aligned}$$

Now note that a tree \(T \in {\mathcal {P}}_r\) can be decomposed into the root (labelled r) and a (possibly empty) sequence of branches that are again k-plane trees, with root labels in \([k+1-r] = \{1,2,\ldots ,k+1-r\}\). Thus we have

$$\begin{aligned} P_r = x_r z \sum _{j \ge 0} (P_1 + P_2 + \cdots + P_{k+1-r})^j = \frac{x_r z}{1-P_1-P_2 - \cdots - P_{k+1-r}} \end{aligned}$$
(1)

for all \(r \in [k]\).

Now let us set

$$\begin{aligned} F_{k,i}(t) = 1 + \left( \sum _{j=i}^{\lceil k/2\rceil } x_j - \sum _{j=i}^{\lfloor k/2\rfloor } x_{k+1-j} \right) t \end{aligned}$$

and

$$\begin{aligned} G_{k,i}(t) = 1 + \left( \sum _{j=i+1}^{\lceil k/2\rceil } x_j - \sum _{j=i}^{\lfloor k/2\rfloor } x_{k+1-j} \right) t \end{aligned}$$

for \(1 \le i \le \lceil k/2\rceil \). These expressions satisfy the recursions

$$\begin{aligned} F_{k,i+1}(t) = G_{k,i}(t) + x_{k+1-i}t \qquad \text {and} \qquad G_{k,i}(t) = F_{k,i}(t) - x_i t, \end{aligned}$$
(2)

as well as

$$\begin{aligned}{} & {} F_{k,i+1}(t) = F_{k,i}(t) + (x_{k+1-i} - x_i)t \qquad \text {and}\nonumber \\ {}{} & {} \qquad G_{k,i+1}(t) = G_{k,i}(t) + (x_{k+1-i} - x_{i+1})t. \end{aligned}$$
(3)

We can use these recursions to continue the definition of \(F_{k,i}(t)\) and \(G_{k,i}(t)\) to greater values of i: generally, we set

$$\begin{aligned} F_{k,i}(t) = F_{k,1}(t) + \sum _{j=1}^{i-1} (x_{k+1-j} - x_j)t \end{aligned}$$

and

$$\begin{aligned} G_{k,i}(t) = G_{k,1}(t) + \sum _{j=1}^{i-1} (x_{k+1-j} - x_{j+1})t. \end{aligned}$$

Both (2) and (3) remain satisfied. Since

$$\begin{aligned} \sum _{j=i}^{k+1-i} (x_{k+1-j} - x_j) = 0 \qquad \text {and} \qquad \sum _{j=i}^{k-i} (x_{k+1-j} - x_{j+1}) = 0, \end{aligned}$$

we see that the following symmetry properties hold:

$$\begin{aligned} F_{k,i}(t) = F_{k,k+2-i}(t)\qquad \text {and} \qquad G_{k,i}(t) = G_{k,k+1-i}(t). \end{aligned}$$
(4)

Moreover, it is important to observe that

$$\begin{aligned} F_{k,k/2+1} = 1\quad (k \text { even})\qquad \text {and} \qquad G_{k,(k+1)/2} = 1\quad (k \text { odd}). \end{aligned}$$
(5)

The key to the proof of Theorem 1.1 is the substitution

$$\begin{aligned} P_1 = \frac{x_1 A}{F_{k,1}(A)} \end{aligned}$$
(6)

for a suitable power series A. One can easily solve the equation for A to show that this power series actually exists (and that it is unique).

As it turns out, we can express \(P_1,P_2,\ldots ,P_{k-1}\) in terms of A as well and also set up a functional equation for A that is amenable to an application of the Lagrange inversion formula.

Proposition 2.1

The power series \(P_1,P_2,\ldots ,P_k\) can be expressed in terms of A and the variables \(x_1,x_2,\ldots ,x_k\) and z in the following way: for \(1 \le h \le k\),

$$\begin{aligned} P_h&= x_h A \prod _{i=1}^{h} F_{k,i}(A)^{-1} \prod _{i=1}^{h-1} G_{k,i}(A), \\ P_{k+1-h}&= x_{k+1-h} z \prod _{i=1}^{h} F_{k,i}(A) \prod _{i=1}^h G_{k,i}(A)^{-1}. \end{aligned}$$

Proof

We use induction on h. For \(h = 1\), the first equation is exactly our substitution (6), while the second equation follows from (1) for \(r = k\) and an application of (2):

$$\begin{aligned} P_k = \frac{x_k z}{1-P_1} = \frac{x_k z}{1 - \frac{x_1 A}{F_{k,1}(A)}} = \frac{x_k z F_{k,1}(A)}{F_{k,1}(A) - x_1 A} = \frac{x_k z F_{k,1}(A)}{G_{k,1}(A)}. \end{aligned}$$

For the induction step, use (1) with \(r = h\) and \(r = h+1\) respectively, which yields

$$\begin{aligned} 1 - P_1 - P_2 - \cdots - P_{k+1-h} = \frac{x_h z}{P_h}, \\ 1 - P_1 - P_2 - \cdots - P_{k-h} = \frac{x_{h+1} z}{P_{h+1}}. \end{aligned}$$

Now take the difference:

$$\begin{aligned} P_{k+1-h} = \frac{x_{h+1}z}{P_{h+1}} - \frac{x_hz}{P_h}. \end{aligned}$$
(7)

After some simple manipulations, this gives us

$$\begin{aligned} P_{h+1} = \frac{x_{h+1}z}{P_{k+1-h} + \frac{x_h z}{P_h}}. \end{aligned}$$
(8)

Now it only remains to apply the induction hypothesis and simplify:

$$\begin{aligned}&P_{h+1}\\&\quad = \frac{x_{h+1}z}{x_{k+1-h} z \prod _{i=1}^h F_{k,i}(A) \prod _{i=1}^h G_{k,i}(A)^{-1} + \frac{z}{A} \prod _{i=1}^h F_{k,i}(A) \prod _{i=1}^{h-1} G_{k,i}(A)^{-1}} \\&\quad = \frac{x_{h+1}A}{x_{k+1-h}A + G_{k,h}(A)} \prod _{i=1}^h F_{k,i}(A)^{-1} \prod _{i=1}^h G_{k,i}(A) \\&\quad = \frac{x_{h+1}A}{F_{k,h+1}(A)} \prod _{i=1}^h F_{k,i}(A)^{-1} \prod _{i=1}^h G_{k,i}(A) \\&\quad = x_{h+1}A \prod _{i=1}^{h+1} F_{k,i}(A)^{-1} \prod _{i=1}^h G_{k,i}(A). \end{aligned}$$

Likewise, replacing h by \(k-h\) in (7) gives us

$$\begin{aligned} P_{h+1} = \frac{x_{k+1-h}z}{P_{k+1-h}} - \frac{x_{k-h}z}{P_{k-h}}. \end{aligned}$$

Thus

$$\begin{aligned} P_{k-h} = \frac{x_{k-h}z}{\frac{x_{k+1-h}z}{P_{k+1-h}} - P_{h+1}}. \end{aligned}$$

Now plug in (8) and apply the induction hypothesis. Again, we obtain the desired formula after some further manipulations. \(\square \)

Corollary 2.2

The power series A satisfies the equation

$$\begin{aligned} A = z \prod _{i=1}^{\lceil k/2 \rceil } F_{k,i}(A)^2 \prod _{i=1}^{\lfloor k/2 \rfloor } G_{k,i}(A)^{-2}. \end{aligned}$$

Proof

Replace h by \(k+1-h\) in the second equation of Proposition 2.1 to obtain another representation for \(P_h\):

$$\begin{aligned} P_h = x_h z \prod _{i=1}^{k+1-h} F_{k,i}(A) \prod _{i=1}^{k+1-h} G_{k,i}(A)^{-1}. \end{aligned}$$

Equating the two expressions for \(P_h\) yields

$$\begin{aligned} A = z \prod _{i=1}^h F_{k,i}(A) \prod _{i=1}^{k+1-h} F_{k,i}(A) \prod _{i=1}^{h-1} G_{k,i}(A)^{-1} \prod _{i=1}^{k+1-h} G_{k,i}(A)^{-1} \end{aligned}$$

Now we apply the symmetry properties (4) to the second and fourth product:

$$\begin{aligned} A&= z \prod _{i=1}^h F_{k,i}(A) \prod _{i=h+1}^{k+1} F_{k,i}(A) \prod _{i=1}^{h-1} G_{k,i}(A)^{-1} \prod _{i=h}^{k} G_{k,i}(A)^{-1} \\&= z \prod _{i=1}^{k+1} F_{k,i}(A) \prod _{i=1}^{k} G_{k,i}(A)^{-1}. \end{aligned}$$

Applying the symmetry properties once again, and noting that \(F_{k,k/2+1}\) can be left out if k is even, while \(G_{k,(k+1)/2}\) can be left out if k is odd (by (5)), we end up with

$$\begin{aligned} A = z \prod _{i=1}^{\lceil k/2 \rceil } F_{k,i}(A)^2 \prod _{i=1}^{\lfloor k/2 \rfloor } G_{k,i}(A)^{-2}, \end{aligned}$$

completing the proof. Note that h could have been chosen arbitrarily for this purpose. \(\square \)

We can now proceed with the proof of our first main theorem.

Proof of Theorem 1.1

We are now ready to apply the Lagrange–Bürmann formula [8, Corollary 5.4.3], based on Proposition 2.1 and Corollary 2.2. Let us first recall this formula: if A satisfies an implicit equation of the form \(A = z \Phi (A)\), then

$$\begin{aligned} {[}z^n] f(A) = \frac{1}{n} [t^{n-1}] f'(t) \Phi (t)^n. \end{aligned}$$
(9)

Now suppose first that \(h \le \lceil k/2 \rceil \). In view of Proposition 2.1 and Corollary 2.2, we can apply (9) with

$$\begin{aligned} \Phi (t) = \prod _{i=1}^{\lceil k/2 \rceil } F_{k,i}(t)^2 \prod _{i=1}^{\lfloor k/2 \rfloor } G_{k,i}(t)^{-2} \end{aligned}$$

and

$$\begin{aligned} f(t) = x_h t \prod _{i=1}^{h} F_{k,i}(t)^{-1} \prod _{i=1}^{h-1} G_{k,i}(t) \end{aligned}$$

in order to compute the coefficients of \(P_h\). The derivative \(f'\) is determined by means of logarithmic differentiation. It is also important to observe that

$$\begin{aligned} \frac{F'_{k,i}(t)}{F_{k,i}(t)} = \frac{1}{t} \Big ( 1 - \frac{1}{F_{k,i}(t)} \Big )\qquad \text {and} \qquad \frac{G'_{k,i}(t)}{G_{k,i}(t)} = \frac{1}{t} \Big ( 1 - \frac{1}{G_{k,i}(t)} \Big ), \end{aligned}$$

which yields

$$\begin{aligned} f'(t)&= f(t) \Big ( \frac{1}{t} - \sum _{i=1}^h \frac{F'_{k,i}(t)}{F_{k,i}(t)} + \sum _{i=1}^{h-1} \frac{G'_{k,i}(t)}{G_{k,i}(t)} \Big ) \\&= f(t) \Big ( \frac{1}{t} - \frac{1}{t} \sum _{i=1}^h \Big ( 1 - \frac{1}{F_{k,i}(t)} \Big ) + \frac{1}{t} \sum _{i=1}^{h-1} \Big ( 1 - \frac{1}{G_{k,i}(t)} \Big ) \Big ) \\&= \frac{f(t)}{t} \Big ( \sum _{i=1}^h \frac{1}{F_{k,i}(t)} - \sum _{i=1}^{h-1} \frac{1}{G_{k,i}(t)} \Big ). \end{aligned}$$

So we have

$$\begin{aligned}&{[}z^n x_1^{\ell _1} \cdots x_k^{\ell _k}] P_h \\ {}&\quad = \frac{1}{n} [t^{n-1} x_1^{\ell _1} \cdots x_k^{\ell _k}] f'(t) \Phi (t)^n \\&\quad = \frac{1}{n} [t^{n-1} x_1^{\ell _1} \cdots x_k^{\ell _k}] x_h \prod _{i=1}^{h} F_{k,i}(t)^{-1} \prod _{i=1}^{h-1} G_{k,i}(t) \\ {}&\qquad \Big ( \sum _{i=1}^h \frac{1}{F_{k,i}(t)} - \sum _{i=1}^{h-1} \frac{1}{G_{k,i}(t)} \Big ) \\&\qquad \prod _{i=1}^{\lceil k/2 \rceil } F_{k,i}(t)^{2n} \prod _{i=1}^{\lfloor k/2 \rfloor } G_{k,i}(t)^{-2n} \\&\quad = \frac{1}{n} [t^{n-1} x_1^{\ell _1} \cdots x_h^{\ell _h-1} \cdots x_k^{\ell _k}] \Big ( \prod _{i=h+1}^{\lceil k/2 \rceil } F_{k,i}(t) \prod _{i=h}^{\lfloor k/2 \rfloor } G_{k,i}(t)^{-1} \Big )^{2n} \\&\qquad \Big ( \prod _{i=1}^{h} F_{k,i}(t) \prod _{i=1}^{h-1} G_{k,i}(t)^{-1} \Big )^{2n-1} \Big ( \sum _{i=1}^h \frac{1}{F_{k,i}(t)} - \sum _{i=1}^{h-1} \frac{1}{G_{k,i}(t)} \Big ). \end{aligned}$$

At this point, we can drop the variable t (equivalently, set \(t=1\)), since the coefficient of \(t^{n-1} x_1^{\ell _1} \cdots x_h^{\ell _h-1} \cdots x_k^{\ell _k}\) is only nonzero if \(\ell _1 + \cdots + \ell _k = n\). Thus we will also only write \(F_{k,i}\) and \(G_{k,i}\) instead of \(F_{k,i}(1)\) and \(G_{k,i}(1)\) respectively.

Next we note that \(F_{k,1},F_{k,2},\ldots ,F_{k,h}\) and \(G_{k,1},G_{k,2},\ldots ,G_{k,h-1}\) are the only factors that contain the variable \(x_h\). Moreover, using logarithmic differentiation once again, one finds that

$$\begin{aligned} \frac{\partial }{\partial x_h} \Bigg ( \prod _{i=1}^{h} F_{k,i} \prod _{i=1}^{h-1} G_{k,i}^{-1} \Bigg )^{2n-1}= & {} (2n-1) \Bigg ( \prod _{i=1}^{h} F_{k,i} \prod _{i=1}^{h-1} G_{k,i}^{-1} \Bigg )^{2n-1}\\{} & {} \Bigg ( \sum _{i=1}^h \frac{1}{F_{k,i}} - \sum _{i=1}^{h-1} \frac{1}{G_{k,i}} \Bigg ). \end{aligned}$$

For any power series X, the coefficient of \(x_h^{\ell _h-1}\) in \(\frac{\partial }{\partial x_h} X\) is precisely \(\ell _h\) times the coefficient of \(x_h^{\ell _h}\) in X. Thus we get

$$\begin{aligned}{} & {} [z^n x_1^{\ell _1} \cdots x_k^{\ell _k}] P_h = \frac{\ell _h}{n(2n-1)} [x_1^{\ell _1} \cdots x_k^{\ell _k}] \Big ( \prod _{i=1}^{h} F_{k,i} \prod _{i=1}^{h-1} G_{k,i}^{-1} \Big )^{2n-1} \\ {}{} & {} \quad \Big ( \prod _{i=h+1}^{\lceil k/2 \rceil } F_{k,i} \prod _{i=h}^{\lfloor k/2 \rfloor } G_{k,i}^{-1} \Big )^{2n}. \end{aligned}$$

Now we finally start extracting coefficients. First of all, we observe that \(x_1\) only occurs in the factor \(F_{k,1}\). Moreover, we have

$$\begin{aligned} F_{k,1}^{2n-1} = (x_1 + G_{k,1})^{2n-1}, \end{aligned}$$

so the coefficient of \(x_1^{\ell _1}\) is \(\left( {\begin{array}{c}2n-1\\ \ell _1\end{array}}\right) G_{k,1}^{2n-1-\ell _1}\), giving us

$$\begin{aligned} {[}z^n x_1^{\ell _1} \cdots x_k^{\ell _k}] P_h{} & {} = \frac{\ell _h}{n(2n-1)} \left( {\begin{array}{c}2n-1\\ \ell _1\end{array}}\right) [x_2^{\ell _2} \cdots x_k^{\ell _k}]G_{k,1}^{-\ell _1} \\{} & {} \quad \Big ( \prod _{i=2}^{h} F_{k,i} \prod _{i=2}^{h-1} G_{k,i}^{-1} \Big )^{2n-1} \Big ( \prod _{i=h+1}^{\lceil k/2 \rceil } F_{k,i} \prod _{i=h}^{\lfloor k/2 \rfloor } G_{k,i}^{-1} \Big )^{2n}. \end{aligned}$$

Among the remaining factors, \(G_{k,1}\) is the only one that contains \(x_k\), and we have

$$\begin{aligned} {[}x_k^{\ell _k}] G_{k,1}^{-\ell _1}&= [x_k^{\ell _k}] (F_{k,2} - x_k)^{-\ell _1} = [x_k^{\ell _k}] F_{k,2}^{-\ell _1} \Big ( 1 - \frac{x_k}{F_{k,2}} \Big )^{-\ell _1} \\&= F_{k,2}^{-\ell _1} \left( {\begin{array}{c}-\ell _1\\ \ell _k\end{array}}\right) \Big ( - \frac{1}{F_{k,2}}\Big )^{\ell _k} = \left( {\begin{array}{c}\ell _1+\ell _k-1\\ \ell _k\end{array}}\right) F_{k,2}^{-\ell _1-\ell _k}. \end{aligned}$$

It follows that

$$\begin{aligned}{} & {} {[}z^n x_1^{\ell _1} \cdots x_k^{\ell _k}] P_h \\ {}{} & {} \quad = \frac{\ell _h}{n(2n-1)} \left( {\begin{array}{c}2n-1\\ \ell _1\end{array}}\right) \left( {\begin{array}{c}\ell _1+\ell _k-1\\ \ell _k\end{array}}\right) [x_2^{\ell _2} \cdots x_{k-1}^{\ell _{k-1}}]F_{k,2}^{2n-\ell _1-\ell _k-1} \\{} & {} \qquad \Big ( \prod _{i=3}^{h} F_{k,i} \prod _{i=2}^{h-1} G_{k,i}^{-1} \Big )^{2n-1} \Big ( \prod _{i=h+1}^{\lceil k/2 \rceil } F_{k,i} \prod _{i=h}^{\lfloor k/2 \rfloor } G_{k,i}^{-1} \Big )^{2n}. \end{aligned}$$

We can now continue in this way, considering the variables \(x_1,x_k,x_2,x_{k-1},x_3,\ldots \) in this order. At the end, we have precisely the first formula in Theorem 1.1.

The case that \(h > \lceil k/2 \rceil \) is treated in a similar way: since

$$\begin{aligned} P_{h} = x_{h} z \prod _{i=1}^{k+1-h} F_{k,i}(A) \prod _{i=1}^{k+1-h} G_{k,i}(A)^{-1} \end{aligned}$$

in this case by the second equation of Proposition 2.1, we apply the Lagrange–Bürmann formula with

$$\begin{aligned} f(t) = x_h \prod _{i=1}^{k+1-h} F_{k,i}(t) \prod _{i=1}^{k+1-h} G_{k,i}(t)^{-1} \end{aligned}$$

and the same function \(\Phi \) as before. This yields

$$\begin{aligned}{}[z^n x_1^{\ell _1} \cdots x_k^{\ell _k}] P_h&= [z^{n-1} x_1^{\ell _1} \cdots x_k^{\ell _k}] f(A) \\&= \frac{1}{(n-1)} [t^{n-2} x_1^{\ell _1} \cdots x_k^{\ell _k}] f'(t) \Phi (t)^n. \end{aligned}$$

The remaining steps are completely analogous to the first case.

Finally, we consider the total number of k-plane trees, without taking the root label into account. Here, we first observe that the generating function is

$$\begin{aligned} P_1+P_2 + \cdots + P_k = 1 - \frac{x_1z}{P_1} \end{aligned}$$

in view of (1) (for \(r = 1\)). In terms of A, this becomes

$$\begin{aligned} P_1+P_2 + \cdots + P_k = 1 - \frac{z F_{k,1}(A)}{A} \end{aligned}$$
(10)

by (6). Thus

$$\begin{aligned} {[}z^n x_1^{\ell _1} \cdots x_k^{\ell _k}] (P_1+P_2+\cdots +P_k) = - [z^{n-1} x_1^{\ell _1} \cdots x_k^{\ell _k}] \frac{F_{k,1}(A)}{A}. \end{aligned}$$

Now we apply the Lagrange–Bürmann formula once again. Noting that

$$\begin{aligned} \frac{\partial }{\partial t} \frac{F_{k,1}(t)}{t} = - \frac{1}{t^2}, \end{aligned}$$

we obtain

$$\begin{aligned} {[}z^n x_1^{\ell _1} \cdots x_k^{\ell _k}] (P_1+P_2+\cdots +P_k)&= \frac{1}{n-1} [t^{n-2} x_1^{\ell _1} \cdots x_k^{\ell _k}] t^{-2} \Phi (t)^{n-1} \\&= \frac{1}{n-1} [t^{n} x_1^{\ell _1} \cdots x_k^{\ell _k}] \Phi (t)^{n-1}, \end{aligned}$$

with the same function \(\Phi \) as before. Again, the remaining steps are completely analogous. \(\square \)

We conclude the section with corollaries of Theorem 1.1 that follow by specialisation. First of all, the following formulas from [1] follow easily by ignoring the variables \(x_1,x_2,\ldots ,x_k\).

Corollary 2.3

For every positive integer n, the total number of k-plane trees with n vertices is

$$\begin{aligned} \frac{k}{n} \left( {\begin{array}{c}(k+1)(n-1)\\ n-1\end{array}}\right) . \end{aligned}$$

The number of k-plane trees with n vertices whose root is labelled h is

$$\begin{aligned} \frac{k+1-h}{kn-h+1} \left( {\begin{array}{c}(k+1)n-h-1\\ n-1\end{array}}\right) . \end{aligned}$$

Proof

Since the number of labels of each kind is no longer relevant, we can set \(x_1 = x_2 = \cdots = x_k = 1\). We get

$$\begin{aligned} F_{k,i}(t) = {\left\{ \begin{array}{ll} 1 &{} k \text { even,} \\ 1 + t &{} k \text { odd,} \end{array}\right. } \end{aligned}$$

as well as

$$\begin{aligned} G_{k,i}(t) = {\left\{ \begin{array}{ll} 1 - t &{} k \text { even,} \\ 1 &{} k \text { odd,} \end{array}\right. } \end{aligned}$$

for all values of i. Consider the case that k is even, the other being similar. Corollary 2.2 gives us

$$\begin{aligned} A = z (1-A)^{-k}. \end{aligned}$$

So by the Lagrange–Bürmann formula, we have

$$\begin{aligned}&{[}z^n] (P_1+P_2 + \cdots + P_k) \\&\quad = [z^n] \Big ( 1 - \frac{z F_{k,1}(A)}{A} \Big ) = - [z^{n-1}] A^{-1} \\&\quad = \frac{1}{n-1} [t^{n-2}] t^{-2} (1-t)^{-k(n-1)} = \frac{1}{n-1} [t^{n}] (1-t)^{-k(n-1)} \\&\quad = \frac{1}{n-1} \left( {\begin{array}{c}(k+1)(n-1)\\ n\end{array}}\right) = \frac{k}{n} \left( {\begin{array}{c}(k+1)(n-1)\\ n-1\end{array}}\right) . \end{aligned}$$

This is exactly the first formula. Considering the coefficients of \(P_h\), which count trees whose root is labelled h, we have

$$\begin{aligned} P_h = A (1-A)^{h-1} \end{aligned}$$

by Proposition 2.1. Thus

$$\begin{aligned} {[}z^n] P_h&= \frac{1}{n} [t^{n-1}] \big ((1-t)^{h-1} - t(h-1)(1-t)^{h-2}\big ) (1-t)^{-k n}. \\&= \frac{1}{n} [t^{n-1}] (1-ht) (1-t)^{-k n + h - 2} \\&= \frac{1}{n} \Big ( \left( {\begin{array}{c}(k+1) n - h\\ n-1\end{array}}\right) - h \left( {\begin{array}{c}(k+1) n - h - 1\\ n-2\end{array}}\right) \Big ) \\&= \frac{1}{n} \left( {\begin{array}{c}(k+1) n - h - 1\\ n-1\end{array}}\right) \Big ( \frac{(k+1) n - h}{k n - h + 1} - \frac{h(n-1)}{k n - h + 1} \Big ) \\&= \frac{k - h + 1}{k n - h + 1} \left( {\begin{array}{c}(k+1) n - h - 1\\ n-1\end{array}}\right) . \end{aligned}$$

\(\square \)

Next, we count k-plane trees by occurrences of a single label.

Corollary 2.4

For every \(n > 1\), the total number of k-plane trees with n vertices of which \(\ell \) are labelled h is equal to

$$\begin{aligned} \frac{1}{n-1} \sum _{r=0}^{n-\ell } \left( {\begin{array}{c}2(h-1)(n-1)+r-1\\ r\end{array}}\right) \left( {\begin{array}{c}2(n-1)-r\\ \ell \end{array}}\right) \left( {\begin{array}{c}(k+1-2h)(n-1)\\ n-r-\ell \end{array}}\right) \end{aligned}$$

if \(h \le \lceil k/2 \rceil \), and equal to

$$\begin{aligned} \frac{1}{n-1} \sum _{r=0}^{n-\ell } \left( {\begin{array}{c}2(k+1-h)(n-1)\\ r\end{array}}\right) \left( {\begin{array}{c}r+\ell -1\\ \ell \end{array}}\right) \left( {\begin{array}{c}(2h-k-1)(n-1)-r-\ell \\ n-r-\ell \end{array}}\right) \end{aligned}$$

otherwise.

Proof

Let us give the proof in the case that k is odd and \(h \le \lceil k/2 \rceil = \frac{k+1}{2}\), the other cases being similar. Since we are only interested in vertices labelled h, we set \(x_i = 1\) for all i except h. Then we get

$$\begin{aligned} F_{k,i}(t) = {\left\{ \begin{array}{ll} 1+x_ht &{} i \le h, \\ 1+t &{} i > h,\end{array}\right. } \qquad \text {and} \qquad G_{k,i}(t) = {\left\{ \begin{array}{ll} 1 + (x_h-1)t &{} i < h, \\ 1 &{} i \ge h. \end{array}\right. } \end{aligned}$$

Now we have to determine

$$\begin{aligned} {[}z^n x_h^{\ell }] (P_1 + P_2 + \cdots + P_k). \end{aligned}$$

Using (10) and the Lagrange–Bürmann formula once again, we find that this equals

$$\begin{aligned}{} & {} {[}z^n x_h^{\ell }] (P_1 + P_2 + \cdots + P_k)\\{} & {} \quad =\frac{1}{n-1} [t^n x_h^{\ell }] (1+x_h t)^{2h(n-1)} (1+t)^{(k+1-2h)(n-1)}\\{} & {} \qquad \times (1+(x_h-1)t)^{-2(h-1)(n-1)}. \end{aligned}$$

Now we extract the coefficient as follows:

$$\begin{aligned}&{[}z^n x_h^{\ell }] (P_1 + P_2 + \cdots + P_k) \\&\quad = \frac{1}{n-1} [t^n x_h^{\ell }] \Big ( 1 - \frac{t}{1+x_h t}\Big )^{-2(h-1)(n-1)}(1+x_h t)^{2(n-1)} (1+t)^{(k+1-2h)(n-1)} \\&\quad = \frac{1}{n-1} [t^n x_h^{\ell }] \sum _{r \ge 0} \left( {\begin{array}{c}2(h-1)(n-1)+r-1\\ r\end{array}}\right) t^r (1+x_ht)^{2(n-1)-r} (1+t)^{(k+1-2h)(n-1)} \\&\quad = \frac{1}{n-1} \sum _{r \ge 0} \left( {\begin{array}{c}2(h-1)(n-1)+r-1\\ r\end{array}}\right) [t^{n-r} x_h^{\ell }] (1+x_ht)^{2(n-1)-r} (1+t)^{(k+1-2h)(n-1)} \\&\quad = \frac{1}{n-1} \sum _{r \ge 0} \left( {\begin{array}{c}2(h-1)(n-1)+r-1\\ r\end{array}}\right) \left( {\begin{array}{c}2(n-1)-r\\ \ell \end{array}}\right) [t^{n-r-\ell }] (1+t)^{(k+1-2h)(n-1)} \\&\quad = \frac{1}{n-1} \sum _{r=0}^{n-\ell } \left( {\begin{array}{c}2(h-1)(n-1)+r-1\\ r\end{array}}\right) \left( {\begin{array}{c}2(n-1)-r\\ \ell \end{array}}\right) \left( {\begin{array}{c}(k+1-2h)(n-1)\\ n-r-\ell \end{array}}\right) . \end{aligned}$$

\(\square \)

Corollary 2.5

For every \(n > 1\), the average number of vertices labelled h in k-plane trees with n vertices is

$$\begin{aligned} \frac{2(k+1-h)n}{k(k+1)}. \end{aligned}$$

Proof

As in the previous proof, we only consider the case that k is odd and \(h \le \lceil k/2 \rceil = \frac{k+1}{2}\). Instead of extracting coefficients, we take the derivative with respect to \(x_h\) and plug in \(x_h=1\) in order to determine the total number of vertices labelled h in all k-plane trees. All other variables \(x_i\) are immediately taken to be 1. This gives us

$$\begin{aligned} {[}z^n]&\frac{\partial }{\partial x_h} (P_1+\cdots + P_k) \Big |_{x_1=\cdots =x_k = 1} \\&= \frac{1}{n-1} [t^n] \frac{\partial }{\partial x_h} (1+x_h t)^{2h(n-1)} (1+t)^{(k+1-2h)(n-1)}\\&\quad \times (1+(x_h-1)t)^{-2(h-1)(n-1)} \Big |_{x_h=1} \\&= [t^n] 2t \big (1-(h-1)t \big ) (1+t)^{(k+1)(n-1)-1} \\&= 2[t^{n-1}] \big (1-(h-1)t \big ) (1+t)^{(k+1)(n-1)-1} \\&= 2 \left( {\begin{array}{c}(k+1)(n-1)-1\\ n-1\end{array}}\right) - 2(h-1) \left( {\begin{array}{c}(k+1)(n-1)-1\\ n-2\end{array}}\right) . \end{aligned}$$

Dividing by the total number of k-plane trees (as given in Corollary 2.3), we obtain the stated formula. \(\square \)

It is also possible to derive formulas for the variance of the number of vertices labelled h, as well as covariances of two different label counts. However, the formulas are somewhat unwieldy. Moreover, one could also take the root label into account in Corollaries 2.4 and 2.5. Instead of stating the most general result (which would be rather lengthy), we illustrate this in the special case \(k=3\).

Corollary 2.6

Let \(n > 1\). Variances and covariances of the number of vertices labelled 1, 2, 3 respectively in 3-plane trees with n vertices are given in the following table:

 

1

2

3

1

\(\frac{n(3n-4)}{4(4n-5)}\)

\(-\frac{n}{6}\)

\(- \frac{n(n-2)}{12(4n-5)}\)

2

\(-\frac{n}{6}\)

\(\frac{2n(4n-3)}{9(3n-2)}\)

\(- \frac{n(7n-6)}{18(3n-2)}\)

3

\(- \frac{n(n-2)}{12(4n-5)}\)

\(- \frac{n(7n-6)}{18(3n-2)}\)

\(\frac{n(5n-4)(13n-18)}{36(3n-2)(4n-5)}\)

Proof

We recall from the proof of Theorem 1.1 that

$$\begin{aligned} {[}z^nx_1^{\ell _1}x_2^{\ell _2}x_3^{\ell _3}] (P_1+P_2+P_3) = \frac{1}{n-1} [t^nx_1^{\ell _1}x_2^{\ell _2}x_3^{\ell _3}] \Phi (t)^{n-1}, \end{aligned}$$

where

$$\begin{aligned} \Phi (t) = (1+(x_1+x_2-x_3)t)^2(1+x_2t)^2(1+(x_2-x_3)t)^{-2} \end{aligned}$$

in the special case \(k=3\). For the variance of the number of vertices labelled h, we need to compute the second moment, which is

$$\begin{aligned} \frac{[z^n] \frac{\partial ^2}{\partial x_h^2} (P_1+P_2+P_3) |_{x_1=x_2=x_3 = 1} + [z^n] \frac{\partial }{\partial x_h} (P_1+P_2+P_3) |_{x_1=x_2=x_3 = 1}}{[z^n] (P_1+P_2+P_3) |_{x_1=x_2=x_3 = 1}}, \nonumber \\ \end{aligned}$$
(11)

and then subtract the square of the mean. Likewise, the mixed moment of the number of vertices labelled h and the number of vertices labelled i is

$$\begin{aligned} \frac{[z^n] \frac{\partial ^2}{\partial x_h \partial x_i} (P_1+P_2+P_3) |_{x_1=x_2=x_3 = 1}}{[z^n] (P_1+P_2+P_3) |_{x_1=x_2=x_3 = 1}}, \end{aligned}$$

from which we subtract the product of the means to obtain the covariance.

Let us only show the calculations for the variance of the number of vertices labelled 1 explicitly. Here, we obtain

$$\begin{aligned}&{[}z^n] \frac{\partial ^2}{\partial x_1^2} (P_1+P_2+P_3) |_{x_1=x_2=x_3 = 1} \\ {}&\quad = \frac{1}{n-1} [t^n] 2(n-1)(2n-3)t^2 (1+t)^{4n-6} \\&\quad = 2(2n-3) [t^{n-2}](1+t)^{4n-6} = 2(2n-3) \left( {\begin{array}{c}4n-6\\ n-2\end{array}}\right) . \end{aligned}$$

We already found earlier that

$$\begin{aligned} {[}z^n] \frac{\partial }{\partial x_1} (P_1+P_2+P_3) |_{x_1=x_2=x_3 = 1} = 2 \left( {\begin{array}{c}4n-5\\ n-1\end{array}}\right) \end{aligned}$$

and

$$\begin{aligned} {[}z^n](P_1+P_2+P_3) |_{x_1=x_2=x_3 = 1} = \frac{1}{n-1} \left( {\begin{array}{c}4n-4\\ n\end{array}}\right) . \end{aligned}$$

Plugging everything into (11) and simplifying, we find a formula for the second moment and thus in turn for the variance. \(\square \)

Corollary 2.7

Let \(n > 1\). The average number of vertices labelled 1, 2, 3 respectively in 3-plane trees with n vertices whose root is labelled 1, 2, 3 respectively is given in the following table:

 

1

2

3

root label 1

\(\frac{n^2}{2 n-1}\)

\(\frac{n-1}{3}\)

\(\frac{(n-1) (n+1)}{3 (2 n-1)}\)

root label 2

\(\frac{n-1}{2}\)

\(\frac{n^2+3 n-1}{3 n}\)

\(\frac{(n-2) (n-1)}{6 n}\)

root label 3

\(\frac{n}{2}\)

\(\frac{(n-2) (n-1)}{3 n-1}\)

\(\frac{n^2+5 n-4}{2 (3 n-1)}\)

Proof

We recall from the proof of Theorem 1.1 that

$$\begin{aligned} P_1= & {} \frac{x_1 A}{1 + (x_1+x_2-x_3)A},\ P_2 = \frac{x_2 A(1 + (x_2-x_3)A)}{(1 + x_2 A) (1 + (x_1+x_2-x_3)A)},\\ P_3= & {} \frac{x_3 A (1 + (x_2-x_3) A )}{(1 + x_2A)^2 (1 + (x_1+x_2-x_3)A)}, \end{aligned}$$

with

$$\begin{aligned} A = z (1+(x_1+x_2-x_3)A)^2(1+x_2A)^2(1+(x_2-x_3)A)^{-2}. \end{aligned}$$

In order to determine the desired mean values, we need the coefficients of the partial derivatives \(\frac{\partial }{\partial x_h} P_i |_{x_1=x_2=x_3 = 1}\). We will show the details of the calculations in one of the cases again: the number of vertices labelled 1 in 3-plane trees whose root label is 1. Since

$$\begin{aligned} \frac{\partial }{ \partial t} \frac{x_1 t}{1 + (x_1+x_2-x_3)t} = \frac{x_1}{(1+(x_1+x_2-x_3)t)^2}, \end{aligned}$$

we have

$$\begin{aligned} {[}z^n] P_1{} & {} = \frac{1}{n} [t^{n-1}] \frac{x_1}{(1+(x_1+x_2-x_3)t)^2}\\ {}{} & {} \quad (1+(x_1+x_2-x_3)t)^{2n}(1+x_2t)^{2n}(1+(x_2-x_3)t)^{-2n}. \end{aligned}$$

Now differentiate with respect to \(x_1\) and set \(x_1 = x_2 = x_3 = 1\):

$$\begin{aligned} \frac{\partial }{\partial x_1} [z^n] P_1 \Big |_{x_1 = x_2 = x_3 = 1}&= \frac{1}{n} [t^{n-1}] (1+(2n-1)t) (1+t)^{4n-3} \\&= \frac{1}{n} \Big ( \left( {\begin{array}{c}4n-3\\ n-1\end{array}}\right) + (2n-1) \left( {\begin{array}{c}4n-3\\ n-2\end{array}}\right) \Big ). \end{aligned}$$

Dividing by the total number of 3-plane trees with n vertices and root label 1, which is \(\frac{1}{n} \left( {\begin{array}{c}4n-2\\ n-1\end{array}}\right) \), we obtain the mean number of vertices labelled 1, namely

$$\begin{aligned} \frac{\frac{1}{n}( \left( {\begin{array}{c}4n-3\\ n-1\end{array}}\right) + (2n-1) \left( {\begin{array}{c}4n-3\\ n-2\end{array}}\right) )}{\frac{1}{n} \left( {\begin{array}{c}4n-2\\ n-1\end{array}}\right) } = \frac{n^2}{2n-1}. \end{aligned}$$

\(\square \)

3 Noncrossing Trees

Our aim in this section is to obtain analogous results for noncrossing trees. In particular, we will prove Theorem 1.2. To this end, we set up a system of functional equations once again. We fix k and let \({\mathcal {N}}_r\) denote the set of k-noncrossing trees whose root is labelled r. As before, we let \(h_i(T)\) be the number of vertices labelled i in a tree T, and |T| the total number of vertices of T. Finally, we define the following generating functions in analogy to the generating functions \(P_r\) in the previous section.

$$\begin{aligned} N_r = N_r(z,x_1,x_2,\ldots ,x_k) = \sum _{T \in {\mathcal {N}}_r} z^{|T|} \prod _{i=1}^k x_i^{h_i(T)}. \end{aligned}$$

The decomposition of k-noncrossing trees is slightly more subtle than that of plane trees. Every noncrossing tree can be decomposed into the root and a sequence of so-called butterflies, which are pairs of noncrossing trees joined at a common root. The roots of these butterflies are the children \(v_{i_1},v_{i_2},\ldots ,v_{i_r}\) of the root \(v_1\). One part of the butterfly rooted at \(v_{i_j}\) contains all those vertices whose indices are less than or equal to \(i_j\) (i.e., vertices \(v_s\) with \(s \le i_j\)), the other contains all those vertices whose indices are greater than or equal to \(i_j\) (i.e., vertices \(v_s\) with \(s \ge i_j\)). We refer to them as lower and upper part of a butterfly; they only have the vertex \(v_{i_j}\) in common. See Fig. 3 for an illustration.

Fig. 3
figure 3

The butterfly decomposition

Each of the two parts of a butterfly can be seen as a noncrossing tree. However, because of the definition of k-noncrossing trees, which involves the order of the vertices on the circle, the two parts are slightly different. The upper part containing vertices \(v_s\) with \(s \ge i_j\) forms a proper k-noncrossing tree. However, the lower part is only almost a k-noncrossing tree: the rule on labels not adding up to values greater than \(k+1\) does not apply to the root edges (for all other edges, the rule is exactly as it is in a proper k-noncrossing tree). Thus the lower part is not necessarily a proper k-noncrossing tree, but it always becomes one by changing the root label to 1 (if it is not already 1). This is because a label 1 can always be paired with any other label along an edge. Thus we find that a butterfly with root label r has generating function

$$\begin{aligned} N_r \cdot \frac{N_1}{x_1 z}. \end{aligned}$$

The first factor represents the upper part of the butterfly, the second factor the lower part, but excluding the root. This is achieved by the denominator.

Arguing as in the previous section, we see that a k-noncrossing tree with root label r has branches that are butterflies with root labels in \([k+1-r]\). Thus

$$\begin{aligned} N_r{} & {} = x_r z \sum _{j \ge 0} \Big ( \frac{N_1}{x_1 z} (N_1 + N_2 + \cdots + N_{k+1-r}) \Big )^j \nonumber \\ {}{} & {} = \frac{x_r z}{1-\frac{N_1}{x_1 z}(N_1 + N_2 + \cdots + N_{k+1-r})} \end{aligned}$$
(12)

for all \(r \in [k]\).

We use the same expressions \(F_{k,i}(t)\) and \(G_{k,i}(t)\) as in the previous section. The substitution, however, will be slightly different. In analogy to (6), we set

$$\begin{aligned} N_1 = x_1 \sqrt{\frac{z B}{F_{k,1}(B)}}. \end{aligned}$$
(13)

Again, it is not hard to verify that there exists a suitable power series B that satisfies this equation, and that it is unique. Next, we prove an analogue of Proposition 2.1.

Proposition 3.1

The power series \(N_1,N_2,\ldots ,N_k\) can be expressed in terms of B and the variables \(x_1,x_2,\ldots ,x_k\) and z in the following way: for \(1 \le h \le k\),

$$\begin{aligned} N_h&= x_h \sqrt{\frac{z B}{F_{k,1}(B)}} \prod _{i=2}^{h} F_{k,i}(B)^{-1} \prod _{i=1}^{h-1} G_{k,i}(B), \\ N_{k+1-h}&= x_{k+1-h} z \prod _{i=1}^{h} F_{k,i}(B) \prod _{i=1}^h G_{k,i}(B)^{-1}. \end{aligned}$$

Proof

The proof is analogous to that of Proposition 2.1 by induction on h. For \(h = 1\), the first equation is exactly our substitution (13), while the second equation follows from (12) for \(r = k\) and an application of (3):

$$\begin{aligned} N_k = \frac{x_k z}{1-\frac{N_1^2}{x_1 z}} = \frac{x_k z}{1 - \frac{x_1^2 z B}{x_1 z F_{k,1}(B)}} = \frac{x_k z F_{k,1}(B)}{F_{k,1}(B) - x_1 B} = \frac{x_k z F_{k,1}(B)}{G_{k,1}(B)}. \end{aligned}$$

For the induction step, use (12) with \(r = h\) and \(r = h+1\) respectively, which yields

$$\begin{aligned} 1 - \frac{N_1}{x_1 z}(N_1 + N_2 + \cdots + N_{k+1-h}) = \frac{x_h z}{N_h}, \\ 1 - \frac{N_1}{x_1 z}(N_1 + N_2 + \cdots + N_{k-h}) = \frac{x_{h+1} z}{N_{h+1}}. \end{aligned}$$

Now take the difference:

$$\begin{aligned} \frac{N_1 N_{k+1-h}}{x_1 z} = \frac{x_{h+1}z}{N_{h+1}} - \frac{x_hz}{N_h}. \end{aligned}$$
(14)

After some manipulations, this gives us

$$\begin{aligned} N_{h+1} = \frac{x_{h+1}z}{\frac{N_1 N_{k+1-h}}{x_1 z} + \frac{x_h z}{N_h}}. \end{aligned}$$
(15)

Now it only remains to apply the induction hypothesis and simplify:

$$\begin{aligned} N_{h+1}&= \frac{x_{h+1}z}{\begin{aligned}\sqrt{\frac{z B}{F_{k,1}(B)}} x_{k+1-h} \prod _{i=1}^h F_{k,i}(B) \prod _{i=1}^h G_{k,i}(B)^{-1}+ \sqrt{\frac{zF_{k,1}(B)}{B}} \prod _{i=2}^h F_{k,i}(B) \prod _{i=1}^{h-1} G_{k,i}(B)^{-1}\end{aligned}} \\&= \frac{x_{h+1}}{x_{k+1-h}B + G_{k,h}(B)} \sqrt{\frac{z B}{F_{k,1}(B)}} \prod _{i=2}^h F_{k,i}(B)^{-1} \prod _{i=1}^h G_{k,i}(B) \\&= \frac{x_{h+1}}{F_{k,h+1}(B)} \sqrt{\frac{z B}{F_{k,1}(B)}} \prod _{i=2}^h F_{k,i}(B)^{-1} \prod _{i=1}^h G_{k,i}(B) \\&= x_{h+1} \sqrt{\frac{z B}{F_{k,1}(B)}} \prod _{i=2}^{h+1} F_{k,i}(B)^{-1} \prod _{i=1}^h G_{k,i}(B). \end{aligned}$$

Likewise, replacing h by \(k-h\) in (14) gives us

$$\begin{aligned} \frac{N_1 N_{h+1}}{x_1 z} = \frac{x_{k+1-h}z}{N_{k+1-h}} - \frac{x_{k-h}z}{N_{k-h}}. \end{aligned}$$

Thus

$$\begin{aligned} N_{k-h} = \frac{x_{k-h}z}{\frac{x_{k+1-h}z}{N_{k+1-h}} - \frac{N_1 N_{h+1}}{x_1 z}}. \end{aligned}$$

Now plug in (15) and apply the induction hypothesis. Again, we obtain the desired formula after some further manipulations. \(\square \)

Corollary 3.2

The power series B satisfies the equation

$$\begin{aligned} B = z F_{k,1}(B)^3 \prod _{i=2}^{\lceil k/2 \rceil } F_{k,i}(B)^4 \prod _{i=1}^{\lfloor k/2 \rfloor } G_{k,i}(B)^{-4}. \end{aligned}$$

Proof

In analogy to Corollary 2.2, we use the two representations for \(N_h\) provided by Proposition 3.1:

$$\begin{aligned} N_h{} & {} = x_h \sqrt{\frac{z B}{F_{k,1}(B)}} \prod _{i=2}^{h} F_{k,i}(B)^{-1} \\ {}{} & {} \quad \prod _{i=1}^{h-1} G_{k,i}(B) = x_{h} z \prod _{i=1}^{k+1-h} F_{k,i}(B) \prod _{i=1}^{k+1-h} G_{k,i}(B)^{-1}. \end{aligned}$$

Applying the symmetry relations (4), we get

$$\begin{aligned} \sqrt{\frac{B}{F_{k,1}(B)}} \prod _{i=2}^{h} F_{k,i}(B)^{-1} \prod _{i=1}^{h-1} G_{k,i}(B) = \sqrt{z} \prod _{i=h+1}^{k+1} F_{k,i}(B) \prod _{i=h}^{k} G_{k,i}(B)^{-1}. \end{aligned}$$

Squaring and simplifying yields

$$\begin{aligned} B = z F_{k,1}(B)\prod _{i=2}^{k+1} F_{k,i}(B)^2 \prod _{i=1}^{k} G_{k,i}(B)^{-2}. \end{aligned}$$

Applying the symmetry properties as well as (5) once again, we arrive at the stated formula:

$$\begin{aligned} B = z F_{k,1}(B)^3 \prod _{i=2}^{\lceil k/2 \rceil } F_{k,i}(B)^4 \prod _{i=1}^{\lfloor k/2 \rfloor } G_{k,i}(B)^{-4}. \end{aligned}$$

As in the proof of Corollary 2.2, h was arbitrary in these calculations. \(\square \)

We are now ready to prove the second main theorem of this paper. It is very similar to the proof of Theorem 1.1, with some small modifications.

Proof of Theorem 1.2

As before, we apply the Lagrange–Bürmann formula, based on Proposition 3.1 and Corollary 3.2. We start with the case that \(h \le \lceil k/2 \rceil \). In view of Proposition 3.1 and Corollary 3.2, we can apply (9) with

$$\begin{aligned} \Phi (t) = F_{k,1}(t)^3 \prod _{i=2}^{\lceil k/2 \rceil } F_{k,i}(t)^4 \prod _{i=1}^{\lfloor k/2 \rfloor } G_{k,i}(t)^{-4} \end{aligned}$$

and

$$\begin{aligned} f(t) = x_h \sqrt{\frac{t}{F_{k,1}(t)}} \prod _{i=2}^{h} F_{k,i}(t)^{-1} \prod _{i=1}^{h-1} G_{k,i}(t), \end{aligned}$$

but we have to take the coefficient of \(z^{n-1/2}\) in view of the factor \(\sqrt{z}\) in the formula for \(N_h\). Once again, we apply logarithmic differentiation to determine the derivative of f(t). We find that

$$\begin{aligned} f'(t)&= f(t) \Big ( \frac{1}{2t} - \frac{F'_{k,1}(t)}{2F_{k,1}(t)} - \sum _{i=2}^h \frac{F'_{k,i}(t)}{F_{k,i}(t)} + \sum _{i=1}^{h-1} \frac{G'_{k,i}(t)}{G_{k,i}(t)} \Big ) \\&= f(t) \Big ( \frac{1}{2t} - \frac{1}{2t} \Big ( 1 - \frac{1}{F_{k,1}(t)} \Big ) - \frac{1}{t} \sum _{i=2}^h \Big ( 1 - \frac{1}{F_{k,i}(t)} \Big ) + \frac{1}{t} \sum _{i=1}^{h-1} \Big ( 1 - \frac{1}{G_{k,i}(t)} \Big ) \Big ) \\&= \frac{f(t)}{t} \Big ( \frac{1}{2F_{k,1}(t)} + \sum _{i=2}^h \frac{1}{F_{k,i}(t)} - \sum _{i=1}^{h-1} \frac{1}{G_{k,i}(t)} \Big ). \end{aligned}$$

So we have

$$\begin{aligned}&{[}z^n x_1^{\ell _1} \cdots x_k^{\ell _k}] N_h \nonumber \\&\quad = \frac{1}{n-\frac{1}{2}} [t^{n-3/2} x_1^{\ell _1} \cdots x_k^{\ell _k}] f'(t) \Phi (t)^{n-1/2} \nonumber \\&\quad = \frac{2}{2n-1} [t^{n-3/2} x_1^{\ell _1} \cdots x_k^{\ell _k}]x_h \sqrt{\frac{1}{tF_{k,1}(t)}} \prod _{i=2}^{h} F_{k,i}(t)^{-1} \prod _{i=1}^{h-1} G_{k,i}(t) \nonumber \\&\qquad \Big ( \frac{1}{2F_{k,1}(t)} + \sum _{i=2}^h \frac{1}{F_{k,i}(t)} - \sum _{i=1}^{h-1} \frac{1}{G_{k,i}(t)} \Big )\nonumber \\&\qquad F_{k,1}(t)^{3n-3/2} \prod _{i=2}^{\lceil k/2 \rceil } F_{k,i}(t)^{4n-2} \prod _{i=1}^{\lfloor k/2 \rfloor } G_{k,i}(t)^{2-4n} \nonumber \\&\quad = \frac{2}{2n-1} [t^{n-1} x_1^{\ell _1} \cdots x_h^{\ell _h-1} \cdots x_k^{\ell _k}] \Big ( \prod _{i=h+1}^{\lceil k/2 \rceil } F_{k,i}(t) \prod _{i=h}^{\lfloor k/2 \rfloor } G_{k,i}(t)^{-1} \Big )^{4n-2}\nonumber \\&\qquad F_{k,1}(t)^{3n-2} \Big ( \prod _{i=2}^{h} F_{k,i}(t) \prod _{i=1}^{h-1} G_{k,i}(t)^{-1} \Big )^{4n-3} \nonumber \\&\qquad \Big ( \frac{1}{2F_{k,1}(t)} + \sum _{i=2}^h \frac{1}{F_{k,i}(t)} - \sum _{i=1}^{h-1} \frac{1}{G_{k,i}(t)} \Big ). \end{aligned}$$
(16)

We remark that we are applying the Lagrange–Bürmann formula, somewhat unusually, in a situation where we have half-integer exponents in our power series, but it is not difficult to verify that it works equally well. At this point, we drop the variable t again (by setting \(t=1\)), since we know that the coefficient of \(t^{n-1} x_1^{\ell _1} \cdots x_h^{\ell _h-1} \cdots x_k^{\ell _k}\) is only nonzero when \(\ell _1 + \cdots + \ell _k = n\). We will also write \(F_{k,i}\) and \(G_{k,i}\) instead of \(F_{k,i}(1)\) and \(G_{k,i}(1)\) again.

As in the proof of Theorem 1.1, we observe that \(F_{k,1},F_{k,2},\ldots ,F_{k,h}\) and \(G_{k,1},G_{k,2},\ldots ,G_{k,h-1}\) are the only factors that contain the variable \(x_h\). Moreover, using logarithmic differentiation once again, one finds that

$$\begin{aligned}{} & {} \frac{\partial }{\partial x_h} F_{k,1}^{3n-2} \Bigg ( \prod _{i=2}^{h} F_{k,i} \prod _{i=1}^{h-1} G_{k,i}^{-1} \Bigg )^{4n-3} \\{} & {} \quad = (4n-3) F_{k,1}^{3n-2} \Bigg ( \prod _{i=2}^{h} F_{k,i} \prod _{i=1}^{h-1} G_{k,i}^{-1} \Bigg )^{4n-3} \\{} & {} \qquad \Bigg (\frac{3n-2}{(4n-3)F_{k,1}} + \sum _{i=2}^h \frac{1}{F_{k,i}} - \sum _{i=1}^{h-1} \frac{1}{G_{k,i}} \Bigg ). \end{aligned}$$

Now we split the expression in (16) into two parts, one of which can be seen as a derivative with respect to \(x_h\) in the same way as in the proof of Theorem 1.1:

$$\begin{aligned}&{[}z^n x_1^{\ell _1} \cdots x_k^{\ell _k}] N_h \\&\quad = \frac{2}{2n-1} [x_1^{\ell _1} \cdots x_h^{\ell _h-1} \cdots x_k^{\ell _k}] \Big ( \prod _{i=h+1}^{\lceil k/2 \rceil } F_{k,i} \prod _{i=h}^{\lfloor k/2 \rfloor } G_{k,i}^{-1} \Big )^{4n-2} \\&\qquad F_{k,1}^{3n-2} \Big ( \prod _{i=2}^{h} F_{k,i} \prod _{i=1}^{h-1} G_{k,i}^{-1} \Big )^{4n-3} \Big ( \frac{3n-2}{(4n-3)F_{k,1}} + \sum _{i=2}^h \frac{1}{F_{k,i}} - \sum _{i=1}^{h-1} \frac{1}{G_{k,i}} \Big ) \\&\qquad -\frac{2}{2n-1} [x_1^{\ell _1} \cdots x_h^{\ell _h-1} \cdots x_k^{\ell _k}] \Big ( \prod _{i=h+1}^{\lceil k/2 \rceil } F_{k,i} \prod _{i=h}^{\lfloor k/2 \rfloor } G_{k,i}^{-1} \Big )^{4n-2} \\&\qquad F_{k,1}^{3n-2} \Big ( \prod _{i=2}^{h} F_{k,i} \prod _{i=1}^{h-1} G_{k,i}^{-1} \Big )^{4n-3} \cdot \frac{2n-1}{2(4n-3)F_{k,1}} \\&\quad = \frac{2\ell _h}{(2n-1)(4n-3)} [x_1^{\ell _1} \cdots x_k^{\ell _k}] \Big ( \prod _{i=h+1}^{\lceil k/2 \rceil } F_{k,i} \prod _{i=h}^{\lfloor k/2 \rfloor } G_{k,i}^{-1} \Big )^{4n-2} \\&\qquad F_{k,1}^{3n-2} \Big ( \prod _{i=2}^{h} F_{k,i} \prod _{i=1}^{h-1} G_{k,i}^{-1} \Big )^{4n-3} \\&\qquad - \frac{1}{4n-3} [x_1^{\ell _1} \cdots x_h^{\ell _h-1} \cdots x_k^{\ell _k}] \Big ( \prod _{i=h+1}^{\lceil k/2 \rceil } F_{k,i} \prod _{i=h}^{\lfloor k/2 \rfloor } G_{k,i}^{-1} \Big )^{4n-2} \\&\qquad F_{k,1}^{3n-3} \Big ( \prod _{i=2}^{h} F_{k,i} \prod _{i=1}^{h-1} G_{k,i}^{-1} \Big )^{4n-3}. \end{aligned}$$

Now we can extract coefficients from both products in the same way as in the proof of Theorem 1.2, i.e. by considering the variables in the order \(x_1,x_k,x_2,x_{k-1},\ldots \).

The derivation of the formula in the case that \(h > \lceil k/2 \rceil \) is similar: we start from the representation

$$\begin{aligned} N_h = x_h z \prod _{i=1}^{k+1-h} F_{k,i}(B) \prod _{i=1}^{k+1-h} G_{k,i}(B)^{-1}, \end{aligned}$$

which means that we can apply the Lagrange–Bürmann formula with

$$\begin{aligned} f(t) = x_h \prod _{i=1}^{k+1-h} F_{k,i}(t) \prod _{i=1}^{k+1-h} G_{k,i}(t)^{-1} \end{aligned}$$

and the same function \(\Phi \) as before. In view of the factor z in the expression for \(N_h\), we have to extract the coefficient of \(z^{n-1}\). Thus

$$\begin{aligned}&{[}z^n x_1^{\ell _1} \cdots x_k^{\ell _k}] N_h \\ {}&\quad = \frac{1}{n-1} [t^{n-2} x_1^{\ell _1} \cdots x_k^{\ell _k}] \frac{x_h}{t} \prod _{i=1}^{k+1-h} F_{k,i}(t) \prod _{i=1}^{k+1-h} G_{k,i}(t)^{-1}\\&\qquad \Big ( \sum _{i=1}^{k+1-h} \frac{1}{G_{k,i}(t)} - \sum _{i=1}^{k+1-h} \frac{1}{F_{k,i}(t)} \Big ) \\&\qquad F_{k,1}(t)^{3n-3} \Big ( \prod _{i=2}^{\lceil k/2 \rceil } F_{k,i}(t) \prod _{i=1}^{\lfloor k/2 \rfloor } G_{k,i}(t)^{-1} \Big )^{4n-4} \\&\quad = \frac{1}{n-1} [t^{n-1} x_1^{\ell _1} \cdots x_h^{\ell _h-1} \cdots x_k^{\ell _k}] \Big ( \prod _{i=k+2-h}^{\lceil k/2 \rceil } F_{k,i}(t) \prod _{i=k+2-h}^{\lfloor k/2 \rfloor } G_{k,i}(t)^{-1} \Big )^{4n-4}\\&\qquad F_{k,1}(t)^{3n-2} \Big ( \prod _{i=2}^{k+1-h} F_{k,i}(t) \prod _{i=1}^{k+1-h} G_{k,i}(t)^{-1} \Big )^{4n-3} \\&\qquad \Big ( \sum _{i=1}^{k+1-h} \frac{1}{G_{k,i}(t)} - \sum _{i=1}^{k+1-h} \frac{1}{F_{k,i}(t)} \Big ). \end{aligned}$$

As before, we drop the variable t now and write \(F_{k,i}\) and \(G_{k,i}\) instead of \(F_{k,i}(1)\) and \(G_{k,i}(1)\). The appropriate split in this case is

$$\begin{aligned}&{[}z^n x_1^{\ell _1} \cdots x_k^{\ell _k}] N_h \\ {}&= \frac{1}{n-1} [x_1^{\ell _1} \cdots x_h^{\ell _h-1} \cdots x_k^{\ell _k}] \Big ( \prod _{i=k+2-h}^{\lceil k/2 \rceil } F_{k,i} \prod _{i=k+2-h}^{\lfloor k/2 \rfloor } G_{k,i}^{-1} \Big )^{4n-4} \\&\qquad F_{k,1}^{3n-2} \Big ( \prod _{i=2}^{k+1-h} F_{k,i} \prod _{i=1}^{k+1-h} G_{k,i}^{-1} \Big )^{4n-3} \\&\qquad \Big ( \sum _{i=1}^{k+1-h} \frac{1}{G_{k,i}} - \sum _{i=2}^{k+1-h} \frac{1}{F_{k,i}} - \frac{3n-2}{(4n-3)F_{k,1}} \Big ) \\&\quad - \frac{1}{n-1} [x_1^{\ell _1} \cdots x_h^{\ell _h-1} \cdots x_k^{\ell _k}] \Big ( \prod _{i=k+2-h}^{\lceil k/2 \rceil } F_{k,i} \prod _{i=k+2-h}^{\lfloor k/2 \rfloor } G_{k,i}^{-1} \Big )^{4n-4} \\&\qquad F_{k,1}^{3n-2} \Big ( \prod _{i=2}^{k+1-h} F_{k,i} \prod _{i=1}^{k+1-h} G_{k,i}^{-1} \Big )^{4n-3} \cdot \frac{n-1}{(4n-3)F_{k,1}}\\&= \frac{\ell _h}{(n-1)(4n-3)} [x_1^{\ell _1} \cdots x_k^{\ell _k}] \Big ( \prod _{i=k+2-h}^{\lceil k/2 \rceil } F_{k,i} \prod _{i=k+2-h}^{\lfloor k/2 \rfloor } G_{k,i}^{-1} \Big )^{4n-4} \\&\qquad F_{k,1}^{3n-2} \Big ( \prod _{i=2}^{k+1-h} F_{k,i} \prod _{i=1}^{k+1-h} G_{k,i}^{-1} \Big )^{4n-3} \\&\quad - \frac{1}{4n-3} [x_1^{\ell _1} \cdots x_h^{\ell _h-1} \cdots x_k^{\ell _k}] \Big ( \prod _{i=k+2-h}^{\lceil k/2 \rceil } F_{k,i} \prod _{i=k+2-h}^{\lfloor k/2 \rfloor } G_{k,i}^{-1} \Big )^{4n-4} \\&\qquad F_{k,1}^{3n-3} \Big ( \prod _{i=2}^{k+1-h} F_{k,i} \prod _{i=1}^{k+1-h} G_{k,i}^{-1} \Big )^{4n-3}. \end{aligned}$$

Once again, we can now extract coefficients from both products following the order of variables \(x_1,x_k,x_2,x_{k-1},\ldots \).

Finally, we consider the generating function for all k-noncrossing trees, which is

$$\begin{aligned} N_1+N_2+ \cdots + N_k = \frac{x_1 z}{N_1} \Big (1 - \frac{x_1 z}{N_1}\Big ) = \sqrt{\frac{z F_{k,1}(B)}{B}} - \frac{z F_{k,1}(B)}{B} \end{aligned}$$

in view of (12) (for \(r=1\)) and (13). So we can now apply the Lagrange–Bürmann formula to the functions \(f_1(t) = \sqrt{\frac{F_{k,1}(t)}{t}}\) (extracting the coefficient of \(z^{n-1/2}\)) and \(f_2(t) = \frac{F_{k,1}(t)}{t}\) (extracting the coefficient of \(z^{n-1}\)), again with the same function \(\Phi \) as before. \(\square \)

As in the previous section, we can now derive a number of corollaries.

Corollary 3.3

For every integer \(n > 1\), the total number of k-noncrossing trees with n vertices is

$$\begin{aligned} \frac{1}{n-1} \left( {\begin{array}{c}(2k+1)(n-1)\\ n\end{array}}\right) - \frac{1}{2n-1} \left( {\begin{array}{c}(2k+1)n-k-1\\ n\end{array}}\right) . \end{aligned}$$

The number of k-noncrossing trees with n vertices whose root is labelled h is

$$\begin{aligned} \frac{k+1-h}{2kn-k-h+1} \left( {\begin{array}{c}(2k+1)n-k-h-1\\ n-1\end{array}}\right) . \end{aligned}$$

Proof

We follow the lines of the proof of Corollary 2.3. Setting \(x_1=x_2=\cdots = x_k = 1\), recall that we have

$$\begin{aligned} F_{k,i}(t) = {\left\{ \begin{array}{ll} 1 &{} k \text { even,} \\ 1 + t &{} k \text { odd,} \end{array}\right. }\quad \text {and} \quad G_{k,i}(t) = {\left\{ \begin{array}{ll} 1 - t &{} k \text { even,} \\ 1 &{} k \text { odd.} \end{array}\right. } \end{aligned}$$

We show the calculations in the case that k is even (the other case is similar once again), where we obtain

$$\begin{aligned} N_h = \sqrt{zB} (1-B)^{h-1} \end{aligned}$$

and

$$\begin{aligned} N_1 + N_2 + \cdots + N_k = \frac{z}{N_1}\Big (1 - \frac{z}{N_1}\Big ) = \sqrt{\frac{z}{B}} - \frac{z}{B}, \end{aligned}$$

where B satisfies the implicit equation

$$\begin{aligned} B = z (1-B)^{-2k}. \end{aligned}$$

We apply the Lagrange–Bürmann formula to find that

$$\begin{aligned} {[}z^n] N_h&= [z^{n-1/2}] \sqrt{B} (1-B)^{h-1} \\&= \frac{1}{n-\frac{1}{2}} [t^{n-3/2}] \frac{1}{2\sqrt{t}} (1-(2h-1)t) (1-t)^{h-2} (1-t)^{-2k(n-1/2)}\\&= \frac{1}{2n-1} [t^{n-1}] (1-(2h-1)t) (1-t)^{-2kn+k+h-2} \\&= \frac{1}{2n-1} \left( {\begin{array}{c}(2k+1)n-k-h\\ n-1\end{array}}\right) - \frac{2h-1}{2n-1} \left( {\begin{array}{c}(2k+1)n-k-h-1\\ n-2\end{array}}\right) \\&= \frac{k+1-h}{2kn-k-h+1} \left( {\begin{array}{c}(2k+1)n-k-h-1\\ n-1\end{array}}\right) \end{aligned}$$

and similarly

$$\begin{aligned}&{[}z^n] (N_1 + N_2 + \cdots + N_k) \\ {}&= [z^{n-1/2}] B^{-1/2} - [z^{n-1}] B^{-1} \\&= \frac{1}{n-\frac{1}{2}} [t^{n-3/2}] \Big ( - \frac{1}{2} t^{-3/2} \Big ) (1-t)^{-2k(n-1/2)} \\&\quad - \frac{1}{n-1} [t^{n-2}] (-t^{-2}) (1-t)^{-2k(n-1)} \\&= \frac{1}{n-1} [t^n] (1-t)^{-2kn+2k} - \frac{1}{2n-1} [t^n] (1-t)^{-2kn+k} \\&= \frac{1}{n-1} \left( {\begin{array}{c}(2k+1)(n-1)\\ n\end{array}}\right) - \frac{1}{2n-1} \left( {\begin{array}{c}(2k+1)n-k-1\\ n\end{array}}\right) . \end{aligned}$$

\(\square \)

Next, we count k-noncrossing trees by the number of occurrences of a single label.

Corollary 3.4

For every \(n > 1\), the total number of k-noncrossing trees with n vertices of which \(\ell \) are labelled h is equal to

$$\begin{aligned} \frac{1}{n-1}&\sum _{r=0}^{n-\ell } \left( {\begin{array}{c}4(h-1)(n-1)+r-1\\ r\end{array}}\right) \left( {\begin{array}{c}3n-3-r\\ \ell \end{array}}\right) \left( {\begin{array}{c}2(k+1-2h)(n-1)\\ n-r-\ell \end{array}}\right) \\&-\frac{1}{2n-1} \sum _{r=0}^{n-\ell } \left( {\begin{array}{c}2(h-1)(2n-1)+r-1\\ r\end{array}}\right) \left( {\begin{array}{c}3n-2-r\\ \ell \end{array}}\right) \\ {}&\quad \left( {\begin{array}{c}(k+1-2h)(2n-1)\\ n-r-\ell \end{array}}\right) \end{aligned}$$

if \(h \le \lceil k/2 \rceil \), and equal to

$$\begin{aligned} \frac{1}{n-1}&\sum _{r=0}^{n-\ell } \left( {\begin{array}{c}(4h-4h+3)(n-1)\\ r\end{array}}\right) \left( {\begin{array}{c}n+r+\ell -2\\ \ell \end{array}}\right) \\ {}&\quad \left( {\begin{array}{c}(4h-2k-3)(n-1)-r-\ell \\ n-r-\ell \end{array}}\right) \\&-\frac{1}{2n-1} \sum _{r=0}^{n-\ell } \left( {\begin{array}{c}2(k+1-h)(2n-1)-n\\ r\end{array}}\right) \left( {\begin{array}{c}n+r+\ell -1\\ \ell \end{array}}\right) \\ {}&\quad \left( {\begin{array}{c}(2h-k-2)(2n-1)+n-r-\ell \\ n-r-\ell \end{array}}\right) \end{aligned}$$

otherwise.

Proof

Let us give the proof in the case that k is odd and \(h \le \lceil k/2 \rceil = \frac{k+1}{2}\). The other cases are similar. Set all \(x_i\) except \(x_h\) equal to 1. As noted in the proof of Corollary 2.4, we have

$$\begin{aligned} F_{k,i}(t) = {\left\{ \begin{array}{ll} 1+x_ht &{} i \le h, \\ 1+t &{} i > h,\end{array}\right. } \qquad \text {and} \qquad G_{k,i}(t) = {\left\{ \begin{array}{ll} 1 + (x_h-1)t &{} i < h, \\ 1 &{} i \ge h. \end{array}\right. } \end{aligned}$$

Now we have to determine

$$\begin{aligned}{}[z^n x_h^{\ell }] (N_1 + N_2 + \cdots + N_k)=[z^n x_h^{\ell }]\left( \sqrt{\frac{zF_{k,1}(B)}{B}}-\frac{zF_{k,1}(B)}{B}\right) . \end{aligned}$$
(17)

We note that

$$\begin{aligned} \frac{\partial }{\partial t}\frac{F_{k,1}(t)}{t}=-\frac{1}{t^2} \end{aligned}$$

and

$$\begin{aligned} \frac{\partial }{\partial t}\sqrt{\frac{F_{k,1}(t)}{t}}=\frac{1}{2}\Big (\frac{F_{k,1}(t)}{t}\Big )^{-1/2}\frac{\partial }{\partial t}\frac{F_{k,1}(t)}{t}=-\frac{1}{2t^{3/2}}F_{k,1}(t)^{-1/2}. \end{aligned}$$

Using the Lagrange–Bürmann formula once again, we find that

$$\begin{aligned}&{[}z^n x_h^{\ell }]\sqrt{\frac{zF_{k,1}(B)}{B}} \\&\quad =[z^{n-1/2} x_h^{\ell }] \sqrt{\frac{F_{k,1}(B)}{B}} \\&\quad = \frac{1}{n-\frac{1}{2}} [t^{n-3/2}x_h^{\ell }] \Big ( -\frac{1}{2t^{3/2}}F_{k,1}(t)^{-1/2} \Big ) \\ {}&\qquad \Big ( F_{k,1}(t)^3 \prod _{i=2}^{\lceil k/2 \rceil } F_{k,i}(t)^4 \prod _{i=1}^{\lfloor k/2 \rfloor } G_{k,i}(t)^{-4} \Big )^{n-1/2} \\&\quad = -\frac{1}{2n-1} [t^n x_h^{\ell }] (1+x_h t)^{-1/2}(1+x_h t)^{3(n-1/2)}(1+x_h t)^{4(h-1)(n-1/2)} \\&\qquad \qquad (1+t)^{2(k+1-2h)(n-1/2)} (1+(x_h-1)t)^{-4(h-1)(n-1/2)}\\&\quad =-\frac{1}{2n-1}[t^n x_h^{\ell }] (1+x_h t)^{3n-2}(1+x_h t)^{2(h-1)(2n-1)}(1+t)^{(k+1-2h)(2n-1)}\\&\qquad (1+(x_h-1)t)^{-2(h-1)(2n-1)}. \end{aligned}$$

Now we extract the coefficient as follows:

$$\begin{aligned} {[}z^n x_h^{\ell }]&\sqrt{\frac{zF_{k,1}(B)}{B}}\\&\quad = -\frac{1}{2n-1} [t^n x_h^{\ell }] \Big ( 1 - \frac{t}{1+x_h t}\Big )^{-2(h-1)(2n-1)}\\&\qquad (1+x_h t)^{3n-2} (1+t)^{(k+1-2h)(2n-1)} \\&\quad = -\frac{1}{2n-1} [t^n x_h^{\ell }] \sum _{r \ge 0} \left( {\begin{array}{c}2(h-1)(2n-1)+r-1\\ r\end{array}}\right) t^r\\&\qquad (1+x_ht)^{3n-2-r} (1+t)^{(k+1-2h)(2n-1)} \\&\quad = -\frac{1}{2n-1} \sum _{r \ge 0} \left( {\begin{array}{c}2(h-1)(2n-1)+r-1\\ r\end{array}}\right) [t^{n-r} x_h^{\ell }]\\&\qquad (1+x_ht)^{3n-2-r} (1+t)^{(k+1-2h)(2n-1)} \\&\quad = -\frac{1}{2n-1} \sum _{r \ge 0} \left( {\begin{array}{c}2(h-1)(2n-1)+r-1\\ r\end{array}}\right) \left( {\begin{array}{c}3n-2-r\\ \ell \end{array}}\right) \\&\qquad [t^{n-r-\ell }] (1+t)^{(k+1-2h)(2n-1)} \\&\quad = -\frac{1}{2n-1} \sum _{r=0}^{n-\ell } \left( {\begin{array}{c}2(h-1)(2n-1)+r-1\\ r\end{array}}\right) \\&\qquad \left( {\begin{array}{c}3n-2-r\\ \ell \end{array}}\right) \left( {\begin{array}{c}(k+1-2h)(2n-1)\\ n-r-\ell \end{array}}\right) . \end{aligned}$$

Similarly, we obtain \([z^n x_h^{\ell }] \frac{zF_{k,1}(B)}{B}.\) We have

$$\begin{aligned} {[}z^n x_h^{\ell }]&\frac{zF_{k,1}(B)}{B} =[z^{n-1} x_h^{\ell }] \frac{F_{k,1}(B)}{B} \\&= \frac{1}{n-1} [t^{n-2} x_h^{\ell }] \Big ( - \frac{1}{t^2} \Big ) \Big ( F_{k,1}(t)^3 \prod _{i=2}^{\lceil k/2 \rceil } F_{k,i}(t)^4 \prod _{i=1}^{\lfloor k/2 \rfloor } G_{k,i}(t)^{-4} \Big )^{n-1} \\&=- \frac{1}{n-1}[t^n x_h^{\ell }] (1+x_h t)^{3n-3}(1+x_h t)^{4(h-1)(n-1)} \\&\qquad (1+t)^{2(k+1-2h)(n-1)} (1+(x_h-1)t)^{-4(h-1)(n-1)}\\&=- \frac{1}{n-1} [t^n x_h^{\ell }] \Big ( 1 - \frac{t}{1+x_h t}\Big )^{-4(h-1)(n-1)} (1+x_h t)^{3n-3} (1+t)^{2(k+1-2h)(n-1)} \\&=- \frac{1}{n-1} [t^n x_h^{\ell }] \sum _{r \ge 0} \left( {\begin{array}{c}4(h-1)(n-1)+r-1\\ r\end{array}}\right) t^r (1+x_ht)^{3n-3-r} (1+t)^{2(k+1-2h)(n-1)} \\&=- \frac{1}{n-1} \sum _{r \ge 0} \left( {\begin{array}{c}4(h-1)(n-1)+r-1\\ r\end{array}}\right) [t^{n-r} x_h^{\ell }] (1+x_ht)^{3n-3-r} (1+t)^{2(k+1-2h)(n-1)} \\&=- \frac{1}{n-1} \sum _{r \ge 0} \left( {\begin{array}{c}4(h-1)(n-1)+r-1\\ r\end{array}}\right) \left( {\begin{array}{c}3n-3-r\\ \ell \end{array}}\right) [t^{n-r-\ell }] (1+t)^{2(k+1-2h)(n-1)} \\&=- \frac{1}{n-1} \sum _{r=0}^{n-\ell } \left( {\begin{array}{c}4(h-1)(n-1)+r-1\\ r\end{array}}\right) \left( {\begin{array}{c}3n-3-r\\ \ell \end{array}}\right) \left( {\begin{array}{c}2(k+1-2h)(n-1)\\ n-r-\ell \end{array}}\right) . \end{aligned}$$

Now, we combine the two by means of (17), and the result follows. \(\square \)

Corollary 3.5

For every \(n > 1\), the average number of vertices labelled h in k-noncrossing trees with n vertices is

$$\begin{aligned} \frac{n}{(2k+1)n-(k+1)} \Big ( 3n-2 - \frac{2(h-1)(n-1)}{k} + \frac{2(k+1-2h)}{(2k+1)\big (2 - \frac{(2kn+n-2k)^{{\overline{k}}}}{(2kn+1-2k)^{{\overline{k}}}}\big )} \Big ), \end{aligned}$$

where \(m^{{\overline{k}}}=m(m+1)\cdots (m+k-1)\) is the rising factorial. Asymptotically, this is equal to \(\frac{3k+2-2\,h}{k(2k+1)} n + \frac{k+1-2\,h}{(2 k + 1)^2( 2 (\frac{2k}{2k+1})^{k}-1)} + O(1/n)\).

Proof

We only consider the case that k is odd and \(h \le \lceil k/2 \rceil = \frac{k+1}{2}\), as in the previous proof. As in the proof of Corollary 2.5, instead of extracting coefficients, we take the derivative with respect to \(x_h\) and plug in \(x_h=1\) in order to determine the total number of vertices labelled h in all k-noncrossing trees. All other variables \(x_i\) are immediately taken to be 1. This results in

$$\begin{aligned}&[z^n] \frac{\partial }{\partial x_h} (N_1+N_2+\cdots + N_k) \Big |_{x_1=\cdots =x_k = 1} \\&= \frac{1}{n-1} [t^n] \frac{\partial }{\partial x_h}\\ {}&\quad (1+x_h t)^{3n-3+4(h-1)(n-1)} (1+t)^{2(k+1-2h)(n-1)} (1+(x_h-1)t)^{-4(h-1)(n-1)} \Big |_{x_h=1}\\&\quad -\frac{1}{2n-1} [t^n] \frac{\partial }{\partial x_h}(1+x_h t)^{3n-2+2(h-1)(2n-1)} (1+t)^{(k+1-2h)(2n-1)} \\ {}&\quad (1+(x_h-1)t)^{-2(h-1)(2n-1)} \Big |_{x_h=1} \\&= [t^n] t\big (3-4(h-1)t \big ) (1+t)^{(2k+1)(n-1)-1}-[t^n]t\\ {}&\quad \left( \frac{3n-2}{2n-1}-2(h-1)t \right) (1+t)^{(2k+1)n-k-2} \\&= 3 \left( {\begin{array}{c}(2k+1)(n-1)-1\\ n-1\end{array}}\right) - 4(h-1) \left( {\begin{array}{c}(2k+1)(n-1)-1\\ n-2\end{array}}\right) \\ {}&\quad - \frac{3n-2}{2n-1} \left( {\begin{array}{c}(2k+1)n-k-2\\ n-1\end{array}}\right) + 2(h-1) \left( {\begin{array}{c}(2k+1)n-k-2\\ n-2\end{array}}\right) \\&=2(3k-2h+2)\left( {\begin{array}{c}(2k+1)n-2k-2\\ n-2\end{array}}\right) \\ {}&\quad -\frac{(3nk-2k-2(h-1)(n-1))}{n-1}\left( {\begin{array}{c}(2k+1)n-k-2\\ n-2\end{array}}\right) . \end{aligned}$$

Dividing by the total number of k-noncrossing trees, we obtain the stated formula after a number of simplifications. \(\square \)

As noted for k-plane trees, it is also possible to derive formulas for the variance of the number of vertices labelled h, as well as covariances of two different label counts. Moreover, one could also take the root label into account in Corollaries 3.4 and 3.5. However, the formulas for k-noncrossing trees are even more complicated than for k-plane trees. Instead of stating the most general result (which would be rather lengthy), we only present the special case \(k=2\).

Corollary 3.6

Let \(n > 1\). Variances and covariances of the number of vertices labelled 1, 2 respectively in 2-noncrossing trees with n vertices are given in the following table:

 

1

2

1

\(\frac{3 (2 n-1) (4 n-3)(49 n^2-100 n+44)}{25(5n-6)(7n-5)^2}\)

\(-\frac{3 (2 n-1) (4 n-3)(49 n^2-100 n+44)}{25(5n-6)(7n-5)^2}\)

2

\(-\frac{3 (2 n-1) (4 n-3)(49 n^2-100 n+44)}{25(5n-6)(7n-5)^2}\)

\(\frac{3 (2 n-1) (4 n-3)(49 n^2-100 n+44)}{25(5n-6)(7n-5)^2}\)

Proof

We recall from the proof of Theorem 1.2 that

$$\begin{aligned} {[}z^nx_1^{\ell _1}x_2^{\ell _2}] (N_1+N_2){} & {} = \frac{1}{n-1} [t^nx_1^{\ell _1}x_2^{\ell _2}] \Phi (t)^{n-1}\\ {}{} & {} \quad -\frac{1}{2n-1} [t^nx_1^{\ell _1}x_2^{\ell _2}] F_{2,1}(t)^{-1/2}\Phi (t)^{n-1/2}, \end{aligned}$$

where

$$\begin{aligned} F_{2,1}(t) = 1+(x_1-x_2)t \end{aligned}$$

and

$$\begin{aligned} \Phi (t) = (1+(x_1-x_2)t)^3(1-x_2t)^{-4} \end{aligned}$$

in the special case \(k=2\). Again as in Corollary 2.6, for us to compute the variance of the number of vertices labelled h, we need to first compute the second moment, which is

$$\begin{aligned} \frac{[z^n] \frac{\partial ^2}{\partial x_h^2} (N_1+N_2) |_{x_1=x_2= 1} + [z^n] \frac{\partial }{\partial x_h} (N_1+N_2) |_{x_1=x_2= 1}}{[z^n] (N_1+N_2) |_{x_1=x_2 = 1}}, \end{aligned}$$
(18)

and then subtract the square of the mean. Likewise, the mixed moment of the number of vertices labelled h and the number of vertices labelled i is

$$\begin{aligned} \frac{[z^n] \frac{\partial ^2}{\partial x_h \partial x_i} (N_1+N_2) |_{x_1=x_2= 1}}{[z^n] (N_1+N_2) |_{x_1=x_2 = 1}}, \end{aligned}$$

from which we subtract the product of the means to obtain the covariance.

Again, we only show the calculations for the variance of the number of vertices labelled 1 explicitly. The other entries follow automatically in this case, since the sum of the number of vertices labelled 1 and the number of vertices labelled 2 is deterministically equal to n. We get

$$\begin{aligned} {[}z^n]&\frac{\partial ^2}{\partial x_1^2} (N_1+N_2) |_{x_1=x_2 = 1}\\&= \frac{1}{n-1} [t^n] 3(n-1)(3n-4)t^2 (1-t)^{-4(n-1)}\\ {}&\quad - \frac{1}{2n-1} [t^n] (3n-2)(3n-3)t^2 (1-t)^{-(4n-2)}\\&= 3(3n-4) [t^{n-2}](1-t)^{-4(n-1)}- \frac{(3n-2)(3n-3)}{2n-1} [t^{n-2}] (1-t)^{-(4n-2)}\\&= 3(3n-4) \left( {\begin{array}{c}5n-7\\ n-2\end{array}}\right) -\frac{(3n-2)(3n-3)}{2n-1} \left( {\begin{array}{c}5n-5\\ n-2\end{array}}\right) . \end{aligned}$$

We already found earlier that

$$\begin{aligned} {[}z^n] \frac{\partial }{\partial x_1} (N_1+N_2) |_{x_1=x_2 = 1} = 3 \left( {\begin{array}{c}5n-6\\ n-1\end{array}}\right) -\frac{3n-2}{2n-1}\left( {\begin{array}{c}5n-4\\ n-1\end{array}}\right) \end{aligned}$$

and

$$\begin{aligned} {[}z^n](N_1+N_2) |_{x_1=x_2 = 1} = \frac{1}{n-1} \left( {\begin{array}{c}5n-5\\ n\end{array}}\right) -\frac{1}{2n-1} \left( {\begin{array}{c}5n-3\\ n\end{array}}\right) . \end{aligned}$$

Plugging everything into (18) and simplifying, we find a formula for the second moment and thus in turn for the variance. \(\square \)

Corollary 3.7

Let \(n > 1\). The average number of vertices labelled 1, 2 respectively in 2-noncrossing trees with n vertices whose root is labelled 1, 2 respectively is given in the following table:

 

1

2

root label 1

\(\frac{3 n^{2} -n - 1}{5n-4}\)

\(\frac{2n^2-3n+1}{5n-4}\)

root label 2

\(\frac{3n-1}{5}\)

\(\frac{2 n+1}{5}\)

Proof

We recall from the proof of Theorem 1.2 that

$$\begin{aligned} N_1 = \frac{x_1 B(1-x_2B)^2}{(1 + (x_1-x_2)B)^2},\ N_2 = \frac{x_2 B(1-x_2B)^3}{(1 + (x_1-x_2)B)^2}, \end{aligned}$$

with

$$\begin{aligned} B = z (1+(x_1-x_2)B)^3(1-x_2B)^{-4}. \end{aligned}$$

In order to determine the desired mean values, we need the coefficients of the partial derivatives \(\frac{\partial }{\partial x_h} N_i |_{x_1=x_2 = 1}\). We will show the details of the calculations in one of the cases again: the number of vertices labelled 1 in 2-noncrossing trees whose root label is 1. Since

$$\begin{aligned} \frac{\partial }{ \partial t} \frac{x_1 t(1-x_2t)^2}{(1 + (x_1-x_2)t)^2} = \frac{x_1 (1-x_2t) (1-x_1t-2x_2t-x_1x_2 t^2+x_2^2 t^2)}{(1 + (x_1-x_2)t)^3}, \end{aligned}$$

we have

$$\begin{aligned}{} & {} {[}z^n] N_1 = \frac{1}{n} [t^{n-1}] \frac{x_1 (1-x_2t) (1-x_1t-2x_2t-x_1x_2 t^2+x_2^2 t^2)}{(1 + (x_1-x_2)t)^3} \\ {}{} & {} \quad (1+(x_1-x_2)t)^{3n}(1-x_2t)^{-4n}. \end{aligned}$$

Now differentiate with respect to \(x_1\) and set \(x_1 = x_2 = 1\):

$$\begin{aligned} \frac{\partial }{\partial x_1} [z^n] N_1 \Big |_{x_1 = x_2= 1}&= \frac{1}{n} [t^{n-1}] \left( 1+(3n-7)t-(9n-8)t^2\right) (1-t)^{1-4n}\\&= \frac{1}{n} \left[ \left( {\begin{array}{c}5n-3\\ n-1\end{array}}\right) +(3n-7) \left( {\begin{array}{c}5n-4\\ n-2\end{array}}\right) -(9n-8)\left( {\begin{array}{c}5n-5\\ n-3\end{array}}\right) \right] \\&= \frac{2(3n^2-n-1)}{(n-1)(n-2)} \left( {\begin{array}{c}5n-5\\ n-3\end{array}}\right) . \end{aligned}$$

Dividing by the total number of 2-noncrossing trees with n vertices and root label 1, which is \(\frac{1}{2n-1} \left( {\begin{array}{c}5n-4\\ n-1\end{array}}\right) \), we obtain the mean number of vertices labelled 1. \(\square \)