An assortment of problems in permutation patterns: unimodality, equivalence, derangements, and sorting
We collect open problems in permutation patterns on four themes: rank-unimodality in the permutation pattern poset, Wilf-equivalence and shape-Wilf-equivalence, the enumeration of derangements in permutation classes, and sorting by stacks in series, …
Authors: ** - **Christian Bean** (University of St Andrews) – 워크숍 조직자이자 퍼뮤테이션 패턴 커뮤니티의 활발한 활동가. - **Ruth Hoffmann** (University of St Andrews) – 퍼뮤테이션 패턴 연구 및 교육에 기여. - **(본 논문 저자)** – 2025 Permutation Patterns 컨퍼런스 사전 워크숍 발표자, 현재는 퍼뮤테이션 패턴 분야의 초기 연구자들을 위한 오픈 문제 수집 및 정리를 담당. **
An Assor tment of Pr oblems in Permut a tion P a tterns: Unimod ality, Equiv alence, Derangements, and Sor ting Vincen t V atter ∗ F ebruary 19, 2026 W e collect open problems in p erm utation patterns on four themes: rank- unimo dalit y in the permutation pattern poset, Wilf-equiv alence and shap e-Wilf-equiv alence, the enumeration of derangemen ts in p erm uta- tion classes, and sorting b y stacks in series, generalized stac ks, and re- stricted con tainers ( C -machines). 1. Intr oduction This pap er accompanies a talk I gav e at the pre-conference workshop for early career researchers at Permutation Patterns 2025 , the 23rd year of the conference series, held at the Universit y of St Andrews and organized by Christian Bean and Ruth Hoffmann. It is not a list of the b est-kno wn or most difficult op en problems in p erm utation patterns, but simply an assortment of problems on a few themes: problems I hav e encountered, wondered ab out, or b een asked ab out. Many are of the “someone really ought to... ” v ariety . A few are folklore, and some may be trivial. This is not mean t as a roadmap for the field; describing what I feel are the deep est or most imp ortan t op en problems would require a different approach and considerably more buildup. Think of this instead as a collection of interesting attractions that do not tak e to o long to reach. The b est-kno wn op en problem in the field is surely the enumeration of 1324 -av oiding p erm utations. This one is easy to reach, but man y ha ve lo ok ed and progress has b een hard to come b y . Ask ed wh y , Zeilb erger replied, “Because life is har d . The few com binatorial ob jects that we can count exactly are the trivial ones” [57] (emphasis in original). There are, in any case, plent y of places to read more ab out this conundrum [14, 15, 21, 22, 32–34, 48, 60]. W e ha ve nothing new to add ab out this problem, and so turn to areas that seem more tractable, or at least where we hav e less evidence of in tractability . The primary ven ue for results in p erm utation patterns, and for the exchange of op en problems, has b een the Permutation Patterns conference series, founded in 2003 by Mic hael Alb ert and Michael A tkinson at the Universit y of Otago in Dunedin, New Zealand. A tkinson, who in tro duced Alb ert ∗ Department of Mathematics, Universit y of Florida, Gainesville, Florida, USA. 1 An Assor tment of Problems in Permut a tion P a tterns 2 to the sub ject [58], drew man y of the field’s curren t researc hers in to p erm utation patterns; his retiremen t was honored at Permutation Patterns 2013 . Alb ert and Atkinson, and the conference series they founded, ha ve shap ed the research agenda considerably , and the conference’s tradition of op en problems sessions has b een particularly influential. F or his part, Alb ert became a central figure in p erm utation patterns, known for his computational and collab orativ e approach to the sub ject, and retired in 2024. In this spirit, many of the problems here b eg for computation, either because data is the goal, or just to b etter illuminate the path forward. There are earlier collections of open problems that the reader may also find v aluable. Wilf, widely regarded as a founder of the field and the plenary sp eak er at the inaugural Permutation Patterns conference in 2003, wrote a survey in 1999 [89] at an early stage in its developmen t; I particularly enjo yed reading it as a graduate studen t. In that surv ey , Wilf expressed doubt ab out the Stanley– Wilf conjecture due to recent results of Alon and F riedgut [3]; his doubt was prov ed wrong a few y ears later when Marcus and T ardos [59] pro ved it. Wilf also recounted Stanley’s skepticism ab out the No onan–Zeilb erger conjecture [63] that every finitely based p erm utation class has a D-finite generating function; that skepticism was vindicated many years later when Garrabrant and P ak [43] dispro ved the conjecture. Another v aluable resource is Steingrímsson’s 2013 survey [80], which cov ers a broad range of topics, including the Möbius function of the p erm utation pattern p oset, top ological prop erties of in terv als, vincular and mesh patterns, and the structure of growth rates. Steingrímsson is himself a leader in the field who has trained many of its current researchers; he delivered the plenary address at Permutation Patterns 2009 . F or readers seeking broader introductions to p ermutation patterns, several general references are a v ailable. Kitaev’s Patterns in Permutations and W or ds [50] is a comprehensive comp endium of the field. Bóna’s undergraduate textbo ok A W alk Thr ough Combinatorics [23] contains a very accessible introduction to the area, while his monograph Combinatorics of Permutations [24] treats the sub ject in greater depth. Finally , I can’t help but recommend my own survey [85] that app ears in the Handb o ok of Enumer ative Combinatorics . The remainder of the pap er is organized as follo ws. Section 2 concerns rank-unimo dalit y of in terv als in the permutation pattern poset. Section 3 discusses symmetries and Wilf-equiv alence. Section 4 addresses the en umeration of derangements in p erm utation classes. Section 5 lo oks at sorting ma- c hines. Below, we collect the basic definitions and offer some remarks on p erm utations as relational structures. Basic definitions The basic notions of permutation patterns are easily stated. With ap ologies to those who view p erm utations as elements of a Coxeter group (T enner [83]), we use the term length to mean the n umber of entries in a p erm utation, whic h w e denote by | π | . W e iden tify a p erm utation π with its plot : the set of p oin ts { ( i, π ( i )) } in the plane. When we sp eak of an entry b eing to the left or right of, or ab o ve or b elo w, another en try , we refer to their relative p ositions in the plot. Similarly , an en try lies to the southe ast of another if it is b oth to the right and below, and so on for the other cardinal directions. A p erm utation σ is c ontaine d in π , written σ ≤ π , if π has a subsequence that is or der-isomorphic to σ , meaning its entries app ear in the same relative order; otherwise π avoids σ . In terms of plots, An Assor tment of Problems in Permut a tion P a tterns 3 ∼ ≤ Figur e 1: The p erm utation σ = 32514 (left) is contained in π = 362957184 (right). The circled entries in π form the subsequence 32918 , which is order-isomorphic to σ . The p erm utation π av oids 4321 b ecause it has no decreasing subsequence of length four. σ ≤ π means that some selection of p oin ts from the plot of π , when rescaled, yields the plot of σ . Figure 1 illustrates these definitions. This containmen t relation is a partial order, and we refer to it as the p ermutation p attern or der . A p ermutation class is a downset (or order ideal) in this p oset: a set C of p erm utations such that if π ∈ C and σ ≤ π , then σ ∈ C . W e denote by C n the set of permutations of length n in a class C . Ev ery p erm utation class C is characterized b y its b asis , the set of minimal p erm utations not in C . W e write A v( B ) for the class of p ermutations av oiding ev ery elemen t of B . The basis of a class is necessarily an antichain (a set of pairwise incomparable p erm utations), and since the permutation pattern order contains infinite antic hains, bases can b e infinite. P ermutations as relational structures The study of p erm utation patterns fits naturally into the broader combinatorics of relational struc- tures. In terms of the plot, a p erm utation is a set of n p oin ts equipp ed with t wo total orders: the left-to-righ t order (b y x -co ordinate) and the b ottom-to-top order (by y -co ordinate). As Cameron [28] observ es, this p erspective clarifies what it means for one p erm utation to b e con tained in another: con tainment is simply the induced substructure relation, the same notion studied in the context of graphs (induced subgraphs), p osets (induced subp osets), integer partitions (Y oung’s lattice), and other combinatorial ob jects. This point of view will b e relev ant in the next section, where we compare uni mo dalit y results for p erm utations with analogous results for partitions and w ords. In most of those cases, the con tainment order is the natural one for relational structures of that type, and the questions (and answ ers) turn out to be surprisingly different. 2. Unimod ality W e b egin with what is p erhaps the easiest of these problems to state, though it may well be among the hardest to prov e. A finite sequence a 0 , a 1 , . . . , a n is said to b e unimo dal if there exists an index k suc h that a 0 ≤ a 1 ≤ · · · ≤ a k ≥ · · · ≥ a n ; that is, the sequence w eakly increases to its maximum and then weakly decreases. A p olynomial is said to be unimo dal if its sequence of co efficients is unimo dal. There are scores of unresolved uni- mo dalit y questions in combinatorics and algebra; for a sample, the reader is referred to Stanley’s 1986 surv ey [78], many of whose conjectures remain open. An Assor tment of Problems in Permut a tion P a tterns 4 Giv en a p erm utation π of length n , let a k denote the num b er of p erm utations of length k contained in π . Is the sequence a 0 , a 1 , . . . , a n necessarily unimodal? T o state this in a more refined form, we recall a few definitions. The set of all p erm utations contained in a given p erm utation π forms, under the con tainment order, a princip al downset (also called a princip al or der ide al ). This is a ranked p oset, with the rank of a p erm utation given by its length. A ranked p oset is said to b e r ank-unimo dal if the sequence counting the num b er of elements at eac h rank is unimo dal. Conjecture 2.1. Every princip al downset in the p ermutation p attern p oset is r ank-unimo dal. This phenomenon may hav e first b een noted in the p erm utation pattern context b y Murphy , who wrote at the end of his 2002 thesis [62, p. 348], emphasis added: There exists a program that takes a permutation of arbitrary length (usually ab out 24) and returns the set of all p erm utations inv olv ed in it, sorted by length. This is a simple but somewhat expensive wa y of finding the basis of the closure of a given permutation or set of p erm utations. The nic est thing ab out the pr o gr am is the waiste d shap e of the output. Here is the num ber of p erm utations of each length in one p ermutation of length 17: 1 , 1 , 2 , 5 , 14 , 36 , 87 , 210 , 486 , 927 , 1315 , 1348 , 1005 , 549 , 218 , 61 , 11 , 1 . W e may go further and ask whether all interv als in this p oset are rank-unimo dal. The interval [ σ, π ] is the set of all permutations τ satisfying σ ≤ τ ≤ π . It was in this generalit y that McNamara and Steingrímsson p osed the following conjecture, whic h subsumes Conjecture 2.1. Conjecture 2.2 (McNamara and Steingrímsson [61, Conjecture 9.4]) . Every interval in the p ermu- tation p attern p oset is r ank-unimo dal. Analogous structures Before surv eying what is known for the p erm utation pattern p oset, we briefly consider analogous questions for other com binatorial structures. The picture that emerges is mixed: rank-unimo dalit y holds in some settings but fails in others, which lea ves the p erm utation case genuinely uncertain. In the c onse cutive pattern p oset on p erm utations, rank-unimo dalit y of in terv als w as established by Elizalde and McNamara [39]. Ho wev er, their proof relies on the particularly constrained nature of consecutiv e con tainment (every p erm utation cov ers at most t wo others in this order) and do es not app ear to shed light on the standard (not-necessarily-consecutive) p erm utation pattern order. F or integer partitions, the situation is m urkier. The c ontainment or der on partitions is defined b y µ ≤ λ if the F errers diagram of µ fits inside that of λ ; equiv alen tly , if µ i ≤ λ i for all i , padding with zeros as needed. This order makes the set of all partitions into a distributive lattice, called Y oung’s lattic e . The principal downset generated by the m × n rectangular partition ( m, m, . . . , m ) consisting of n parts each equal to m is denoted by L ( m, n ) , and its rank-generating function is a Gaussian p olynomial. Gaussian polynomials ha v e b een known to b e unimo dal since the mid- nineteen th century , although a com binatorial pro of was not given until O’Hara [64] in 1990, later exp osited colorfully by Zeilb erger [90]. One migh t hop e that all principal do wnsets in Y oung’s lattice are rank-unimo dal. Indeed, in 1986 P ouzet and Rosen berg [65, p. 367] asked something far more general: are principal downsets in the An Assor tment of Problems in Permut a tion P a tterns 5 natural ordering on any type of finite relational structures rank-unimo dal? This was answered in the negative only a y ear later by Stanton [79], who exhibited a non-unimodal principal do wnset in Y oung’s lattice. The partition (8 , 8 , 4 , 4) has rank sequence 1 , 1 , 2 , 3 , 5 , 6 , 9 , 11 , 15 , 17 , 21 , 23 , 27 , 28 , 31 , 30 , 31 , 27 , 24 , 18 , 14 , 8 , 5 , 2 , 1 . Stan ton’s coun terexample for in teger partitions also precludes any thoughts of a graph analogue of Conjecture 2.1, b ecause it sho ws that the en umeration of induced subgraphs of the graph K 8 ∪ K 8 ∪ K 4 ∪ K 4 is not unimo dal. Although the answer to their question was negative, Pouzet and Rosenberg [65, Corollary 2.11] did establish what migh t be called the “first half ” of rank-unimo dalit y: in an y principal downset of a finite relational structure, the rank sequence is weakly increasing up to at least the middle rank. Com bined with the symmetry of Y oung’s lattice, this giv es another pro of of the unimo dalit y of the Gaussian p olynomials. Specialized to p erm utations, it guaran tees that the rank sequence of any principal downset in the p erm utation pattern p oset increases up to at least half its length. W ords ov er a finite alphab et under the sub w ord order are m uch b etter b eha v ed. Chase [29] prov ed that principal downsets are not merely rank-unimo dal but rank-log-concav e, a stronger prop ert y we no w define. Log-conca vity A sequence a 0 , a 1 , . . . , a n of nonnegative terms is said to b e lo g-c onc ave if a 2 k ≥ a k − 1 a k +1 for all 1 ≤ k ≤ n − 1 , and a p olynomial p ( x ) = a 0 + a 1 x + · · · + a n x n is lo g-c onc ave if its sequence of co ef- ficien ts is log-conca ve. Log-concavit y implies unimodality b ecause it sho ws that the ratios a k /a k − 1 are weakly decreasing, so once this ratio drops b elo w 1 , it remains b elo w 1 . W e cannot hop e for log-concavit y in the p ermutation pattern p oset. The rank sequence of ev ery non trivial downset begins 1 , 1 , 2 , . . . , but 1 2 < 1 · 2 so these sequences are not log-conca ve. Even ig- noring the empty p erm utation, sequences b eginning 1 , 2 , 5 or 1 , 2 , 6 (both common) fail log-concavit y b ecause 2 2 < 1 · 5 . Nev ertheless, log-concavit y can pla y a key role in establishing unimo dalit y , via the follo wing classical result due to Ibragimov [46] and Keilson and Gerb er [49]. 1 Prop osition 2.3. A p olynomial p ( x ) with p ositive c o efficients is lo g-c onc ave if and only if p ( x ) q ( x ) is unimo dal for every unimo dal p olynomial q ( x ) . La yered permutations and comp ositions One might hop e that the conjecture is at least resolv ed for lay ered p erm utations, a particularly tractable p erm utation class. W e briefly recall their definition. The dir e ct sum , or simply sum , of p erm utations π of length m and σ of length n is the p erm utation π ⊕ σ of length m + n defined by ( π ⊕ σ )( i ) = ( π ( i ) for 1 ≤ i ≤ m, σ ( i − m ) + m for m + 1 ≤ i ≤ m + n. 1 It should be remarked that the pro duct of tw o unimodal p olynomials is not necessarily unimodal. F or example, 1 + x + 3 x 2 is unimo dal but (1 + x + 3 x 2 ) 2 = 1 + 2 x + 7 x 2 + 6 x 3 + 9 x 4 is not. An Assor tment of Problems in Permut a tion P a tterns 6 Visually , the plot of π ⊕ σ places the plot of σ ab o ve and to the right of the plot of π . The op eration is asso ciativ e, so expressions like π ⊕ σ ⊕ τ do not require parentheses. A p erm utation is layer e d if it can b e expressed as a sum of decreasing p erm utations; equiv alently , the la yered p erm utations are precisely A v (231 , 312) . Every lay ered p erm utation has a unique decomp o- sition π = δ 1 ⊕ δ 2 ⊕ · · · ⊕ δ k where each δ i is a decreasing p erm utation, and so lay ered p erm utations are in bijection with comp ositions: the composition c = c (1) c (2) · · · c ( k ) corresp onds to the lay ered p erm utation with consecutive decreasing lay ers of lengths c (1) , c (2) , . . . , c ( k ) . F or example, the comp osition (3 , 1 , 4) corresp onds to the lay ered p erm utation 321 ⊕ 1 ⊕ 4321 = 321 4 8765 . Under this bijection, the pattern containmen t order on la yered p erm utations corresp onds to the (generalized) subwor d or der on comp ositions. Concretely , a comp osition u = u (1) · · · u ( k ) with k parts is a subw ord of a comp osition w with ℓ parts if there exist indices 1 ≤ i 1 < i 2 < · · · < i k ≤ ℓ suc h that u ( j ) ≤ w ( i j ) for all 1 ≤ j ≤ k . Thus π ≤ σ in the p erm utation pattern order on la y ered p erm utations if and only if the corresp onding comp ositions satisfy u ≤ w in the sub w ord order. Sagan [70] established unimo dalit y for principal downsets of comp ositions, which migh t seem to settle the lay ered p erm utation case. How ev er, there is a catch: the or der Sagan c onsiders is not the subwor d or der . In Sagan’s c omp onentwise or der , a comp osition u = u (1) · · · u ( k ) is con tained in w = w (1) · · · w ( ℓ ) if k ≤ ℓ and u ( i ) ≤ w ( i ) for all 1 ≤ i ≤ k . This is a natural analogue of Y oung’s lattice, ordering comp ositions by comp onen twise comparison of their parts. But it is not the subw ord order, whic h corresp onds to the p erm utation pattern order on lay ered p erm utations and has b een more commonly studied (see, for example, Bergeron, Bousquet-Mélou, and Dulucq [13] and Sagan and V atter [71]). The difference is that in the sub word order, embeddings need not align initial en tries. F or instance, the comp osition (2) is not contained in (1 , 2) under the comp onen t wise order, yet the corresp onding la yered p erm utations satisfy 21 ≤ 1 32 in the p erm utation pattern order. Sagan’s main result is the following. The pro of is short and instructive. Theorem 2.4 (Sagan [70, Theorem 3.3]) . The princip al downset of any c omp osition is r ank- unimo dal under the c omp onentwise or der. Pr o of. Let f w ( x ) denote the rank-generating p olynomial for the principal downset of the comp osition w = w (1) · · · w ( ℓ ) in the comp onen t wise order. If u = u (1) · · · u ( k ) is con tained in w , then either u is empty , or u (1) ≤ w (1) and u (2) · · · u ( k ) ≤ w (2) · · · w ( ℓ ) . This yields the recurrence f w ( x ) = 1 + x + x 2 + · · · + x w (1) f w (2) ··· w ( ℓ ) ( x ) , with f ε ( x ) = 1 for the empty comp osition. W e pro ceed by induction on the num ber of parts of w . The base case f ε ( x ) = 1 is trivially unimo dal. F or the inductive step, the p olynomial x + x 2 + · · · + x w (1) is log-concav e, so by Prop osition 2.3, its pro duct with the (inductiv ely) unimo dal p olynomial f w (2) ··· w ( ℓ ) ( x ) is unimodal. Since the coefficient of x in this pro duct equals 1 , adding the constant term 1 preserves unimo dalit y . Although the comp onen twise and subw ord orders are different, for comp ositions with weakly de- creasing part sizes, the principal downsets under the tw o orders ha ve the same rank sequences. T o see this, observe that if w = w (1) · · · w ( ℓ ) is weakly decreasing, then an y embedding of u into w in the sub w ord order can b e shifted left to pro duce an embedding in the comp onen t wise order. Thus An Assor tment of Problems in Permut a tion P a tterns 7 π r = π ◦ ρ π − 1 π c = ρ ◦ π ( π rc ) − 1 = ρ ◦ π − 1 ◦ ρ ( π r ) − 1 π rc ( π c ) − 1 Figur e 2: The symmetries of the square, lab elled by their effect on a p ermutation π . the set of comp ositions con tained in w is the same under both orders, even though the order rela- tions among them ma y differ, and so the principal downsets of compositions with weakly decreasing parts are rank-unimo dal b y Sagan’s Theorem 2.4. By symmetry (reversing the compositions), the unimo dalit y also holds when w is weakly increasing. Corollary 2.5. The princip al downset of a c omp osition with monotone p arts is r ank-unimo dal in the subwor d or der. Henc e, the princip al downset of the c orr esp onding layer e d p ermutation is r ank- unimo dal. In particular, this cov ers the case of “rectangular” comp ositions ( ℓ, ℓ, . . . , ℓ ) , which w as the original question the author asked Sagan about at Permutation Patterns 2007 . The general case, even for la yered p erm utations, remains op en. Conjecture 2.6. The princip al downset of every c omp osition is r ank-unimo dal in the subwor d or der. Henc e, the princip al downset of every layer e d p ermutation is r ank-unimo dal. Alb ert and the author ha ve verified this conjecture for all comp ositions of length 34 or less. This is of course a sp ecial case of Conjecture 2.1, whic h is itself a sp ecial case of Conjecture 2.2. 3. Equiv alence The p erm utation pattern order has a natural symmetry group, the dihedral group D 4 of order eigh t, visualized in Figure 2 as symmetries of the square. These symmetries act on the plots of p erm u- tations, and in the p erm utation patterns literature the group is commonly describ ed as generated b y three reflections: rev erse π 7→ π r (reflection ab out the vertical axis), complement π 7→ π c (re- flection ab out the horizontal axis), and in verse π 7→ π − 1 (reflection ab out the main diagonal). The standard presentation of dihedral groups instead uses one reflection and one rotation; here, this An Assor tment of Problems in Permut a tion P a tterns 8 1 2 3 4 5 6 7 symmetry classes A000903 1 1 2 7 23 115 694 Wilf-equiv. classes A099952 1 1 1 3 16 91 595 T able 1: The num b er of symmetry classes and Wilf-equiv alence classes for 1 ≤ n ≤ 7 . w ould b e any one of the four reflections together with the 90 ◦ rotation π 7→ ( π c ) − 1 or the 270 ◦ rotation π 7→ ( π r ) − 1 . As indicated b y Figure 2, comp osing t wo reflections yields a rotation, while comp osing three reflections yields another reflection. These symmetries partition the p erm utations of each length into symmetry classes : p erm utations π and σ lie in the same symmetry class if σ = Φ( π ) for some symmetry Φ . Since symmetries are automorphisms of the p erm utation pattern order, any enumerativ e question ab out π -av oiding p er- m utations is equiv alent to the corresp onding question ab out Φ( π ) -a voiding p erm utations. (This applies only when counting all p erm utations, how ev er; when we imp ose additional constraints, such as counting derangements in the next section, we lose symmetries.) It can b e useful to adopt a group-theoretic persp ectiv e. F or p erm utations of length n , let ρ = n ( n − 1) · · · 21 = id r = id c . Then complemen t is left multiplication by ρ , π c = ρ ◦ π , while reverse is right multiplication by ρ , π r = π ◦ ρ . Since ρ is an in volution, identiti es among the symmetries become straigh tforw ard calculations. F or example, ( π r ) − 1 = ( π ◦ ρ ) − 1 = ρ − 1 ◦ π − 1 = ρ ◦ π − 1 = ( π − 1 ) c . T w o p erm utations can hav e equinumerous av oidance classes without b eing symmetries of each other. The classical example is that b oth A v(231) and A v(321) are counted by the Catalan num bers, yet 231 and 321 lie in different symmetry classes. This motiv ated Wilf to ask, in the 1980s, for a classification of when av oiding one p erm utation is equally restrictive as av oiding another. 2 W e say that π and σ are Wilf-e quivalent , written π ∼ σ , if | A v n ( π ) | = | A v n ( σ ) | for all n . Symmetry implies Wilf-equiv alence, but as the example 231 ∼ 321 sho ws, the conv erse do es not hold. Before discussing Wilf-equiv alence further, w e pause to note that while counting symmetry classes turns out to be straightforw ard, this was not alwa ys appreciated. In his Nov em b er 1962 Scientific A meric an column, Gardner [42] describ ed the problem of counting “essentially differen t” placements of n non-attac king ro oks on an n × n chessboard (equiv alent to counting symmetry classes of p er- m utations of length n ), writing that “the task of eliminating rotation and reflection duplicates is so difficult that it is not known how man y essen tially different solutions exist even on as low-order a b oard as the 8 × 8 . ” In fact, this is a routine application of P ólya theory , and moreov er, Lucas had already solved the problem in his 1891 b ook Thé orie des Nombr es [56, pp. 220–222], w ell b efore P ólya. 3 Wilf-equiv alence is harder than this. If π ∼ σ , then π and σ must hav e the same length. The p erm utations of lengths 1 , 2 , and 3 each form a single Wilf-equiv alence class. F or length 4 , there are 2 Wilf never raised this question in print, but Babson and W est [10] and Stanley [31, p. 357] b oth state that he posed it in the 1980s. 3 F or a similar problem that is actually difficult, consider the n -que ens pr oblem , which asks to count symmetry classes of non-attac king placemen ts of n queens on an n × n board. Unlik e the ro oks problem, there is no simple formula: the sequence of solutions (A000170) b egins 1 , 0 , 0 , 2 , 10 , 4 , 40 , 92 , 352 , . . . , and the current record, n = 27 , required a year-long massively parallel computation [67]. W e refer to the survey of Bell and Stev ens [12]. An Assor tment of Problems in Permut a tion P a tterns 9 − − → − − → BS − − → − − → − − → Figur e 3: The pro of of Prop osition 3.2 with α = 231 , β = 312 , and γ = 21 . The shaded region is the shadow cast by copies of 21 . The bijection lab eled BS is due to Blo om and Saracino [19]. 7 symmetry classes but only 3 Wilf-equiv alence classes; establishing that there are exactly 3 required considerable work, completed by Stank ov a [75] in 1996. In their 2002 pap er, Stanko v a and W est [77] extended the classification to length 7 . These v alues are display ed in T able 1. The enumeration of Wilf-equiv alence classes has remained stuc k here since 2002. Question 3.1. How many Wilf-e quivalenc e classes of p ermutations of length 8 ar e ther e? A first step tow ard extending this to length 8 would b e to compute | A v n ( β ) | for each β of length 8 and sufficiently large n to separate the symmetry classes into candidate Wilf-equiv alence classes, then to chec k which apparen t equiv alences are already explained b y known results. Perhaps existing theorems suffice, or p erhaps there are new Wilf-equiv alences waiting to b e discov ered. Sufficien t conditions: shap e-Wilf-equiv alence Most known Wilf-equiv alences can b e explained by a stronger notion of equiv alence. A ful l r o ok plac ement (or frp ) of shap e λ is a F errers b oard of shap e λ with one ro ok in eac h row and column. Ev ery p erm utation π of length n corresp onds to the n × n square frp with ro oks in p ositions ( i, π ( i )) ; this is simply the plot of π with grid lines added. There is a natural con tainmen t order on frps: R is contained in S if R can b e obtained from S by deleting ro ws and columns. Restricted to square frps, this coincides with the pattern order on p erm utations. W e sa y that an frp c ontains a permutation σ if it contains the square frp corresponding to σ , and otherwise that it avoids σ . Note that the entire square m ust fit within the frp; for instance, an frp whose ro oks happ en to form a 21 -pattern migh t still av oid 21 if the top-right corner do esn’t fit inside the F errers b oard. A general frp can b e visualized as a plot enclosed by a staircase b oundary (a Dyck path). P ermutations β and γ are shap e-Wilf-e quivalent if, for every F errers shap e λ , the n um b er of β -av oiding frps of shap e λ equals the num ber of γ -av oiding frps of shap e λ . Shap e-Wilf-equiv alence implies Wilf-equiv alence (by restricting to square shap es), but is strictly stronger. The p o wer of shap e-Wilf-equiv alence comes from a closure prop ert y first observed b y Babson and W est [10] (implicit in the pro ofs of their Theorems 1.6 and 1.9) and made explicit by Bac kelin, W est, and Xin [11, Prop osition 2.3]. Prop osition 3.2. If α and β ar e shap e-Wilf-e quivalent, then α ⊕ γ and β ⊕ γ ar e shap e-Wilf- e quivalent for every p ermutation γ . The idea is simple and illustrated in Figure 3. Giv en an α ⊕ γ -av oiding frp, consider the shadow cast b y copies of γ : the cells lying southw est of every copy of γ contained in the frp (where, as alwa ys, a An Assor tment of Problems in Permut a tion P a tterns 10 cop y of γ means the full square frp corresp onding to γ , not merely ro oks forming a γ -pattern). This shado w forms a F errers b oard (shown shaded), and the ro oks within it, after remo ving empty rows and columns, form an α -a voiding frp. W e then apply whatever bijection witnesses the shap e-Wilf- equiv alence of α and β to obtain a β -av oiding frp of the same shap e. Restoring the empty ro ws and columns and replacing the p ortion of the frp outside the shado w yields a β ⊕ γ -av oiding frp of the original shap e. F rom one shap e-Wilf-equiv alence, Prop osition 3.2 generates infinitely many others. In fact, only tw o basic shap e-Wilf-equiv alences are known. Theorem 3.3 (Back elin, W est, and Xin [11, Theorem 2.1]) . F or every k ≥ 1 , the p ermutations k ( k − 1) · · · 21 and 12 · · · k ar e shap e-Wilf-e quivalent. The case k = 2 was prov ed by W est [86] and k = 3 by Babson and W est [10]. Krattenthaler [53] ga ve an elegan t bijectiv e proof of the general case using F omin’s gro wth diagrams. This result has since b een generalized to binary matrices by de Mier [35] and to w ords by Jelínek and Mansour [47]. Theorem 3.4 (Stank o v a and W est [77]) . The p ermutations 231 and 312 ar e shap e-Wilf-e quivalent. A bijective pro of w as later given b y Blo om and Saracino [19], and this is the bijection lab eled BS in Figure 3. This bijection is wonderfully simple: they establish a corresp ondence b et ween 231 -av oiding frps and lab eled Dyck paths, then lo cally transform the lab els, and finally map bac k to 312 -av oiding frps. Guo, Krattenthaler, and Zhang [45] hav e since extended Theorem 3.4 to words. Theorem 3.3 states that 123 and 321 are shap e-Wilf-equiv alent, just as 12 and 21 are. Combined with Prop osition 3.2, this means that 123 = 12 ⊕ 1 is shap e-Wilf-equiv alent to 213 = 21 ⊕ 1 . By Prop osition 3.2, one wa y to show that tw o p erm utations α and β are not shap e-Wilf-equiv alent is to sho w that α ⊕ 1 and β ⊕ 1 are not Wilf-equiv alent. Enumerating the 123 ⊕ 1 -, 231 ⊕ 1 -, and 132 ⊕ 1 -a voiding p erm utations to length 7 rules out any additional equiv alences, leaving three shap e- Wilf-equiv alence classes of p erm utations of length three: { 123 , 321 , 213 } , { 231 , 312 } , and { 132 } . Stank ov a [76] sho wed that these equiv alence classes can b e ordered by av oidance: for any F errers b oard, there are at least as man y 132 -av oiding frps as 321 -a voiding frps, and at least as many 321 - a voiding frps as 231 -a voiding frps. In other words, 132 is the easiest pattern of length three to av oid on F errers b oards of any shap e, while 231 is the hardest. Computation shows that Prop osition 3.2 together with Theorems 3.3 and 3.4 account for all shap e- Wilf-equiv alences of p erm utations of length 6 or less. Question 3.5. Do Pr op osition 3.2 and The or ems 3.3 and 3.4 imply al l shap e-Wilf-e quivalenc es? A p oten tial con verse to Prop osition 3.2 was raised by Burstein at Permutation Patterns 2025 . Question 3.6 (Burstein) . If α ⊕ 1 ∼ β ⊕ 1 , must α and β b e shap e-Wilf-e quivalent? Although most Wilf-equiv alences seem to arise from shap e-Wilf-equiv alence, there is at least one exception. Stanko v a [74] pro ved that 1342 ∼ 2413 , but these permutations are not shap e-Wilf- equiv alent because the en umeration of 1342 ⊕ 1 - and 2413 ⊕ 1 -av oiding permutations differs at length 8 . A bijectiv e pro of of this Wilf-equiv alence was later given by Blo om [17]. An Assor tment of Problems in Permut a tion P a tterns 11 T ow ard necessary conditions While sufficient conditions for Wilf-equiv alence ha ve received considerable attention, necessary con- ditions hav e b een lacking. A t presen t, the only general metho d for proving that π ∼ σ is to enumerate the π - and σ -a voiding p erm utations un til the counts disagree. This is ob viously unhelpful for pro ving general statements ab out infinite families of patterns, or for developing any structural understanding of when Wilf-equiv alence fails. A more refined approac h would study permutations of small “co dimension” ab o v e a pattern. F or a p erm utation β of length m , define g k ( β ) = { p erm utations of length m + k that contain β } . Since | A v n ( β ) | = n ! − g n − m ( β ) , w e hav e π ∼ σ if and only if g k ( π ) = g k ( σ ) for all k . Th us, understanding the function g k could yield necessary conditions for Wilf-equiv alence. F or small k , some results are kno wn. Pratt [66, p. 276] observed in 1973 that g 1 ( β ) = m 2 + 1 for an y p erm utation β of length m ; that is, g 1 dep ends only on the length of β , not on its structure. Ra y and W est [68] show ed that g 2 ( β ) = m 4 + 2 m 3 + m 2 + 4 m + 4 − 2 j 2 for some in teger j with 0 ≤ j ≤ m − 1 . Ho w ever, the dep endence of j on β is not w ell understo o d. The author raised the following tw o problems at Permutation Patterns 2007 [84]. Problem 3.7. Expr ess the quantity j in the R ay–W est formula for g 2 ( β ) in terms of statistics of β . Problem 3.8. Find a formula for g 3 ( β ) . Un balanced Wilf-equiv alence So far we hav e discussed Wilf-equiv alence of individual p erm utations, but the notion extends nat- urally to sets: t wo sets of p erm utations B and B ′ are Wilf-equiv alent if | A v n ( B ) | = | A v n ( B ′ ) | for all n . One migh t exp ect Wilf-equiv alen t sets to hav e the same cardinality , but this is not the case. A tkinson, Murphy , and R uškuc [7] c haracterized the class of p erm utations sortable by t wo increasing stac ks in series. Its basis is infinite, { 2 (2 k − 1) 4 1 6 3 · · · (2 k ) (2 k − 3) : k ≥ 2 } , but they sho wed that the class is nonetheless Wilf-equiv alen t to A v(1342) , which was en umerated b y Bóna [20]. 4 Burstein and Pan tone [27] giv e further examples of such unb alanc e d Wilf-equiv alences b et w een finite sets, such as { 1324 , 3416725 } ∼ { 1234 } . These remain p o orly understo od. 4 A simpler deriv ation of the generating function of A v(1342) using full ro ok placemen ts has since b een given b y Bloom and Elizalde [18, Theorem 4.3]. An Assor tment of Problems in Permut a tion P a tterns 12 4. Derangements A ma jor fo cus in the study of p erm utation patterns has b een the enumeration of sp ecific p erm utation classes, esp ecially those defined by relatively few, relatively short basis elements. Beyond mere “stamp collecting”, the ability to enumerate a class serv es as a proxy for understanding its structure, and as a measuring stic k for the adequacy of existing tec hniques. By now, how ev er, the lo w-hanging fruit app ears to hav e mostly b een pick ed. In particular, the “ 2 × 4 ” classes (those with basis consisting of tw o p erm utations of length 4 ) hav e b een almost completely exhausted. These classes served for many y ears as a testbed for different en umerative approac hes, but of the 56 symmetry classes and 38 Wilf-equiv alence classes, only three ha ve unkno wn generating functions. Moreov er, Alb ert, Homberger, Pan tone, Shar, and V atter [2] giv e evidence that the generating functions for these three remaining classes do not satisfy algebraic differen tial equations; this would imply that they are not D-finite (not ev en differentially algebraic). It remains p ossible that these generating functions hav e nice contin ued fraction expressions, though no 2 × 4 class is known to ha v e such a form. As exact enumeration of p erm utation classes reaches maturity , it is natural to seek refinements that imp ose additional structure. One ma y ask, for instance, to count the alternating (up-down) p erm utations in a class, or the even p erm utations, or the Dumont p erm utations of the first kind, or the inv olutions. Many such refinements hav e prov ed tractable. Ho wev er, one type of p erm utation has remained stubb ornly difficult to count, ev en in very well- b eha v ed p erm utation classes: derangements. Recall that a der angement is a p erm utation with no fixed p oin ts (entries satisfying π ( i ) = i , lying on the main diagonal of the plot). W e survey the few kno wn results b elo w, but quickly reach op en questions. Derangemen ts av oiding a pattern of length three Rob ertson, Saracino, and Zeilb erger [69] initiated the study of pattern-av oiding derangemen ts. Both the inv erse and reverse-complemen t symmetries preserve the num b er of fixed p oin ts, so they act as symmetries on the set of derangements. This reduces the consideration of derangements av oiding a pattern of length three to four cases: { 123 } , { 132 , 213 } , { 231 , 312 } , and { 321 } . Rob ertson, Saracino, and Zeilb erger pro ved that for β ∈ { 132 , 213 , 321 } , the β -a voiding derange- men ts are counted by Fine’s sequence (A000957): 0 , 1 , 2 , 6 , 18 , 57 , 186 , 622 , 2120 , 7338 , 25724 , 91144 , . . . . The coincidence b et ween 132 and 321 is surprising, since these patterns lie in differen t symmetry classes. Of course they are Wilf-equiv alen t (b oth a voidance classes are counted by the Catalan n umbers), but the coincidence for derangemen ts do es not follow from that. In fact, Robertson, Saracino, and Zeilberger pro ved something stronger: the distribution of the num b er of fixed points is the same across all 132 -av oiding and all 321 -av oiding p erm utations. Elizalde [38] strengthened this further, pro ving that the joint distribution of the num b er of fixed p oin ts and the num b er of excedances (entries satisfying π ( i ) > i ) is the same for 132 -a voiders and 321 -a voiders. Elizalde and Pak [40] later gav e a bijective pro of of this result. 5 5 The c hronology here is unusual: Elizalde and Pak’s bijective paper app eared in 2004, while Elizalde’s initial An Assor tment of Problems in Permut a tion P a tterns 13 F or β ∈ { 231 , 312 } , the β -av oiding derangements are counted by A258041: 0 , 1 , 1 , 4 , 10 , 31 , 94 , 303 , 986 , 3284 , 11099 , 38024 , . . . . Rob ertson, Saracino, and Zeilb erger compute the first eight terms of this sequence [69, T able 3], and pro v e [69, Theorem 7.1] that there are strictly fewe r 231 -a voiding derangements than 132 - a voiding derangements of eac h length n ≥ 3 (one might skip ahead to Figure 4; it’s not ev en close). Elizalde [37, Theorem 3.7] giv es a con tinued fraction expression for the generating function for 231 -a voiding p erm utations according to the num b er of fixed points. This leav es the case of 123 -av oiding derangements. Here the sequence b egins 0 , 1 , 2 , 7 , 20 , 66 , 218 , 725 , 2538 , 8646 , 31118 , 108430 , . . . . This is sequence A318232 in the OEIS, and that entry references the w ork of F u, T ang, Han, and Zeng [41]. They define G n ( t ) = X π t exc π , where the sum is ov er 123 -av oiding derangemen ts of length n and exc π denotes the n um b er of excedances of π . In particular, G n (1) is the num ber of 123 -av oiding derangements. F u, T ang, Han, and Zeng also consider G n ( − 1) , for whic h they ha ve a conjecture [41, Conjec- ture 5.11]. F or o dd n , we alwa ys ha ve G n ( − 1) = 0 : the reverse-complemen t symmetry preserves 123 -a voidance and, for derangements, exchanges excedances with non-excedances. Thus if π has k excedances, its reverse-complemen t has n − k , and when n is o dd these hav e opp osite parities, so the con tributions cancel. F or even n , they conjecture that ( − 1) n/ 2 G n ( − 1) is p ositiv e. This amounts to a statemen t ab out whether, for a given even length, there are more 123 -av oiding derangements with an even num ber of excedances or with an o dd num ber. A 123 -av oiding p erm utation can hav e at most tw o fixed p oin ts. Elizalde [37, Corollary 3.2] shows that the enumeration of 123 -av oiding p erm utations by n umber of fixed points reduces to enumerating those with exactly tw o fixed p oin ts, as the other cases can b e computed from this count. He giv es a formula [37, Theorem 3.3] for the num b er of 123 -av oiding p erm utations with exactly tw o fixed p oin ts, but it inv olves a quadruple sum. Using this form ula, Elizalde [37, Theorem 3.4] pro v es that for n ≥ 4 , there are strictly more 123 -av oiding derangemen ts than 132 -a voiding derangements of length n (see Figure 4). This inequalit y had b een observ ed based on the data for 4 ≤ n ≤ 8 by Rob ertson, Saracino, and Zeilb erger, and Elizalde rep orts that it was conjectured indep enden tly b y Bóna and Guib ert. A closed-form enumeration remains elusive. Elizalde [37, p. 8] notes that he has “not b een able to find a satisfactory expression” for the generating function, although he expresses hope [37, p. 39] that a simpler formula than his Theorem 3.3 exists. Birma jer, Gil, Tirrell, and W einer [16, Conjecture A.2] conjecture a simpler formula for the num ber of 123 -a voiding permutations with t wo fixed p oin ts, parameterized b y the distance b etw een the fixed p oints; if pro ved, this would reduce Elizalde’s quadruple sum to a double sum. The tw o form ulas agree through n = 200 . Using the first 200 terms, P antone (p ersonal comm unication) was able to fit a linear differential equation to the generating function, suggesting that it is D-finite. Unfortunately , that differential equation is quite unwieldy (far to o long to include here). It remains p ossible that a nicer expression result, though presented at FPSA C 2003 , was not formally published un til 2011, in the Zeilberger F estsc hrift volume of the Electr onic Journal of Combinatorics . An Assor tment of Problems in Permut a tion P a tterns 14 10 20 30 40 50 60 70 80 90 100 1 0 1 / 4 1 / 2 3 / 4 1 β = 231 β = 132 β = 123 Figur e 4: The prop ortion of β -av oiding p erm utations that are derangemen ts, by length. exists in the form of a con tin ued fraction, as Elizalde [37, Theorem 3.7] found for 231 -av oiding p erm utations according to the num b er of fixed points. Prop ortions Figure 4 plots the prop ortion of β -av oiding p erm utations of length n that are derangements, for eac h of the three symmetry classes of patterns of length three, with n ranging from 1 to 100 . T he figure illustrates the comparisons established ab o v e: 123 -a voiding permutations are more lik ely to b e derangements than 132 -a voiding p erm utations, whic h in turn are more likely to b e derangements than 231 -av oiding p erm utations. It is tempting to observe that this ordering is reversed from the n umber of fixed p oin ts in the patterns themselv es; patterns with more fixed p oin ts app ear to b e a voided by prop ortionally more derangements. Curious. F or β ∈ { 132 , 213 , 321 } , we hav e the Rob ertson, Saracino, and Zeilberger result that the β -a voiding derangemen ts are coun ted b y Fine’s sequence. Denoting these num bers by F n , they satisfy C n = 2 F n + F n − 1 , where C n denotes the Catalan num bers, so C n /F n = 2 + F n − 1 /F n . Since the gro wth rate of Fine’s sequence is also 4 lik e the Catalan num b ers, w e see that C n /F n → 9 / 4 , and thus F n /C n → 4 / 9 . F or β = 123 , Figure 4 suggests that the num ber of 123 -av oiding derangemen ts grows like δC n for some limiting prop ortion δ ≥ 1 / 2 , where C n denotes the n th Catalan n umber. Assuming this asymptotic form and using the first 200 terms of the en umeration, P antone (p ersonal communication) applied the metho d of differential approximates to conjecture that the limiting prop ortion is precisely 9 / 16 . Conjecture 4.1 (Pan tone) . The limiting pr op ortion of der angements among 123 -avoiding p ermu- tations is e qual to 9 / 16 . F or β ∈ { 231 , 312 } , Figure 4 and numerical exp erimen tation suggest that the prop ortion tends to 0 . Question 4.2. Is the limiting pr op ortion of der angements among 231 -avoiding p ermutations e qual to 0 ? These observ ations suggest broader questions. F or a p erm utation class C , let C ◦ denote the set of derangemen ts in C . An Assor tment of Problems in Permut a tion P a tterns 15 Question 4.3. Do es the r atio |C ◦ n | / |C n | c onver ge for every p ermutation class C ? Numerous follow-up questions suggest themselves. F or the class of all p erm utations, the limit is of course 1 / e . What v alues in [0 , 1] are achiev able? The case of A v (132) shows that these limits can b e greater than 1 / e , but ho w muc h greater? Is there a largest p ossible limit strictly less than 1 ? F or whic h classes is this limit 0 ? Separable derangements The skew sum of p erm utations σ of length m and τ of length n is the p erm utation σ ⊖ τ of length m + n defined b y ( σ ⊖ τ )( i ) = ( σ ( i ) + n for 1 ≤ i ≤ m, τ ( i − m ) for m + 1 ≤ i ≤ m + n. Visually , the plot of σ ⊖ τ places the plot of τ b elo w and to the right of the plot of σ . A p erm utation is sep ar able if it can b e built from the singleton p erm utation 1 b y rep eated application of sum and skew sum. Bose, Buss, and Lubiw [25] gav e the separable p erm utations their name and sho wed that they are precisely A v(2413 , 3142) . Notable sub classes include A v (132) and A v (231) , whic h we hav e just discussed, as well as the la yered p erm utations discussed earlier. The separable p erm utations of length n are coun ted by the large Schröder num b ers (A006318): 1 , 2 , 6 , 22 , 90 , 394 , 1806 , 8558 , 41586 , 206098 , 1037718 , 5293446 , . . . . This enumeration was first established by Shapiro and Stephens [72] in 1991, though they work ed with the recursiv e definition via sums and sk ew sums. This was b efore Bose, Buss, and Lubiw had iden tified the basis { 2413 , 3142 } , which led to an amusing historical coincidence: As W est [88] re- p orts, Shapiro and Getu later conjectured that the large Schröder n umbers also count A v(2413 , 3142) , not realizing Shapiro had already prov ed this himself, alb eit in a disguised form. W est [88] gav e a pro of in 1995. 6 Stank ov a [74] then gav e the muc h more natural pro of, decomp osing these p erm uta- tions into sums and skew sums, whic h brings the story full circle to Shapiro and Stephens. F or classes with only finitely many simple p ermutations (a term we won’t define here), suc h as the separable p erm utations, Brignall, Huczynska, and V atter [26] show how to systematically obtain algebraic equations for the generating functions of v arious natural subsets: the alternating permu- tations, the even p erm utations, the Dumont p erm utations of the first kind, the inv olutions, and man y others. Ho wev er, their metho d do es not apply to derangements. The obstacle is that b eing a derangemen t do es not lie in a finite “query-complete set of prop erties” (in the sense of that pap er). The pro of of this fact uses displacemen t sets, D ( π ) = { π ( i ) − i : i ∈ [ n ] } , so a p erm utation π is a derangemen t if and only if 0 / ∈ D ( π ) . While D ( π ⊕ σ ) = D ( π ) ∪ D ( σ ) , whether a sk ew sum π ⊖ σ is a derangemen t dep ends on the interaction b et w een D ( π ) and D ( σ ) , and so p erm utations with differen t displacement sets must b e track ed separately . Th us despite the w ell-understo od structure of separable p erm utations, no explicit expression for the generating function of separable derangemen ts has b een found. These p erm utations are counted by 6 W est wrote that this was “the first non-trivial en umerative result to be obtained for any problem in volving forbidden subsequences of length k ≥ 4 . ” This ov erlo oks Gessel’s 1990 pap er [44], which gives an explicit formula for 1234 -av oiding p erm utations. Since [44] is cited in [88], this is a puzzling omission; p erhaps W est meant the first inv olving non-monotone patterns, or more than one pattern. An Assor tment of Problems in Permut a tion P a tterns 16 A393394, 0 , 1 , 2 , 7 , 30 , 124 , 560 , 2610 , 12470 , 60955 , 302930 , 1528621 , . . . . These terms were computed by tracking, for eac h length, ho w many separable p erm utations re- alize each p ossible displacement set. The count of separable derangements is then the sum ov er displacemen t sets not containing 0 . Problem 4.4. Find the gener ating function for the numb er of sep ar able der angements of length n . The ratios |S ◦ n | / |S n | , where S denotes the class of separable p erm utations, app ear to b e monotoni- cally decreasing, approaching something b et w een 1 / 5 and 1 / 4 . Ho wev er, these guesses are based only on the enumeration up to length 18 and so should b e tak en with a grain of salt. Question 4.5. What is the limiting pr op ortion of der angements among sep ar able p ermutations, assuming this limit exists? 5. Sor ting The study of sorting devices has been intert wined with p erm utation patterns since Kn uth’s analysis of stac k-sorting in The A rt of Computer Pr o gr amming . In this section, w e consider sev eral sorting mac hines: m ultiple stacks in series, A tkinson’s enhanced ( r, s ) -stac ks, and restricted containers (also kno wn as C -machines). Each machine gives rise to a p erm utation class (the p erm utations it can sort/generate), and there are numerous op en problems. Stac ks A stack is a last-in first-out linear sorting device with push and p op op erations. The greedy algorithm for stack-sorting a p erm utation π = π (1) π (2) · · · π ( n ) pro ceeds as follows. First, push π (1) onto the stac k. At a later stage, supp ose that the en tries π (1) , . . . , π ( i − 1) hav e all b een either output or pushed onto the stack, so π ( i ) is the next en try in the input. If π ( i ) is less than every en try currently on the stack, push π ( i ) on to the stack. Otherwise, p op en tries off the stac k (to the output) until π ( i ) is less than every remaining stac k entry , then push π ( i ) onto the stac k. After all en tries ha v e been read, p op any remaining entries from the stack to the output. This pro duces a permutation s ( π ) . A p erm utation is W est t -stack sortable if s t ( π ) is the identit y p erm utation. W e caution that for t ≥ 2 , the set of W est- t -stack-sortable p erm utations do es not form a p erm utation class. As one exam- ple, 35241 is W est- 2 -stack-sortable, b ecause s ( s (35241)) = s (32145) = 12345 , but its subp erm utation 3241 is not W est- 2 -stack-sortable, b ecause s ( s (3241)) = s (2314) = 2134 = 1234 . Indeed, W est [86, Theorem 4.2.18] (and later in [87]) sho wed that the W est- 2 -stack-sortable p er- m utations (he did not call them this) are characterized b y a voiding 2341 in the standard sense, and also av oiding the b arr e d p attern 35241 ; a p erm utation av oids 35241 if every occurrence of the pattern 3241 can b e extended to an o ccurrence of the pattern 35241 . An Assor tment of Problems in Permut a tion P a tterns 17 W e will not b elabor W est stack-sorting any further, and instead turn to sorting with t stacks in series: a p erm utation is sortable b y t stacks in series if there exists some sequence of op erations that transforms it into the identit y , where each op eration pushes to or p ops from one of the t stacks, and entries pass through the stac ks in order (from the first stack to the second, and so on). Unlike the W est notion, this definition b eha v es as one might reasonably hop e. In particular, the set of p erm utations sortable by t stacks in series forms a permutation class: if a permutation can be sorted, then an y subpermutation can b e sorted by running the same op erations while ignoring the en tries not present in the subp erm utation. One and t w o stac ks The p erm utations sortable by a single stack are precisely A v (231) , as observed b y Knuth [51, Ex- ercise 2.2.1-5]. F or t wo stacks in series, T arjan [82, Lemma 10] found that the shortest unsortable p erm utation has length 7 . W e quote his “pro of” 7 : (2435761) is unsortable using tw o stacks, as the reader may easily verify . Con v ersely , ev ery sequence of length 6 or less may b e sorted using t wo stacks. Exhaustiv e case analysis will verify this fact. In a 1992 technical rep ort [4, Theorem 2], Atkinson seems to hav e b een the first to find all 22 basis elemen ts of length 7 for t wo stacks in series. Murph y [62, Prop osition 257] prov ed that the class of p erm utations sortable b y tw o stac ks in series has an infinite basis, and in addition to the 22 basis elemen ts of length 7 , he lists the 51 basis elements of length 8 . More generally , the num b er of basis elemen ts of length n , for n ≥ 7 , is given by A111576: 22 , 51 , 146 , 604 , . . . . Computing these basis elements up to n = 10 is not difficult once one views the sortable p erm utations in terms of pro ducts of 231 -a v oiding p erm utations, as we explain b elow. Sorting, generating, and duality W e pause to discuss a general framework that clarifies several arguments to follo w. W e think of sorting machines as transforming an input permutation (generally dra wn on the right in diagrams, so that the entries en ter the mac hine in their natural order π (1) , π (2) , . . . ) to an output p erm utation. Sorting is then the sp ecial case where the output is the iden tit y . M ← − − ← − − 12 · · · n output π (1) π (2) · · · π ( n ) input Generating is the sp ecial case where the input is the identit y . 7 Pratt [66], in a paper from the same era, begins a pro of with “W e lea ve to the reader the pleasure of convincing himself that none of the p erm utations in Figure 3 can b e computed by a deque. ” The implicit assumption in b oth papers, one published in the Journal of the A CM and the other in STOC , that the reader would verify such claims by hand rather than b y computer is now somewhat quaint. An Assor tment of Problems in Permut a tion P a tterns 18 M ← − − ← − − π (1) π (2) · · · π ( n ) output 12 · · · n input A mac hine is symb ol oblivious if its allow ed operations are indifferent to the v alues of the sym b ols b eing manipulated. (This terminology follows A tkinson [6], although he simply uses oblivious ; we add “sym bol” to a v oid confusion with other uses of the term “oblivious” in computer science.) A stac k is symbol oblivious: a push or p op is p ermitted regardless of what symbol is inv olv ed. 8 Comp ositions of stacks in series are also symbol oblivious. F or a symbol-oblivious mac hine, if we relab el the input sym b ols and p erform the same sequence of op erations, we obtain the corresp ondingly relab eled output. Suppose a symbol-oblivious machine M can transform π in to σ . Relab eling by an arbitrary p erm utation τ shows that the same sequence of op erations allo ws M to transform τ ◦ π into τ ◦ σ . In particular, taking τ = σ − 1 , we see that M can transform σ − 1 ◦ π into the identit y . In other words: Prop osition 5.1. L et M b e a symb ol-oblivious machine. Then M c an tr ansform π into σ if and only if M c an sort σ − 1 ◦ π . In p articular, M c an gener ate π if and only if M c an sort π − 1 . F or example, a single stac k sorts precisely the class A v(231) . Since 312 − 1 = 231 , Prop osition 5.1 implies that a single stack generates the class A v(312) from the identit y . More generally , symbol obliviousness clarifies what tw o stacks in series can generate. Supp ose entries pass through the first stack and enter the second stack in the order σ (1) , σ (2) , . . . , σ ( n ) . Since a single stack generates A v(312) , we ha ve σ ∈ A v(312) . By symbol obliviousness, the second stack p erforms some sequence of operations that w ould transform 12 · · · n into some τ ∈ A v(312) . Since the actual symbols input into the second stac k are σ (1) , . . . , σ ( n ) rather than 1 , . . . , n , the output is relab eled accordingly , generating σ ◦ τ . Thus tw o stacks in series generate precisely A v(312) ◦ A v (312) . This yields a simple metho d for computing the basis men tioned earlier: generate all elements of A v(231) ◦ A v (231) up to the desired length, and iden tify the minimal permutations that do not app ear. A second useful observ ation concerns running machines backw ards. Supp ose that a machine M can transform π into σ via some sequence of operations. M ← − − ← − − σ (1) σ (2) · · · σ ( n ) output π (1) π (2) · · · π ( n ) input Reading that sequence backw ards describ es a w ay for a “reversed mac hine” M r to transform σ r in to π r . M r − − → − − → σ (1) σ (2) · · · σ ( n ) input π (1) π (2) · · · π ( n ) output In general, M r ma y b e a different mac hine than M , and w e sa y that M is r eversible if M r = M . Stac ks in series are reversible (reverse the roles of input and output, reverse the order of the stacks, and exchange pushes with p ops). 8 Although not under W est’s notion, since the rule “p op if the top of the stac k is smaller than the next input entry” dep ends on comparing symbol v alues. An Assor tment of Problems in Permut a tion P a tterns 19 If we assume that M , and hence also M r , is symbol oblivious, and that M can sort π , then M r can transform ρ = n ( n − 1) · · · 21 into π r . M r − − → − − → n · · · 21 input π (1) π (2) · · · π ( n ) output Relab eling the entries according to ( π r ) − 1 , we see that M r transforms ( π r ) − 1 ◦ ρ = ρ ◦ π − 1 ◦ ρ = ( π rc ) − 1 in to the identit y , which we record b elo w. Prop osition 5.2. If a symb ol-oblivious machine M c an sort π , then the r everse d machine M r c an sort ( π rc ) − 1 = ρ ◦ π − 1 ◦ ρ . Since stacks in series are sym b ol oblivious and reversible, if π can b e sorted by t stacks in series, then ( π rc ) − 1 can also b e sorted by t stac ks in series. As Figure 2 shows, the p erm utation ( π rc ) − 1 is the reflection of π ab out the anti-diagonal. This p erm utation has b een called the “dual” of π (Murph y [62, Section 8.1.2]) or the “tw o-stack dual” (Smith and V atter [73]). W e suggest instead the term sorting dual , since this duality applies to any sym b ol-oblivious reversible mac hine. General b ounds F or general t , Knuth presents an argument in The A rt of Computer Pr o gr amming , V olume 3 [52, Solution to Exercise 5.2.4-19] sho wing that if all p erm utations of length n can b e sorted by t stacks in series, then all p erm utations of length 2 n can b e sorted b y t + 1 stac ks in series. (This argument also app ears in T arjan [82, Lemma 11].) W e sketc h the pro of. Let π be a p erm utation of length 2 n and supp ose that all p erm utations of length n can be sorted by t stac ks in series. By sym b ol-obliviousness, all permutations of length n can b e transformed into ρ = n ( n − 1) · · · 21 . Th us w e can use the first t of our t + 1 stacks to output π (1) , . . . , π ( n ) in descending order, pushing these entries into the last stac k so that they sit in increasing order (read top to b ottom) b efore we read π ( n + 1) . W e then use the first t stacks to sort π ( n + 1) , . . . , π (2 n ) , merging these en tries with the conten ts of the final stack into the output as desired. Murph y [62, Prop osition 264] giv es a different argument to obtain a similar result. In his approach, w e pro cess all entries π (1) , . . . , π (2 n ) at once. The entries with v alues 1 , 2 , . . . , n are sorted and output using the last t stacks (these are pushed onto the first stack but immediately p opp ed off it). The entries with v alues n + 1 , n + 2 , . . . , 2 n are pushed into the first stack, where they remain temp orarily . Once all entries with v alues 1 , 2 , . . . , n ha ve b een output, the entries n + 1 , n + 2 , . . . , 2 n sit “upside down” in the first stack, in the rev erse order of the subsequence they form in π , read top to b ottom. W e then sort and output these using the last t stac ks. In fact, Kn uth’s argumen t and Murphy’s argument are the sorting duals of eac h other. Supp ose that the p ermutations π and σ can b e sorted by t stacks in series. Kn uth’s argument sho ws that t + 1 stac ks in series can sort all horizontal juxtap ositions of the form ρ ◦ π σ : p erm uta- tions of length | π | + | σ | in which the first | π | entries are order-isomorphic to ρ ◦ π (the complement of π ) and the last | σ | entries are order-isomorphic to σ . Murph y’s argumen t sho ws that t + 1 stacks in series can sort all vertic al juxtap ositions of the form π ◦ ρ σ T : p erm utations of length | π | + | σ | An Assor tment of Problems in Permut a tion P a tterns 20 in which the largest | π | v alues are order-isomorphic to π ◦ ρ (the reverse of π ) and the smallest | σ | v alues are order-isomorphic to σ . T o see the duality , substitute the sorting duals of π and σ into Murphy’s construction. Since the sorting dual of π is ρ ◦ π − 1 ◦ ρ , we obtain vertical juxtap ositions of the form " ( ρ ◦ π − 1 ◦ ρ ) ◦ ρ ρ ◦ σ − 1 ◦ ρ # = " ρ ◦ π − 1 ρ ◦ σ − 1 ◦ ρ # . The sorting duals of these p erm utations are precisely the horizontal juxtap ositions from Knuth’s argumen t. Since tw o stacks in series can sort every p erm utation of length 6 , it follo ws from these constructions that t ≥ 2 stacks in series can sort every p erm utation of length 3 · 2 t − 1 . Atkinson [4, Corollary , p.10] refined this b ound to 7 · 2 t − 2 − 1 , but the asymptotics are the same: roughly log 2 n stacks in series suffice to sort all p erm utations of length n . F or a lo wer b ound, observe that a single stack can sort precisely C n p erm utations of length n , where C n denotes the n th Catalan n umber. Thus t stacks in series can sort at most C t n p erm utations of length n . This shows that roughly log 4 n stacks in series are required to sort all p erm utations of length n . There is a factor-of-t wo gap b et ween these b ounds, and it has not b een significan tly narrow ed since Kn uth first p osed the following problem almost sixty years ago, whic h he rated 47 out of 50 in difficult y . Problem 5.3 (Knuth [52, Exercise 5.2.4-20]) . Determine the true r ate of gr owth, as n → ∞ , of the numb er of stacks in series ne e de d to sort every p ermutation of length n . Three stacks Sp ecializing to three stac ks, we immediately run into problems. The exhaustive computational approac h that works for t w o stacks b ecomes intractable, as computing A v(231) ◦ A v(231) ◦ A v (231) for even mo dest lengths is infeasible. W e do not even know the length of the shortest basis element for the class of 3 -stack-sortable p erm utations, although Atkinson’s b ound shows that all p erm utations of length 7 · 2 − 1 = 13 can be sorted, so this shortest basis element m ust ha ve length at least 14 . Elder and V atter [36] rep ort that Elder and W aton wagered a b eer on the problem, with Elder guessing 15 and W aton guessing 22 (“conjecturing,” if one is feeling generous). Question 5.4 (W aton; see Elder and V atter [36]) . What is the length of the shortest p ermutation that c annot b e sorte d by thr e e stacks in series? Murph y [62, Conjecture 265] guesses more generally that t stacks in series can sort all p erm utations of length up to ( t + 1)! , which would give 25 as the length of the shortest p erm utation unsortable by three stacks in series. Ho wev er, Murph y’s conjecture can’t be true for all t , since log 4 ( t + 1)! grows faster than t . The kno wn unsortable p erm utations are sho c kingly long, giv en these conjectured answ ers. T ar- jan [82] rep orts that he constructed a permutation of length 41 that cannot b e sorted by three stac ks An Assor tment of Problems in Permut a tion P a tterns 21 in series, although he do esn’t present it. Murphy [62, Prop osition 262] giv es a general metho d to construct p erm utations that cannot b e sorted by t + 1 stacks in series, starting from a p erm utation that cannot b e sorted by t stacks. W e sketc h his argument. Supp ose that some permutation β of length k cannot b e sorted by t stacks in series. Consider the p erm utation π = β [ β r , β r , . . . , β r | {z } | β | − 1 copies , 1 ] , the inflation of β formed, lo osely sp eaking, by replacing each entry of β except the last with a blo c k of entries order-isomorphic to β r . W e claim that π cannot b e sorted by t + 1 stacks in series. Indeed, w e can never hav e all entries from a single β r in terv al together in the first stack, b ecause reading top to bottom they w ould form a copy of β , and the remaining t stac ks could not sort them. Th us at least one entry from the first interv al must exit the first stack b efore the first entry of the second in terv al en ters, and similarly for subsequen t interv als. F o cusing on these | β | − 1 en tries together with the final entry of π , w e obtain a subsequence order-isomorphic to β that enters the last t stacks in that order, and the last t stac ks cannot sort β , so they cannot sort this subsequence. Murph y’s construction yields an unsortable p erm utation of length | β | 2 − | β | + 1 . F or three stacks, w e start with a permutation of length 7 (the shortest length not sortable b y t w o stacks), giving an unsortable permutation of length 43 , whic h is longer than T arjan’s claimed example. Murphy [62, p. 329] examines one such permutation and finds four entries that can b e remov ed without making it sortable, yielding an unsortable p erm utation of length 39 . In his 1992 technical rep ort, Atkinson [4, Lemma 5] had already done muc h the same, although he obtained an unsortable p erm utation of length 38 . This record has sto o d for ov er thirty years. A tkinson’s ( r, s ) -stacks In a 1998 pap er, A tkinson [5] introduced a natural generalization of stacks. With a standard stac k, one may push an entry on to the top or p op an entry from the top. An ( r, s ) -stack relaxes these constrain ts: one may push the next input en try in to an y of the top r p ositions and pop an y of the top s entries to the output. Thus a (1 , 1) -stack is an ordinary stack. These machines are symbol oblivious, as their op erations do not depend on the v alues of the en tries, and the reverse of an ( r, s ) -stack is an ( s, r ) -stac k. Thus, by Prop osition 5.2, we obtain the following. Prop osition 5.5 (Atkinson [5, Lemma 1.1]) . A n ( r, s ) -stack sorts π if and only if an ( s, r ) -stack sorts its sorting dual ( π rc ) − 1 . In particular, the class of p erm utations sortable b y an ( r, r ) -stac k is closed under the sorting dual. W e return to ( r, s ) -stacks later in this section. Restricted containers ( C -mac hines) W e no w in tro duce a differen t generalization of stac ks that captures man y p erm utation classes. As w e will see, this framew ork includes Atkinson’s ( r, 1) - and (1 , s ) -stacks as special cases. Let C b e a p erm utation class. A C -machine is a container that holds entries sub ject to the constraint that, at all times, the entries in the container (read left to right) must b e order-isomorphic to a An Assor tment of Problems in Permut a tion P a tterns 22 mem b er of C . In analyzing these mac hines, it turns out to b e more natural to study generation than sorting; w e discuss this choice further b elo w. Thus w e tak e the input to be 12 · · · n , and the machine has three op erations: • push : remov e the next en try from the input and place it an ywhere in the con tainer, provided the resulting arrangement is order-isomorphic to a member of C ; • p op : remo ve the leftmost entry from the container and app end it to the output; • byp ass : remov e the next entry from the input and append it directly to the output. The p erm utation gener ate d b y a sequence of operations is the output once all en tries hav e exited. The classical stack is reco vered b y taking C = A v(12) . In this machine, entries in the container must b e decreasing, so each push places the new entry on the left. Since p ops also o ccur from the left, the bypass op eration is redundan t, and w e recov er the usual stack op erations. As Knuth observed, this machine generates precisely A v (312) . By con trast, for the A v (21) -mac hine, the entries in the con tainer m ust b e increasing, so eac h push places the new entry on the right. Since p ops o ccur from the left, the bypass op eration is now essen tial. This mac hine generates precisely A v(321) : clearly it cannot generate 321 or any p erm uta- tion con taining it, and conv ersely , to generate a 321 -a voiding p erm utation, output the left-to-right maxima with b ypasses while passing the remaining entries (whic h m ust b e increasing) through the con tainer. (This is equiv alen t to generating with tw o queues in parallel.) A t the other extreme, taking C to b e the class of all p erm utations allows entries to b e placed anywhere in the container, and this machine generates all p erm utations. The bypass op eration is sup erfluous in some cases, as the stack example sho ws. Ho wev er, including it greatly simplifies the basis theorem below. In practice, b ypasses are used precisely to output the left-to-righ t maxima of the generated p erm utation. The basis theorem The main structural result for C -machines c haracterizes the classes they generate and mak es it immediately apparent whether a class of interest can b e generated by a C -machine, and if so, which one. The pro of is to o simple to omit. In the statement, w e use the notation 1 ⊖ B = { 1 ⊖ β : β ∈ B } . Theorem 5.6 (Alb ert, Hom b erger, Pan tone, Shar, and V atter [2, Theorem 1.1]) . F or any set B of p ermutations, the A v( B ) -machine gener ates the class A v(1 ⊖ B ) . Pr o of. The A v ( B ) -mac hine cannot generate any p erm utation of the form 1 ⊖ β for β ∈ B : at the momen t when the maximum entry (which app ears first in 1 ⊖ β ) is next in the input, the container w ould need to hold a copy of β , and it is not allow ed to do so. F or the conv erse, we show how to generate a p erm utation π that av oids all permutations in 1 ⊖ B . Let i 1 < i 2 < · · · < i ℓ b e the p ositions of the left-to-right maxima of π ; note that i 1 = 1 since the first entry is alwa ys a left-to-right maximum. W e pro ceed iteratively through the left-to-right maxima. F or the first, w e push all entries with v alues less than π ( i 1 ) into the container in their correct relative order with resp ect to π . This is p ossible b ecause the entries lying to the southeast of π ( i 1 ) in π av oid B . W e then b ypass π ( i 1 ) to the output. An Assor tment of Problems in Permut a tion P a tterns 23 F or each subsequen t left-to-righ t maxim um, observ e that all entries lying horizontally b et w een the previous left-to-right maximum and the curren t one are already in the container. W e p op these en tries to the output. Then we push the entries with v alues b et w een the t wo maxima from the input in to the con tainer, placing them in their correct relative positions with resp ect to π . Again, this is p ossible because the entries lying to the southeast of the current left-to-righ t maximum m ust a void B . W e then bypass the current maximum to the output, and repeat. Sorting versus generating Unlik e stacks, C -machines are not even a little bit sym b ol oblivious: the a v ailable push op erations dep end entirely on the relative order of the entries in the container and the next entry to b e input. Th us, we can’t lean on Prop osition 5.1 to conclude that sorting and generating are symmetric. What w ould happ en if we tried to sort with a C -mac hine? One answer is that sorting with C -machin es, as defined, w ould not b e all that interesting. The only pro ductiv e container configuration is increasing order, since any inv ersion in the container would p ersist to the output, resulting in a failure to sort. It follo ws that sorting with a C -machine is equiv alent to sorting with a priority queue , in which one may push and p op entries, but instead of the last-in b eing p opped (as in a stack) or the first-in b eing p opped (as in a queue), the least-in, that is, the smallest entry , is p opped. A priority queue of unlimited capacity can sort an y p erm utation: simply push all the en tries in, then p op them out in order. 9 Th us if C con tains the iden tity of all lengths, the C -machine can sort everything. If C contains identit y p erm utations only up to some length k , then sorting with the C -machine is equiv alent to sorting with a ( k + 1) -b ounde d priority queue , which can hold at most k + 1 entries at any time. (The “ +1 ” accoun ts for the bypass op eration.) Bounded priorit y queues ha ve b een studied by Atkinson and T ulley [9], among others, though their sorting capabilities do not seem to ha ve b een written down explicitly . It is not difficult to see that a ( k + 1) -b ounded priorit y queue can sort precisely the class A v( S k +1 ⊖ 1) , that is, the p erm utations av oiding all patterns of length k + 2 that end with 1 . Another w ay to describ e this class is that it consists of the p erm utations with maxim um drop size at most k , where the maximum dr op size of π is max { i − π ( i ) } . These classes are already v ery well understo od; in fact, Ch ung, Claesson, Duk es, and Graham [30] hav e even determined their descent p olynomials. In short, sorting with C -machines as defined do es not lead an ywhere new. An alternative approach to sorting with C -machines would b e to mo dify the definition of the machines to mak e sorting more natural. If a C -machine can generate π , then the rev ersed C -mac hine (whic h pushes only at the left but allo ws pops from an ywhere in the container) can transform π r in to id r . By applying appropriate symmetries to C , one could therefore study sorting by reversed C -machines instead of generating b y C -mac hines. But this is clearly symmetric to generating with C -machines, and generating is easier to talk about. 9 The more in teresting questions about priority queues concern the pairs ( π , σ ) for which a priority queue can transform π into σ . A theorem of Atkinson and Thiyagarajah [8] states that there are precisely ( n + 1) n − 1 such pairs of p erm utations of length n . An Assor tment of Problems in Permut a tion P a tterns 24 A tkinson’s ( r, 1) - and (1 , s ) -stacks as C -machines An ( r, 1) -stack allows pushing into any of the top r p ositions but only p opping from the top. By “rotating” this stack 90 ◦ coun terclo c kwise, w e see that it is equiv alen t to the A v ( B ) -mac hine where B consists of all p erm utations of length r + 1 that end with their largest entry . This allows one to insert the next en try from the input (which is larger than every entry currently in the container) into an y of the first r p ositions of the con tainer, and then to p op from the first p osition of the con tainer. Letting S r denote the set of all p erm utations of length r , w e see that the ( r , 1) -stack is equiv alent to the A v( S r ⊕ 1) -mac hine. By Theorem 5.6, this machine generates the class A v 1 ⊖ ( S r ⊕ 1) , which repro ves a result of Atkinson [5, Theorem 2.1]. By the dualit y of Prop osition 5.5, (1 , s ) -stacks are also equiv alen t to C -machines. A tkinson [5, Section 3] w ent on to en umerate these classes, finding their algebraic generating func- tions and asymptotics. The en umeration of these classes also app ears implicitly in the w ork of Kremer [54, 55], who considers, for eac h r ≥ 1 and fixed indices j, k ∈ [ r + 2] , classes with bases B j,k = { β ∈ S r +2 : β ( j ) = r + 1 and β ( k ) = r + 2 } . Her main result [55, Theorem 1] shows that all classes of the form A v( B j,k ) with | j − k | ≤ 2 , or k = 1 , or k = r + 2 , hav e isomorphic generating trees, and th us are Wilf-equiv alent. The underlying recurrences also app ear in Sulanke’s w ork [81] on coloured parallelogram p oly omino es. (W e caution readers that Kremer’s generating function as printed contains errors; Atkinson’s pap er should b e consulted for the correct generating function.) F or r = 1 , w e obtain the Catalan num b ers. F or r = 2 , the en umeration gives the large Schröder num bers (A006318), which arose earlier in this pap er in the con text of separable p erm utations; Kremer’s classes are Wilf-equiv alent to the separable p erm utations but not symmetric to them. F or r = 3 , we obtain A054872. Sorting 1342 -av oiders As mentioned in Section 3, A tkinson, Murph y , and Ruškuc [7] show ed that the class sortable by t wo or der e d stacks in series is Wilf-equiv alent to A v(1342) . Here an or der e d stack is one where the con tents must remain increasing when read from top to b ottom; in sorting with stacks in series, the final stack must alw ays b e ordered, but the previous stac ks do not need to b e. A t Permutation Patterns 2007 , Bóna asked [84, Question 4]: Is there a natural sorting machine that can sort precisely the class A v(1342) ? Theorem 5.6 sho ws that the answer is essentially yes: the class A v(4213) is generated b y the A v(213) - mac hine. Here we ha ve replaced A v(1342) by a symmetry and also sw app ed sorting for generating, but neither change is substantiv e. How ever, what Bóna actually had in mind was a more satisfying mac hine-level explanation of the Wilf-equiv alence, and that remains open: Problem 5.7. Find a bije ction b etwe en A v (1342) and the class sortable by two or der e d stacks in series that is witnesse d by a c orr esp ondenc e b etwe en the op er ation se quenc es of the asso ciate d ma- chines. An Assor tment of Problems in Permut a tion P a tterns 25 En umeration and D-finiteness The C -machine framew ork leads to functional equations for generating functions. In fav orable cases, these yield explicit formulas; in others, they allow efficient computation of man y terms via dynamic programming. A striking example is A v(4231 , 4123 , 4312) . This class can b e generated b y a C -machine (all basis elemen ts b egin with their maximum entries), and Alb ert, Homberger, Pan tone, Shar, and V atter [2] computed 5000 terms of its counting sequence. Despite this abundance of data, no algebraic differ- en tial equation satisfied by the generating function has b een found. The counterexamples to the No onan–Zeilberger conjecture [63] constructed by Garrabran t and P ak [43] ha ve extremely large bases. A more compact coun terexample w ould be nice to ha v e, and A v(4231 , 4123 , 4312) , with its basis of just three short p erm utations, app ears to b e a strong candidate. Conjecture 5.8 (Alb ert, Hom b erger, P antone, Shar, and V atter [2, Conjecture 5.3]) . The gener at- ing function for A v(4231 , 4123 , 4312) is not differ ential ly algebr aic. Am usingly , the sup erclass A v(4231 , 4312) is enumerated b y the large Schröder n umbers. This w as conjectured by Stanley and first prov ed by Kremer [54, Prop osition 11], although this class is not a mem b er of her large family of Wilf-equiv alen t classes. Instead, she show ed sp ecifically that the generating tree for the symmetric class A v(2134 , 1324) is isomorphic to the generating trees of her large family . The class A v(4231) , meanwhile, is symmetric to the notorious class A v(1324) men tioned in the in tro duction. The curren t record for enumerating this class is 50 terms, computed by Conw a y , Guttmann, and Zinn-Justin [34]. Th us in the chain A v(4231 , 4123 , 4312) ⊆ A v (4231 , 4312) ⊆ A v (4231) , the first class is computationally tractable but its generating function appears po orly b eha ved, the second has an algebraic generating function, and no one kno ws what to do with the third. The (2 , 2) -stack Returning to Atkinson’s ( r, s ) -stacks, the (2 , 2) -stack is the simplest case not captured by the C - mac hine framew ork: it allows pushing into either of the top tw o p ositions and popping from either of the top tw o p ositions. A tkinson established the basis for this class. Theorem 5.9 (Atkinson [5, Theorem 4.1]) . The class of (2 , 2) -stack-sortable p ermutations is A v(23451 , 23541 , 32451 , 32541 , 245163 , 246153 , 425163 , 426153) . By Prop osition 5.5, this class is closed under the sorting dual. This can also b e seen from the basis, as every element app ears alongside its sorting dual: p erm utation 23451 23541 32541 245163 246153 426153 sorting dual itself 32451 itself itself 425163 itself It w ould of course b e desirable to hav e a general description of the basis of ( r, s ) -stack-sortable p erm utations, or ev en simply to know whether these bases are all finite. An Assor tment of Problems in Permut a tion P a tterns 26 Problem 5.10. Char acterize the b asis of the class sortable by an ( r , s ) -stack for gener al r , s ≥ 2 . The p erm utations sortable by a (2 , 2) -stack are counted by A393395, 1 , 2 , 6 , 24 , 116 , 628 , 3636 , 21956 , 136428 , 865700 , 5583580 , 36490740 , . . . . A tkinson rep orted a conjectured expression from the OEIS Sup erseek er for the generating function of these permutations but did not prov e it. Using Combinatorial Exploration [1] and w orking from the basis in Theorem 5.9, P antone (p ersonal communication) pro ved Atkinson’s conjecture, establishing that the generating function for this class has minimal polynomial 2 xf 3 − (2 x + 3) f 2 − ( x − 7) f − 4 . (This differs slightly from Atkinson’s presentation b ecause it includes the constant term 1 for the empt y p erm utation, while Atkinson did not.) It w ould still b e of in terest to derive this en umeration directly from the sorting mechanism. Problem 5.11. Derive the gener ating function for the class of (2 , 2) -stack-sortable p ermutations fr om the structur e of the (2 , 2) -stack. Giv en that all known enumerations of ( r, s ) -stack-sortable classes are algebraic, one might ask how far this extends. Question 5.12. Do es the class of p ermutations sortable by an ( r , s ) -stack have an algebr aic gener- ating function for al l r , s ≥ 1 ? Generalizing C -machines The (2 , 2) -stack is not a C -machine: it allows p opping from either of the top tw o p ositions, whereas C - mac hines p op only from the leftmost p osition. This suggests a natural generalization of C -machines: allo w the p op op eration to remo ve any of the leftmost s entries from the contain er, rather than just the leftmost one. Call such a mac hine an extende d C -machine with s -p op , or a ( C , s ) -machine for short. The C -mac hines considered earlier are then ( C , 1) -machines, and the (2 , 2) -stac k can b e view ed as an (A v(123 , 213) , 2) -machine. The basis theorem (Theorem 5.6) gives a complete c haracterization of the classes generated b y ( C , 1) -machines. Do es a similar result hold more generally? Problem 5.13. Is ther e a b asis the or em for ( C , s ) -machines analo gous to The or em 5.6? Ev en partial progress would b e v aluable. F or instance, if C is finitely based, do es every ( C , s ) -machine generate a class with a finite basis? A ckno wledgements I am grateful to Jay Pan tone for numerous extremely helpful discussions ab out the material presented here. An Assor tment of Problems in Permut a tion P a tterns 27 References [1] Alber t, M. H., Bean, C., Claesson, A., Nadeau, E., P antone, J., and Ulf arsson, H. Combinatorial Exploration: An algorithmic framework for enumeration. Mem. A mer. Math. So c. 317 , 1611 (2026). [2] Alber t, M. H., Homberger, C., P antone, J., Shar, N., and V a tter, V. Generating p erm utations with restricted containers. J. Combin. The ory Ser. A 157 (2018), 205–232. [3] Alon, N., and Friedgut, E. On the n umber of p erm utations a v oiding a given pattern. J. Combin. The ory Ser. A 89 , 1 (2000), 133–140. [4] A tkinson, M. D. Sorting p erm utations with netw orks of stacks. T ech. Rep. TR-210, Carleton Univ ersity , 1992. A v ailable online at https://carleton.ca/scs/?p=15050 . [5] A tkinson, M. D. Generalized stack p erm utations. Combin. Pr ob ab. Comput. 7 , 3 (1998), 239–246. [6] A tkinson, M. D. Perm uting mac hines and p erm utation patterns. In Permutation Patterns , S. A. Linton, N. Ruškuc, and V. V atter, Eds., vol. 376 of L ondon Math. So c. L e ctur e Note Ser. Cam bridge Universit y Press, Cambridge, England, 2010, pp. 67–88. [7] A tkinson, M. D., Murphy, M. M., and R uškuc, N. Sorting with tw o ordered stac ks in series. The or et. Comput. Sci. 289 , 1 (2002), 205–223. [8] A tkinson, M. D., and Thiy a garajah, M. The p erm utational p o wer of a priority queue. BIT 33 , 1 (1993), 2–6. [9] A tkinson, M. D., and Tulley, D. Bounded capacity priority queues. The or et. Comput. Sci. 182 , 1-2 (1997), 145–157. [10] Babson, E., and West, J. The p erm utations 123 p 4 · · · p m and 321 p 4 · · · p m are Wilf- equiv alent. Gr aphs Combin. 16 , 4 (2000), 373–380. [11] Backelin, J., West, J., and Xin, G. Wilf-equiv alence for singleton classes. A dv. in Appl. Math. 38 , 2 (2007), 133–148. [12] Bell, J., and Stevens, B. A survey of kno wn results and research areas for n -queens. Discr ete Math. 309 , 1 (2009), 1–31. [13] Berger on, F., Bousquet-Mélou, M., and Dulucq, S. Standard paths in the comp osition p oset. A nn. Sci. Math. Québ e c 19 , 2 (1995), 139–151. [14] Bev an, D. P ermutations av oiding 1324 and patterns in Łukasiewicz paths. J. L ondon Math. So c. (2) 92 , 1 (2015), 105–122. [15] Bev an, D., Brignall, R., El vey Price, A., and P antone, J. A structural c haracterisation of A v(1324) and new b ounds on its gro wth rate. Eur op e an J. Combin. 88 (2020), Article 103115, 29 pp. [16] Birmajer, D., Gil, J. B., Tirrell, J. O., and Weiner, M. D. Pattern-a v oiding stabilized- in terv al-free p erm utations. Discr ete Math. 348 , 3 (2025), P ap er No. 114329, 13 pp. [17] Bloom, J. A refinement of Wilf-equiv alence for patterns of length 4. J. Combin. The ory Ser. A 124 (2014), 166–177. [18] Bloom, J., and Elizalde, S. Pattern a voidance in matchings and partitions. Ele ctr on. J. Combin. 20 , 2 (2013), P ap er 5, 38 pp. An Assor tment of Problems in Permut a tion P a tterns 28 [19] Bloom, J., and Saracino, D. A simple bijection b et ween 231 -av oiding and 312 -av oiding placemen ts. J. Combin. Math. Combin. Comput. 89 (2014), 23–32. [20] Bóna, M. Exact enumeration of 1342 -av oiding permutations: a close link with lab eled trees and planar maps. J. Combin. The ory Ser. A 80 , 2 (1997), 257–272. [21] Bóna, M. A new upp er b ound for 1324 -a v oiding p erm utations. Combin. Pr ob ab. Comput. 23 (2014), 717–724. [22] Bóna, M. A new record for 1324 -av oiding permutations. Eur op e an J. Math. 1 , 1 (2015), 198–206. [23] Bóna, M. A W alk Thr ough Combinatorics , fourth ed. W orld Scientific, Hack ensac k, New Jersey , 2017. [24] Bóna, M. Combinatorics of Permutations , third ed. Discrete Mathematics and its Applications. CR C Press, Bo ca Raton, Florida, 2022. [25] Bose, P., Buss, J. F., and Lubiw, A. Pattern matching for p erm utations. Inform. Pr o c ess. L ett. 65 , 5 (1998), 277–283. [26] Brignall, R., Huczynska, S., and V a tter, V. Simple permutations and algebraic gener- ating functions. J. Combin. The ory Ser. A 115 , 3 (2008), 423–441. [27] Burstein, A., and P antone, J. T wo examples of unbalanced Wilf-equiv alence. J. Comb. 6 , 1-2 (2015), 55–67. [28] Cameron, P. J. Homogeneous p ermutations. Ele ctr on. J. Combin. 9 , 2 (2002/03), Paper 2, 9 pp. [29] Chase, P. J. Subsequence n umbers and logarithmic concavit y . Discr ete Math. 16 , 2 (1976), 123–140. [30] Chung, F., Claesson, A., Dukes, M., and Graham, R. Descent p olynomials for p erm u- tations with b ounded drop size. Eur op e an J. Combin. 31 , 7 (2010), 1853–1867. [31] Chung, F., Greene, C., and Hutchinson, J. Herbert S. Wilf (1931–2012). Notic es A mer. Math. So c. 62 , 4 (2015), 346–360. [32] Claesson, A., Jelínek, V., and Steingrímsson, E. Upp er b ounds for the Stanley–Wilf limit of 1324 and other lay ered patterns. J. Combin. The ory Ser. A 119 , 8 (2012), 1680–1691. [33] Conw a y, A. R., and Guttmann, A. J. On the growth rate of 1324 -av oiding p erm utations. A dv. in A ppl. Math. 64 (2015), 50–69. [34] Conw a y, A. R., Guttmann, A. J., and Zinn-Justin, P. 1324 -a v oiding permutations revisited. A dv. in Appl. Math. 96 (2018), 312–333. [35] de Mier, A. k -noncrossing and k -nonnesting graphs and fillings of F errers diagrams. Combi- natoric a 27 , 6 (2007), 699–720. [36] Elder, M., and V a tter, V. Problems and conjectures presen ted at the Third International Conference on Perm utation Patterns, Univ ersit y of Florida, March 7–11, 2005. Wil l not b e publishe d. arXiv:math/0505504 [math.CO]. [37] Elizalde, S. Multiple pattern av oidance with resp ect to fixed p oin ts and excedances. Ele ctr on. J. Combin. 11 , 1 (2004), Research Paper 51, 40 pp. [38] Elizalde, S. Fixed p oin ts and excedances in restricted p erm utations. Ele ctr on. J. Combin. 18 , 2 (2011), Paper 29, 17 pp. An Assor tment of Problems in Permut a tion P a tterns 29 [39] Elizalde, S., and McNamara, P. R. W. The structure of the consecutive pattern poset. Int. Math. R es. Not. IMRN , 7 (2018), 2099–2134. [40] Elizalde, S., and P ak, I. Bijections for refined restricted p erm utations. J. Combin. The ory Ser. A 105 , 2 (2004), 207–219. [41] Fu, S., T ang, D., Han, B., and Zeng, J. ( q , t ) -Catalan num bers: gamma expansions, pattern av oidances, and the ( − 1) -phenomenon. A dv. in A ppl. Math. 106 (2019), 57–95. [42] Gardner, M. Mathematical games. Sci. A mer. 207 , 5 (Nov em b er 1962), 151–168. [43] Garrabrant, S., and P ak, I. Perm utation patterns are hard to count. In Pr o c e e dings of the Twenty-Sixth A nnual A CM-SIAM Symp osium on Discr ete Algorithms (SOD A) . ACM, New Y ork, New Y ork, 2016, pp. 923–936. [44] Gessel, I. M. Symmetric functions and P-recursiv eness. J. Combin. The ory Ser. A 53 , 2 (1990), 257–285. [45] Guo, T., Kra ttenthaler, C., and Zhang, Y. On (shap e-)Wilf-equiv alence for words. A dv. in A ppl. Math. 100 (2018), 87–100. [46] Ibragimo v, I. A. On the comp osition of unimo dal distributions. The ory Pr ob ab. Appl. 1 , 2 (1956), 255–260. [47] Jelínek, V., and Mansour, T. Wilf-equiv alence on k -ary words, comp ositions, and parking functions. Ele ctr on. J. Combin. 16 , 1 (2009), Paper 58, 9 pp. [48] Johansson, F., and Nakamura, B. Using functional equations to enumerate 1324-av oiding p erm utations. A dv. in Appl. Math. 56 (2014), 20–34. [49] Keilson, J., and Gerber, H. Some results for discrete unimo dalit y . J. A mer. Statist. A sso c. 66 (1971), 386–389. [50] Kit aev, S. Patterns in Permutations and W or ds . Monographs in Theoretical Computer Science. Springer, Berlin, Germany , 2011. [51] Knuth, D. E. The A rt of Computer Pr o gr amming , v ol. 1. Addison-W esley , Reading, Mas- sac husetts, 1968. [52] Knuth, D. E. The A rt of Computer Pr o gr amming , v ol. 3. Addison-W esley , Reading, Mas- sac husetts, 1973. [53] Kra ttenthaler, C. Gro wth diagrams, and increasing and decreasing c hains in fillings of Ferrers shap es. A dv. in A ppl. Math. 37 , 3 (2006), 404–431. [54] Kremer, D. P ermutations with forbidden subsequences and a generalized Schröder n umber. Discr ete Math. 218 , 1-3 (2000), 121–130. [55] Kremer, D. P ostscript: “P erm utations with forbidden subsequences and a generalized Sc hröder num b er” . Discr ete Math. 270 , 1-3 (2003), 333–334. [56] Lucas, F. É. A. Théorie des Nombr es , vol. T ome Premier. Gauthier-Villars et Fils, Paris, F rance, 1891. [57] Mansour, T. Interview with Doron Zeilberger. Enum. Combin. A ppl. 1 , 1 (2021), Interview #S3I3, 4 pp. [58] Mansour, T. Interview with Michael Alb ert. Enum. Combin. Appl. 2 , 4 (2022), In terview #S4I1PP , 5 pp. [59] Marcus, A., and T ardos, G. Excluded p erm utation matrices and the Stanley–Wilf conjec- An Assor tment of Problems in Permut a tion P a tterns 30 ture. J. Combin. The ory Ser. A 107 , 1 (2004), 153–160. [60] Marinov, D., and Radoičić, R. Coun ting 1324 -a voiding p ermutations. Ele ctr on. J. Combin. 9 , 2 (2003), Paper 13, 9 pp. [61] McNamara, P. R. W., and Steingrímsson, E. On the top ology of the p erm utation pattern p oset. J. Combin. The ory Ser. A 134 (2015), 1–35. [62] Murphy, M. M. R estricte d Permutations, A ntichains, A tomic Classes, and Stack Sorting . PhD thesis, Univ ersit y of St Andrews, 2002. A v ailable online at http://hdl.handle.net/ 10023/11023 . [63] Noonan, J., and Zeilberger, D. The enumeration of p erm utations with a prescrib ed num ber of “forbidden” patterns. A dv. in A ppl. Math. 17 , 4 (1996), 381–407. [64] O’Hara, K. M. Unimo dalit y of Gaussian co efficien ts: a constructive pro of. J. Combin. The ory Ser. A 53 , 1 (1990), 29–52. [65] Pouzet, M., and Rosenber g, I. G. Sp erner prop erties for groups and relations. Eur op e an J. Combin. 7 , 4 (1986), 349–370. [66] Pra tt, V. R. Computing p erm utations with double-ended queues, parallel stacks and parallel queues. In STOC ’73: Pr o c e e dings of the Fifth A nnual A CM Symp osium on the The ory of Computing . ACM, New Y ork, New Y ork, 1973, pp. 268–277. [67] Preußer, T. B., and Engelhardt, M. R. Putting queens in carry chains, N o ¯ 27. J. Signal Pr o c ess. Systems 88 , 2 (2017), 185–201. [68] Ra y, N., and West, J. P osets of matrices and p erm utations with forbidden subsequences. A nn. Comb. 7 , 1 (2003), 55–88. [69] R ober tson, A., Saracino, D., and Zeilberger, D. Refined restricted p erm utations. A nn. Comb. 6 , 3-4 (2002), 427–444. [70] Sagan, B. E. Comp ositions inside a rectangle and unimo dalit y . J. Algebr aic Combin. 29 , 4 (2009), 405–411. [71] Sagan, B. E., and V a tter, V. The Möbius function of a comp osition p oset. J. Algebr aic Combin. 24 , 2 (2006), 117–136. [72] Shapiro, L., and Stephens, A. B. Bo otstrap p ercolation, the Schröder num bers, and the n -kings problem. SIAM J. Discr ete Math. 4 , 2 (1991), 275–280. [73] Smith, R., and V a tter, V. A stack and a pop stack in series. A ustr alas. J. Combin. 58 , 1 (2014), 157–171. [74] St anko v a, Z. F orbidden subsequences. Discr ete Math. 132 , 1-3 (1994), 291–316. [75] St anko v a, Z. Classification of forbidden subsequences of length 4 . Eur op e an J. Combin. 17 , 5 (1996), 501–517. [76] St anko v a, Z. Shap e-Wilf-ordering on p erm utations of length 3. Ele ctr on. J. Combin. 14 , 1 (2007), Paper 56, 44 pp. [77] St anko v a, Z., and West, J. A new class of Wilf-equiv alen t p ermutations. J. Algebr aic Combin. 15 , 3 (2002), 271–290. [78] St anley, R. P. Log-concav e and unimo dal sequences in algebra, combinatorics, and geometry . In Gr aph the ory and its applic ations: East and W est (Jinan, 1986) , vol. 576 of A nn. New Y ork A c ad. Sci. New Y ork Acad. Sci., New Y ork, New Y ork, 1989, pp. 500–535. An Assor tment of Problems in Permut a tion P a tterns 31 [79] St anton, D. Unimo dalit y and Young’s lattice. J. Combin. The ory Ser. A 54 , 1 (1990), 41–53. [80] Steingrímsson, E. Some op en problems on p erm utation patterns. In Surveys in Combina- torics 2013 , S. R. Blackburn, S. Gerke, and M. Wildon, Eds., vol. 409 of L ondon Math. So c. L e ctur e Note Ser. Cambridge Univ ersity Press, Cambridge, England, 2013, pp. 239–263. [81] Sulanke, R. A. Three recurrences for parallelogram p oly omino es. J. Differ. Equations A ppl. 5 , 2 (1999), 155–176. [82] T arjan, R. Sorting using netw orks of queues and stacks. J. A sso c. Comput. Mach. 19 , 2 (1972), 341–346. [83] Tenner, B. E. Pattern av oidance and the Bruhat order. J. Combin. The ory Ser. A 114 , 5 (2007), 888–905. [84] V a tter, V. Problems and conjectures presen ted at the problem session. In Permutation Patterns , S. Linton, N. Ruškuc, and V. V atter, Eds., vol. 376 of L ondon Math. So c. L e ctur e Note Ser. Cambridge Universit y Press, Cambridge, England, 2010, pp. 339–344. [85] V a tter, V. P ermutation classes. In Handb o ok of Enumer ative Combinatorics , M. Bóna, Ed. CR C Press, Bo ca Raton, Florida, 2015, pp. 754–833. [86] West, J. Permutations with F orbidden Subse quenc es and Stack-Sortable Permutations . PhD thesis, M.I.T., 1990. A v ailable online at http://hdl.handle.net/1721.1/13641 . [87] West, J. Sorting t wice through a stack. The or et. Comput. Sci. 117 , 1-2 (1993), 303–313. [88] West, J. Generating trees and the Catalan and Sc hröder num b ers. Discr ete Math. 146 , 1-3 (1995), 247–262. [89] Wilf, H. S. The patterns of p erm utations. Discr ete Math. 257 , 2-3 (2002), 575–583. [90] Zeilberger, D. Kathy O’Hara’s constructive pro of of the unimo dalit y of the Gaussian p oly- nomials. A mer. Math. Monthly 96 , 7 (1989), 590–602.
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment