TThe number of { , } -avoiding permutations David CallanDepartment of Statistics, University of Wisconsin-Madison1300 University Avenue, Madison, WI 53706-1532 [email protected]
Mar 14, 2013
Abstract
We show that the counting sequence for permutations avoiding both of the (clas-sical) patterns 1243 and 2134 has the algebraic generating function supplied byVaclav Kotesovec for sequence A164651 in The On-Line Encyclopedia of IntegerSequences.
Several authors have developed methods to count permutations avoiding a given set ofpatterns; see, for example, the references in the Wikipedia entry [1]. In particular, enu-meration schemes have been developed for automated counting [2, 3]. When successful,an automated method produces an enumeration scheme that yields the initial terms ofthe counting sequence (perhaps 20 or more) and sometimes these terms appear to have analgebraic generating function that does not follow readily from the enumeration scheme.Here, we treat one such case. The counting sequence for permutations that avoid both ofthe (classical) patterns 1243 and 2134 begins 1 , , , , , , . . . , sequence A164651in The On-Line Encyclopedia of Integer Sequences [4]. In a comment on this sequencedated Oct 24 2012, Vaclav Kotesovec observed that the generating function3 x − x + 2 + x (1 − x ) √ − x x − x + 4 x − { , } -avoiders do indeed have this generating function.Defining a start-small permutation to be one that does not start with its largest entry,the proof rests on a bijection φ from start-small { , } -avoiders of length n to listsof start-small 123-avoiders whose total length is n − φ , for example, 12345 → (12 , , , → (3412), a singleton list. Now, 123-avoiders are famously1 a r X i v : . [ m a t h . C O ] M a r ounted by the Catalan numbers and the well known combinatorial interpretation of thetransform ( a n ) n ≥ → ( b n ) n ≥ , defined via generating functions by1 + B ( x ) = 11 − A ( x ) , permits counting these lists of start-small 123-avoiders. The generating function for start-small { , } -avoiders thus obtained readily yields the generating function for un-restricted { , } -avoiders.In Section 2, we show that φ is given by iteration of a more basic bijection, whichis presented in Section 3. Finally, Section 4 gives the bookkeeping details to obtain thedesired generating function from φ . A mid-123 entry in a permutation is an entry that serves as the “2” in a 123 pattern.A key mid-123 entry is a mid-123 entry b whose immediate predecessor is either < b or aright-to-left maximum (max for short). For example, the mid-123 entries in 1 3 4 5 2 6 are3, 4, 5, 2 but only 3, 4, and 5 are key. Lemma 1.
A permutation with no key mid- entries has no mid- entries at all andso is a -avoider.
Proof. Suppose the i th entry π i of a permutation π is a mid-123 entry but not key.Then, by definition of key, we have π i − > π i and π i − is not a right-to-left max. So π i − is also a mid-123 entry. Again, if π i − is not key, then π i − > π i − and π i − is nota right-to-left max. Iterating this process, we must eventually arrive at a key mid-123entry. Hence, every permutation with a mid-123 entry has a key mid-123 entry . Lemma 2.
Suppose b is the last mid- entry in a { , } -avoider. Then there isa unique c such that bc forms the “ ” of a pattern. Proof. Suppose abc and abc (cid:48) are 123 patterns with c (cid:54) = c (cid:48) , say c < c (cid:48) . If c precedes c (cid:48) in the permutation, then c is a mid-123, violating the hypothesis on b . If c follows c (cid:48) ,then abc (cid:48) c is a proscribed 1243.Let A n denote the set of start-small { , } -avoiders on [ n ], and A n,k the subsetwith k key mid-123 entries. 2o produce the promised bijection φ from A n to lists of start-small 123-avoiders whosetotal length is n − ≤ k ≤ n −
2, abijection A n,k → (cid:8) ( σ , . . . , σ k +1 ) : each σ i is a start-small 123-avoider,lengths of the σ i ’s sum to n + k (cid:9) . For k = 0, naturally the bijection is π → ( π ), a singleton list, because, by Lemma 1, π isalready 123-avoiding. For 1 ≤ k ≤ n − k + 1 ≤ j ≤ n − A n,k,j = { π ∈ A n,k : the last mid-123 entry of π is in position j } . The result of the next Section extracts from a start-small { , } -avoider that does contain 123’s two { , } -avoiders, both start-small, the first with one fewer keymid-123 entries than the original and the second with no key mid-123 entries. Iterationthen gives the desired bijection φ . Proposition 3.
For ≤ k < j ≤ n − , there is a bijection A n,k,j → A j, k − × A n +1 − j, . Proof. Given π ∈ A n,k,j , we need to reversibly produce σ ∈ A j, k − and σ ∈ A n +1 − j, .Write π as τ bτ where b is the last mid-123 entry in π , and let abc be the 123 patternin π with smallest a ( c is uniquely determined by Lemma 2). Concatenate a and τ andstandardize (replace smallest entry by 1, next smallest by 2, and so on) to get the desired σ with no 123’s.Concatenate τ and c to get a { , } -avoider ρ —a candidate (after standard-ization) for σ . This ρ may need further processing because of two glitches: ρ may stillhave k key mid-123’s instead of the required k − ρ cannot end with its smallestentry (which must be possible in σ ). But these glitches cancel out.If b is a key mid-123 in π , then ρ has k − b has been lost. Inthis case, just standardize ρ to get σ . Otherwise, the last entry of τ exceeds b but is nota right-to-left max. Delete from ρ the longest terminal string of τ that is decreasing butdoes not contain a right-to-left max of π (equivalently, does not contain an entry > c );3 A (cid:56) (cid:60) (cid:45) avoider,last mid (cid:45) (cid:61)
6, is key
13 16 12 3 15 8 9 10 11 7 6 5 2 1 14 4 A (cid:56) (cid:60) (cid:45) avoider,last mid (cid:45) (cid:61)
5, is not key say r ≥ r to each remaining entry of ρ , append the entries r, r − , . . . , σ .For example, for π = 11 2 12 9 7 8 4 5 6 1 10 3, we find that the last mid-123, b = 6,is a key mid-123, and a = 2 , c = 10. So σ = standardize(2 1 10 3) = 2 1 4 3 and σ =standardize(11 2 12 9 7 8 4 5 10) = 8 1 9 6 4 5 2 3 7.As another example, for π = 13 16 12 3 15 8 9 10 11 7 6 5 2 1 14 4, we find that the lastmid-123, b = 5, is not key, and a = 3 , c = 14. So σ = standardize(3 2 1 14 4) = 3 2 1 5 4.Here, τ = 13 16 12 3 15 8 9 10 11 7 6 and the longest decreasing terminal string of τ that does not contain a right-to-left max of π has length r = 3. So σ = standardize(3 +(13 16 12 3 15 8 9 10 11 7 6 14) 3 2 1) = standardize(16 19 15 6 18 11 12 13 17 3 2 1) =9 12 8 4 11 5 6 7 10 3 2 1.The invertibility of this map rests on structural properties of { , } -avoidersevident in the matrix diagrams above: consider scanning the entries leftward from thelast mid-123 entry b . In case b is key, as long as these entries decrease, they decrease by1 (in square box at center of yellow region). In case b is not key, they increase by 1 untileither an entry > c , a decrease, or a jump > < c occurs. In the latter case,the “missing” entries in the jump occur in increasing order immediately to the left of thejump (again in square box at center of yellow region). In both cases, the gray regionsare empty except for the “ a ” and “ c ”, and the yellow square box is bisected by the maindiagonal.The preceding observations, all immediate consequences of the patterns 1243 and 21344eing proscribed and b being the last mid-123, validate the following description of theinverse map. For a permutation σ , we use σ [ j ] to denote the entry in position j and σ [ j, k ]to denote the list of entries occupying positions j through k .Suppose given a { , } -avoider σ and a 123-avoider σ and we wish to recapture π . We have n = length( σ ) + length( σ ) − j = length( σ ). Define the integer r by writing σ in the form µ, r, r − , . . . , , r maximal, where it is understoodthat µ is σ and r is 0 if σ does not end with 1. Set p = j − r , the length of µ , and q = length( σ ) −
1. The positions i and k of the “ a ” and “ c ” respectively in π are givenby i = position in µ of its minimum entry, and k = j − σ of its maximumentry. The values of “ a ” and “ c ” are recaptured as a = σ [1] and c = σ [ p ] + q . Define s to be the length of the longest increasing terminal string in σ [ i + 1 , p ].Now concatenate the strings σ [1 , p − s ] + q, σ [ p − s +1 , p −
1] + q − , n − j + r + s, σ [ p +1 , j ] + q, σ [2 , q +1] , where the next to last string is empty when p = j , equivalently, when r = 0.Finally, to obtain π from the resulting string, overwrite, with a and c respectively, theentries in the positions that a and c should occupy, namely, positions i and k .For instance, the second example above yielded σ = 9 12 8 4 11 ←− s −→ ←− r −→ , σ = 3 2 1 5 4 , and, to reverse the map, we find n = 16 , j = 12 , r = 3 , p = 9 , q = 4 , s = 4 , i = 4 , k =( j −
1) + 4 = 15 , a = σ [1] = 3 , c = σ [9] + 4 = 14. The strings to be concatenated are(9 12 8 4 11) + 4 , (5 6 7) + 3 , , (3 2 1) + 4 , (2 1 5 4) , yielding 13 16 12 8 15 8 9 10 11 7 6 5 2 1 5 4 , with entries in positions i = 4 and k = 15 crossed out. Replace them with a = 3 and c = 14, respectively, to recover π . A k -list is a list of length k . Recall that if A is a class (species) of combinatorial structureswith a n structures of size n ( n ≥ compositional A -structure of size n is one5btained by taking a composition ( n , n , . . . , n k ) of n and forming a k -list of A -structuresof respective sizes n , n , . . . , n k , then the counting sequence ( b n ) n ≥ for compositional A -structures has generating function B ( x ) := (cid:80) n ≥ b n x n given by1 + B ( x ) = 11 − A ( x ) , where A ( x ) is the generating function for A -structures. This is known as the INVERTtransform [5] but bearing the combinatorial interpretation in mind, it could as well becalled the Compositional transform. We will apply it to the class of (nonempty) start-small123-avoiders with size measured as “length minus 1” (note that there is no start-small123-avoider of length 1).With C ( x ) := −√ − x x denoting the generating function for the Catalan numbers C n ,which are well known to count Dyck paths of n upsteps, we compute[ x n ] C ( x ) = P, Q, R ) of Dyck paths with a total of n upsteps= n + 2 upsteps that start U U (cid:0) ( P, Q, R ) → U U P DQDR (cid:1) = n + 2] (via Krattenthaler’s bijection [6]) . Thus, [ x n ] x C ( x ) = [ x n − ] C ( x ) = n + 1]= n , and, using the Compositional transform, we have for n ≥ x n ] 11 − x C ( x ) = n = n (cid:88) k =1 k -lists of start-small 123-avoiders of total length n + k . Hence, for n ≥ x n ] x − x C ( x ) = n − (cid:88) k =1 k -lists of start-small 123-avoiders of total length n − k = { , } -avoiders of length n (via the bijection φ ) , from which it is immediate that the generating function for start-small { , } -avoiders (with x marking length) is G ( x ) = 1 + x − x C ( x ) − x . u n ) n ≥ = (1 , , , , . . . ) and ( v n ) n ≥ = (1 , , , , . . . ) denote the countingsequences for { , } -avoiders and start-small { , } -avoiders respectively.Clearly, v n = u n − u n − for n ≥
1, (consider deletion of the first entry from a { , } -avoider on [ n ] that starts n ). So the generating functions F ( x ) = (cid:80) n ≥ u n x n and G ( x ) = (cid:80) n ≥ v n x n are related by F ( x ) = G ( x ) / (1 − x ). Thus F ( x ) = G ( x )1 − x = 1 + x − x C ( x ) − x − x which, after expansion, agrees with Kotesovec’s formula.Losonczy [7] has counted permutations that avoid 3421, 4312 and 4321 or equivalently(by reversal) both of the patterns treated here and 1234. References [1] Enumerations of specific permutation classes, Wikipedia.[2] Vincent Vatter, Enumeration schemes for restricted permutations,
Combina-torics, Probability and Computing , Electronic J. Combinatorics , Issue 1 (2010), R29.[4] The On-Line Encyclopedia of Integer Sequences, published electronically athttp://oeis.org, 2013.[5] M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Al-gebra Applications, 226–228 (1995), 57–72; erratum 320 (2000), 210, available athttp://arxiv.org/abs/math/0205301[6] Christian Krattenthaler, Permutations with restricted patterns and Dyck paths,
Advances in Applied Mathematics Annals ofCombinatorics11