Stack sorting with restricted stacks

07/18/2019
by   Giulio Cerbai, et al.
0

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 procedure and on the stacks. More precisely, we consider a greedy algorithm where we perform the rightmost legal operation (here "rightmost" refers to the usual representation of stack sorting problems). Moreover, the first stack is required to be σ-avoiding, for some permutation σ, meaning that, at each step, the elements maintained in the stack avoid the pattern σ when read from top to bottom. Since the set of permutations which can be sorted by such a device (which we call σ-machine) is not always a class, it would be interesting to understand when it happens. We will prove that the set of σ-machines whose associated sortable permutations are not a class is counted by Catalan numbers. Moreover, we will analyze two specific σ-machines in full details (namely when σ=321 and σ=123), providing for each of them a complete characterization and enumeration of sortable permutations.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/03/2020

Catalan and Schröder permutations sortable by two restricted stacks

We investigate the permutation sorting problem with two restricted stack...
research
10/08/2019

Stack Sorting with Increasing and Decreasing Stacks

We introduce a sorting machine consisting of k+1 stacks in series: the f...
research
07/05/2023

Sorting Pattern-Avoiding Permutations via 0-1 Matrices Forbidding Product Patterns

We consider the problem of comparison-sorting an n-permutation S that av...
research
08/22/2022

Analysis of Approximate sorting in I/O model

We consider the problem of approximate sorting in I/O model. The goal of...
research
10/25/2019

A Curious Link Between Prime Numbers, the Maundy Cake Problem and Parallel Sorting

We present new theoretical algorithms that sums the n-ary comparators ou...
research
06/15/2017

Experimental Study of Compressed Stack Algorithms in Limited Memory Environments

The compressed stack is a data structure designed by Barba et al. (Alg...
research
01/27/2023

Stack-Aware Hyperproperties

A hyperproperty relates executions of a program and is used to formalize...

Please sign up or login with your details

Forgot password? Click here to reset