11
Discrete Mathematics 320 (2014) 40–50 Contents lists available at ScienceDirect Discrete Mathematics journal homepage: www.elsevier.com/locate/disc Permutations weakly avoiding barred patterns and combinatorial bijections to generalized Dyck and Motzkin paths Phan Thuan Do a,, Dominique Rossin b , Thi Thu Huong Tran c a Department of Computer Science, Hanoi University of Science and Technology, 01 Dai Co Viet road, Hanoi, Viet Nam b Laboratoire d’Informatique, École Polytechnique, Route de Saclay, 91128 PALAISEAU Cedex, France c Institute of Mathematics, 18 Hoang Quoc Viet, Hanoi, Viet Nam article info Article history: Received 29 May 2012 Received in revised form 18 October 2013 Accepted 8 December 2013 Available online 18 December 2013 Keywords: Weak avoidance of barred patterns Barred pattern Dyck paths Motzkin paths Restricted permutations abstract We explore the weak avoidance of barred patterns in permutations introduced recently by J.-L. Baril. We give its general properties in comparison with the barred pattern avoidance. By showing explicit bijections, we revisit Dyck paths with no peak at height p, Dyck paths with no ud ... du and Motzkin paths via weakly avoiding permutations in S n (132). © 2013 Elsevier B.V. All rights reserved. 1. Introduction Let S n be the set of permutations of length n, i.e., each element of S n is a bijection from [n]={1,..., n} to itself. We use the one-line notation to represent a permutation: each π S n is represented as a word π = π(1) ··· π(n).A pattern τ of length k is a permutation in S k . A permutation π avoids the pattern τ if π does not contain any subsequence order-isomorphic to τ . Studying pattern-avoiding permutations has been blossomed recently. A large number of results on enumerations, bijective proofs and exhaustive generations, which are relevant to known classical sequences such as Catalan, Motzkin and Fibonacci, were introduced [3,5,8,9,11–14,19,21]. A breakthrough on the investigation of pattern avoiding permutations is a very nice combinatorial proof given by Marcus and Tardos [15] for Wilf–Stanley’s conjecture, which gives an exponential upper bound on the number of permutations avoiding a given pattern. As a result, the sequences of which growth rates are factorial cannot be considered as permutations avoiding some patterns. Besides, in the literature we also find the concept of barred patterns, in which some of the entries are barred. For π to avoid the barred pattern ¯ τ means that every subsequence of π which is order-isomorphic to the sequence of unbarred entries of ¯ τ can be extended (exactly to the positions) to the one in π order-isomorphic to τ . It was shown that the barred pattern has many applications in enumerative combinatorics [2,6,17,20]. Pudwell [17] gave a detailed list of enumerations This paper was partially sponsored by Vietnamese National Foundation for Science and Technology Development (project: 102.99-2012.44). This work was carried out while the third author was undertaking an internship at LIX supported by LIA for-math Vietnam and joining a research group at Vietnam Institute for Advanced Study in Mathematics. Corresponding author. E-mail addresses: [email protected] (P.T. Do), [email protected] (D. Rossin), [email protected] (T.T.H. Tran). 0012-365X/$ – see front matter © 2013 Elsevier B.V. All rights reserved. http://dx.doi.org/10.1016/j.disc.2013.12.007

Permutations weakly avoiding barred patterns and combinatorial bijections to generalized Dyck and Motzkin paths

Embed Size (px)

Citation preview

Discrete Mathematics 320 (2014) 40–50

Contents lists available at ScienceDirect

Discrete Mathematics

journal homepage: www.elsevier.com/locate/disc

Permutations weakly avoiding barred patterns andcombinatorial bijections to generalized Dyck andMotzkin paths✩

Phan Thuan Do a,∗, Dominique Rossin b, Thi Thu Huong Tran c

a Department of Computer Science, Hanoi University of Science and Technology, 01 Dai Co Viet road, Hanoi, Viet Namb Laboratoire d’Informatique, École Polytechnique, Route de Saclay, 91128 PALAISEAU Cedex, Francec Institute of Mathematics, 18 Hoang Quoc Viet, Hanoi, Viet Nam

a r t i c l e i n f o

Article history:Received 29 May 2012Received in revised form 18 October 2013Accepted 8 December 2013Available online 18 December 2013

Keywords:Weak avoidance of barred patternsBarred patternDyck pathsMotzkin pathsRestricted permutations

a b s t r a c t

We explore the weak avoidance of barred patterns in permutations introduced recently byJ.-L. Baril. We give its general properties in comparison with the barred pattern avoidance.By showing explicit bijections, we revisit Dyck paths with no peak at height p, Dyck pathswith no ud . . . du and Motzkin paths via weakly avoiding permutations in Sn(132).

© 2013 Elsevier B.V. All rights reserved.

1. Introduction

Let Sn be the set of permutations of length n, i.e., each element of Sn is a bijection from [n] = {1, . . . , n} to itself.Weuse theone-line notation to represent a permutation: each π ∈ Sn is represented as a word π = π(1) · · ·π(n). A pattern τ of lengthk is a permutation in Sk. A permutation π avoids the pattern τ if π does not contain any subsequence order-isomorphicto τ . Studying pattern-avoiding permutations has been blossomed recently. A large number of results on enumerations,bijective proofs and exhaustive generations, which are relevant to known classical sequences such as Catalan, Motzkin andFibonacci, were introduced [3,5,8,9,11–14,19,21]. A breakthrough on the investigation of pattern avoiding permutations isa very nice combinatorial proof given by Marcus and Tardos [15] for Wilf–Stanley’s conjecture, which gives an exponentialupper bound on the number of permutations avoiding a given pattern. As a result, the sequences of which growth rates arefactorial cannot be considered as permutations avoiding some patterns.

Besides, in the literature we also find the concept of barred patterns, in which some of the entries are barred. For πto avoid the barred pattern τ means that every subsequence of π which is order-isomorphic to the sequence of unbarredentries of τ can be extended (exactly to the positions) to the one in π order-isomorphic to τ . It was shown that the barredpattern has many applications in enumerative combinatorics [2,6,17,20]. Pudwell [17] gave a detailed list of enumerations

✩ This paper was partially sponsored by Vietnamese National Foundation for Science and Technology Development (project: 102.99-2012.44). This workwas carried out while the third author was undertaking an internship at LIX supported by LIA for-math Vietnam and joining a research group at VietnamInstitute for Advanced Study in Mathematics.∗ Corresponding author.

E-mail addresses: [email protected] (P.T. Do), [email protected] (D. Rossin), [email protected] (T.T.H. Tran).

0012-365X/$ – see front matter© 2013 Elsevier B.V. All rights reserved.http://dx.doi.org/10.1016/j.disc.2013.12.007

P.T. Do et al. / Discrete Mathematics 320 (2014) 40–50 41

on permutations avoiding a barred pattern of length ≤5. Many of them have the factorial growth rate. Inspired by thedefinition of the barred pattern avoidance, Baril in [4] has recently introduced the weak avoidance of the barred patternwhere the extended positions are not necessary to consider. Using the weak avoidance, Baril investigated permutationsavoiding dotted patterns, which are defined as the intersection of weakly avoiding permutations. Therefore, he retrieved anumerous of classical sequences that is the central purpose in [4].

In this paper, we study more deeply the weak avoidance of the barred pattern. Being a natural generalization of thebarred pattern avoidance, the weak avoidance inherits interesting properties of the barred pattern avoidance. Furthermore,in our opinion, the reason the weak avoidance has not yet received such interests as the dotted pattern avoidance in [4] isthat it has not disclosed the efficiency of revisiting classical sequences. We show in fact that the weak avoidance is muchmore useful than it seems to be. Precisely, we also retrieve, by using the weak avoidance, almost sequences counted bypermutations avoiding dotted patterns in [4] (by Lemma 2 [4] and Lemma 1) and by permutations avoiding barred patternsin [17] (by Proposition 3). Moreover, the weak avoidance is useful for retrieving several generalized sequences that is notcounted easily by pattern avoiding permutations. Our focus is to present such revisits by showing explicit bijections. It isnoticed that the problems of enumerating and generating the generalized sequences have received much attention in theliterature [5,10,16].

We organize the manuscript as follows. Section 2 presents general results on the weak avoidance. We characterize allone-barred patterns on which the weak avoidance becomes the avoidance. In addition, for one-barred patterns not in theclass of these patterns we show that Wilf–Stanley’s conjecture for the weak avoidance does not hold any more. Section 3 isdevoted to revisit generalized Dyck paths with no peak at a given height and Dyck paths without ud · · · du by permutationsweakly avoiding a barred pattern and simultaneously avoiding 132. Our proofs are based on the construction of the knownbijections between Dyck paths and 132-avoiding permutations. Section 4 provides a direct bijection between Motzkinpaths and permutations avoiding 132 and simultaneously weakly avoiding the barred pattern 213. To prove the result, weintroduce a geometric representation for permutations avoiding 132 and then give a simple description for permutationsweakly avoiding 213 and simultaneously avoiding 132 by permutations avoiding 132 and without any occurrence of twoadjacent consecutive integers.

2. Weak avoidance of barred patterns

In this section, we first recall the definitions of the pattern avoidance, the barred pattern avoidance and the weakavoidance of barred patterns in permutations. Then we present some general properties on permutations weakly avoidingone-barred pattern.

For each sequence s of m distinct integers, we denote by red(s) the permutation obtained from s by replacing the ithsmallest element of s by i. Recall that we use one-line notation to present a permutation. Given a permutation τ , we say thats is of pattern τ if red(s) = τ . A permutation π = π1 · · ·πn ∈ Sn is called avoiding τ , or τ -avoiding, if π does not contain anysubsequence that is of pattern τ . For example, 25413 is not 132-avoiding since 25413 contains the subsequence 253 andred(253) = 132, and 43512 is 132-avoiding.

Let τ ∈ Sk and I ⊆ [k]. A barred pattern of τ at I , denoted by τ(I), is the permutation obtained by copying all elementsof τ and putting a bar over each element i whenever i ∈ I . The subsequence of τ of unbarred elements in τ(I) is denoted byτ \ I . A permutation π avoids a barred pattern τ(I) if each occurrence of pattern red(τ \ I) in π can be extended accordingto τ(i) to an occurrence of pattern τ in π that means the positions of the added entries in the obtained subsequence are thesame as the positions of the barred elements in τ(I). For example, if τ = 312 and I = {3}, then τ(I) = 312, it follows thatτ \ I = 12, the permutation 4132 is 312-avoiding and 2134 is not 312-avoiding since the subsequence 14 is of pattern 12but there does not exist any a such that a14 is a subsequence of 2134 and a14 is of pattern 312.

Let τ(I) be a barred pattern at I in Sk. A permutation π weakly avoids τ(I) if each occurrence of pattern red(τ \ I) in π canbe extended (without considering the positions of barred elements in τ(I)) to an occurrence of pattern τ in π . For example,4312 weakly avoids 321 but 1243 does not weakly avoid 321 (since subsequence 43 is of pattern 21 but {4, 3} is not in anysubsequence of 1243 that is of pattern 321).

To simplify the expression, we denote τ(I) the permutation obtained from τ(I) by replacing all the bars with the hats andwe say π avoids τ(I) instead of saying π weakly avoids τ(I). Then τ(I) is called a hatted pattern of τ at I .

Let T be a set of patterns. Denote by Sn(T ) the set of permutations of length n avoiding all patterns in T . For example,

S3(21) = {123}, S3(21) = ∅, and S3(21) = {321, 312, 231}.

Remark. Ifπ avoids τ(I), then every subsequence ofπ avoiding τ also avoids red(τ\I). This claimdoes not hold anymore ifwereplace τ(I) by τ(I). Furthermore,we have Sn(τ(I)) ⊆ Sn(τ(I)) but the reverse inclusion is not true. For instance, 2143 ∈ Sn(213)and 2143 ∈ Sn(213) since the subsequence 13 cannot be extended to 1a3 with a < 1. Later, we will give a characterizationfor patterns where the equality holds.

Throughout the manuscript, we only consider barred patterns τ(I) with |I| = 1. Hence, we write τ \ i instead of τ \ {i}.The following lemma is straightforward from the definition.

42 P.T. Do et al. / Discrete Mathematics 320 (2014) 40–50

Lemma 1. Let τ ∈ Sk and 1 ≤ i, j ≤ k such that red(τ \ i) = red(τ \ j). Then Sn(τ(i)) = Sn(τ(j)).

Denote by rev, com and inv the reverse, the complement and the inverse transformation on permutations respectively,i.e., if π = π1 · · ·πn ∈ Sn, then rev(π) = πn · · ·π1, com(π) = π ′

1 · · ·π ′n, where π ′

i = n + 1 − πi, and inv(π) is the inversemap of π . For example, rev(4123) = 3214, com(4123) = 1432, and inv(4123) = 2341.

Assume that χ is one of the three transformations rev, com, inv above. The next straightforward lemma gives us Wilf-equivalences on hatted patterns.

Lemma 2. Let τ , τ ′∈ Sk and 1 ≤ i, j ≤ k. If the map χ satisfies two following conditions:

(i) χ(τ) = τ ′,(ii) χ(red(τ \ i)) = red(τ ′

\ j),

then χ : Sn(τ(i)) → Sn(τ ′

(j)) is a bijection. Consequently, |Sn(τ(i))| = |Sn(τ ′

(j))|.

From Lemmas 1 and 2, consequently, we have:

• |Sn(4123)| = |Sn(3214)| = |Sn(3214)| = |Sn(3214)| (where χ = rev);• |Sn(4123)| = |Sn(1432)| = |Sn(1432)| = |Sn(1432)| (where χ = com);• |Sn(4123)| = |Sn(2341)| = |Sn(2341)| = |Sn(2341)| (where χ = inv).

Before presenting the exact relation between hatted patterns and barred patterns in Proposition 4, we recall a resultin [17], which gives a characterization for being classical patterns of one-barred patterns.

Lemma 3 ([17]). Let τ ∈ Sk and let 1 ≤ i ≤ k such that i is adjacent to either (i + 1) or (i − 1). Then, we have:

Snτ(i)

= Sn

red(τ \ i)

.

Proposition 4. Let τ ∈ Sk and let 1 ≤ i ≤ k. For all n ≥ k we have Sn(τ(i)) ( Sn(τ(i)) if and only if i is adjacent to either i + 1or i − 1 in τ .

Proof. Suppose τj = i with 1 ≤ j ≤ k. Let π ∈ Sn(τ(i)) and π ∈ Sn(τ(i)). Let A = πt1 · · ·πtk−1 be an occurrence of patternred(τ \ i) in π such that A cannot be extended according to τ(i) to an occurrence of pattern τ in π . Since π ∈ Sn(τ(i)), so A canbe extended to a sequence B of pattern τ by adding an element a. Without loss of generality, assume that a appears beforeπtj−1 in π . Then, the ordinal value of πtj−1 in B is the same to that of τj in τ . Since τ is a permutation, πtj−1 is the ith largestin B. Hence, πtj−1 is either the ith largest (if a > πtj−1 ) or the (i − 1)th largest (if a < πtj−1 ) in A. On the other hand, since Ais of pattern red(τ \ i), the ordinal value of πtj−1 in A is the same to that of τj−1 in red(τ \ i). Hence, πtj−1 is either the τj−1thlargest (if i > τj−1) or the (τj−1 − 1)th largest (if i < τj−1) in A. We must have either τj−1 = i + 1 or τj−1 = i − 1. Similarly,if A is extended to B by adding an element after πtj−1 , then either τj+1 = i + 1 or τj+1 = i − 1.

Conversely, without loss of generality, assume τj−1 = i + 1. So τ = τ1 · · · (i + 1)i · · · τk. By Lemma 3, we haveSn(τ(i)) = Sn(red(τ \ i)). We prove the strict inclusion by induction on n. For n = k, we have τ ∈ Sk(τ(i)). Since τ containsthe subsequence τ \ i, which is of pattern red(τ \ i), we have τ ∈ Sn(τ(i)). Let π ∈ Sn−1(τ(i)) and π contains red(τ \ i). Werepresent π = π L(n − 1)πR, where π L and πR are the left and the right parts of π separated by (n − 1) respectively. Let π ′

be a permutation on Sn such that

π ′=

π L(n − 1)nπR if red(τ \ i) contains the subsequence (k − 1)(k − 2)π Ln(n − 1)πR otherwise.

It is clear that π ′ contains red(τ \ i). We prove that π ′ avoids τ(i). Let A be a subsequence of pattern red(τ \ i) in π ′. It isremarkable that A cannot contain both n and n − 1 due to the choice of π ′. We consider the following cases:

Case 1. n ∈ A: Since A is also a subsequence in π, A can be extended to another subsequence of pattern τ in π . So it canbe extended to a pattern τ in π ′.

Case 2. n ∈ A and n − 1 ∈ A: Let A′ be the sequence obtained from A by replacing n by (n − 1). Then, A′ is of patternred(τ \ i) in π and it is extended to a pattern τ in π by adding an element a (a ≤ n−2). Thus, A is also extended to a patternτ in π ′ by adding a.

Hence, in any case, A can be extended to a pattern τ . This completes the proof. �

Proposition 5. Let τ ∈ Sk and 1 ≤ i ≤ k such that the element i of τ is adjacent to either i + 1 or i − 1 in τ . Then, the growthrate of |Sn(τ(i))| is factorial.

Proof. Suppose τj = i. We prove the statement for the case τj+1 = i − 1. Indeed, we define a map f from Sn to Snk, wheref (π) is obtained by inflating all elements of π . Precisely, f (π) is the permutation obtained by replacing each element t ofπ by an increasing sequence of k consecutive integers (t − 1)k + 1, (t − 1)k + 2, . . . , tk, for all t = 1, . . . , n. This map isalso called an expansion of permutations [1]. For instance, for k = 2 then f (312) = 561234. It is clear that f is injective. We

P.T. Do et al. / Discrete Mathematics 320 (2014) 40–50 43

Fig. 1. The Dyck path φ(5462137).

will show that f (π) avoids τ(i) for all π ∈ Sn. Hence, |Snk(τ(i))| ≥ |Sn| and |Sn(τ(i))| ≥ nk

!, which is in a factorial form as we

desire.Thus, put σ = f (π) and let A = σt1 · · · σtk−1 be an arbitrary subsequence of pattern red(τ \ i) of σ . Then, the ordinal value

of σtj in A is the same to that of τj+1 in τ . Consider the block of k consecutive integers containing σtj in the construction off . By the pigeonhole principle, there exists at least an element of the block not in A. Among them we take an element, saya, which is nearest to σtj in σ . Consider a new subsequence B of σ obtained from A by adding a. If a is before (resp. after) σtjin σ , the ordinal values of a and σtj (resp. σtj and a) in B are the same to those of τj and τj+1 in τ respectively. Hence, B is ofpattern τ and so σ avoids τ(i). �

Remark. By Lemma 3, Wilf–Stanley’s conjecture holds for the one-barred patterns τ(i), where i is adjacent to either i + 1or i − 1 in τ . However, by Propositions 4 and 5, Wilf–Stanley’s conjecture does not hold for the weak avoidance of such τ(i).Therefore, depending on each given one-barred pattern, the set of weakly avoiding permutations is either identical to ordistinct from the set of avoiding permutations. This remark suggests us to the following conjecture.

Conjecture 1. The growth rate of |Sn(τ(i))| is factorial for all τ ∈ Sk and for all i ≤ k.

3. Weakly avoiding permutations visiting generalized Dyck paths

In this section, we study two subsets of Sn(132): Sn(132, (p − 1) · · · 21p) and Sn(132, 1 · · · (p − 1)p). We prove inSection 3.1 that the standard bijection (between Sn(132) andDyck n-paths) [12] is also a bijection between Sn(132, 1 · · · (p−

1)p) and Dyck paths with no peaks at height p. Furthermore, in Section 3.2, we propose a modification of the standardbijection and prove that its restriction on Sn(132, (p − 1) · · · 21p) is bijective to Dyck n-paths with no ud · · · du. Last, byusing Simion–Schmidt’s bijection, we show a Wilf equivalence for the class of permutations Sn(132, 1 · · · (p − 1)p).

3.1. Dyck paths with no peaks at height p

We first recall some preliminary definitions.

Definition 1. Let n be a positive integer.

(i) A Dyck n-path is a lattice path in the integer plane starting at (0, 0) and ending at (0, 2n) that consists of n up steps(1, 1), n down steps (1,−1) and never runs below the x-axis.

(ii) A peak of a Dyck path is a point created by an up step followed by a down step. The height of the peak is the y-coordinateof the point.

(iii) A valley of a Dyck path is a point created by a down step followed by an up step.

Each Dyck n-path is also represented by a word of length 2n on the alphabet {u, d}, where u and d substitute for up anddown step respectively. For example, the Dyck 7-path in Fig. 1 is represented by uuududduududdd.

We can use a set of left-to-right minimal (LTRM) blocks to represent a permutation. Let π = π1 · · ·πn ∈ Sn. An elementπi of π is a left-to-right (LTR) minimum of π if πi < πj for all j < i. In this case, i is a LTRM index of π . Assume that1 = i1 < i2 < · · · < ik are all LTRM indices of π . We divide π into k blocks separated by parentheses as follows:

π = (πi1 · · ·πi2−1)(πi2 · · ·πi3−1) · · · (πik · · ·πn).

Then, each block starts with an LTRM index and is called a LTRM block. For instance, the elements 5, 4, 2, 1 are LTR minimaof π = 5462137 with LTRM blocks {5, 46, 2, 137} and π = (5)(46)(2)(137).

Remark. The following statement is straightforward: if π ∈ Sn(132) with LTRM indices 1 = i1 < i2 < · · · < ik, then theLTRM blocks of π satisfy two following conditions, which we call property (∗),

(i) the first elements of the blocks are decreasing from left to right;(ii) each block is an increasing sequence.

44 P.T. Do et al. / Discrete Mathematics 320 (2014) 40–50

We now present the non-recursive version of the standard bijection between Sn(132) and Dyck n-paths given byKrattenthaler [14]. Denote this bijection byφ. The recursive version ismentioned in Section 3.2. Letπ ∈ Sn(132). To generatea Dyck path from π we read each element of π from left to right as follows. The path starts from (0, 0). When πi is read,

– we add up steps to the path until it hits the line y = hi + 1, where hi = |{πk : πk > πi and k > i}| is the number ofelements of π after πi and greater than πi;

– we then add one down step to the path.

For example, φ(5462137) is the Dyck 7-path shown in Fig. 1. It is noticeable that permutation 5462137 ∈ Sn(132, 123)and its Dyck path has no peaks at height 2. We have the following lemma:

Lemma 6. Let π = π1 · · ·πn ∈ Sn(132) and Dn = φ(π). Then, reading each LTR minimum in π generates a peak in Dn and viceversa. Furthermore, the height of the peak in Dn corresponding to LTR minimum πi of π is hi + 1.

Proof. Since π ∈ Sn(132), π has the property (∗). Thereby, πi is a LTR minimum if and only if πi < πi−1. Equivalently, πiis a LTR minimum if and only if hi ≥ hi−1. By the definition of φ, after πi−1 is read, the path ends at the point on the lineh = hi−1. Therefore, when πi is read, the path must go up at least one step to hit y = hi−1 before going down. This createsa peak in Dn. Conversely, if a peak in Dn is established by reading element πi, then hi ≥ hi−1. The rest is evident from thedefinition of φ. �

Theorem 1. Let n, p be positive integers such that 1 ≤ p ≤ n. The map φ restricted on Sn(132, 12 · · · (p + 1)) is bijective toDyck n-paths with no peak at height p.

Proof. Let π ∈ Sn(132, 12 · · · (p + 1)), and let Dn = φ(π). On the contrary, suppose that Dn has a peak at height p. ByLemma 6 this peak is established by reading πi0 satisfying

(i) πi0 is a LTR minimum of π ;(ii) there are exactly (p − 1) elements of π after πi0 and greater than πi0 , say πi1 , . . . , πip−1 with i0 < i1 < · · · < ip−1.

Since π is 132-avoiding, the subsequence πi0πi1 · · ·πip−1 is increasing, otherwise there exists t , where 0 < t < p − 1,such that πit > πit+1 and πi0πitπit+1 contains pattern 132. Hence, the subsequence πi0πi1 · · ·πip−1 is of pattern 12 · · · p.Furthermore, it cannot be extended to a subsequence of pattern 12 · · · (p + 1) by inserting an element of π either after πi0

(by (ii)) or before πi0 (by (i)). Therefore, π contains 12 · · · (p + 1), which is a contradiction.Conversely, let Dn be a Dyck n-path with no peak at height p and let σ = φ−1(Dn). It is sufficient to show that σ avoids

12 · · · (p+1). On the contrary,we assume thatσi0σi1 · · · σip−1 is an occurrence of pattern 12 · · · p inσ and cannot be extendedto an occurrence of pattern 12 · · · (p + 1). Then, σi0 is a LTR minimum, otherwise the subsequence σi0σi1 · · · σip−1 can beextended to another one of pattern 12 · · · (p+ 1) by inserting an element smaller than and before σi0 in σ . Moreover, thereare exactly (p−1) elements of σ after and greater than σi0 , otherwise the subsequence σi0σi1 · · · σip−1 either can be extendedto the one containing 12 · · · (p + 1) or contains 132. By Lemma 6, reading σi0 creates a peak at height p in Dn, which is acontradiction. �

Corollary 7. Let n be a positive number. The following statements hold:

(i) The cardinality of Sn(132, 12) is the n-th Fine number;(ii) The cardinality of Sn(132, 123) is the (n − 1)-th Catalan number.

Proof. These statements are immediate from Theorem 1 and the two following facts:

– Fact 1: The number of Dyck n-paths with no peaks at height 1 is the n-th Fine number [10].– Fact 2: The number of Dyck n-paths with no peaks at height 2 is the (n − 1)-th Catalan number [16]. �

Remark. Since Sn(132, 123 · · · (p + 1)) = Sn(132) for p > n, we have a discrete continuity from the Catalan sequence toitself.

3.2. Dyck paths with no ud · · · du

Let A be a finite sequence of distinct integers. We write A = ALmAR, where m is the maximum element of A; and AL andAR are left and right subsequences separated by m of A respectively. Denote by um (resp. dm) the up step (resp. the downstep) indexed by the integerm. We define recursively a map, denoted by θ , on the set of integer sequences as follows:

(i) θ(ϵ) = ϵ, here ϵ denotes the empty sequence;(ii) θ(A) = θ(AL)umθ(AR)dm.

This recursive process finally gives a Dyck path with each step indexed by an integer in A. We call θ(A) an indexedDyck path.

Lemma 8. The map θ restricted on Sn(132) is bijective to Dyck n-paths.

P.T. Do et al. / Discrete Mathematics 320 (2014) 40–50 45

(a) 132-avoiding permutation. (b) Dyck path given recursively by θ .

Fig. 2. Recursive representation of θ .

(a) By the standard bijection φ. (b) By the modified bijection θ .

Fig. 3. The images of 452361 ∈ S6 .

Proof. Let π, π ′∈ Sn(132) such that θ(π) and θ(π ′) give the same Dyck n-path without indexing Dn. By the definition of

θ,Dn is illustrated as in Fig. 2(b). So its last d is indexed as dn and the last u starting from a point on the x-axis is indexed asun. That means the positions of n in π and π ′ are identical. Recursively, we have red(π L) = red(π ′L) and red(πR) = red(π ′R).On the other hand, since π, π ′

∈ Sn(132), their elements are distributed as in Fig. 2(a), i.e. all elements of the left part aregreater than those of the right part. Hence, πR

= red(πR) = red(π ′R) = π ′R and recursively π L= π ′L. Hence, θ is injective.

The surjectivity of θ is deduced clearly from the recursive definition of θ . Precisely, given a Dyck n-path, its steps always areindexed by integers on [n] to be an image by θ . �

Remark. 1. Themap θ is amodified version of the standard bijection in the previous section butwritten under the recursiveform [9]:

φ(π) = uφ(π L)dφ(πR).

2. Although the recursive formulas ofφ and θ are quite similar, their givenDyck paths are completely different. For instance,see Fig. 3,

φ(452361) = uuudduudddud,θ(452361) = u4d4u5u2d2u3d3d5u6u1d1d6.

3. Unfortunately, the restriction of φ on Sn(132, (p−1) · · · 21p) does not give a bijection to Dyck n-paths with no ud · · · du.For instance, 5462137 ∈ S7(132, 213) but φ(5462137) contains udu (see Fig. 1). However, we next prove that therestriction of θ gives a desired bijection.

We call each pair (uk, dk) in an indexedDyck path θ(π) awell-matching pair. The following properties are straightforwardfrom the construction of θ .

Lemma 9. Let θ(π) be an indexed Dyck path. The following statements hold:

(i) If two well-matching pairs of θ(π) are overlapped then the one with smaller index is nested within the other, e.g.(· · · u5 · · · u2 · · · d2 · · · d5 · · ·);

(ii) Two consecutive steps ud creating a peak in θ(π) are indexed ukdk for some k;(iii) Two consecutive steps du creating a valley in θ(π) are indexed dk−1uk.

Theorem 2. Let n, p be positive integers and p ≥ 3. The map θ restricted on Sn(132, (p−1) · · · 21p) is bijective to Dyck n-pathswith no p consecutive steps ud · · · du.

Proof. Let π ∈ Sn(132, (p − 1) · · · 21p) and put Dn = θ(π). We prove that Dn does not contain ud · · · du. On the contrary,suppose that Dn contains consecutive steps uℓpdℓp−1 · · · dℓ2uℓ1 . Then, we have:

(a) ℓp = ℓp−1 and ℓ1 = ℓ2 + 1 (by Lemma 9(ii), (iii)).(b)

ℓ1 > ℓ1 − 1 = ℓ2 > ℓ3 > · · · > ℓp−2 > ℓp−1,

since by Lemma 9(i) the order of the indexed up and down steps in Dn must be

· · · uℓ2 · · · uℓ3 · · · uℓp−2 · · · uℓp−1dℓp−1dℓp−2 · · · dℓ3dℓ2uℓ1 · · · dℓ1 · · · .

46 P.T. Do et al. / Discrete Mathematics 320 (2014) 40–50

Fig. 4. The Dyck path θ(5462137).

By the construction of θ, π is determined by taking the indices of the up steps in the order from left to right in the indexedDyck path. Therefore,

π = · · · ℓ2 · · · ℓ3 · · · ℓp−1ℓ1 · · · ,

where ℓp−1 is attached to ℓ1. Soπ contains the subsequence ℓ2ℓ3 · · · ℓp−1ℓ1 of pattern (p−2)(p−3) · · · 1(p−1). Furthermore,it is remarkable that:

– there is not any element k between ℓi−1 and ℓi in π such that ℓi < k < ℓi−1 for i = 3, 4, . . . , p− 1. Otherwise, (uk, dk) iswithin (uℓi−1 , dℓi−1) and contains (uℓi , dℓi). So Dn contains dℓi · · · dk · · · dℓi−1 , which is a contraction since dℓi attaches todℓi−1 .

– there is not any element between ℓp−1 and ℓ1.– there is not any element k before ℓ2 in π such that ℓ2 < k < ℓ1 since ℓ2 = ℓ1 − 1.

Therefore, the subsequence ℓ2ℓ3 · · · ℓp−1ℓ1 of π cannot be extended to any occurrence of pattern (p − 1)(p − 2) · · · 1p. Soπ contains (p − 1) · · · 21p.

Conversely, it is proved similarly by contradiction that if π has an occurrence ℓ2ℓ3 · · · ℓp−1ℓ1 of pattern (p − 2)(p −

3) · · · 1(p − 1), which cannot be extended to an occurrence of pattern (p − 1)(p − 2) · · · 1p, then θ(π) containsuℓp−1dℓp−1dℓp−2 · · · dℓ2uℓ1 . �

Fig. 4 illustrates the Dyck 7-path θ(5462137). It is noticeable that 5462137 ∈ S7(132, 213) and its Dyck path has no udu.

Corollary 10. Sn(132, 213) counts (n − 1)-th Motzkin numbers.

Proof. The statement is straightforward from Theorem 2 and the fact that Dyck n-paths with no udu counts (n − 1)-thMotzkin number [7]. �

In Section 4, we give a new direct bijection from Sn(132, 213) to Motzkin (n − 1)-paths.

3.3. Wilf-equivalence through Simion–Schmidt’s bijection

Recall that Simion–Schmidt’s bijection [18] is a map from Sn(132) to Sn(123) defined by Algorithm 1. For example,7561234 ∈ S7(132)maps to 7561432 ∈ S7(123). We have the following lemma:

Algorithm 1: Simion–Schmidt [18]Input: A permutation π = π1 . . . πn in Sn(132)Output: A permutation σ = σ1 . . . σn in Sn(123)

1 σ1 := π1 ;2 x := π1 ;3 foreach i = 2, . . . , n do4 if πi < x then5 σi := πi ;6 x := πi ;7 else8 σi := max{k|x < k ≤ n, k = σj for all j < i};

Lemma 11. Simion–Schmidt’s map is a bijection from Sn(132, 1 · · · (p − 1)p) to Sn(123, 1p(p − 1) · · · 2).

Proof. According to Algorithm 1, for any pattern τ = 1k(k − 1) · · · 2, k > 1, in σ , lines 4, 5, 6 and 8 guarantee that

• the element in π corresponding to 1 in τ is equal to a pivot x. Thus, the elements in π corresponding to k, k − 1, . . . , 2in τ are greater than x;

• the elements in π corresponding to k, k − 1, . . . , 2 in τ respectively are in the increasing order.

P.T. Do et al. / Discrete Mathematics 320 (2014) 40–50 47

(a) Overlapping LTRM blocks. (b) Non-overlapping LTRM blocks.

Fig. 5. Geometric representations of LTRM blocks.

Hence, each subsequence of pattern 1k(k− 1) · · · 2 in σ is mapped by a subsequence of pattern 12 · · · k in π . Similarly, eachsubsequence of pattern 12 · · · k in π maps to a subsequence of pattern 1k(k − 1) · · · 2 in σ for any k > 1. Regarding thedefinition of the hatted pattern, if π avoids 1 · · · (p − 1)p, then σ avoids 1p(p − 1) · · · 2. This completes the proof. �

Consequently, the permutations in Sn+1(123, 1p(p − 1) · · · 2) are also viewed as Dyck n-paths with no peak at height p.

4. Weakly avoiding permutation visiting Motzkin paths

This section presents an explicit bijection between Sn(132, 213) andMotzkin (n−1)-paths. We first recall the definitionof Motzkin n-path on a horizontal line.

Definition 2. Let n, h be non-negative integers.

(i) A Motzkin n-path on the line y = h is a lattice path in the integer plane starting and ending at points on y = h thatconsists of n steps including up (1, 1), down (1,−1) and flat (1, 0) ones and never runs below y = h. The height of aMotzkin n-path M is the difference between the ordinate of the highest horizontal line that this path can reach and h,denoted by h(M).

(ii) A Motzkin n-path on the line y = h is proper if it does not contain any flat-steps on y = h.

Motzkin paths are also represented by words of length n on the alphabet {u, d, f }, where u, d and f substitute for up,down and flat step respectively.

Let π ∈ Sn such that the LTRM blocks of π satisfy the property (∗) (in Section 3), that is, the first elements of the blocksare decreasing from left to right, and each block is an increasing sequence. In this case, we also say that π has a geometricrepresentation, which is the union of the representations of its LTRM blocks. Assume that i1, . . . , ik are LTRM indices of π .Each LTRM block πit · · ·πit+1−1 is represented by a set of (it+1 − it) semicircles, each one has the endpoints (πj, 0) and(πj+1, 0) for j = it , . . . , it+1 − 2, on the upper half-plane. If a LTRM block has only one element then its representation is asingle point. Two LTRM blocks of π are overlapping if there exist two intersecting semicircles in their representations.

Fig. 5(a) illustrates that LTRM-blocks (1, 7, 11, 13) and (2, 6, 12) are overlapping; Fig. 5(b) illustrates that LTRM-blocks(1, 7, 10), (2, 4, 6) and (11, 13) are pair-wise non-overlapping.

We give here a necessary and sufficient condition for the 132-avoiding property of a permutation based on its geometricrepresentation:

Lemma 12. Let π ∈ Sn such that π has a geometric representation. Then π ∈ Sn(132) if and only if its LTRM blocks are pairwisenon-overlapping.

Proof. On the contrary, there exist two intersecting semicircles of π satisfying that their endpoints are (πi, 0) and (πi+1, 0),and (πj, 0) and (πj+1, 0)with πi < πj. Then, we have:

πi < πj < πi+1 < πj+1.

So π contains either πiπi+1πj (if i < j) or πjπj+1πi (if j < i) as a subsequence. Moreover, both πiπi+1πj and πjπj+1πi are ofpattern 132, which contradicts to the 132-avoiding property of π .

Conversely, assume that π contains a subsequence ijk such that i < k < j. It is remarkable that j and k are not LTRminima (since j, k > i) and they are not in the same LTRM block (since j > k). Moreover, by the definition of the geometricrepresentation, the LTR minimum of the LTRM block containing j is greater than that of the LTRM block containing k.Therefore, the LTRM blocks containing j and k are overlapping. �

For convenience, we call two adjacent consecutive integers in a permutation an adjacent pair.

Theorem 3. Let π ∈ Sn. Then π ∈ Sn(132, 213) if and only if π ∈ Sn(132) and π does not contain any adjacent pair.

Proof. We assume that π contains an adjacent pair a(a + 1) for some 1 ≤ a ≤ n − 1. It is clear that the subsequencea(a + 1) of π is of pattern 12 but it cannot be extended to a subsequence of pattern 213. Therefore, π contains 213, whichis a contradiction.

Conversely, we prove that π avoids 213. Take a subsequence ij of π such that i < j. Since π avoids 132, its LTRM blockssatisfy the conditions in Lemma 12. We consider two following cases:

48 P.T. Do et al. / Discrete Mathematics 320 (2014) 40–50

(a) Motzkin path uududdufdfud. (b) Geometric representation ofψ(uududdufdfud).

Fig. 6. An illustration of ψ .

Case 1: i and j are in two different LTRM blocks. Then, j is not a LTR minimum. The subsequence of π including i, theminimum element of the LTRM block containing j and j is of pattern 213.

Case 2: i and j are in the same LTRM block. Consider the element i + 1 of π . Since π does not contain the adjacent pairi(i + 1) and the elements in the same block are increasing, we must have j ≥ i + 2 and i + 1 cannot be between i and j inπ . On the other hand, i + 1 cannot be after j, otherwise π contains the subsequence ij(i + 1), what is of pattern 132. Hence,i + 1 must appear before i in π . In this case, the subsequence (i + 1)ij of π is of pattern 213.

Hence, in any cases the increasing subsequence i, j of π is extended to a subsequence of pattern 213. This claims that πavoids 213. �

We now present a new bijection, denoted by ψ , from Motzkin (n − 1)-paths to Sn(132, 213). Let Mn−1 be a Motzkin(n − 1)-path from (0, 0) to (n − 1, 0). ψ(Mn−1) is a permutation on [n] determined by its LTRM blocks as follows:

(i) For each horizontal line y = h (0 ≤ h ≤ h(Mn−1)), we consider all paths in Mn−1, which are proper Motzkin paths ofmaximum length on y = h; Each such path intersects to y = h at some points. We rearrange the abscissas of thesepoints in the increasing order, say x1 < x2 < · · · < xk. Then, the sequence (x1 + 1, x2 + 1, . . . , xk + 1) forms a LTRMblock of π ;

(ii) We rearrange all blocks created in (i) in the decreasing order of the first elements. This gives the permutationψ(Mn−1).

For example, with the Motzkin 9-path in Fig. 6(a): taking the intersection to y = 0 we get two LTRM blocks: (1, 7, 10) and(11, 13); to y = 1 we get four LTRM blocks: (2, 4, 6), (8), (9) and (12); to y = 2 we get two LTRM blocks: (3) and (5). So itsimage by ψ is (12)(11, 13)(9)(8)(5)(3)(2, 4, 6)(1, 7, 10). Moreover, its geometric representation is illustrated in Fig. 6(b).

Lemma 13. ψ is a well-defined map from (n − 1)-Motzkin paths to Sn(132, 213).

Proof. Let Mn−1 be a Motzkin (n − 1)-path. By the construction, ψ(Mn−1) is a permutation and its LTRM blocks satisfythe property (∗) (in Section 3). We prove ψ(Mn−1) is 132-avoiding by showing its LTRM blocks pairwise non-overlapping(Lemma 12). Thus, taking two different LTRM blocks of ψ(Mn−1), we consider two following cases:

Case 1: These two LTRM blocks are created by taking the intersection ofMn to a same line in the construction ofψ . Thentwo corresponding proper Motzkin paths on this line are separated by a path containing either a flat step on or a downstep under this line. Hence, the maximum abscissa established by the first proper Motzkin path is less than the minimumabscissa established by the second one. This means the geometric representations of the two LTRM blocks are disjoint andso non-overlapping.

Case 2: These two LTRM blocks are created by taking the intersection of Mn to two different horizontal lines, say y = h1and y = h2 (h1 < h2). LetM1 andM2 be the two corresponding proper Motzkin paths on these lines respectively. LetM∗ bea path inMn of the smallest length such that:

• M∗ contains M2;• M∗ is a Motzkin path on the line y = h1.

See Fig. 7 for an example ofM∗.Since M∗ is of the smallest length and h1 < h2, it is a proper Motzkin path on the line y = h1 and it meets y = h1 at

exactly two points. Assume that the abscissas of these two points are a and b (a < b). Then by the construction, (a + 1, 0)and (b + 1, 0) are ending points of a semicircle in the geometric representation of ψ(Mn). On the other hand, since M∗

contains M2, this semicircle contains all semicircles in the representation of the LTRM block corresponding to M2. By case1, this semicircle is either a part of or disjoint to the representation of the LTRM block corresponding toM1.

Hence, in any cases, two representations of the LTRM blocks corresponding toM1 andM2 are non-overlapping.Besides, there is not any proper Motzkin path of Mn−1 such that the abscissas of the intersections to the horizontal line

are consecutive. Hence, the elements i and i+1 ofψ(Mn−1) cannot be in the same LTRMblock andψ(Mn) avoids all adjacentpairs. By Theorem 3, ψ(Mn) ∈ Sn+1(132, 213). �

Theorem 4. The map ψ is bijective between Motzkin (n − 1)-paths and Sn(132, 213).

Proof. To prove the statement, we establish a map from Sn(132, 213) to Motzkin (n − 1)-paths and show that it is theinversion of ψ . Let π ∈ Sn(132, 213). The Motzkin (n − 1)-path starting from (0, 0) is determined by reading in turn theelements from 1 to n of π as follows. In the geometric representation of π , when i (1 ≤ i ≤ n) is read, we do:

P.T. Do et al. / Discrete Mathematics 320 (2014) 40–50 49

Fig. 7. Proper Motzkin paths on y = h1 and y = h2 .

1. go up one step if i is a starting point of a semicircle;2. go flat one step if i is not a starting point of a semicircle and i + 1 is not an ending point of a semicircle;3. go down one step if i is not a starting point of a semicircle and (i + 1) is an ending point of a semicircle;4. do nothing if i = n.

To show the inversion, we consider the relation of element i and i + 1 in the permutation and the intersection points (ofthe proper Motzkin paths inMn to horizontal lines) of abscissas i − 1 and i in the Motzkin path. Precisely, if reading i in thepermutation leads to an up step, then in the corresponding Motzkin path the ordinate of the intersection point of abscissa(i − 1) is 1 greater than that of the intersection point of abscissa i. Hence, in the image of this Motzkin path byψ , the LTRMblock containing i contains the LTRM block containing (i + 1). Conversely, by the definition of the inverse if i is a startingpoint of a semicircle, then this semicircle contains the representation of the LTRM-block containing (i+ 1). Similarly for thecases that reading i leads to a flat or a down step. Therefore, by recursion the constructed map is the inverse of ψ . �

Remark. Although there exists a variety of bijections from restricted permutations to Dyck paths, to the best of ourknowledge, our bijection ψ is the first one from restricted permutations to Motzkin paths.

5. Conclusion

We showed the efficiency of the weak avoidance in revisiting generalized sequences by explicit bijections. Based on thegivenbijections,we expect to study further problemsof exhaustive generations forDyckpathswith nopeak at a givenheight,Dyck paths with no ud · · · du andMotzkin paths. Another application of the weak avoidance we wish to tackle is to evaluatethe number of permutations avoiding a given pattern. Given a classical pattern q, we knew that it is difficult to calculateexplicitly |Sn(q)| for a general q. Wilf–Stanley’s claim gives that |Sn(q)| is bounded by an exponential function. It would beinteresting if we could calculate exactly limn→∞

n√

|Sn(q)|. Based on Proposition 5 and our calculations on computer, it isreasonable to make the following conjecture:

Conjecture 2. Let q be a pattern and τ(i) be a hatted pattern. Then

limn→∞

nSn(q) = lim

n→∞

nSn(q, τ(i)).

Acknowledgments

We would like to thank the referees for many insightful comments and detailed corrections that brings the manuscriptto this form.

References

[1] M.D. Atkinson, T. Stitt, Restricted permutations and the wreath product, Discrete Math. 259 (1–3) (2002) 19–36.[2] E. Babson, E. Steingrímsson, Generalized permutation patterns and a classification of the mahonian statistics, Sém. Lothar. Combin. 44 (2000).[3] E. Barcucci, A. Del Lungo, E. Pergola, R. Pinzani, From Motzkin to Catalan permutations, Discrete Math. 217 (1–3) (2000) 33–49.[4] J.L. Baril, Classical sequences revisited with permutations avoiding dotted pattern, Electron. J. Combin. 18 (1) (2011) Paper 178, 18.[5] J.L. Baril, P.T. Do, ECO-generation for p-generalized Fibonacci and Lucas permutations, Pure Math. Appl. 17 (1–2) (2006) 19–37.[6] A. Bernini, L. Ferrari, R. Pinzani, Enumerating permutations avoiding three Babson-Steingrímsson patterns, Ann. Comb. 9 (2005) 137–162.[7] D. Callan, Two bijections for Dyck path parameters, Preprint, 2001. http://arxiv.org/abs/math/0406381.[8] D. Callan, Bijections from Dyck paths to 321-avoiding permutations revisited, Preprint, 2007. http://arxiv.org/abs/0711.2684.[9] A. Claesson, S. Kitaev, Classification of bijections between 321- and 132-avoiding permutations, Discrete Math. Theor. Comput. Sci. Proc. (2008).

[10] E. Deutsch, Dyck path enumeration, Discrete Math. 204 (1–3) (1999) 167–202.[11] S. Elizalde, Statistics on pattern-avoiding permutations, Ph.D. Thesis, MIT, USA, 2004.[12] D.E. Knuth, The Art of Computer Programming, Volume 1: Fundamental Algorithms, Addison-Wesley Professional, 1969.[13] D.E. Knuth, The Art of Computer Programming, Volume 3, Addison-Wesley Professional, 1973.

50 P.T. Do et al. / Discrete Mathematics 320 (2014) 40–50

[14] C. Krattenthaler, Permutationswith restricted patterns andDyck paths, Adv. Appl.Math. 27 (2–3) (2001) 510–530. Special issue in honor of DominiqueFoata’s 65th birthday (Philadelphia, PA, 2000).

[15] A. Marcus, G. Tardos, Excluded permutation matrices and the Stanley–Wilf conjecture, J. Combin. Theory Ser. A 107 (1) (2004) 153–160.[16] P. Peart, W.J. Woan, Dyck paths with no peaks at height k, J. Integer Seq. 4 (1) (2001) 6 (electronic). Article 01.1.3.[17] L. Pudwell, Enumeration schemes for permutations avoiding barred patterns, Electron. J. Combin. 17 (1) (2010) Research Paper 29, 27.[18] R. Simion, F.W. Schmidt, Restricted permutations, European J. Combin. 6 (1985) 383–406.[19] C. Stump, On bijections between 231-avoiding permutations and Dyck paths, Sém. Lothar. Combin. 60 (2008–2009) 13. Art. B60a.[20] J. West, Permutations with forbidden subsequences and stack-sortable permutations, Ph.D. Thesis, MIT, USA, 1990.[21] J. West, Generating trees and the Catalan and Schröder numbers, Discrete Math. 146 (1–3) (1995) 247–262.