We consider the problem of comparison-sorting an $n$-permutation $S$ that avoids some $k$-permutation $\pi$. Chalermsook, Goswami, Kozma, Mehlhorn, and Saranurak prove that when $S$ is sorted by inserting the elements into the GreedyFuture binary search tree, the running time is linear in the extremal function $\mathrm{Ex}(P_\pi\otimes \text{hat},n)$. This is the maximum number of 1s in an $n\times n$ 0-1 matrix avoiding $P_\pi \otimes \text{hat}$, where $P_\pi$ is the $k\times k$ permutation matrix of $\pi$, $\otimes$ the Kronecker product, and $\text{hat} = \left(\begin{array}{ccc}&\bullet&\\\bullet&&\bullet\end{array}\right)$. The same time bound can be achieved by sorting $S$ with Kozma and Saranurak's SmoothHeap. In this paper we give nearly tight upper and lower bounds on the density of $P_\pi\otimes\text{hat}$-free matrices in terms of the inverse-Ackermann function $\alpha(n)$. \[ \mathrm{Ex}(P_\pi\otimes \text{hat},n) = \left\{\begin{array}{ll} \Omega(n\cdot 2^{\alpha(n)}), & \mbox{for most $\pi$,}\\ O(n\cdot 2^{O(k^2)+(1+o(1))\alpha(n)}), & \mbox{for all $\pi$.} \end{array}\right. \] As a consequence, sorting $\pi$-free sequences can be performed in $O(n2^{(1+o(1))\alpha(n)})$ 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.
翻译:我们考虑比较排序一个避免某个k-排列π的n-排列S的问题。Chalermsook、Goswami、Kozma、Mehlhorn和Saranurak证明,当将S的元素插入GreedyFuture二叉搜索树进行排序时,运行时间与极值函数Ex(P_π⊗hat,n)呈线性关系。该函数是n×n的0-1矩阵中避免P_π⊗hat的最大1的个数,其中P_π是π的k×k置换矩阵,⊗是Kronecker积,hat=(\begin{array}{ccc}&\bullet&\\\bullet&&\bullet\end{array})。使用Kozma和Saranurak的SmoothHeap对S进行排序也可达到相同的时间界。本文中,我们以逆Ackermann函数α(n)给出了关于P_π⊗hat自由矩阵密度的几乎紧的上界和下界:\[ Ex(P_π⊗hat,n) = \left\{\begin{array}{ll} Ω(n·2^{α(n)}), & \mbox{对大多数π成立,}\\ O(n·2^{O(k^2)+(1+o(1))α(n)}), & \mbox{对所有π成立。}\end{array}\right. \] 由此可知,对π自由序列的排序可在O(n2^{(1+o(1))α(n)})时间内完成。对于动态最优性猜想的许多推论,最好的分析都使用了禁止0-1矩阵理论。我们的分析可能有助于分析二叉搜索树上的其他访问序列类别。