Sorting with pattern-avoiding stacks: the 132-machine Giulio Cerbai∗ Anders Claessony Luca Ferrari∗ Dipartimento di Matematica Science Institute Dipartimento di Matematica e Informatica \U. Dini" University of Iceland e Informatica \U. Dini" University of Firenze Reykjav´ık,Iceland University of Firenze Firenze, Italy
[email protected] Firenze, Italy
[email protected] [email protected] Einar Steingr´ımssonz Department of Mathematics and Statistics University of Strathclyde, Glasgow, Scotland Dipartimento di Matematica e Informatica \U. Dini" University of Firenze, Firenze, Italy
[email protected] Submitted: Jun 11, 2020; Accepted: Jul 21, 2020; Published: Aug 21, 2020 c The authors. Released under the CC BY-ND license (International 4.0). Abstract This paper continues the analysis of the pattern-avoiding sorting machines re- cently introduced by Cerbai, Claesson and Ferrari (2020). These devices consist of two stacks, through which a permutation is passed in order to sort it, where the content of each stack must at all times avoid a certain pattern. Here we char- acterize and enumerate the set of permutations that can be sorted when the first stack is 132-avoiding, solving one of the open problems proposed by the above men- tioned authors. To that end we present several connections with other well known combinatorial objects, such as lattice paths and restricted growth functions (which encode set partitions). We also provide new proofs for the enumeration of some sets of pattern-avoiding restricted growth functions and we expect that the tools introduced can be fruitfully employed to get further similar results. Mathematics Subject Classifications: 05A05, 05A10, 05A15, 05A19, 68P10, 68R05 ∗Members of the INdAM Research group GNCS, and partially supported by INdAM-GNCS 2020 project \Combinatoria delle permutazioni, delle parole e dei grafi: algoritmi e applicazioni".