3 research outputs found

    2-stack pushall sortable permutations

    Full text link
    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? Whether this problem is polynomial or NP-complete is still unanswered yet. In this article we introduce 2-stack pushall permutations which form a subclass of 2-stack sortable permutations and show that these two classes are closely related. Moreover, we give an optimal O(n^2) algorithm to decide if a given permutation of size n is 2-stack pushall sortable and describe all its sortings. This result is a step to the solve the general 2-stack sorting problem in polynomial time.Comment: 41 page

    Permutation classes

    Full text link
    This is a survey on permutation classes for the upcoming book Handbook of Enumerative Combinatorics

    2-Stack Sorting is polynomial ∗

    Get PDF
    In this article, we give a polynomial algorithm to decide whether a given permutation σ is sortable with two stacks in series. This is indeed a longstanding open problem which was first introduced by Knuth in [1]. He introduced the stack sorting problem as well as permutation patterns which arises naturally when characterizing permutations that can be sorted with one stack. When several stacks in series are considered, few results are known. There are two main different problems. The first one is the complexity of deciding if a permutation is sortable or not, the second one being the characterization and the enumeration of those sortablepermutations. Weherebyprovethat thefirstproblemlies inPbygivingapolynomial algorithm to solve it. This article strongly relies on [3] in which 2-stack pushall sorting is defined and studied. 1 Notations and definitions Let I be a set of integers. A permutation of I is a bijection from I onto I. We write a permutation σ of I as the word σ = σ1σ2...σn where σi = σ(i1) with I = {i1...in} and i1 < i2 < ·· · < in. The size of the permutation is the integer n and if not precised, I = [1...n]. Notice that given the word σ1σ2...σn we can deduce the set I and the map σ. For any subset J of I, σ |J denotes the permutation obtained by restricting σ to J. In particular the word corresponding to σ |J is a subword of the word corresponding to σ. Let’s recall the problem of sorting with two stacks in series. Given two stacks H and V in series –as shown in Figure 1 – and a permutation σ, we want to sort elements of σ using the stacks. We write σ as the word σ = σ1σ2...σn with σi = σ(i) and take it as input. Then we have three different operations: • ρ which consist in pushing the next element of σ on the top of H. • λ which transfer the topmost element of H on the top of V. • µ which pop the topmost element of V and write it in the output
    corecore