Avoiding consecutive patterns in permutations

  • Published on
    26-Jun-2016

  • View
    216

  • Download
    0

Transcript

<ul><li><p>Advances in Applied Mathematics 45 (2010) 449461</p><p>Contents lists available at ScienceDirect</p><p>A</p><p>Ra Db D</p><p>a</p><p>ArReAc</p><p>M050505</p><p>KePeCoEn</p><p>1.</p><p>coofcoex</p><p>lecoth</p><p>*dm</p><p>01doAdvances in Applied Mathematics</p><p>www.elsevier.com/locate/yaama</p><p>voiding consecutive patterns in permutations</p><p>.E.L. Aldred a, M.D. Atkinson b,, D.J. McCaughan a</p><p>epartment of Mathematics and Statistics, University of Otago, PO Box 56, Dunedin 9054, New Zealandepartment of Computer Science, University of Otago, PO Box 56, Dunedin 9054, New Zealand</p><p>r t i c l e i n f o a b s t r a c t</p><p>ticle history:ceived 18 November 2008cepted 25 March 2010</p><p>SC:A05A15A16</p><p>ywords:rmutationnsecutive patternumeration</p><p>The number of permutations that do not contain, as a factor(subword), a given set of permutations is studied. A newtreatment of the case = {12 k} is given and then somenumerical data is presented for sets consisting of permutationsof length at most 4. Some large sets of Wilf-equivalent permuta-tions are also given.</p><p> 2010 Elsevier Inc. All rights reserved.</p><p>Introduction</p><p>The notion of one permutation being contained in another permutation generally refers tohaving a subsequence that is order isomorphic to . In generalised pattern containment extranditions are stipulated relating to when terms of should be adjacent in . The extreme casethis, which we call consecutive pattern containment, is when we require all the terms of to bensecutive: so is consecutively contained in if has a factor that is order isomorphic to . Forample 521643 contains 132 because of the factor 164.A frequently studied problem in pattern containment is to enumerate the permutations of each</p><p>ngth that fail to contain (or avoid) one or more given patterns. In the case of consecutive patternntainment the rst systematic study of avoidance problems was by Elizalde and Noy [5]. To describeeir results and to present our own contribution we introduce some notation.</p><p>Corresponding author.E-mail addresses: raldred@maths.otago.ac.nz (R.E.L. Aldred), mike@cs.otago.ac.nz (M.D. Atkinson),mcaughan@maths.otago.ac.nz (D.J. McCaughan).</p><p>96-8858/$ see front matter 2010 Elsevier Inc. All rights reserved.</p><p>i:10.1016/j.aam.2010.03.005</p></li><li><p>450 R.E.L. Aldred et al. / Advances in Applied Mathematics 45 (2010) 449461</p><p>av</p><p>(wanrepefuinCa</p><p>an</p><p>re</p><p>biac</p><p>lemtwimsi</p><p>avinsobu</p><p>la</p><p>fo</p><p>exHtydaLet be a set of permutations. Dene Cav() as the set of all permutations that (consecutively)oid every permutation in . If is the set {1,2, . . .} we write this as Cav(1,2, . . .).To enumerate sets of this form it turns out that the exponential generating function</p><p>n</p><p>tnxn/n!</p><p>here tn is the number of permutations in the set of length n) is the natural tool and Elizalded Noy used it to obtain results on avoiding the increasing pattern k = 12 k (and less completesults for other patterns). Their approach was to consider the more general problem of countingrmutations with a specic number of occurrences of k , dene appropriate bivariate generatingnctions, set up differential equations satised by these functions, and solve these equations (at leastprinciple). In particular they found the explicit generating functions for the sets Cav(123) andv(1234) as</p><p>3</p><p>2</p><p>exp(y/2)</p><p>cos(3y/2+/6)</p><p>d</p><p>2</p><p>cos y sin y + exp(y)spectively.In Section 2 we shall give a new approach to enumerating Cav(k). Our method also requires</p><p>variate generating functions and (partial) differential equations but it enumerates the permutationscording to the value of their nal term.Elizalde and Noy [5] also began the study of sets Cav() where consists of permutations of</p><p>ngth 3. This was continued by Kitaev and Mansour [6,7]. This work resulted in fairly complete enu-eration results with the exceptions of the two sets Cav(312,132) and Cav(312,231). For the lattero sets we give enumerating recurrences in Section 3. We have used the recurrences to get approx-ations to certain limits and it is convenient here to contrast such limits with the correspondingtuation for classical pattern containment.For classical pattern containment one denes Av() to be the set of permutations that classicallyoid all the permutations of a given set . Given such a set let pn be the number of permutationsAv() of length n. Then the MarcusTardos theorem [8] is that, if is non-empty, pn kn forme k that depends only on . It is also known [2] that, when is a singleton set, lim n</p><p>pn exists</p><p>t it is a tantalising open problem to prove this in general.Elizalde [4] observed that, for consecutive pattern containment, the situation is similar. In particu-</p><p>r he proved that, if cn is the number of permutations of length n in Cav( ), then</p><p>cnn! k</p><p>n</p><p>r some constant k &lt; 1, and</p><p>lim n</p><p>cnn!</p><p>ists. It is obvious that the rst of these extends to any non-empty set of avoided permutations.owever, the second remains true also as is easily conrmed by checking Elizaldes proof. It is thispe of limit that we approximate in Section 3. In this section we also present some computational</p><p>ta for sets Cav( ) with | | = 4.</p></li><li><p>R.E.L. Aldred et al. / Advances in Applied Mathematics 45 (2010) 449461 451</p><p>ThTh2(getw</p><p>aann,acsoof(</p><p>2.</p><p>to</p><p>234</p><p>peth</p><p>pe</p><p>w</p><p>wOf the sets that are dened by avoiding permutations of length 3 two are particularly noteworthy.e rst is the set Cav(123,321) which consists of permutations which alternate in rises and descents.ey are clearly related to the alternating permutations of Andr [1] and their generating function issec x + tan x) x 1. The second is the set Cav(123,231,312) which in [7] is shown to have thenerating function 1 + x(sec x + tan x). In Section 4 we give a one-to-one correspondence betweeno subsets of these sets that explains the similarity in their generating functions.In the nal section we consider the more general question of counting permutations withprescribed number of consecutive patterns. Two sequences of permutations = (1, . . . , t)d = (1, . . . , t) are dened to be distributionally equivalent if, for all non-negative integersm1,m2, . . . ,mt , the number N(,n,m1, . . . ,mt) of permutations of length n that contain i ex-tly mi times is equal to the corresponding number N(,n,m1, . . . ,mt). Elizalde and Noy consideredme instances of this notion with t = 1. Of course N(,n,0, . . . ,0) is the number of permutationslength n in Cav(). We shall give a theorem that displays many distributionally equivalent pairs,).</p><p>Avoiding 123 k</p><p>In this section we consider permutations that avoid k = 12 k. Dene</p><p>U (t)na</p><p>be the set of permutations such that</p><p>1. avoids k ,. has length n 0,. the nal term of is a where 1 a n, and. ends in t rises where, necessarily, t k 2.</p><p>Put u(t)na = |U (t)na |.Permutations of U (0)na (which necessarily end in a descent) arise by appending a nal term a to armutation U (s)n1,b where b a and 0 s k 2 (increasing the terms of that are greateran or equal to a by 1). It follows that</p><p>u(0)na =</p><p>b: ba</p><p>(u(0)n1,b + u(1)n1,b + + u(k2)n1,b</p><p>)</p><p>On the other hand permutations of U (t)na that have t &gt; 0 arise by appending a nal term a to armutation U (t1)n1,b where b &lt; a. This gives</p><p>u(t)na =</p><p>b: b 0.We can rewrite these two equations without the summations over b as</p><p>u(0)na = u(0)n,a+1 + u(0)n1,a + u(1)n1,a + + u(k2)n1,a (1)u(t)na = u(t)n,a1 + u(t1)n1,a1 if t &gt; 0 (2)here appropriate initial conditions are</p></li><li><p>452 R.E.L. Aldred et al. / Advances in Applied Mathematics 45 (2010) 449461</p><p>W</p><p>W</p><p>N</p><p>aneq</p><p>an</p><p>Toteu(0)11 = 1u(0)nn = 0 if n 1u(t)n1 = 0 if t &gt; 0</p><p>e now make a change of variables and put</p><p>v(t)i j = u(t)i+ j+1,i+1ith these variables the equations and initial conditions become</p><p>v(0)00 = 1v(0)i0 = 0 if i 0v(t)0 j = 0 if t &gt; 0v(0)i j = v(0)i+1, j1 + v(0)i, j1 + v(1)i, j1 + + v(k2)i, j1v(t)i j = v(t)i1, j+1 + v(t)i1, j if t &gt; 0</p><p>ext we introduce the (exponential) generating functions</p><p>V (t)(x, y) =i, j</p><p>v(t)i jxi</p><p>i!y j</p><p>j!</p><p>d rewrite the recurrences as equations between the generating functions. This gives the differentialuations</p><p>V (0)</p><p> y= V</p><p>(0)</p><p>x+ V (0) + V (1) + + V (k2)</p><p>V (1)</p><p>x= V</p><p>(1)</p><p> y+ V (0)</p><p>V (2)</p><p>x= V</p><p>(2)</p><p> y+ V (1)</p><p> V (k2)</p><p>x= V</p><p>(k2)</p><p> y+ V (k3)</p><p>d the boundary value equations are</p><p>V (0)(x,0) = 1V (t)(0, y) = 0 for 1 t k 2</p><p>solve these equations we substitute w = (x+ y)/2, z = (x y)/2. The chain rule for differentiation</p><p>lls us that</p></li><li><p>R.E.L. Aldred et al. / Advances in Applied Mathematics 45 (2010) 449461 453</p><p>so</p><p>Th</p><p>w</p><p>wofw</p><p>fo</p><p>thV (t)</p><p>x= 1</p><p>2</p><p>(V (t)</p><p>w+ V</p><p>(t)</p><p>z</p><p>)</p><p>V (t)</p><p> y= 1</p><p>2</p><p>(V (t)</p><p>w V</p><p>(t)</p><p>z</p><p>)</p><p>we can reformulate the equations as:</p><p>V (0)</p><p>z= (V (0) + V (1) + + V (k2))</p><p>V (1)</p><p>z= V (0)</p><p>V (2)</p><p>z= V (1)</p><p> V (k2)</p><p>z= V (k3)</p><p>Now, by elimination, we get a (k 1)th order differential equation for V (k2)</p><p>k1i=0</p><p> i V (k2)</p><p>zi= 0</p><p>e solution of this equation is</p><p>V (k2) = A1 exp(1z) + A2 exp(2z) + + Ak1 exp(k1z)</p><p>here 1, . . . , k1 are the roots of</p><p>k1 + k2 + + 1 = 0</p><p>hich are the non-trivial kth roots of 1. Here A1, . . . , Ak1 are independent of z, and so are functionsw alone. The other variables V (k3), V (k4), . . . , V (0) may be found by successive differentiation</p><p>ith respect to z.To nd A1, . . . , Ak1 we use the boundary conditions. These show that A1, . . . , Ak1 satisfy the</p><p>llowing equations:</p><p>A1 exp(1w) + A2 exp(2w) + + Ak1 exp(k1w) = 0A11 exp(1w) + A22 exp(2w) + + Ak1k1 exp(k1w) = 0</p><p> A1</p><p>k31 exp(1w) + A2k32 exp(2w) + + Ak1k3k1 exp(k1w) = 0A1</p><p>k21 exp(1w) + A2k22 exp(2w) + + Ak1k2k1 exp(k1w) = 1</p><p>To solve these equations we regard the rst k 2 of them as homogeneous linear equations for</p><p>e quantities Ai exp(i w) and solve the system whose matrix is</p></li><li><p>454 R.E.L. Aldred et al. / Advances in Applied Mathematics 45 (2010) 449461</p><p>bywde</p><p>Th</p><p>Ifgi</p><p>H</p><p>Th</p><p>Thm</p><p>1 1 1 11 2 3 k121 </p><p>22 </p><p>23 2k1 </p><p>k31 k32 </p><p>k33 k3k1</p><p>the method of determinants. Let i denote the value of the determinant of the above matrixhen the ith column is removed, multiplied by a sign (+1 if i is odd, 1 if i is even). Because theterminant is of van der Monde type its value is, to within sign,</p><p>r</p></li><li><p>R.E.L. Aldred et al. / Advances in Applied Mathematics 45 (2010) 449461 455</p><p>enleus</p><p>2</p><p>eis</p><p>us</p><p>VVfo</p><p>an</p><p>frNow observe that v(0)0n = u(0)n+1,1 is by denition the number of permutations of length n + 1 thatd with the term 1. This however is the same as the total number of permutations in the set ofngth n. In particular, the generating function that enumerates Cav(k) is V (0)(0, y) and this is (againing k2i = 2i )</p><p>21 1 + 22 2 + + 2k1k121 exp(1 y)1 + 22 exp(2 y)2 + + 2k1 exp(k1 y)k1</p><p>Two instances of the use of this formula are</p><p>1. The generating function of Cav(123456) is</p><p>3</p><p>exp(x/2) cos(z +/3) + 3exp(x/2) cos(z +/6) + exp(x)</p><p>where z = 3x/2.. The generating function of Cav(12345678) is</p><p>4</p><p>exp(x) + cos(x) sin(x) + 2cos(z) cosh(z) 2cos(z) sinh(z) 2cosh(z) sin(z)</p><p>where z = 2x/2.</p><p>We conclude this section with two observations. The rst is that we can read off from the co-cients of V 0)(x, y) the number of permutations of length n that end in the term a. This number</p><p>k2t=0</p><p>u(t)na = u(0)n+1,a u(0)n+1,a+1 = v(0)a1,n+1a v(0)a,na</p><p>ing Eq. (2) above and the denition of v(0)i j .The second observation is about the connection between the one variable generating function</p><p>(0)(0, y) which enumerates the permutations that avoid k and the two variable generating function(0)(x, y). In fact, V (0)(x, y) can be obtained directly from V (0)(0, y). The reason is that, from thermulae above, V (0)(x, y) is a quotient of the form</p><p>V (0)(x, y) = h(x)h(x+ y)</p><p>d therefore</p><p>V (0)(0, y) = h(0)h(y)</p><p>om which we obtain</p><p>V (0)(x, y) = h(x) = (h(0)/V(0)(0, x))</p><p>(0)= V</p><p>(0)(0, x+ y)(0)h(x+ y) (h(0)/V (0, x+ y)) V (0, x)</p></li><li><p>456 R.E.L. Aldred et al. / Advances in Applied Mathematics 45 (2010) 449461</p><p>3.</p><p>nuthpethof</p><p>fodosicoex</p><p>mWeq</p><p>3.</p><p>anen</p><p>ph</p><p>ac</p><p>te</p><p>ThRecurrences and limits</p><p>In this section we nd approximations for various limits of the form lim ntn/n! where tn is the</p><p>mber of permutations in various pattern avoidance sets. This is done by nding recurrence relationsat allow us to compute tn for values of n far beyond what could be achieved by generating thermutations in the set directly. The method we use has appeared in the pattern literature before bute only general description of it that we have been able to nd is the brief hint in the nal section[3]. We then estimate the growth rate by calculating</p><p>tnntn1</p><p>r large values of n. We give our approximations to a large number of decimal places. Although wenot have a proof that all these places are correct we do have a high degree of condence in them</p><p>nce convergence to the approximation has happened well before the highest value of n that we havemputed. We also note that the apparent rapid convergence to the limit is in marked contrast to ourperience in computing the analogous limits for classical pattern avoidance problems.We begin by considering Cav(312,132) and Cav(312,231). In both cases we enumerate the per-</p><p>utations according to the values of their nal two terms a,b and we distinguish a &lt; b from a &gt; b.e then go on to consider Cav( ) with | | = 4. Our results indicate that there are no unexpectedualities in the values of these limits.</p><p>1. Avoiding 312 and 132</p><p>Let unab be the number of permutations of length n in Cav(312,132) that end with a rising abd dnab the number that end with a descending ab. A permutation of length n in Cav(312,132) thatds with ab arises by appending b to one of length n 1 (with appropriate renumbering of terms).If a &lt; b we have to ensure that the nal three terms cab of this new permutation are not isomor-ic to 312. If c &lt; a this is already assured but if c &gt; a we need also c &lt; b. This gives</p><p>unab =c: c</p></li><li><p>R.E.L. Aldred et al. / Advances in Applied Mathematics 45 (2010) 449461 457</p><p>TaCa</p><p>TaCa</p><p>3.</p><p>th</p><p>w</p><p>3.</p><p>co12Fofotalimcoson</p><p>4.</p><p>31Caable 1v(312,132).</p><p>n 1 2 3 4 5 6 7 8 9 10</p><p>tn 1 2 4 10 30 108 454 2186 11840 71254</p><p>ble 2v(312,231).</p><p>n 1 2 3 4 5 6 7 8 9 10</p><p>tn 1 2 4 11 37 149 705 3814 23199 156940</p><p>2. Avoiding 312 and 231</p><p>Again we dene unab to be the number of such permutations that end with a rising ab and dnabe number that end with a descending ab. Arguing as before leads to</p><p>unab =</p><p>c: c</p></li><li><p>458 R.E.L. Aldred et al. / Advances in Applied Mathematics 45 (2010) 449461</p><p>TaCa</p><p>LeCa</p><p>Pr</p><p>w</p><p>anthpe</p><p>thth</p><p>pr</p><p>peanpepatois</p><p>Lenble 3v( ) with | | = 4.n 1 2 3 4 5 6 7 8 9 10</p><p>2413 1 2 6 23 110 632 4237 32465 279828 26799502143 1 2 6 23 110 631 4223 32301 277962 26577971324 1 2 6 23 110 632 4229 32337 278204 26592231423 1 2 6 23 110 631 4218 32221 276896 2643883</p><p>Table 4Approximate limits.</p><p> lim ntn</p><p>1234 0.9630052413 0.9577182143 0.9561741324 0.9558501423 0.9548261342 0.9546111243 0.952891</p><p>mma 1. The number of permutations that begin with the term 1 in both Cav(123,231,312) andv(123,321) is En1 , the (n 1)th Euler number.</p><p>oof. Since</p><p>sec x+ tan x =n=0</p><p>Enxn/n!</p><p>e have</p><p>1+ x(sec x+ tan x) =n=0</p><p>nEn1xn/n!</p><p>d so there are nEn1 permutations of degree n in Cav(123,231,312). However, as noted in [7],is set is invariant under the operation of adding 1 modulo n to each term; so there are En1rmutations that begin with 1.The set Cav(123,321) consists of permutations whose ascents and descents alternate. Therefore</p><p>e permutations of length n in the set that begin with 1 continue with a...</p></li></ul>