On embedded trees and lattice paths

On embedded trees and lattice paths

Markus Kuba Markus Kuba
Institut für Diskrete Mathematik und Geometrie
Technische Universität Wien
Wiedner Hauptstr. 8-10/104
1040 Wien, Austria
Abstract.

Bouttier, Di Francesco and Guitter introduced a method for solving certain classes of algebraic recurrence relations arising the context of embedded trees and map enumeration. The aim of this note is to apply this method to three problems. First, we discuss a general family of embedded binary trees, trying to unify and summarize several enumeration results for binary tree families, and also to add new results. Second, we discuss the family of embedded -ary trees, embedded in the plane in a natural way. Third, we show that several enumeration problems concerning simple families of lattice paths can be solved without using the kernel method by regarding simple families of lattice paths as degenerated families of embedded trees.

Key words and phrases:
Embedded trees, Labeled trees, Binary Trees, Plane Trees, Height of Plane trees, Lattice Paths, Vicious walkers, Osculating walkers
The author was supported by the Austrian Science Foundation FWF, grant S9608-N13.

1. Introduction

Several families of embedded trees have been studied in the literature. Binary trees, complete binary trees, several different families of planar trees and more generally simply generated tree families have been considered in a series of papers [8, 9, 20, 13, 3, 2, 17, 18, 12, 22, 14]: it has been showed that embedded trees naturally arise in the context of map enumeration and that properties of embedded trees are closely related to a random measure called Integrated Superbrownian Excursion. Combinatorial properties of embedded ternary trees where studied using bijections between embedded ternary trees and non-separable rooted planar maps [16, 10], where the authors studied a particular subclass of embedded ternary trees named skew ternary trees [16], or left ternary trees [10], which are embedded ternary trees with no node having label greater than zero. Using bijections between embedded ternary trees with no label greater than zero and non-separable rooted planar maps with edges they obtained amongst others an explicit result for the number of such trees of size . Some other enumerative results for embedded ternary trees where derived in [19]. For the exact enumeration of embedded trees and related problems Bouttier, Di Francesco and Guitter [8], see also Di Francesco [13], introduced a new method for solving systems of recurrence relations. Bousquet-Mélou [3] showed how this method can be used to derive deep results about the enumeration of embedded binary trees and families of embedded plane trees, and also about properties of the Integrated Superbrownian Excursion. The aim of this note is to continue the analysis of [19]. We use generating functions and the method of [8] to study a general family of embedded binary trees, rederiving and unifying several earlier results, and also the family of embedded -ary trees. Moreover, we show that some enumeration problems concerning simple families of lattice paths, previously solved by Banderier and Flajolet [1] using the kernel method, can be treated using the method of [8]. This work is divided into three parts. The first part is devoted to the study of a general family of binary trees embedded in the plane, summarizing and rederiving a few of the enumerational results of [8, 3, 6]. The second part of this work is devoted to the study of embedded -ary trees. The third part is devoted to the enumeration of lattice paths using the method of [8, 13], rederiving (and slightly extending) earlier results of Flajolet and Banderier [1]. Moreover, we use their method to (re-)derive other results. In particular, we derive the length generating function of three vicious walkers and osculating walkers, previously obtained earlier by Bousquet-Mélou [5] using the kernel method, and Gessel. In the next section we we recall some properties of the family of -ary trees and we discuss the (natural) embedding of -ary trees and -ary trees into the plane. Section 3 is devoted to a presentation of the method [8, 13] following the exposition of Di Francesco [13]. Throughout this work we use the notations , and also .

2. The family of d-ary trees

The family of -ary trees , with , can be described in a recursive way, which says that a -ary tree is either a leaf (an external node) or an internal node followed by ordered ternary trees, visually described by the suggestive “equation”

Here is the symbol for an internal node and is the symbol for a leaf or external node. The generating function of the number of -ary trees of size satisfies the equation

 T(z)=1+zTd(z),withT(0)=1. (1)

Concerning the series expansion of the generating function it is convenient consider the shifted series . This corresponds to discarding external nodes (the empty tree) in the description above; we obtain simply generated -ary trees ), defined by the formal equation

 ~T=◯×φ(~T),with% φ(t)=(1+t)d, (2)

with a node, the cartesian product, and the substituted structure. We refer to [21] for the general definition of simply generated trees. Let denote the number of ternary trees of size , and the number of simply generated ternary trees of size . By the formal description above (2) the counting series satisfies the functional equation

 ~T(z)=z(1+~T(z))d,~T(0)=0. (3)

Due to the Lagrange inversion formula, see e.g. [15], the number of -ary trees of size is given by the so-called Fuss-Catalan numbers ,

 ~Tn=[zn]~T(z)=1(d−1)n+1(dnn),% and consequently~T(z)=∑n≥1(dnn)zn(d−1)n+1. (4)

Note that due to the definition the series and are related by .

2.1. Embedded d-ary trees

By definition of -ary trees each internal node with no children has exactly positions to attach a new node, which are as usual called external nodes or leaves, see Figure 1. We embed -ary trees in the plane by distinguishing between the cases of even and odd , respectively. Equivalently, we can distinguish between -ary trees and -ary trees, with . The root node has position zero. We recursively define the embedding of -ary and -ary trees as follows. For -ary trees an internal node with label/position has exactly children, being internal or external, placed at positions , , , . For -ary trees an internal node with label/position has exactly children, being internal or external, placed at positions , , , . Following [3], we call these embedding natural embedding of -ary trees, because the label a node is its abscissa in the natural integer embedding of the tree.

In this note we are interested in the number of embedded -ary trees having no label greater than , with . Let and denote the generating function of embedded -ary and -ary trees having no label greater than , , with initial values and . Following the observation of Bousquet-Mélou we can think of as the generating function of embedded -ary trees with root labeled . By definition we obtain the following system of recurrences for 111Subsequently, we will usually drop the subscripts and of and in order to simplify the presentation.. For -ary trees we get the system of recurrences

 Tj(z)=1+zd∏ℓ=−dTℓ(z),j≥0,withT−j(z)=1,for1≤j≤d, (5)

and for -ary trees we get the system of recurrences

 Tj(z)=1+zd∏ℓ=1(T2ℓ−1(z)T−2ℓ+1(z)),j≥0,withT−j(z)=1,for1≤j≤2d−1. (6)

Note that for both cases we have

 Tj(z)→T(z)forj→∞,

in the sense of formal power series, where denotes the overall generating function (1) of -ary and -ary trees, respectively. Note that this observation turns out to be crucial for the solution of the recurrence relation; see the original paper of Bouttier et al. [8] and the next section. In the work [19] a different embedding for -ary trees is suggested. However, the embedding above for -ary trees turns out to be more easily analyzed and more natural, since the nodes are evenly placed in the plane.

3. A method for solving infinite systems of algebraic recurrence relation

Bouttier, Di Francesco and Guitter introduced a method for solving certain classes of algebraic recurrence relations arising the context of embedded trees and map enumeration. Our presentation of their method follows the exposition of Di Francesco [13]. For a given integer let , with , denote a family of generating functions. Assume that the satisfy algebraic recurrence relations expressing in terms of a finite number of previous terms , with . The boundary data needed to entirely determine should consist of consecutive initial values of . Assume further that in the sense of formal power series exists, with ; note that is also the solution of the unrestricted recurrence relation for , holding for all . Exploiting the fact that one uses the ansatz , where denotes an a priori unknown formal power series with . This allows to linearize the recurrence relations at large , similar to first order asymptotic series expansion.

A first order expansion of the recurrence relation for in terms of leads to linear recurrence relations for . It is readily solved using the classical ansatz , with unspecified . We can deduce that the general solution of the linearized recurrence relation is given by , where the , with , are all solutions with modulus less one of the characteristic equation of the linear recurrence relation for the first order approximation . In order to obtain the solution of the original problem one uses a full asymptotic series expansion of the recurrence relation for in terms of and compares order by order the contributions to the true solution. We recursively obtain the unspecified coefficients , usually depending on , , with free parameters , where denotes the -th unit vector.

The main difficulty is solve the recurrence relation for the coefficients . Once these recurrence relations are solved, one can hopefully derive a compact expression for and subsequently adapt the unspecified parameters , , to the initial conditions .

4. General families of embedded binary trees

The family of ordinary (incomplete) binary trees , enumerated by the Catalan numbers, whose counting series satisfies the functional equation

 T(z)=1+zT(z)2.

Bousquet-Mélou [3] considered the embedding of this tree family in the plane according to

 Tj(z)=1+zTj−1(z)Tj+1(z),j∈Z.

Here denotes the generating function of a tree with root at position . Bouttier et al. [8, 9] and Bousquet-Mélou [3] studied two families and of embedded plane trees which are closely related to families of maps. They can be realised as certain families of embedded binary trees. Let and denote the counting series of the families and , satisfying the functional equations

 F(z)=11−2zF(z),G(z)=11−3zG(z),

or equivalently,

 F(z)=1+2zF(z)2,G(z)=1+3zG(z)2.

These tree families are embedded according to

 Fj(z)=11−z(Fj−1(z)+Fj+1(z)),Gj(z)=11−z(Gj−1(z)+G(z)+Gj+1(z)),j∈Z,

or equivalently by

 Fj(z)=1+zFj(z)(Fj−1(z)+Fj+1(z)),Gj(z)=1+zGj(z)(Gj−1(z)+Gj(z)+Gj+1(z)).

For the three tree families , and it was shown that the generating functions of trees with small labels, i.e. tree in which all labels are less or equal , are algebraic and explicit expressions were obtained.

4.1. Embedding of a general family of binary trees

We discuss properties of the family of weighted binary trees, defined according to a functional equation for its counting series ,

 T=1+z(2v1+v2)T+z(w1+w2+2w3)T2.

We can interpret either as weights, , or as variables encoding different kinds of nodes, which would lead to a refined enumeration of trees. Concerning the second point of view one could for example consider , with . By solving the quadratic equation for one easily obtains the following explicit result.

 T=1−z(2v1+v2)−√(1−z(2v1+v2))2−4z(w1+w2+2w3)2z(w1+w2+2w3). (7)

We reobtain the previously considered families and several other tree families, binary and non-binary, by suitable sometimes non-unique choices of and .

Example 1.

Binary trees (Catalan numbers) A000108 are obtained by setting and , the number of rooted Eulerian edge maps in the plane A052701 are obtained by setting and , Blossom trees or equivalently rooted planar maps A005159 are obtained by setting and , Schröder trees (large Schröder numbers) A006318 can be obtained setting and , planar rooted trees with tricolored end nodes A047891 can be obtained setting and , the choice and gives sequence A082298, the choice and gives sequence A103210; several other sequences in Sloane’s Encyclopedia [23] can be obtained by suitable choices of the parameters.

We embed this family according to the following recurrence relation for .

 Tj=1+z(v1Tj−1+v1Tj+1+v2Tj)+z(w1Tj−1Tj+1+w2T2j+w3Tj(Tj−1+Tj+1)), (8)

with . We will see that we can reobtain the previously discussed families , and and their counting series by the following choices of the weights/variables : , and .

We will show that for several choices of the weights and arbitrary weights the generating functions of trees with small labels in the embedded family , i.e. tree in which all labels are less or equal , can be explicitly obtained.

4.2. Trees with small labels

Our starting point is the recurrence relation below for .

 Tj=1+z(v1Tj−1+v1Tj+1+v2Tj)+z(w1Tj−1Tj+1+w2T2j+w3Tj(Tj−1+Tj+1)), (9)

for with initial value given by or , depending on particular counting problem, see [8, 9, 13, 3]. Following the approach presented in Section 3 we use that fact that for tending to infinity we have in the sense of formal power series, with given by (7). We make the ansatz , where denotes the generating function of the family defined by (7), with as tends to infinity. We expend Equation 9 with respect to the ansatz and compare the terms tending at a similar rate to zero in the asymptotic expansion of as tends to infinity, neglecting terms , and . We get the linearized equation

 −Tρj=−zT(v1(ρj−1+ρj+1)+v2ρj)−zT2(w1(ρj−1+ρj+1)+2w2ρj+w3(ρj−1+2+ρj+ρj+1)).

Now we make a refined ansatz in order to solve this linear recurrence relation for , assuming that is a formal power series depending on variables/weights with . We obtain the so-called characteristic equation for the series ,

 1=z(v1(1X+X)+v2)+zT(w1(1X+X)+2w2+w3(1X+2+X)). (10)

We observe that is a power series in and has non-negative coefficients. Consequently, the proper solution is given by

 (11)

One readily checks that the expression above for is indeed a power series in and has non-negative coefficients. Using the definition of the series we can express solely in terms of the series

with respect to the polynomials and defined by

 t1(X)=w1(1+X2)+2w2X+w3(1+X)2−v1(1−X)2,t2(X)=w1(1−X+X2)+w2X+w3(1+X2).

We make the more refined ansatz , with unspecified and , which amounts to an asymptotic expansion of for tending to infinity. Next we compare the terms with the same order of magnitude in (9) as tends infinity. We obtain from (9), using the relation (10), the following recurrence relation for , with .

 αn+1(v1T+w1+w3)(1Xn+1+Xn+1−1X−X)=n∑i=1αiαn+1−i(w1Xn+1−2i+w2+w3(1Xi+Xi)). (12)

We observe that the variable only appears in the defining equations for series and , but not in the recurrence relation for . Introducing the quantity , , we obtain the simplified recurrence relation

 βn+1(1Xn+1+Xn+1−1X−X)=n∑i=1βiβn+1−i(w1Xn+1−2i+w2+w3(1Xi+Xi)). (13)

Let denote the formal power series . Equation 13 is equivalent to a functional equation for :

 f(tX)+f(tX)−(1X+X)f(t)=w1f(tX)⋅f(tX)+w2f(t)2+w3f(t)⋅(f(tX)+f(tX)).

One already knows the solutions of Equation 13 in the cases , see Bousquet-Mélou [3], and , , see Bouttier et al. [8] and also [3]. We will provide the solution of Equations 12 and 12, respectively, in the case and , excluding the degenerate case .

Lemma 1.

For given parameters and , excluding the degenerate case , the solution of the recurrence relation 12 is for given by

 αn=Xn−1αn1(w1X+w2(1+X+X2))n−1(1−Xn)(v1T+w1+w2)n−1(1−X)2n−1(1+X+X2)n−1(1+X)n−1.

We could not solve directly the functional equation for . Instead we obtained the solution in an experimental way using the computer algebra software Maple. Once the solution of the recurrence relation is guessed, it is readily rigourously checked that it satisfies the recurrence relation (12), or equivalently that the generating function satisfies the stated functional equation. Unfortunately, we could not solve the recurrence relation in full generality , except for the already known special case and  [8, 3]; it is given by

 αn=Xn−1αn1wn−13(1−X2n)(v1T)n−1(1−X)2n−1(1+X+X2)n−1(1+X).

However, the result of Lemma 1 already covers and generalizes the result for two previously treated families, the cases of binary trees and of a family of planar trees, which we interpret as embedded binary trees. It seems that the structure of the values is not regular in the other cases. We performed some computer experiments and we state the following conjecture on the values of for and .

Conjecture 1.

In the case and the solution of the recurrence relation 12 is given by

where the sequence of polynomials with initial values

 p1(X)=1,p2(X)=1,p3(X)=X4+2X3+2X+1,

is for recursively defined by

 p2n(X)=P2n−1(X)−2X2p2n−2(X),p2n+1(X)=pn+2(X)pn+1(X)−4X4pn(X)pn−1(X).

We return to our previous case of and . In order to simplify the presentation we set

 α1=(v1T+w1+w2)(1−X2)(1−X3)(w1X+w2(1+X+X2))⋅λ,withλ=λ(X,v1,w1,w2),

and obtain the following result.

Theorem 1.

For given parameters and , excluding the degenerate case , a solution of the recurrence relation 8 with free parameter is given by

 Tj=T⋅(1−(v1T+w1+w2)λ(1−X2)(1−X3)Xj(w1X+w2(1+X+X2))(1−λXj+1)(1−λXj+2)),

with series given by (11).

Now we can easily reobtain the previous results of [8, 3] by suitable choices of and adapting to the initial value . The quadratic equation relating and normally has two distinct solutions; we use the fact that a priori has a power series expansion at to identify the right solution.

Corollary 1 ([8, 3]).

In the case of embedded binary trees, and with , we reobtain the result

 Tj=T⋅(1−Xj+2)(1−Xj+7)(1−Xj+4)(1−Xj+5),j≥−1.

In the case of embedded planar trees, and with , we reobtain the result

 Tj=T⋅(1−Xj+1)(1−Xj+4)(1−Xj+2)(1−Xj+3),j≥−1.
Remark 1.

As mentioned above one can readily obtain numerous enumerative results from Theorem 1. The solutions turn out to be usually more involved due to the adaption to initial values or .

4.3. The height of planar trees

A more general form of recurrence relation (9) reads the following way.

 Tj=1+z(v1Tj−1+v2Tj+v3Tj+1)+z(w1Tj−1Tj+1+w2T2j+w3TjTj−1+w4TjTj+1)).

It seems very difficult to obtain solutions for this recurrence relation. However, there exist a subclass , setting for the sake of simplicity , which is explicitly solvable

 Tj=1+z(v1Tj−1+v2Tj)+zTj−1Tj,forj≥1. (14)

This was observed earlier by Bousquet-Mélou [6]. This subclass is of particular importance due to the connection with the height of plane trees [11], corresponding to the case , with initial condition . By the approach presented in Section 3 we use the fact that

 Tj→T,withT=1+z(v1+v2)T+zT2,

and the ansatz . This leads to

 −ρjT=−zT(v1ρj−1+v2ρj)−zT2(ρj−1+ρj)+zT2ρj−1ρj.

For the first order expansion we consider the terms tending at the same rate to zero as tends to infinity, neglecting the term . We get the linearized equation

 ρj=z(v1ρj−1+v2ρj)+zT(ρj−1+ρj).

This recurrence relation is readily solved by , with given by satisfying

 X=z(v1+T)1−z(v2+T).

As before he more refined ansatz , with unspecified and leads to a recurrence relation for ,

 αn+1(v1T+1)1−XnXn+1=n∑i=1αiαn+1−i1Xi,n≥0.

Proceeding as before, we introduce the quantity , and solve the arising recurrence relation in an experimental way using the computer algebra software Maple. We obtain the solution

 αn=αn1Xn−1(v1T+1)n−1(1−X)n−1,n≥1,

with unspecified . In order to simplify the presentation we set and obtain the following result.

Theorem 2 ([6]).

A solution of the recurrence relation 14 with free parameter is given by

 Tj=T⋅(1−(v1T+1)(1−X)λXj(1−λXj+1)),

with .

Setting and adapting to the initial condition gives the following result.

Corollary 2 ([11, 6]).

The generating function of plane trees of height is given by

 Tj=T⋅1−Xj+11−Xj+2,withX=zT/(1−zT)=T−1.

Note that the free parameter in Theorem 2 allows to obtain refined enumerations, as shown in [6].

4.4. A family of ternary trees

We have seen that one can eliminate the variables and from the recurrence relation (12) (and also in (14)) for by a proper substitution, leading to the simplified recurrence relation (13) for the values . This is not the case anymore even for ternary trees. Consider for example the family of weighted ternary trees, defined according to a functional equation for its counting series ,

 T(z)=1+z(2v1+v2)T(z)+zT(z)3,

embedded according to recurrence relation

 Tj(z)=1+z(v1Tj−1+v1Tj+1(z)+v2Tj(z))+zTj−1(z)Tj(z)Tj+1(z),

with . Proceeding as before, i.e. making the ansatz and subsequent refinements with being the solution of

 1=z(v1(1X+X)+v2)+zT2(1X+1+X),

with , one obtains the recurrence relation

Unfortunately, we are not able to solve this recurrence relation for . We observe that as before the variable only appears in the defining equations for series and , but not in the recurrence relation for . In the case we can use the solution of [19], and subsequently may obtain a refinement of a result of [19].

5. Embedded (2d+1)-ary trees with small labels

The starting point of our considerations is the system of recurrences (5). We make the ansatz , with as tends to infinity, for near zero. We expend Equation 5 with respect to the ansatz and obtain

 T(1−ρj)=1+zT2d+1d∏ℓ=−d(1−ρj+ℓ).

By definition of -ary trees (1) we have . Consequently,

 T(1−ρj)=T(1−zT2d+zT2dd∏ℓ=−d(1−ρj+ℓ)).

The equation above is equivalent to

 1−ρj=1−zT2d+zT2dd∏ℓ=−d(1−ρj+ℓ).

By expansion of the product on the right hand side of the equation above we obtain the main equation

 ρj=zT2d−zT2dd∏ℓ=−d(1−ρj+ℓ)=zT2d2d+1∑ℓ=1(−1)ℓ−1∑bℓ⊆{−d,…,d}(ℓ∏k=1ρj+bk), (15)

with running over all subset of of size , . Comparing the terms tending at a similar rate to zero as tends to infinity we obtain the linear recurrence relation

 ρj=zT2dd∑ℓ=−dρj+ℓ.

An ansatz , assuming that there exists a formal power series with for near 0, leads to the so-called characteristic equation

 1=zT2dd∑ℓ=−dXℓ,or equivalently1=Zd∑ℓ=−dXℓ,withZ:=zT2d. (16)

The equation above is identical to the characteristic equation of lattice path with step set , see Banderier and Flajolet [1]. We can use the very general considerations of [1] summarized below in Lemma 2 concerning such equations.

Lemma 2 (Banderier and Flajolet [1]).

Let denote a non-empty finite subset of the integers and the set of associated weights. The characteristic polynomial associated to and is a Laurent polynomial in given by . Let and . The characteristic equation associated to is given by

 1−ZP(X)=0,or equivalentlyXc−ZXcP(X)=0.

For near zero the characteristic equation has solutions, of which solutions are small solution with