The height of multiple edge plane trees

Multi-edge trees as introduced in a recent paper of Dziemia\'nczuk 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
Dziemiańczuk [4] 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 Section 2, a bijection is constructed which links d-ary multiple edge trees with standard d-ary trees. Since the bijection is heightpreserving, 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, Gao, Odlyzko and Richmond [5] and provide in this way a full analysis of the height of d-ary multi-edge trees, cf. Theorem 2.3.
In Section 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, Knuth and Rice [1] (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 are assuming that k 1 + k 2 + · · · + k r is always ≤ d, this is possible, and clearly this process is bijective for each vertex, so it also describes a bijection between trees. Figures 1 and 2 illustrate an example in the case d = 5.
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, Gao, Odlyzko and Richmond [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 dary trees (d-ary multi-edge trees) with n vertices whose height is h and N (d) (n) the total number of d-ary trees (d-ary multi-edge trees) with n vertices. For any δ > 0, we have the asymptotic formula where c = 2(d − 1)/d, uniformly for 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: Corollary 2.5. The number of d-ary multi-edge trees with n vertices and k leaves equals the number of d-ary trees with n vertices and k leaves.
More generally, the following holds: Corollary 2.6. For every r ∈ {0, 1, . . . , d}, the number of d-ary multiedge trees with n vertices, k of which have exactly r children, equals the number of d-ary trees with n vertices, k of which have exactly r children. Thus the average number of vertices with exactly r children is the same for d-ary multi-edge trees and d-ary trees with n vertices.
It is not difficult to show that the average proportion of vertices with exactly r children is asymptotically equal to d r (d−1) d−r d −d as n → ∞ (cf. the paragraph following [3, Theorem 3.13] with k = r, φ k = d k , Φ(y) = (1 + y) d , τ = 1/(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 n of edges (which we call the size of a tree). The resulting counting sequence 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.
3.1. 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.
for z ∈ C, Then υ : Z → U and ζ : U → Z are bijective holomorphic functions which are inverses of each other.
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 for T h (z), we use the ansatz T h (z) = p h (z)/q h (z) with p 0 (z) = q 0 (z) = 1 and Eliminating p h (z) yields the second order recurrence The characteristic equation is This quadratic equation has the roots α and β defined in (4). This yields the explicit expressions Inserting this in (6) yields (3).
Let T be the generating function of all plane, rooted multi-edge trees.
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 is clearly analytic. The sum h≥0 (T − T h )(z) can be written as 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.
Theorem 3.5. Let h ≥ 0. The number of rooted plane multi-edge trees of size n and height > h is denotes a weighted trinomial coefficient.
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 . 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 multiedge 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 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 (14) 4nπ 2 5ε log n < h < n 3/4−ε , 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. [2, (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 Proof. We expand the denominator of the integrand as a binomial se- Substituting t = z + 5 2 ibm and shifting the path of integration back to the real line yields Proof. 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 for z = ζ(u).

Using this transformation and Cauchy's formula as in the proof of Theorem 3.5 yields
Now we apply the saddle point method to this integral. It turns out that the right choice for the contour of integration is given by the parametrisation u = re iϕ with r = exp − 5 2 h n and −π ≤ ϕ ≤ π. This yields We set By the assumption (14), we have (16) α 2 > π 2 ε log n .
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 (19) 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 Thus (18) yields Combining (21) and (22) with (1) yields the result.
3.5. 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.
Theorem 3.10. The number of rooted plane multi-edge trees of size n with k vertices is 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 Catalan number C k−1 = 1 k 2k−2 k−1 . Each such tree can be transformed into a multi-edge tree of size n by distributing the n edges among the k − 1 edges of the non-multi-edge tree. This corresponds to a composition of n into k − 1 parts. There are n−1 k−2 such compositions. Thus there are 1 k 2k−2 k−1 n−1 k−2 plane rooted multi-edge tree of size n with k vertices.
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 P(V n = k) ∼ note that the negative sign has to be chosen to obtain regularity at z = 0. The probability generating function of V n is then p n (y) = [z n ]T (y, z) [z n ]T (1, z) .
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 ).