Related papers: Passing through a stack $k$ times with reversals
We consider two orthogonal points of view on finite permutations, seen as pairs of linear orders (corresponding to the usual one line representation of permutations as words) or seen as bijections (corresponding to the algebraic point of…
We introduce a simple lattice model in which percolation is constructed on top of critical percolation clusters, and show that it can be repeated recursively any number $n$ of generations. In two dimensions, we determine the percolation…
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…
We enumerate permutations in the two permutation classes $\text{Av}_n(312, 4321)$ and $\text{Av}_n(321, 4123)$ by the number of cycles each permutation admits. We also refine this enumeration with respect to several statistics.
In a totally ordered set the notion of sorting a finite sequence is defined through a suitable permutation of the sequence's indices. In this paper we prove a simple formula that explicitly describes how the elements of a sequence are…
We introduce consecutive-pattern-avoiding stack-sorting maps $\text{SC}_\sigma$, which are natural generalizations of West's stack-sorting map $s$ and natural analogues of the classical-pattern-avoiding stack-sorting maps $s_\sigma$…
We study the iteration of the process "a particle jumps to the right" in permutations. We prove that the set of permutations obtained in this model after a given number of iterations from the identity is a class of pattern avoiding…
The direct application of the definition of sorting in lattices is impractical because it leads to an algorithm with exponential complexity. In this paper we present for distributive lattices a recursive formulation to compute the sort of a…
We determine the maximal number of steps required to sort $n$ labeled points on a circle by adjacent swaps. Lower bounds for sorting by all swaps, not necessarily adjacent, are given as well.
To reversify an arbitrary sequential algorithm $A$, we gently instrument $A$ with bookkeeping machinery. The result is a step-for-step reversible algorithm that mimics $A$ step-for-step and stops exactly when $A$ does. Without loss of…
Pop-stacks are variants of stacks that were introduced by Avis and Newborn in 1981. Coincidentally, a 1982 result of Unger implies that every permutation of length n can be sorted by n-1 passes through a deterministic pop-stack. We give a…
The number of n-gram features grows exponentially in n, making it computationally demanding to compute the most frequent n-grams even for n as small as 3. Motivated by our production machine learning system built on n-gram features, we ask:…
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 introduce a new permutation statistic, namely, the number of cycles of length $q$ consisting of consecutive integers, and consider the distribution of this statistic among the permutations of $\{1,2,...,n\}$. We determine explicit…
Turing's famous 'machine' framework provides an intuitively clear conception of 'computing with real numbers'. A recursive counterexample to a theorem shows that the theorem does not hold when restricted to computable objects. These…
In this paper we study several variations of the \emph{pancake flipping problem}, which is also well known as the problem of \emph{sorting by prefix reversals}. We consider the variations in the sorting process by adding with prefix…
For which sets A does there exist a mapping, computed by a total or partial recursive function, such that the mapping, when its domain is restricted to A, is a 1-to-1, onto mapping to $\Sigma^*$? And for which sets A does there exist such a…
In the first place, a novel, yet straightforward in-place integer value-sorting algorithm is presented. It sorts in linear time using constant amount of additional memory for storing counters and indices beside the input array. The…
We consider systems of recursively defined combinatorial structures. We give algorithms checking that these systems are well founded, computing generating series and providing numerical values. Our framework is an articulation of the…
The subject of pattern avoiding permutations has its roots in computer science, namely in the problem of sorting a permutation through a stack. A formula for the number of permutations of length n that can be sorted by passing it twice…