Multi-statistic enumeration of two-stack sortable permutations

Mireille Bousquet-Mélou

LaBRI, Université Bordeaux 1 351 cours de la Libération 33405 Talence Cedex, FRANCE bousquet@labri.u-bordeaux.fr Submitted: October 1, 1997. Accepted: April 1, 1998

Abstract

Using Zeilberger’s factorization of two-stack-sortable permutations, we write a functional equation — of a strange sort — that defines their generating function according to five statistics: length, number of descents, number of right-to-left and left-to-right maxima, and a fifth statistic that is closely linked to the factorization. Then, we show how one can translate this functional equation into a polynomial one. We thus prove that our five-variable generating function for two-stack-sortable permutations is algebraic of degree 20.

1 Introduction

The aim of this paper is twofold. Our first intention is to draw attention on the factorization of two-stack-sortable permutations described by Zeilberger in [22]. Among other advantages, this factorization preserves many standard statistics defined on permutations, and hence, constitutes an efficient first step for their enumeration. We thus obtain a functional equation — of a strange kind — that defines a five-variable generating function for these permutations (see Eq. (1)).

Our second point is to show how one can “solve” such an equation, or, more precisely, convert it into a polynomial one: in particular, we prove that the generating function for two-stack-sortable permutations, counted according to the length, number of descents, number of right-to-left and left-to-right maxima, is algebraic of degree 10. In passing, we translate some of our results in terms of non-separable maps, since two (sophisticated) bijections have been described between these maps and two-stack-sortable permutations [9, 8, 14]. We believe that our method can be applied to, or at least inspire, the solution of other functional equations having similar features.

Let us mention that our first point (celebrating Zeilberger’s factorization) is extended in a forthcoming paper [1], where we study several enumeration problems (and their q-analogues) related to the sorting procedure decribed below.

1.1 The sorting procedure

Let σ = σ_{1}σ_{2} … σ_{n} be a word on the alphabet IN^{∗} = {1, 2, …}, having all its letters distinct. If n = 0, let T (σ) be the empty word. Otherwise, let T (σ) be obtained by permuting the letters of σ as follows: if m = max(σ_{1}, …, σ_{n}) and σ = σ^{(ℓ)}mσ^{(r)}, then

T (σ) = T (σ^{(ℓ)})T (σ^{(r)})m.

For instance, sorting the permutation σ = 2351674 gives T (σ) = 2315647.

Where does this definition come from? Imagine σ stands on the right of an empty stack, as in Figure 1(a), and we try to sort its letters through the stack, that is, obtain them on the left of the stack in increasing order; in addition, letters must always move from right to left and cannot overtake each other. Clearly, the only algorithm that leaves a hope to obtain the letters of σ in the output in increasing order is the following: add letters from σ on the top of the stack as long as the letters in the stack decrease from bottom to top, and otherwise, remove the top letter from the stack. Figure 1 shows four stages of this procedure. Applying this algorithm gives T (σ) as the output.

2351674 = σ 674 1 5 23  51674 23 T (σ) = 2315647  (b) (a)  (d) (c)

Figure 1: The sorting algorithm.

1.2 Enumeration

This sorting procedure was apparently first described by Knuth [16, p. 238], who proved that the number of one-stack sortable permutations of length n, i.e. of permutations σ such that T (σ) = 12 … n, is the Catalan number C_{n} = \binom{2n}{n}/(n + 1). This procedure was later thoroughly studied by West in his Ph.D. thesis [20]. In particular, he conjectured [21] that the number of two-stack sortable permutations of length n, i.e. of permutations σ such that T^{2}(σ) = 12 … n, is 2(3n)!/((2n + 1)!(n + 1)!). This conjecture was first proved by Zeilberger: in [22], he describes a clever factorization of these permutations that gives a functional equation for their generating function; then, he solves this equation via a very complicated method that we will simplify below. In addition, there exist two bijective proofs of this result [8, 14], based on the fact that 2(3n)!/((2n + 1)!(n + 1)!) is also the number of non-separable planar maps [3, 19]. Nothing is known about k-stack sortable permutations when k > 2.

In this paper, we shall enumerate two-stack-sortable permutations σ according to the following classic statistics:

• the length n (meaning that σ belongs to the symmetric group S_{n}),

• the number of descents, i.e. the number of i ∈ {1, …, n} such that σ(i) > σ(i + 1) (with σ(n + 1) = 0),

• the number of right-to-left maxima, i.e. the number of i ∈ {1, …, n} such that σ(i) > σ(j) for all j > i,

• the number of left-to-right maxima, i.e. the number of i ∈ {1, …, n} such that σ(i) > σ(j) for all j < i. Moreover, using Zeilberger’s factorization requires to introduce another statistic ℓ(σ), defined by

ℓ(σ) = max{ℓ : σ^{−1}(n) < σ^{−1}(n − 1) < ⋯ < σ^{−1}(n − ℓ + 1)}.

These five statistics will respectively be counted by the indeterminates x, z, u, v and t. By convention, the “empty” permutation is given the weight v. We shall not prove the following proposition, as it is a direct consequence of Zeilberger’s factorization [22].

Proposition 1.1 Let ϕ(x, z, u, v, t) be the generating function for two-stack sortable permutations. This series is completely defined by the following equation:

ϕ(x, z, u, v, t) = \frac{v}{1 − xzut}

+xut [v(1 − v) + \frac{(v + tu − tuv)ϕ(x, z, 1, v, 1) − ϕ(x, z, 1, v, tu)}{1 − tu}] [\frac{ϕ(x, z, u, 1, 1) − tϕ(x, z, u, 1, t)}{1 − t}] . (1)

This equation will be the central object of this paper, and deserves a few comments. First of all, it perfectly defines ϕ(x, z, u, v, t): indeed, the coefficient of x^{n} in this series is a polynomial in z, u, v and t, which can be computed from (1) by induction on n. We have:

ϕ(x, z, u, v, t) = v + xzuvt + x^{2}zuvt(v + zut) + x^{3}zuvt(vzu + vzut + vz + ztu + z^{2}t^{2}u^{2} + v^{2}) + O(x^{4}).

However, this equation is not completely satisfactory, as it is not a very standard way of specifying a generating function. Most combinatorialists probably think they have a better knowledge of a series when they know it satisfies a differential or algebraic equation. In this particular case, it is known [22] that the length generating function for two-stack-sortable permutations, in other words ϕ(x, 1, 1, 1, 1), is cubic over IR(x). Can we derive this information from (1)? Other partial results, like the expansions of ϕ(x, z, 1, 1, 1) and ϕ(x, 1, u, 1, 1) [8], or the algebraic equation (of degree 6) satisfied by ϕ(x, 1, 1, 1, t) [22], suggest that the complete generating function ϕ(x, z, u, v, t) could be algebraic over IR(x, z, u, v, t), but Eq. (1) does not permit to prove this immediately.

The main difficulty with this equation is that we cannot substitute 1 for t (or only after multiplying the whole equation by (1 − t), but then we end up with a tautology). This kind of “frustrating” equation occurs in many enumeration problems, because divided differences (or discrete derivatives) like

Df(x, t) = \frac{f(x, 1) − f(x, t)}{1 − t}

have a simple combinatorial meaning: if f(x, t) = ∑ a_{nm}x^{n}t^{m}, then the series Df(x, t) = ∑ a_{nm}x^{n}(1 + t + ⋯ + t^{m−1}) somehow corresponds to “choosing one among the m cells”, an operation that occurs frequently in combinatorial constructions. Examples can be found in the enumeration of maps [3, 6, 7, 11, 13, section 2.9.1], of polygons [2, 10], and permutations [1, 15]. Being able to solve these equations systematically would be very helpful.

In this paper, with the help of Maple, we shall elucidate completely the algebraic status of the series ϕ(x, z, u, v, t) and its main significant specializations, proving the following theorem.

Theorem 1.2 The generating function ϕ(x, z, u, v, t) for two-stack-sortable permutations, and all its specializations obtained by setting one or several of the variables z, u, v and t to 1, are algebraic on the field IK = IR(x, z, u, v, t) of rational functions in the variables x, z, u, v and t. Figure 2 shows the inclusion properties and the degrees of the relevant extensions of IK, in the case z ≠ 1. When z = 1, the pattern is the same as in Figure 2, except that ϕ(x, 1, 1, 1, 1) is only cubic over IK.

2 IK (ϕ(x, z, 1, 1, 1)) = IK(ϕ(x, z, 1, v, 1)) IK = IR(x, z, u, v, t)^{IK (ϕ(x, z, 1, 1, t))}^{IK (ϕ(x, z, 1, v, t))} =  ^{IK (ϕ(x, z, u, 1, 1))} =^{IK (ϕ(x, z, u, v, 1))}  ^{IK (ϕ(x, z, 1, 1, tu))} =^{IK (ϕ(x, z, 1, v, tu))} IK (ϕ(x, z, u, 1, t)) = IK (ϕ(x, z, u, v, t)) 2  2  2 5 2

Figure 2: Algebraicity of ϕ(x, z, u, v, t) and its specializations.

To prove this theorem, we shall derive from the functional equation (1) an algebraic equation satisfied by ϕ(x, z, u, v, t). Our method is partly based on, and largely inspired by, the so-called quadratic method invented by Brown to count quadrangular dissections of the disc [4, 5] (see also [13, section 2.9.1]). Before handling the whole equation, we shall show how this method works by handling the simplest (and original) case z = u = v = 1. The complete solution requiring several steps, we shall then proceed with the case u = v = 1, then u = 1, then v = 1, and end up with the complete generating function ϕ(x, z, u, v, t).

Notations. Given a field IL and n indeterminates x_{1}, …, x_{n}, we denote by:

•IL[x_{1}, …, x_{n}] the ring of polynomials in x_{1}, …, x_{n} with coefficients in IL, •IL(x_{1}, …, x_{n}) the field of rational functions in x_{1}, …, x_{n} with coefficients in IL, •IL[[x_{1}, …, x_{n}]] the ring of formal power series in x_{1}, …, x_{n} with coefficients in IL.

Throughout the paper, we denote by IK the field IR(x, z, u, v, t). The series ϕ(x, z, u, v, t) will often be denoted ϕ(u, v, t).

We shall often make use of the following simple remark. Remark. Let IL be a field, and let f(x, t) be a formal power series of IL[t][[x]], i.e. a series in x with polynomial coefficients in t. If f(x, t) is algebraic of degree k over IL(x, t), then f(x, 1) is algebraic of degree at most k over IL(x).

2 The quadratic method and Zeilberger’s result (z = u = v = 1)

The two-variable generating function ϕ(x, 1, 1, 1, t) = Z(x, t) satisfies

Z(x, t) = \frac{1}{1 − xt} + xt [\frac{Z(x, 1) − Z(x, t)}{1 − t}] [\frac{Z(x, 1) − tZ(x, t)}{1 − t}] .  (2)

This is exactly the equation established by Zeilberger in [22]. Let us rewrite it by constructing a square involving all powers of Z(x, t):

(1 − xt) [1 − t + xt \frac{(1 + t)Z(x, 1) − 2tZ(x, t)}{1 − t}]^{2} = E(t),  (3)

where E(t) is the following polynomial in t with coefficients in IR[x, Z(x, 1)]:

E(t) = 1 − [2 + x − 2xZ(x, 1)] t + [xZ(x, 1) − 2x + 1] [1 + xZ(x, 1)] t^{2} − x [1 + xZ(x, 1)]^{2} t^{3}.

Let us consider the term

\frac{(1 + t)Z(x, 1) − 2tZ(x, t)}{1 − t}.

It is a formal power series in x with coefficients in IR[t]. There exists in IR[[x]] a (unique) formal power series T = T (x) = 1 + x + 4x^{2} + O(x^{3}) satisfying

T = 1 + xT \frac{(1 + T)Z(x, 1) − 2T Z(x, T)}{1 − T}.  (4)

(The coefficient of x^{n} in T (x) can de determined by induction on n using this equation.) Eq. (3) shows that the polynomial E(t) has a double zero at t = T (x). Hence, the resultant of E(t) and ∂E/∂t(t), taken as polynomials in t, is zero. This gives:

16x^{2} [x^{2}Z(x, 1)^{3} + (2x + 3x^{2})Z(x, 1)^{2} + (1 − 14x + 3x^{2})Z(x, 1) + 11x + x^{2} − 1] [1 + xZ(x, 1)]^{4} = 0,

from which we obtain the cubic equation satisfied by Z(x, 1). We have thus proved Zeilberger’s result:

Proposition 2.1 The length generating function Z(x, 1) = ϕ(x, 1, 1, 1, 1) for two-stack-sortable permutations is cubic on IR(x):

x^{2}Z(x, 1)^{3} + x(2 + 3x)Z(x, 1)^{2} + (1 − 14x + 3x^{2})Z(x, 1) + x^{2} + 11x − 1 = 0.

The Lagrange inversion formula gives

Z(x, 1) = 1 + ∑_{n≥1} \frac{2(3n)!}{(2n + 1)!(n + 1)!}x^{n}.  (5)

The generating function Z(x, t) = ϕ(x, 1, 1, 1, t) for two-stack-sortable permutations, counted according to their length and DZ’s statistic, is algebraic of degree 6 over IR(x, t), and the field IR(x, t, Z(x, t)) contains Z(x, 1).

Proof. To obtain the expansion of Z(x, 1), we introduce the series Y = Y (x) defined by

Y = x(1 + Y)^{3},

and then check that 1+Y −Y^{2} satisfies the same equation as Z(x, 1). This implies that Z(x, 1) = 1+Y −Y^{2}. We then obtain (5) thanks to the Lagrange inversion formula.

Now, Eq. (2) shows that Z = Z(x, t) is at most quadratic over IR(x, t, Z(x, 1)), and hence algebraic of degree at most 6 over IR(x, t). The (minimal) algebraic equation it satisfies can be obtained by eliminating Z(x, 1) in (2):

(xt − 1)^{3}x^{5}t^{6}Z^{6} + (3xt^{2} + 3xt − t^{2} + 8t − 3)(xt − 1)^{3}x^{4}t^{4}Z^{5} + (3x^{3}t^{5} + 9x^{3}t^{4}

+3x^{3}t^{3} −20x^{2}t^{5} +15x^{2}t^{4} −17x^{2}t^{3} −9x^{2}t^{2} +13xt^{4} +11xt^{3} −11xt^{2} +9xt+4t^{3} −23t^{2} +16t−3)(xt−1)^{2}x^{3}t^{2}Z^{4}

+(x^{4}t^{7}+9x^{4}t^{6}+9x^{4}t^{5}+x^{4}t^{4}+8x^{3}t^{7}−43x^{3}t^{6}−27x^{3}t^{5}−4x^{3}t^{4}−4x^{3}t^{3}+16x^{2}t^{7}−128x^{2}t^{6}+161x^{2}t^{5}−51x^{2}t^{4}−6x^{2}t^{3}

+6x^{2}t^{2} − 16xt^{6} + 95xt^{5} − 53xt^{4} + 25xt^{3} + 9xt^{2} − 4xt + 2t^{5} − t^{4} − 20t^{3} + 22t^{2} − 8t + 1)(xt − 1)^{2}x^{2}Z^{3}

+(xt−1)(3x^{6}t^{7}+9x^{6}t^{6}+3x^{6}t^{5}+29x^{5}t^{7}−84x^{5}t^{6}+23x^{5}t^{5}−12x^{5}t^{4}+88x^{4}t^{7}+57x^{4}t^{6}+145x^{4}t^{5}−22x^{4}t^{4}+15x^{4}t^{3}

+80x^{3}t^{7} −487x^{3}t^{6} +153x^{3}t^{5} −238x^{3}t^{4} −31x^{3}t^{3} −3x^{3}t^{2} −140x^{2}t^{6} +584x^{2}t^{5} −383x^{2}t^{4} +244x^{2}t^{3} +6x^{2}t^{2} −6x^{2}t

+68xt^{5}−211xt^{4}+172xt^{3}−84xt^{2}+18xt+3x−5t^{4}+14t^{3}−10t^{2}+2t)xZ^{2}+(xt−1)(3x^{7}t^{6}+3x^{7}t^{5}+16x^{6}t^{6}+19x^{6}t^{5}

−9x^{6}t^{4} −8x^{5}t^{6} −490x^{5}t^{5} +113x^{5}t^{4} +3x^{5}t^{3} −64x^{4}t^{6} +270x^{4}t^{5} +741x^{4}t^{4} −244x^{4}t^{3} +9x^{4}t^{2} +128x^{3}t^{6} −197x^{3}t^{5}

−127x^{3}t^{4}−395x^{3}t^{3}+180x^{3}t^{2}−3x^{3}t−148x^{2}t^{5}+285x^{2}t^{4}−107x^{2}t^{3}+87x^{2}t^{2}−60x^{2}t−3x^{2}+33xt^{4}−73xt^{3}+42xt^{2}

−4xt−t^{4}+2t^{3}−t^{2})Z+x^{8}t^{6}+22x^{7}t^{6}−3x^{7}t^{5}+116x^{6}t^{6}−60x^{6}t^{5}+132x^{5}t^{6}−659x^{5}t^{5}+208x^{5}t^{4}+5x^{5}t^{3}−160x^{4}t^{6}

+74x^{4}t^{5}+824x^{4}t^{4}−336x^{4}t^{3}+64x^{3}t^{6}+114x^{3}t^{5}−292x^{3}t^{4}−277x^{3}t^{3}+206x^{3}t^{2}−3x^{3}t−88x^{2}t^{5}+91x^{2}t^{4}+74x^{2}t^{3}

−17x^{2}t^{2} − 34x^{2}t − x^{2} + 28xt^{4} − 59xt^{3} + 32xt^{2} − 2xt − t^{4} + 2t^{3} − t^{2} = 0.  (6)

This polynomial is irreducible, and thus Z(x, t) has degree exactly 6 over IR(x, t). The fields IR(x, t, Z(x, t)) and IR(x, t, Z(x, 1), Z(x, t)) have both degree 6 over IR(x, t) and hence, are equal. In particular, IR(x, t, Z(x, t)) contains Z(x, 1).

Remarks

1. The algebraic equation satisfied by Z(x, 1) has been obtained without having to guess anything. But the idea of introducing the series Y satisfying Y = x(1 + Y)^{3} seems only natural if one suspects the expansion (5). However, we can alternatively obtain this expansion, without guessing it, via the following procedure. We convert the algebraic equation satisfied by Z(x, 1) into a linear differential equation (using for instance the Maple package Gfun [18]):

x^{2}(27x − 4)\frac{∂^{2}Z}{∂x^{2}} (x, 1) + 2x(27x − 5)\frac{∂Z}{∂x} (x, 1) + 2(3x − 1)Z(x, 1) + 2(3x − 1) = 0.

Denoting by a_{n} the coefficient of x^{n} in Z(x, 1), this differential equation gives:

a_{0} = 1, a_{1} = 1, and for n ≥ 2, a_{n} = \frac{3(3n − 1)(3n − 2)}{2(n + 1)(2n + 1)}a_{n−1}.  (7)

We then obtain our result^{1} by induction on n. If the recurrence relation (7) had not been of order 1, we could still have looked for its hypergeometric solutions via Petkovs̆ek’s algorithm [17].

2. The expression of Z(x, 1) was first conjectured by West [20], then proved by Zeilberger [22], Dulucq, Gire and Guibert [8], and finally Goulden and West [14]. Zeilberger solves (2) by first guessing Eq. (6), and then checking that (6) and (2) have a common solution. This procedure was later simplified by Gessel, but his approach still requires to conjecture the value of Z(x, 1). In the two other papers [8, 14], a bijection between two-stack-sortable permutations and rooted non-separable planar maps is given, and the authors conclude thanks to the results of Brown and Tutte [3, 6] on the enumeration of maps.

1As noticed by Gilles Schaeffer, another hint about the right parametrization (by Y) is given by the equation satisfied by the series T defined by (4). We obtain: T (1 − 2xT)^{2} = (1 − xT)^{3}, which suggests (?) Y = xT/(1 − 2xT).

3 The number of descents (u = v = 1)

We shall now, step by step, “solve” the equation of in Proposition 1.1, i.e., transform it into a polynomial equation. The first step is the case u = v = 1. It is achieved again via the quadratic method. We follow the calculation of the previous section. Our starting point is the equation

ϕ(1, 1, t) = \frac{1}{1 − xzt} + xt [\frac{ϕ(1, 1, 1) − ϕ(1, 1, t)}{1 − t}] [\frac{ϕ(1, 1, 1) − tϕ(1, 1, t)}{1 − t}] .  (8)

(Recall that ϕ(1, 1, t) stands for ϕ(x, z, 1, 1, t).) The construction of a square involving all powers of ϕ(1, 1, t) gives

(1 − xzt) [1 − t + xt \frac{(1 + t)ϕ(1, 1, 1) − 2tϕ(1, 1, t)}{1 − t}]^{2} = E(t)  (9)

where

E(t) = 1−[2 + xz − 2xϕ(1, 1, 1)] t

+ [1 − 4x + 2xz + 2x(1 − xz)ϕ(1, 1, 1) + x^{2}ϕ(1, 1, 1)^{2}] t^{2} − xz [1 + xϕ(1, 1, 1)]^{2} t^{3}.

Again, E(t) has a double root at t = T (x, z), where T (x, z) = T is the unique solution (in IR[z][[x]]) of

T = 1 + xT \frac{(1 + T)ϕ(1, 1, 1) − 2T ϕ(1, 1, t)}{1 − T},

and the resultant of E(t) and ∂E/∂t, taken as polynomials in t, is zero. We obtain the following refinement of Proposition 2.1.

Proposition 3.1 The generating function S = ϕ(x, z, 1, 1, 1) for two-stack-sortable permutations, counted according to their length and number of descents, is algebraic of degree 5 over IR(x, z):

x^{4}S^{5} + x^{3}(4zx − x + 4)S^{4} + x^{2}(−3zx^{2} + 6z^{2}x^{2} + 4zx − 12x + 6)S^{3}
+x(−3z^{2}x^{3} + 4z^{3}x^{3} − 4z^{2}x^{2} + 8x^{2} + 13zx^{2} − 22x − 4zx + 4)S^{2}
+(−z^{3}x^{4} + z^{4}x^{4} − 20zx^{3} − 4z^{3}x^{3} + 26z^{2}x^{3} + 32x^{2} + 6z^{2}x^{2} − 13zx^{2} − 12x − 4zx + 1)S
+z^{3}x^{3} − z^{2}x^{3} − 3z^{2}x^{2} + 20zx^{2} − 16x^{2} + 8x + 3zx − 1 = 0.

The Lagrange-Good inversion formula gives

ϕ(x, z, 1, 1, 1) = 1 + ∑_{1≤j≤n} \frac{(2n − j)!(n + j − 1)!}{(2n − 2j + 1)!(n − j + 1)!(2j − 1)!j!}x^{n}z^{j}.

The series ϕ(x, z, 1, 1, t) is algebraic of degree 10 over IR(x, z, t), and IR(x, z, t, ϕ(x, z, 1, 1, t)) contains ϕ(x, z, 1, 1, 1).

Proof. To obtain the expression of ϕ(1, 1, 1), we introduce the series U = U(x, z) and V = V (x, z) defined by

U = x(1 + U)(1 + V)^{2} and V = xz(1 + V)(1 + U)^{2},  (10)

and then check that 1 + V (1 − UV)/(1 + U) satisfies the same equation as ϕ(1, 1, 1). This implies that

ϕ(1, 1, 1) = 1 + V \frac{1 − UV}{1 + U} .

We conclude thanks to the Lagrange-Good inversion formula (see [12] for instance).

Eq. (8) shows that ϕ(1, 1, t) is at most quadratic over IR(x, z, t, ϕ(1, 1, 1)), and hence algebraic of degree at most 10 over IR(x, z, t). The (minimal) algebraic equation it satisfies can be obtained by eliminating ϕ(1, 1, 1) in (8): it has degree exactly 10 — and takes several Maple pages. To obtain an “explicit” expression of ϕ(1, 1, t), we can go back to (9). Expressing x, z and ϕ(1, 1, 1) in terms of U and V, we factor E(t):

E(t) = (1 − αt)^{2}(1 − βt),

where α and β are series in x and z:

α = \frac{xz}{V} (1 + U + V) and β = xz(1 + 2U)^{2}.

This gives finally:

2xt^{2}ϕ(1, 1, t) = (1 − t)^{2} + xt(1 + t)ϕ(1, 1, 1) − (1 − t)(1 − αt)\sqrt{\frac{1 − βt}{1 − xzt}}.  (11)

Note. Again, the idea of introducing the series U and V satisfying (10) is only natural after having conjectured the expansion of ϕ(x, z, 1, 1, 1). This expansion was obtained bijectively by Dulucq, Gire and Guibert [8, 15] and Goulden and West [14]: it is equivalent to the enumeration of non-separable planar maps according to the number of edges and vertices [6].

4 Descents and left-to-right maxima (u = 1)

Let us now climb one more step, by handling the equation of Proposition 1.1 in the case u = 1. The equation reads:

ϕ(1, v, t) = \frac{v}{1 − xzt} + xt [v(1 − v) + \frac{(v + t − tv)ϕ(1, v, 1) − ϕ(1, v, t)}{1 − t}] [\frac{ϕ(1, 1, 1) − tϕ(1, 1, t)}{1 − t}] .

It can be rewritten as

[\frac{ϕ(1, v, t) − (v + t − tv)ϕ(1, v, 1)}{1 − t} − v(1 − v)] [1 − t + xt \frac{ϕ(1, 1, 1) − tϕ(1, 1, t)}{1 − t}]

(12)

= \frac{v}{1 − xzt} − (v + t − tv)ϕ(1, v, 1) − v(1 − v)(1 − t).

Let T = T (x, z) be the (unique) formal power series in x and z satisfying

T = 1 + xT \frac{ϕ(1, 1, 1) − T ϕ(1, 1, T)}{1 − T}.

Note that T does not depend on v. Substituting T for t in (12) shows that for any v,

(v + T − T v)ϕ(1, v, 1) = \frac{v}{1 − xzT} − v(1 − v)(1 − T).  (13)

In particular, for v = 1, we obtain

ϕ(1, 1, 1) = \frac{1}{1 − xzT} .  (14)

We can eliminate T between (13) and (14) to obtain ϕ(1, v, 1) as a rational function of x, v, z and ϕ(1, 1, 1).

Proposition 4.1 The generating function ϕ(x, z, 1, v, 1) for two-stack-sortable permutations, counted according to their length, number of descents and number of left-to-right maxima, is given by

ϕ(x, z, 1, v, 1) = v + xzvϕ(1, 1, 1) \frac{1 − ϕ(1, 1, 1)}{1 − ϕ(1, 1, 1) − v [1 + (xz − 1)ϕ(1, 1, 1)]},  (15)

where ϕ(1, 1, 1) is the generating function for these permutations, according to their length and number of descents, given by Proposition 3.1. In other words, the length generating function for two-stack-sortable permutations having m left-to-right maxima is

xzϕ(1, 1, 1) [\frac{1 + (xz − 1)ϕ(1, 1, 1)}{1 − ϕ(1, 1, 1)}]^{m−1} .

In particular, ϕ(x, z, 1, v, 1) is algebraic of degree 5 over IR(x, z, v), and IK(ϕ(1, v, 1)) = IK(ϕ(1, 1, 1)). Moreover, IK(ϕ(1, v, t)) = IK(ϕ(1, 1, t)), and ϕ(1, v, t) is algebraic of degree 10 over IR(x, z, v, t).

Proof. The degree of ϕ(1, v, 1) over IK is bounded from above and from below by the degree of ϕ(1, 1, 1): – from above, because Eq. (15) shows that ϕ(1, v, 1) belongs to IK(ϕ(1, 1, 1));

– from below, because ϕ(1, 1, 1) is a specialization of ϕ(1, v, 1). Hence the extensions IK(ϕ(1, v, 1)) and IK(ϕ(1, 1, 1)) coincide and are of degree 5 over IK. According to Eq. (12), a similar relation links ϕ(1, v, t) and ϕ(1, 1, t). Hence, they have the same degree.

Remarks

1. The algebraic equation satisfied by ϕ(1, v, 1), obtained by eliminating ϕ(1, 1, 1) in (15), has very big coefficients, and we do not write it here. When z = 1, the series ϕ(1, 1, 1) is only cubic (see Proposition 2.1), and so is S = ϕ(1, v, 1). Here is the cubic equation it satisfies:

(x^{4}v^{3} + 5x^{3}v^{3} + 6x^{3}v^{2} − 8x^{2}v^{3} − 5x^{2}v^{2} + xv^{3} + 12x^{2}v + 8xv^{2} − 17xv − v^{2} + 8x + 2v − 1)S^{3} − v(3x^{4}v^{3} − 6x^{4}v^{2}

+15x^{3}v^{3} − 26x^{3}v^{2} − 24x^{2}v^{3} − 24x^{3}v − 16x^{2}v^{2} + 3xv^{3} + 45x^{2}v + 25xv^{2} − 24x^{2} − 37xv − 3v^{2} + 11x + 4v − 1)S^{2}

+v^{2}(3x^{4}v^{3}−12x^{4}v^{2}+15x^{3}v^{3}+12x^{4}v−70x^{3}v^{2}−24x^{2}v^{3}+50x^{3}v−17x^{2}v^{2}+3xv^{3}+24x^{3}+48x^{2}v+26xv^{2}−163x^{2}

−24xv − 3v^{2} + 20x + 2v)S − v^{3}(x^{4}v^{3} − 6x^{4}v^{2} + 5x^{3}v^{3} + 12x^{4}v − 38x^{3}v^{2} − 8x^{2}v^{3} − 8x^{4}

+74x^{3}v − 6x^{2}v^{2} + xv^{3} − 63x^{3} + 15x^{2}v + 9xv^{2} − 120x^{2} − 4xv − v^{2} + 16x) = 0.

2. It would be interesting to know which statistic defined on non-seperable maps corresponds to the number of left-to-right maxima of a two-stack-sortable permutation through the bijections described in [8] and [14].

5 Descents and right-to-left maxima (v = 1)

The last step before we can complete the solution of (1) is the case v = 1. The equation reads:

ϕ(u, 1, t) = \frac{1}{1 − xzut} + xut [\frac{ϕ(1, 1, 1) − ϕ(1, 1, tu)}{1 − tu}] [\frac{ϕ(u, 1, 1) − tϕ(u, 1, t)}{1 − t}] .  (16)

It can be rewritten as

[\frac{tϕ(u, 1, t) − ϕ(u, 1, 1)}{1 − t}] [1 − t + xut^{2} \frac{ϕ(1, 1, 1) − ϕ(1, 1, tu)}{1 − ut}] = \frac{t}{1 − xzut} − ϕ(u, 1, 1).  (17)

Let T = T (x, z, u) be the (unique) formal power series in x, z and u satisfying

T = 1 + xuT^{2} \frac{ϕ(1, 1, 1) − ϕ(1, 1, T u)}{1 − uT}.  (18)

Substituting T for t in (17) shows that

ϕ(u, 1, 1) = \frac{T}{1 − xzuT} .  (19)

We can obtain the quadratic equation (on IR(x, z, u, ϕ(1, 1, 1))) satisfied by T (x, z, u) by eliminating ϕ(1, 1, T u) between (18) and (8), in which t is replaced by T u. We find:

1 − u − T [1 − u + xzu − xzu^{2} − xuϕ(1, 1, 1)] − xuT^{2} [1 − z + zu + xzuϕ(1, 1, 1)] = 0.

Finally, Eq. (19) gives, from the equation satisfied by T, the equation satisfied by ϕ(u, 1, 1).

Proposition 5.1 The generating function ϕ(u, 1, 1) = ϕ(x, z, u, 1, 1) for two-stack-sortable permutations, counted according to their length, number of descents and number of right-to-left maxima, is quadratic on IR(x, z, u, ϕ(1, 1, 1)):

1 − u − ϕ(u, 1, 1) [1 − u − xzu + xzu^{2} − xuϕ(1, 1, 1)] − xuϕ(u, 1, 1)^{2} = 0.  (20)

It is algebraic of degree 10 over IR(x, z, u). We can expand it explicitely: for 1 ≤ m ≤ j < n, the number of two-stack-sortable permutations of length n having j descents and m right-to-left maxima is

∑_{k=1}^{min(m+1,n−j+1)} [(m − k + 1)P (n, j, m, k, 0) − \frac{2(k − 1)(j − m)}{2n − 2j − k + 2}P (n, j, m, k, 1)]

×\frac{(n + j − m − 1)!}{(n − j − k + 1)!(2j − m + k − 1)!} \frac{(2n − j − m − k)!}{(j − m)!(2n − 2j − k + 1)!} \frac{(m + k − 2)!}{k!(k − 1)!(m − k + 1)!}

where P (n, j, m, k, e) is the following polynomial:

P (n, j, m, k, e) = (2n − j − m − k + 1)(2j − m + k − 1) − (j − m − e)(4n − 2j − 3k − m + 3).

The series ϕ(x, z, u, 1, t) is algebraic of degree 20 over IR(x, z, u, t).

Proof. Eq. (20) shows that IR(x, z, u, ϕ(u, 1, 1)) contains ϕ(1, 1, 1). In order to prove that ϕ(u, 1, 1) is exactly quadratic on IR(x, z, u, ϕ(1, 1, 1)), we have to show that the discriminant Δ of (20) is not a square in IR(x, z, u, ϕ(1, 1, 1)) = IR(u, U, V), where the series U and V are defined by (10). Expressing Δ in terms of u, U and V gives:

Δ = (1 + V)^{2}(1 + U − u)^{2} [(1 + U)^{2}(1 + V)^{2} − 2uV (1 + U)(1 + 2U + V) + u^{2}V^{2}] .

This discriminant cannot be factored further, and ϕ(u, 1, 1) is exactly quadratic on IR(x, z, u, ϕ(1, 1, 1)) – and thus of degree 10 over IR(x, z, u). We can now solve (20) in terms of u, U and V:

ϕ(u, 1, 1) = \frac{1 + V}{2uU(1 + U)} [−(1 + V)(1 + U)^{2} + u(1 + U)(1 + 2U + 2V) − u^{2}V

+(1 + U − u)((1 + U)(1 + V) − uV) (1 − \frac{4uUV (1 + U)}{((1 + U)(1 + V) − uV)^{2}} )^{1/2}] .

Expanding this solution in u gives

ϕ(u, 1, 1) = 1+ ∑_{m≥1} \frac{u^{m}V^{m}}{U(1 + U)^{m}(1 + V)^{m−2}} ∑_{k=1}^{m+1} \frac{(m + k − 2)!}{k!(k − 1)!(m − k + 1)!} \frac{U^{k}}{(1 + V)^{k+1}} [m − k + 1 + 2(1 − k)V] .

We conclude thanks to the Lagrange-Good inversion formula.

Let us now consider ϕ(u, 1, t). From (17), we conclude that this series belongs to IK(ϕ(1, 1, tu), ϕ(u, 1, 1)). In the proof of Proposition 3.1, we have seen (11) that

IK(ϕ(1, 1, tu)) = IK (ϕ(1, 1, 1), \sqrt{\frac{1 − tuβ}{1 − xtu}} ) ,

and thus ϕ(1, 1, tu) cannot belong to IK(ϕ(u, 1, 1)) (which only contains rational functions in t). Hence, ϕ(1, 1, tu) is quadratic over IK(ϕ(u, 1, 1)), and IK(ϕ(1, 1, tu), ϕ(u, 1, 1)) is of degree 20 over IK. In particular, ϕ(u, 1, t) is of degree at most 20 on IK. We can obtain an algebraic equation of degree 20 satisfied by ϕ(u, 1, t) by eliminating from (16) first ϕ(1, 1, tu) (using (8)), then ϕ(u, 1, 1) (using (20)), and finally ϕ(1, 1, 1) (using Proposition 3.1). To check that this polynomial is irreducible, it suffices to do this calculation for some well-chosen values of z, u and t: for instance, when z = u = t = −1, the eliminations described above provide an irreducible polynomial in x and ϕ(u, 1, t) of degree 20.

Note. When z = 1, a similar calculation can be done, using the series Y introduced in the proof of Proposition 2.1. We obtain the number of two-stack-sortable permutations of length n having m right-to-left maxima, as given in [8].

Remark. According to [8] and [14], the number of two-stack-sortable permutations of length n having j descents (including n, by convention in this paper) and m right-to-left maxima is the number of rooted non-separable maps having n+1 edges, j +1 vertices and such that the degree of the root face is m+1. The enumeration of these maps according to the number of edges and degree of the root face was achieved by Brown [3]. His work was extended by Brown and Tutte who also took into account the number of vertices [6]. To recover their result, let us define

B(x, u, z) = ∑_{n≥2,m≥2,j≥2} B_{n,m,j} x^{n}u^{m}z^{j},

where B_{n,m,j} is the number of non-separable maps having n edges, j vertices, and such that the degree of the root face is m. Then B(x, u, z) = xzu(ϕ(x, z, u, 1, 1) − 1), and we derive from Proposition 5.1 the following equation for B:

B(x, u, z)^{2} + B(x, u, z) [z(1 − u) + xzu(1 − z + zu) − uB(x, 1, z)] − xzu^{2} [xz^{2}(1 − u) + B(x, 1, z)] = 0.

This is equivalent to Eq. (3.4) of [6]. Proposition 5.1 also provides the following corollary.

Corollary 5.2 The number of rooted non-separable maps having n edges, j vertices and such that the degree of the root face is m, is 1 if j = m = n ≥ 2 and otherwise

∑_{k=1}^{min(m,n−j+1)} [(m − k)Q(n, j, m, k, 0) − \frac{2(k − 1)(j − m)}{2n − 2j − k + 2}Q(n, j, m, k, 1)]

×\frac{(n + j − m − 2)!}{(n − j − k + 1)!(2j − m + k − 2)!} \frac{(2n − j − m − k)!}{(j − m)!(2n − 2j − k + 1)!} \frac{(m + k − 3)!}{k!(k − 1)!(m − k)!},

where Q(n, j, m, k, e) is the following polynomial:

Q(n, j, m, k, e) = (2n − j − m − k + 1)(2j − m + k − 2) − (j − m − e)(4n − 2j − 3k − m + 2).

6 The complete generating function

Eq. (1), combined with the results of the previous sections, summarized in Figure 2, shows that ϕ(u, v, t) belongs to IK(ϕ(u, 1, t)). Hence, it is of degree at most 20 over IK. But its degree is at least the degree of ϕ(u, 1, t) (which is a specialization of ϕ(u, v, t)), and thus the complete generating function ϕ(x, z, u, v, t) is of degree exactly 20 over IR(x, z, u, v, t).

The only result that is still missing is the degree of ϕ(x, z, u, v, 1), which counts two-stack-sortable permutations according to the four most natural statistics we defined in Section 1. To fill in this gap, let us, for the last time, consider the equation of Proposition 1.1:

ϕ(u, v, t) = \frac{v}{1 − xzut} + xut [v(1 − v) + \frac{(v + tu − tuv)ϕ(1, v, 1) − ϕ(1, v, tu)}{1 − tu}] [\frac{ϕ(u, 1, 1) − tϕ(u, 1, t)}{1 − t}] .

Using Eqs. (12) (with tu instead of t) and (17), we can rewrite this equation as:

ϕ(u, v, t) = \frac{v}{1 − xzut} + xut \begin{matrix}[\frac{v}{1−xzut} − v(1 − v)(1 − ut) − (v + tu − tuv)ϕ(1, v, 1)] & [\frac{t}{1−xzut} − ϕ(u, 1, 1)] \\ [1 − tu + xtu \frac{ϕ(1, 1, 1) − tuϕ(1, 1, tu)}{1 − tu}] & [1 − t + xut^{2} \frac{ϕ(1, 1, 1) − ϕ(1, 1, tu)}{1 − tu}] \end{matrix}.

Now, we use Eq. (8) (with t replaced by tu) to remove the quadratic terms from the denominator:

ϕ(u, v, t) = \frac{v}{1 − xzut} + xut \frac{[\frac{v}{1−xzut} − v(1 − v)(1 − ut) − (v + tu − tuv)ϕ(1, v, 1)] [\frac{t}{1−xzut} − ϕ(u, 1, 1)]}{(1 − t)(1 − tu) − \frac{xut^{2}}{1 − xzut} + \frac{xut(1 − t^{2}u)ϕ(1, 1, 1)}{1 − tu} − \frac{xu^{2}t^{2}(1 − t)ϕ(1, 1, tu)}{1 − tu}} .

In particular, for t = 1, we obtain:

ϕ(u, v, 1) = \frac{v}{1 − xzu} + \frac{[\frac{v}{1−xzu} − v(1 − v)(1 − u) − (v + u − uv)ϕ(1, v, 1)] [\frac{1}{1−xzu} − ϕ(u, 1, 1)]}{ϕ(1, 1, 1) − \frac{1}{1−xzu}}.

This shows that ϕ(u, v, 1) belongs to IK(ϕ(u, 1, 1)). Hence, its degree is bounded from above by the degree of ϕ(u, 1, 1), which is 10. But its degree is also bounded from below by the degree of ϕ(u, 1, 1), which is a specialization of ϕ(u, v, 1). This adds the last brick to the wall of Figure 2.

Aknowledgements to Gilles Schaeffer, first because he taught me nothing less than the quadratic method, and then for his helpul comments on this note.

References

[1] M. Bousquet-Mélou, Sorted and/or sortable permutations, to be presented at the 10th Conference “Formal Power Series and Algebraic Combinatorics”, Toronto, June 1998.

[2] M. Bousquet-Mélou, A method for the enumeration of various classes of column-convex polygons, Discrete Math. 154 (1996) 1–25.

[3] W. G. Brown, Enumeration of non-separable planar maps, Canad. J. Math. 15 (1963) 526–545.

[4] W. G. Brown, On the existence of square roots in certain rings of power series, Math. Annalen 158 (1965) 82-89.

[5] W. G. Brown, Enumeration of quadrangular dissections of the disk, Canad. J. Math. 17 (1965) 302–317.

[6] W. G. Brown and W. T. Tutte, On the enumeration of rooted non-seperable planar maps, Canad. J. Math. 16 (1964) 572–577.

[7] R. Cori, B. Jacquard and G. Schaeffer, Description trees for some families of planar maps, Proceedings of the 9th Conference “Formal Power Series and Algebraic Combinatorics”, Vienna, 1997, pp. 196–208.

[8] S. Dulucq, S. Gire and O. Guibert, A combinatorial proof of J. West’s conjecture. To appear in Discrete Math.

[9] S. Dulucq, S. Gire and J. West, Permutations with forbidden subsequences and non-separable planar maps, Discrete Math. 153 (1996) 85–103.

[10] S. Feretić and D. Svrtan, On the number of column-convex polyominoes with given perimeter and number of columns, in Proceedings of the 5^{th} conference Formal Power Series and Algebraic Combinatorics, A. Barlotti, M. Delest, and R. Pinzani eds., pages 201–214, Florence, june 1993.

[11] Z.-G. Gao, The number of rooted triangular maps on a surface, J. Combin. Theory Ser. B 52 (1991) 236–249.

[12] I. Gessel, A combinatorial proof of the multivariable Lagrange inversion formula, J. Combin. Theory Ser. A 45 (1987) 178–195.

[13] I. P. Goulden and D. M. Jackson, Combinatorial enumeration, John Wiley and Sons, 1983.

[14] I. P. Goulden and J. West, Raney paths and a combinatorial relationship between rooted non-separable planar maps and two-stack-sortable permutations, J. Combin. Theory Ser. A 75 (1996) 220–242.

[15] O. Guibert, Combinatoire des permutations à motifs exclus en liaison avec mots, cartes planaires et tableaux de Young, Ph.D. thesis, Université Bordeaux 1, 1995.

[16] D. E. Knuth, The art of computer programming Vol.1, Fundamental algorithms, Addison-Wesley, Reading, Massachusetts, 1973.

[17] M. Petkovs̆ek, H. S. Wilf, and D. Zeilberger, A = B, A. K. Peters, Wellesley, Massachusetts, 1996.

[18] B. Salvy and P. Zimmermann. GFUN: a MAPLE package for the manipulation of generating and holonomic functions in one variable, ACM Transactions on Mathematical Software 20 (1994) 163–167

    (see also http://pauillac.inria.fr/algo/libraries/libraries.html).

[19] W. T. Tutte, A census of planar maps, Canad. J. Math. 15 (1963) 249–271.

[20] J. West, Permutations with restricted subsequences and stack-sortable permutations, Ph.D. thesis, MIT, 1990.

[21] J. West, Sorting twice through a stack, Theoret. Comput. Sci. 117 (1993) 303–313.

[22] D. Zeilberger, A proof of Julian West’s conjecture that the number of two-stack-sortable permutations of length n is 2(3n)!/((n + 1)!(2n + 1)!), Discrete Math. 102 (1992) 85–93.