paper

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

arXiv:2307.02294

Abstract

We consider the problem of comparison-sorting an -permutation that avoids some -permutation . Chalermsook, Goswami, Kozma, Mehlhorn, and Saranurak prove that when is sorted by inserting the elements into the GreedyFuture binary search tree, the running time is linear in the extremal function . This is the maximum number of 1s in an 0-1 matrix avoiding , where is the permutation matrix of , the Kronecker product, and . The same time bound can be achieved by sorting with Kozma and Saranurak's SmoothHeap. In this paper we give nearly tight upper and lower bounds on the density of -free matrices in terms of the inverse-Ackermann function . \[ \mathrm{Ex}(P_π\otimes \text{hat},n) = \left\{\begin{array}{ll} Ω(n\cdot 2^{α(n)}), & \mbox{for most ,}\\ O(n\cdot 2^{O(k^2)+(1+o(1))α(n)}), & \mbox{for all .} \end{array}\right. \] As a consequence, sorting -free sequences can be performed in time. For many corollaries of the dynamic optimality conjecture, the best analysis uses forbidden 0-1 matrix theory. Our analysis may be useful in analyzing other classes of access sequences on binary search trees.