Related papers: Passing through a stack $k$ times
Machines whose main purpose is to permute and sort data are studied. The sets of permutations that can arise are analysed by means of finite automata and avoided pattern techniques. Conditions are given for these sets being enumerated by…
The (classical) problem of characterizing and enumerating permutations that can be sorted using two stacks connected in series is still largely open. In the present paper we address a related problem, in which we impose restrictions both on…
The problem of determining which permutations can be sorted using certain switchyard networks dates back to Knuth in 1968. In this work, we are interested in permutations which are sortable on a double-ended queue (called a deque), or on…
In this work, we consider a restricted case of the well studied Sorting by Block Interchanges problem. We put an upper bound k on the length of the blocks (substrings) to be interchanged at each step. We call the problem Sorting by k-Block…
Inspired by a common technique for shuffling a deck of cards on a table without riffling, we formalize the pile shuffle and investigate its capabilities as a sorting device. Our study is novel in that we consider pile shuffle in three…
We compute the number of ways a given permutation can be written as a product of exactly $k$ transpositions. We express this number as a linear combination of explicit geometric sequences, with coefficients which can be computed in many…
A descent $k$ of a permutation $\pi=\pi_{1}\pi_{2}\dots\pi_{n}$ is called a big descent if $\pi_{k}>\pi_{k+1}+1$; denote the number of big descents of $\pi$ by $\operatorname{bdes}(\pi)$. We study the distribution of the…
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 use an interesting result of probabilistic flavor concerning the product of two permutations consisting of one cycle each to find an explicit formula for the average number of block interchanges needed to sort a permutation of length…
Pattern avoiding machines were recently introduced by Claesson, Ferrari and the current author to gain a better understanding of the classical $2$-stacksort problem. In this paper we generalize these devices by allowing permutations with…
We bound the number of permutations with a fixed number $r$ of $321 \ominus p_0$ patterns by a constant times the number of permutations which avoid $321 \ominus p_0$. We use this new upper bound to show that the ordinary generating…
An infinite permutation is a linear ordering of the set of non-negative integers. Generally, the properties of infinite permutations analogous to those of infinite words show some resemblances and some differences between permutations and…
We study sorting by queues that can rearrange their content by applying permutations from a predefined set. These new sorting devices are called shuffle queues and we investigate those of them corresponding to sets of permutations defining…
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…
We present a deterministic comparison-based algorithm that sorts sequences avoiding a fixed permutation $\pi$ in linear time, even if $\pi$ is a priori unkown. Moreover, the dependence of the multiplicative constant on the pattern $\pi$…
We study the behavior of West's stack-sorting map $s$ on permutations whose last entry is also their least. Let $S_{n}':=\{\pi0\mid \pi\in S_n\}$ where $\pi0$ denotes the concatenation of $\pi$ and $0$. For each permutation $\pi\in S_n'$,…
Given a set $Y$ of decreasing plane trees and a permutation $\pi$, how many trees in $Y$ have $\pi$ as their postorder? Using combinatorial and geometric constructions, we provide a method for answering this question for certain sets $Y$…
We describe an algorithm, implemented in Python, which can enumerate any permutation class with polynomial enumeration from a structural description of the class. In particular, this allows us to find formulas for the number of permutations…
Let $\Omega=\{1,2,...,n\}$ where $n \ge 2$. The {\em shape} of an ordered set partition $P=(P_1,..., P_k)$ of $\Omega$ is the integer partition $\lambda=(\lambda_1,...,\lambda_k)$ defined by $\lambda_i = |P_i|$. Let G be a group of…
We use stack words to find a new, simple proof for the best known upper bound for the number of 3-stack sortable permutations of a given length. This is the first time that stack words are used to obtain such a result.