The height of multiple edge plane trees

Multi-edge trees as introduced in a recent paper of Dziemiańczuk are plane trees where multiple edges are allowed. We first show that d-ary multi-edge trees where the out-degrees are bounded by d are in bijection with classical d-ary trees. This allows us to analyse parameters such as the height. The main part of this paper is concerned with multi-edge trees counted by their number of edges. The distribution of the number of vertices as well as the height are analysed asymptotically.


Introduction
has introduced a tree model based on plane (=planar) trees [10, p. 31], which are enumerated by Catalan numbers. Instead of connecting two vertices by one edge, in his multi-edge model, two vertices can be connected by several edges. If one counts trees by vertices, one must somehow restrict the number of edges in order to avoid an infinity of objects with the same number of vertices. In [4], the chosen restriction is that each vertex has out-degree at most d, i.e., there are at most d edges going out from any vertex. However, if one counts trees with a given number of edges, the restriction with the parameter d is no longer necessary. This is in contrast to the case of classical plane trees where the number of edges equals the number of vertices minus one. In [4], several parameters of multi-edge trees were analysed, but some questions about the (average) height (i.e., the maximum distance from the root) of such multi-edge trees were left open. The present paper aims to close this gap.
In Sect. 2, a bijection is constructed which links d-ary multiple edge trees with standard d-ary trees. Since the bijection is height-preserving, and the height of d-ary trees is well understood, we can resort to results by Flajolet and Odlyzko [7] as well as by Flajolet et al. [5] and provide, in this way, a full analysis of the height of d-ary multi-edge trees, cf. Theorem 2.3.
In Sect. 3, we count trees by the number of edges and drop the parameter d. The analysis of the height of plane trees appears in a classic paper by de Bruijn et al. [2] (see also [18]), with an average height of asymptotically √ πn. Now, we can follow this approach to some extent, but combine it with a technique presented in [9]. The expected height is asymptotically equal to 2 √ 5 √ πn, with a more precise result in Theorem 3.6. The constant is smaller, which is also intuitive, since the multiple edges contribute to the size of the objects, but not to the height. We also give an exact counting formula in terms of weighted trinomial coefficients (Theorem 3.5) and a local limit theorem (Theorem 3.8).
The distribution of the number of vertices in plane multi-edge trees with n edges is analysed in Theorem 3.11. The number of trees with given number of vertices and edges is given in Theorem 3.10.

A bijection between d-ary multi-edge trees and ordinary d-ary trees
As explained in the introduction, Dziemiańczuk [4] studies d-ary multi-edge trees, where a vertex can have at most d edges going out from it. We present a simple bijection to ordinary (pruned) d-ary trees, where every vertex has d possible positions for an edge to be attached (e.g., left, middle, right in the case d = 3). See [10, Example I.14] for a discussion of pruned d-ary trees. This bijection preserves (amongst other parameters, such as the number of leaves) the height, allowing us to reduce the problem of enumerating d-ary multi-edge trees by height to the analogous question for d-ary trees, which has been settled in [5]. Our bijection can be described as follows: suppose that a vertex v of a d-ary multi-edge tree has r children, which are connected to v by k 1 , k 2 , . . ., k r edges respectively. The corresponding vertex v in the d-ary tree also has r children (corresponding to the children of v in the natural way), which are attached to v by edges in the k 1 th, (k 1 + k 2 )th, (k 1 + k 2 + k 3 )th, . . . , (k 1 + k 2 + · · · + k r )th position. Since we assume that k 1 + k 2 + · · · + k r is always ≤ d, this is possible, and clearly this process is bijective for each vertex, so it  From this bijection, we immediately obtain the following corollaries: It is well known that d-ary trees belong to the general class of simply generated families of trees, and the height of such families was studied in great detail in a paper by Flajolet et al. [5]. They obtain the following local limit theorem (only stated for d-ary trees here, i.e. setting φ(y) = (1 + y) d and τ = 1/(d − 1) in the formulae given there), which refines earlier results of Flajolet and Odlyzko [7] on the average height: h (n) be the number of d-ary trees (dary multi-edge trees) with n vertices whose height is h and N (d) (n) is the total AEM number of d-ary trees (d-ary multi-edge trees) with n vertices. For any δ > 0, we have the asymptotic formula Similar results for the average height were obtained by Kemp [13,14] (see also [17]) for slightly different models of random plane trees, namely for trees with given root degree or number of leaves.
As it was mentioned earlier, other statistical results carry over from d-ary trees to d-ary multi-edge trees as well: It is not difficult to show that the average proportion of vertices with exactly r children is asymptotically equal to d 1)), which tends to 1/(r!e) as d → ∞. This generalises the observation made in [4] in the case r = 0 that the asymptotic average proportion of leaves tends to 1/e as d → ∞.

Trees with given number of edges
In this section, we consider plane rooted multi-edge trees with a given number of edges n (which we call the size of a tree). The resulting counting sequence Vol. 90 (2016) The height of multiple edge plane trees 629 A n is sequence A002212 in [15], see also [16]. It starts with 1, 1, 3, 10, 36, 137, 543, 2219, 9285, 39587. Asymptotically, the number A n of plane rooted multi-edge trees with n edges is This will follow without further effort at the end of the proof of Theorem 3.6. We now analyse the height of multi-edge trees.

Generating functions
In the following lemma, we introduce the fundamental transformation which will be used throughout this section. The principal branch of the square root function is chosen as usual, i.e., as a holomorphic function on C\R ≤0 such that √ 1 = 1.
Then υ : Z → U and ζ : U → Z are bijective holomorphic functions which are inverses of each other.
Proof. We first note that ζ is well-defined and holomorphic on U with ζ (u) = 0 for all u ∈ U . If |u| = 1, then Thus the image of the unit circle under ζ is the interval which has two not necessarily distinct solutions u 1 , u 2 ∈ C with u 1 u 2 = 1. W.l.o.g., |u 1 | ≤ |u 2 |. Thus either u 1 ∈ U and |u 2 | > 1 or |u 1 | = |u 2 | = 1.
In a neighbourhood of zero, we must have ζ −1 (z) = υ(z), because It is easily seen that For h ≥ 0, consider the class T h of plane rooted multi-edge trees of height at most h. Denote the ordinary generating function associated to T h by T h (z).

Lemma 3.2. The generating function T h (z) is given by
Proof. The class T 0 consists of an isolated vertex. For h > 0, T h consists of a root and a sequence of branches of height at most h − 1 such that each branch is attached by a positive number of edges to the root. If E = {e} is the class of one edge, we can write T h symbolically as The symbolic equation (5) translates to This may be seen as a continued fraction. To obtain an explicit expression Eliminating p h (z) yields the second order recurrence Vol. 90 (2016) The height of multiple edge plane trees 631 The characteristic equation is This quadratic equation has the roots α and β defined in (4). This yields the explicit expressions Under the substitution z = ζ(u), we have Inserting this in (6) yields (3).
Let T be the generating function of all plane, rooted multi-edge trees.
Proof. It is clear that T is the limit of T h for h → ∞. As |u| < 1, we have T (z) = u + 1. The expression for T − T h follows.
Note that T could also have been determined by removing the restriction on h in the symbolic equation and solving the resulting quadratic equation for T .
Proof. By the explicit formula for β, it is clear that T (z) is an analytic function on Z.
For u = υ(z) and z ∈ Z, the function We can bound the sum by converges uniformly on compact subsets of U and is therefore analytic in U .
The results for z ∈ Z follow by the fact that υ(z) is analytic.

Explicit formula for the number of trees of given height
At this stage, we can compute the number of rooted plane multi-edge trees of size n and height >h explicitly. Taking the difference for h and h − 1 results in a formula for the number of trees of height h. Proof. By the definition of the generating functions, we have to compute [z n ](T − T h )(z). By Cauchy's formula, we have For sufficiently small |u|, the index of 0 with respect to ζ(u) is 1. Therefore, using the substitution z = ζ(u) and using Cauchy's formula again, we can rewrite (9) as Vol. 90 (2016) The height of multiple edge plane trees 633 Expanding the denominator into a geometric series yields By the definition of n;1,3,1 k , this is exactly (8).

Remark 1.
It would be possible to determine the asymptotic behaviour of the trinomial coefficients by means of the saddle point method (cf. [11,Section 4.3.3]) and to obtain asymptotics for the average height (Theorem 3.6) and the local limit theorem (Theorem 3.8) from that, but the calculations would be somewhat more involved.

Expected height
We now compute the expected height of a random rooted plane multi-edge tree of size n.
Theorem 3.6. Let H n be the height of a random rooted plane multi-edge tree of size n. Then Before proving Theorem 3.6, we prove a lemma on the harmonic sum occurring in its proof.
Proof. Using the substitution u = e −t yields where d(m) is the number of positive divisors of m.
for real t → 0 + . However, the same argument can also be used for |arg t| < π/4 because the inverse Mellin transform remains valid for complex t with |arg t| < 2π/5 by the identity theorem for analytic functions; cf. [9]. As substituting back yields (11).
Proof of Theorem 3.6. We use the well-known identity We intend to compute [z n ] h≥0 (T − T h )(z) via singularity analysis. The dominant singularity is at z = 1/5. To perform singularity analysis, we need the expansion of T − T h around z = 1/5, corresponding to u = 1 under the substitution z = ζ(u).
Inserting this in (12) yields for z → 1 5 and |arg( 1 5 − z)| < 3π/5, i.e. |arg(z − 1 5 )| > 2π/5. Note that the exact bounds for the arguments are somewhat arbitrary: the essential property of 2π/5 here is that it is less than π/2. Using the expansions of 1 − u and t in terms of √ 1 − 5z and of 1 − u, respectively, the angles are transformed accordingly, but we have to allow for a small error. By singularity analysis [8], this yields The number of plane rooted multi-edge trees of size n is

Local limit theorem
In this section, we prove a local limit theorem for the height of a plane rooted multi-edge tree. As our generating function is very explicit, we can give a result in a wider range than [5].
Theorem 3.8. Let 0 < ε < 1 6 . Then, for the probability of a plane rooted multi-edge tree to have height h is The fact that the two expressions for G(α) in (15) are equal is Poisson's sum formula (cf. [1, (3.12 We first compute the integral which will appear by application of the saddle point method.

Lemma 3.9. Let 0 < a < 1, 0 < b be real numbers and c, d be complex numbers. Then
Vol. 90 (2016) The height of multiple edge plane trees 637 Proof. We expand the denominator of the integrand as a binomial series, dom- Substituting t = z + 5 2 ibm and shifting the path of integration back to the real line yields Proof of Theorem 3.8. Instead of computing the number of trees of height exactly h, we compute the number A nh of trees of height exactly h − 1 because this leads to more convenient formulae and does not matter asymptotically. By (7), we get Using this transformation and Cauchy's formula as in the proof of Theorem 3.5 yields Now we apply the saddle point method (cf. Flajolet and Sedgewick [10, Ch. VIII]) to this integral. We use the parametrisation u = re iϕ with −π ≤ ϕ ≤ π and choose r below. This yields The main contribution is exp(nf (u)). This function has a saddle point if f (u) = 0, which is equivalent to From this expression, we see that choosing some r with r = 1 − 5h leads through a saddle point. It turns out to be more convenient to simply set r = exp − 5 2 h n . We set By the assumption (14), we have Note that r → 1 for n → ∞. We also note that g(u) = O(1) on the area of integration. If α 2 ≤ π, Otherwise, r h ≤ exp(−2π), i.e., 1 1−u h and 1 1−u h+1 are bounded. Thus (17) can be used in any case.
We first prune the tails. We set δ n = n −1/2+ε so that nδ 2 n = n 2ε and nδ 4 n = n −1+4ε ≤ n −1/2+ε and nδ n /h 2 = O(n −1/2+ε log n) for n → ∞. In particular, we have δ n = o (1). The choice of δ n is motivated by the fact that we will need these asymptotic estimates and that those of the previous expressions which converge to 0 actually have an influence on the final error terms, whereas the growth of nδ 2 n → ∞ is of minor importance.
Vol. 90 (2016) The height of multiple edge plane trees 639 For |ϕ| > δ n , we have |1 + 3u + u 2 | ≤ |1 + 3u| + r 2 = 1 + 6r cos ϕ + 9r 2 + r 2 ≤ 1 + 6r cos δ n + 9r 2 + r 2 for sufficiently large n. We conclude that for |ϕ| > δ n , for sufficiently large n. Thus, by (17), We now approximate the integrand in the central region. We have Therefore, noting that n(h/n + δ n We now use the substitution √ nϕ = t, leading to We set and note that the contribution of |t| > δ n √ n is again negligible: we have dt. Now we can use the estimate (17) for 1 − r h as before, and the integral in the upper bound can in principle be computed explicitly. It is O(( √ nδ n ) −1 exp(−nδ 2 n /5)), so the total contribution of the tails (i.e., the regions where |t| > δ n √ n; of course the estimate for negative t is analogous) is O(n −1/2 δ −1 n log 2 n exp(−nδ 2 n /5)). It would be possible to give an even better bound, but this is enough for our purposes.
We obtain By Lemma 3.9 with a = exp −(5h 2 )/(2n) , b = h/ √ n, c = −i/ √ n and d = (5h)/(2n) and by replacing m + 1 by m, we obtain Vol. 90 (2016) The height of multiple edge plane trees 641 The integral E hn can be bounded by We first consider the case α 2 ≥ π. In this case, we have E hn = O(h 3 /n 3 ). All summands in the first expression in (15) are positive and its first summand is at least α 2 exp(−α 2 ), so that Then (18) yields We now turn to the case α 2 < π. We now use the second expression for G(α) in (15). Again, all summands are positive and we bound G(α) by the first summand from below. This yields and, by (19) and (16), For an upper bound of E hn , we use the estimate (1 − r h ) −1 = O(n/h 2 ), cf. (17). We get

Number of vertices
In this section, we consider the number of vertices of a random rooted plane multi-edge tree of size n.
We first give an explicit formula.
Proof. We first provide a proof based on the generating function, which will also be needed later. Let T (y, z) be the bivariate generating function for rooted plane multi-edge trees, where y marks the number of vertices and z the number of edges. Rooted plane multi-edge trees T can be represented symbolically as This symbolic equation translates to For a fixed z, we compute the coefficient [y k ]T (y, z) using the Lagrange inversion formula. By (25), we have Now the Lagrange inversion formula gives us Finally, we extract the coefficient of z n : Combinatorial proof of Theorem 3.10. It is well known that the number of plane rooted trees (without multiple edges) with k vertices is given by the The distribution of the number of vertices can now be derived from the explicit formula in Theorem 3.10 using Stirling's formula. In order to determine the asymptotic behaviour of the moments, we use an approach via Hwang's quasi power theorem which turns out to be more convenient.
holds uniformly for v ∈ R. Furthermore, the local limit theorem For y in a neighbourhood of 1, the dominant singularity is at z = 1/(1+4y). As The asymptotic formulae for mean and variance in Theorem 3.11 as well as the central limit theorem are an immediate consequence of Hwang's quasi power theorem [12] in the version of [10, Theorem IX.8].
The local limit theorem follows immediately from the explicit formula in Theorem 3.10: applying Stirling's formula to (23), we find that the total number of multi-edge trees with n edges and k = 4n 5 + R vertices is equal to Combining this with the asymptotic formula (1) for the total number A n of multi-edge trees with n edges, we obtain the desired statement for R = o(n 2/3 ).
Open Access. This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.