Related papers: Generalizations of two-stack-sortable permutations
We introduce an algorithm to determine when a sorting operation, such as stack-sort or bubble-sort, outputs a given pattern. The algorithm provides a new proof of the description of West-2-stack-sortable permutations, that is permutations…
In an exercise in the first volume of his famous series of books, Knuth considered sorting permutations by passing them through a stack. Many variations of this exercise have since been considered, including allowing multiple passes through…
In recent work, Zeilberger and the author used a functional equations approach for enumerating permutations with r occurrences of the pattern 12...k. In particular, the approach yielded a polynomial-time enumeration algorithm for any fixed…
In this paper we examine the sorting operator $T(LnR)=T(R)T(L)n$. Applying this operator to a permutation is equivalent to passing the permutation reversed through a stack. We prove theorems that characterise $t$-revstack sortability in…
We consider the set of permutations that are sorted after two passes through a pop stack. We characterize these permutations in terms of forbidden patterns (classical and barred) and enumerate them according to the ascent statistic. Then we…
We consider the number of passes a permutation needs to take through a stack if we only pop the appropriate output values and start over with the remaining entries in their original order. We define a permutation $\pi$ to be $k$-pass…
We address the problem of the number of permutations that can be sorted by two stacks in series. We do this by first counting all such permutations of length less than 20 exactly, then using a numerical technique to obtain nineteen further…
We characterise and enumerate permutations that are sortable by n-4 passes through a stack. We conjecture the number of permutations sortable by n-5 passes, and also the form of a formula for the general case n-k, which involves a…
In this article, we give a polynomial algorithm to decide whether a given permutation $\sigma$ is sortable with two stacks in series. This is indeed a longstanding open problem which was first introduced by Knuth. He introduced the stack…
We consider a stack sorting algorithm where only the appropriate output values are popped from the stack and then any remaining entries in the stack are run through the stack in reverse order. We identify the basis for the $2$-reverse pass…
In the 60's, Knuth introduced stack-sorting and serial compositions of stacks. In particular, one significant question arise out of the work of Knuth: how to decide efficiently if a given permutation is sortable with 2 stacks in series?…
We investigate a generalization of stacks that we call $\mathcal{C}$-machines. We show how this viewpoint rapidly leads to functional equations for the classes of permutations that $\mathcal{C}$-machines generate, and how these systems of…
Using earlier results we prove a formula for the number $W_{(n,k)}$ of 2-stack sortable permutations of length $n$ with $k$ runs, or in other words, $k-1$ descents. This formula will yield the suprising fact that there are as many 2-stack…
Recently Albert and Bousquet-M\'elou \cite{AB15} obtained the solution to the long-standing problem of the number of permutations sortable by two stacks in parallel (tsip). Their solution was expressed in terms of functional equations. We…
We derive a simple functional equation with two catalytic variables characterising the generating function of 3-stack-sortable permutations. Using this functional equation, we extend the 174-term series to 1000 terms. From this series, we…
We introduce a sorting machine consisting of $k+1$ stacks in series: the first $k$ stacks can only contain elements in decreasing order from top to bottom, while the last one has the opposite restriction. This device generalizes \cite{SM},…
We extend and generalize many of the enumerative results concerning West's stack-sorting map $s$. First, we prove a useful theorem that allows one to efficiently compute $|s^{-1}(\pi)|$ for any permutation $\pi$, answering a question of…
We prove a "decomposition lemma" that allows us to count preimages of certain sets of permutations under West's stack-sorting map $s$. As a first application, we give a new proof of Zeilberger's formula for the number of 2-stack-sortable…
We study permutations that are sorted by operators of the form $\mathbf{S} \circ \alpha \circ \mathbf{S}$, where $\mathbf{S}$ is the usual stack sorting operator introduced by D. Knuth and $\alpha$ is any $D_8$-symmetry obtained combining…
At the end of the 1960s, Knuth characterised the permutations that can be sorted using a stack in terms of forbidden patterns. He also showed that they are in bijection with Dyck paths and thus counted by the Catalan numbers. Subsequently,…