2-Stack Sorting is polynomial
Adeline Pierrot (LIAFA), Dominique Rossin (LIX)

TL;DR
This paper proves that deciding whether a permutation can be sorted with two stacks in series can be done in polynomial time, resolving a longstanding open problem in permutation sorting.
Contribution
The authors provide the first polynomial-time algorithm for determining 2-stack sortable permutations, addressing a major open problem since Knuth's initial work.
Findings
Deciding 2-stack sortability is in P
Provides a polynomial algorithm for 2-stack sorting decision
Builds on previous work on 2-stack pushall sorting
Abstract
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. 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 sortable permutations. We hereby prove that the first problem lies in P by giving a polynomial algorithm to solve it. This article strongly relies on a previous article in which 2-stack pushall sorting is defined and studied.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsBiochemical and Structural Characterization · Advanced Combinatorial Mathematics · Algorithms and Data Compression
