Sorting with pattern-avoiding stacks: the 132-machine

Giulio Cerbai, Anders Claesson, Luca Ferrari, Einar Steingrímsson

Research output: Contribution to journalArticlepeer-review

6 Citations (Scopus)
5 Downloads (Pure)


This paper continues the analysis of the pattern-avoiding sorting machines recently 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 characterize 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 mentioned 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.

Original languageEnglish
Article number3.32
Number of pages27
JournalElectronic Journal of Combinatorics
Issue number3
Publication statusPublished - 21 Aug 2020


  • pattern-avoiding sorting machine
  • combinatorial objects
  • stacksort


Dive into the research topics of 'Sorting with pattern-avoiding stacks: the 132-machine'. Together they form a unique fingerprint.

Cite this