In this section, we establish a simple bijection between Alt2n(321) and Tn, with Dyck paths as an intermediate stage, such that a permutation σ ∈ Alt2n(321) is carried to a tree T ∈ Tn with hsum(T ) = inv(σ).
3.2.1 The first stage of the bijection between Alt
2n(321) and T
nThe first stage is a special case of the Fran¸con-Viennot [19] bijection between per-mutations and lattice paths such that the inversion number of the permutation is translated to the area under the path.
A Dyck path of length n is a lattice path from (0, 0) to (n, n), using north step (0, 1) and east step (1, 0), that never goes below the line y = x. Let N and E denote a north step and an east step, respectively. Let Qn = ENEN · · · EN be the specific lattice path from (0, 0) to (n, n) formed by the steps E and N alternatingly. Note that Qn goes between the line y = x and the line y = x − 1.
Let Cn be the set of Dyck paths of length n. It is known that |Cn| = Cn. For every path P ∈ Cn, we define the statistic area(P ) of P to be the number of unit squares in the polyomino (P, Qn) enclosed by P and Qn. For example, Figure 3.1(a) shows a polyomino (P, Q4) with the lower path Q4 = ENENENEN, the upper path P = NNENNEEE, and area(P ) = 8.
Proposition 3.2.1. There is a bijection Ω between the two sets Alt2n(321) and Cn such that a permutation σ ∈ Alt2n(321) is carried to a path Ω(σ) ∈ Cn with inv(σ) = area(Ω(σ)).
Proof. Given a σ = σ1· · · σ2n ∈ Alt2n(321), we label the ith step of Qn by σi, for 1 ≤ i ≤ 2n. The corresponding path Ω(σ) is constructed from Qn by rearranging the steps of Qn according to the numerical order of their labels. Since σ is 321-avoiding and alternating, the odd entries σ1 < σ3 < · · · < σ2n−1 (respectively, even entries σ2 < σ4 < · · · < σ2n) are increasing, which are on the n east (respectively, north) steps of the path Ω(σ), accordingly. Then Ω(σ) is a path from (0, 0) to (n, n).
Moreover, since σ2i−1 > σ2i, there are always at least i north steps preceding the ith east step in Ω(σ). Hence Ω(σ) ∈ Cn.
To find Ω−1, given a P ∈ Cn, we label the steps of P from 1 to 2n. With the polyomino (P, Qn), we assign the ith step of Qn the label zi of the opposite step across the polyomino, for 1 ≤ i ≤ 2n. Then we recover the word Ω−1(P ) = z1· · · z2n ∈ Alt2n(321).
Note that every inversion (σi, σj) of σ is in one-to-one correspondence to the unit square at the intersection of the column with label σi and the row with label σj of the polyomino (Ω(σ), Qn). Hence inv(σ) = area(Ω(σ)).
Example 3.2.2. Take a σ = 3 1 6 2 7 4 8 5 ∈ Alt8(321). The paths Ω(σ) and Q4, along with their step-labeling, are shown in Figure 3.1(a). Note that area(Ω(σ)) = inv(σ) = 8.
Figure 3.1: The polyomino (Ω(σ), Q4) and plane tree Π ◦ Ω(σ) corresponding to the per-mutation σ = 3 1 6 2 7 4 8 5 ∈ Alt8(321).
3.2.2 The second stage of the bijection between Alt
2n(321) and T
nThe second stage is an adaptation of the standard plane-tree representation of per-mutations.
For a tree T ∈ Tnand a vertex x ∈ T , the height of x, denoted by height(x), is the distance from the root to x. We define the statistic hsum(T ) of T , the total height of all vertices of T , as
hsum(T ) =X
x∈T
height(x).
Proposition 3.2.3. There is a bijection Π between the two sets Cn and Tn such that a path P ∈ Cn is carried to a tree Π(P ) ∈ Tn with area(P ) = hsum(Π(P )).
Proof. A well-known bijection Π : Cn → Tn is constructed as follows. For every path P ∈ Cn, to each north step there corresponds an edge traversed (in preorder) on the way down, and to each east step there corresponds an edge traversed on the way up.
Let x1, . . . , xn be the non-root vertices of Π(P ) in preorder. We observe that for each i (1 ≤ i ≤ n), the height of xi in Π(P ) equals the number of unit squares in the ith row (from bottom to top) of the polyomino (P, Qn). Hence area(P ) = hsum(Π(P )).
Example 3.2.4. Take a P = NNENNEEE ∈ C4, i.e., the upper path of the polyomino shown in Figure 3.1(a). The corresponding tree Π(P ) is shown in Figure 3.1(b), where area(P ) = hsum(Π(P )) = 8.
With the composition Π ◦ Ω : Alt2n(321) → Tn, each permutation σ ∈ Alt2n(321) can be represented by a plane tree T = Π ◦ Ω(σ) with inv(σ) = hsum(T ).
3.3 A sign-reversing involution on plane trees
In this section, we review Chen-Shapiro-Yang’s involution φ on Tn and show that the involution reverses the parity of the statistic hsum(T ) of T . First, we describe the fixed points of the involution φ in case n is odd.
Legal trees. We specify a subset of T2n+1, constructed from Tn as follows. For every T ∈ Tn, we associate T with a tree λ(T ) ∈ T2n+1 by attaching to each vertex of T a leaf as the first child of the vertex. We observe that the resulting trees λ(T ) can be characterized by the following condition
(A) a vertex is a leaf if and only if it is the first child of an internal vertex.
Let Gn⊆ Tn be the set of trees that satisfy condition (A). Notice that
|G2n| = 0 and |G2n+1| = |Tn| = Cn, (3.3.1) and that the map λ is a bijection between Tn and G2n+1.
Lemma 3.3.1. For every tree T ∈ G2n+1, the statistic hsum(T ) has the opposite parity of n.
For any non-root vertex x of a plane tree T , we say that x is legal if either x is a leaf and it is also the first child of its parent, or x is an internal vertex but it is not the first child of its parent. Otherwise, x is illegal. The tree T is said to be legal if T contains at least one edge and every non-root vertex of T is legal. In other word, Gn consists of all the legal trees in Tn for all n ≥ 1. By Eq. (3.3.1), a legal tree has odd number of edges necessarily. Let τ (x) denote the subtree of T rooted at x, consisting of x and the descendants of x.
The involution φ. Making use of the construction given in [6, Theorem 2.1], the map φ acting on plane trees has the following consequence.
Theorem 3.3.2. For all n ≥ 1, there is an involution φ on the set Tn − Gn that reverses the parity of the statistic hsum(T ) of plane trees T .
Proof. Given a T ∈ Tn−Gn, find the last illegal vertex, say v, in right-to-left preorder.
Let u be the parent of v. There are two possibilities for the vertex v. (1) v is a leaf, and it has siblings, say w1, . . . , wk, to the left of v. (2) v is an internal vertex, and it is the first child of u.
For case (1), we separate the subtrees τ (w1), . . . , τ (wk) from T , and then construct the tree φ(T ) by attaching the subtrees τ (w1), . . . , τ (wk) to v in the same order. Note that the vertex v remains to be the last illegal vertex of φ(T ) in right-to-left preorder.
This operation makes the height of every vertex x ∈ τ(w1) ∪ · · · ∪ τ(wk) increase by 1. Hence hsum(φ(T )) = hsum(T ) +Pk
i=1|{x : x ∈ τ(wi)}|.
For case (2), the tree φ(T ) is constructed by reversing the operation in case (1).
In this case, we have hsum(φ(T )) = hsum(T ) −Pk
i=1|{x : x ∈ τ(wi)}|.
We observe that the first subtree τ (w1) = w1 is a single vertex, and the other sub-trees τ (w2), . . . , τ (wk) are legal trees, each of which contains even number of vertices.
Hence the term Pk
i=1|{x : x ∈ τ(wi)}| is odd, and the statistic hsum(φ(T )) has the opposite parity of hsum(T ). The assertion follows.
Example 3.3.3. Given the tree T shown in Figure 3.2(a), the white vertices are the legal vertices while the black vertices are the illegal vertices, where the vertex v is the last illegal vertex in right-to-left preorder. The corresponding tree φ(T ) is shown in Figure 3.2(b).
The involution φ leads immediately to the sign-balance of Altn(321).
Corollary 3.3.4. For n ≥ 1, the following identities hold.
(i) I(Alt2n(321)) =
(−1)n−12 Cn−1
2 n odd
0 n even,
(ii) I(Alt2n−1(321)) = −I(Alt2n(321)).
(a) (b)
v
u u
φ v
Figure 3.2: An example for the involution φ on illegal plane trees.
Proof. (i) For the case of even length, we have I(Alt2n(321)) = X
σ∈Alt2n(321)
(−1)inv(σ)
= X
T∈Tn
(−1)hsum(T ) (by Propositions 3.2.1 and 3.2.3)
= X
T∈Gn
(−1)hsum(T ) (by Theorem 3.3.2)
=
(−1)n+12 Cn−1
2 if n odd
0 if n even. (by Eq. (3.3.1) and Lemma 3.3.1).
(ii) For every σ = σ1· · · σ2n ∈ Alt2n(321), we observe that the greatest entry is σ2n−1 = 2n (otherwise there will be a 321-pattern (2n, σ2n−1, σ2n) in σ), and that σ2n−2 < σ2n (otherwise there will be a 321-pattern (σ2n−3, σ2n−2, σ2n) in σ). Then removing the entry σ2n−1 from σ results in a member σ′ ∈ Alt2n−1(321) with inv(σ′) = inv(σ) − 1. This is a sign-reversing bijection between Alt2n−1(321) and Alt2n(321).
Hence I(Alt2n−1(321)) = −I(Alt2n(321)). The proof is completed.
Remarks. Shattuck [28] studied a q-polynomial of generating function for the inver-sion number of Catalan words, which can be translated from Dyck paths with north step and east step replaced by 1 and 0, respectively. Corollary 3.3.4(i) is essentially equivalent to Shattuck’s result [28, Theorem 4.1].