arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1705.00849cs.DS
收藏

基于比较排序的平均复杂度改进

Improved Average Complexity for Comparison-Based Sorting

Kazuo Iwama, Junichi Teruyama

摘要:

本文研究排序算法的平均复杂度与比较次数的关系。它的信息论下限是$n \lg n - 1.4427n + O(\log n)$。对于许多有效的算法,第一个$n\lg n$长期很容易实现,我们的重点是(负)常数因子的线性项。MergeInsertion排序的当前最佳值是$-1.3999$。我们的新值是$-1.4106$,将差距缩小了一些$25\%$。我们算法的一个重要组成部分是“二元插入”,它将两个数字$A$和$B$,$A<B$插入到一个排序序列$T$中。该插入算法对于严格的数学分析仍然足够简单,并且对于$T$的长度的一定范围工作良好,对于该范围,简单的二进制插入不起作用,因此允许我们采用与二进制插入互补的方法。

英文摘要:

This paper studies the average complexity on the number of comparisons for sorting algorithms. Its information-theoretic lower bound is $n \lg n - 1.4427n + O(\log n)$. For many efficient algorithms, the first $n\lg n$ term is easy to achieve and our focus is on the (negative) constant factor of the linear term. The current best value is $-1.3999$ for the MergeInsertion sort. Our new value is $-1.4106$, narrowing the gap by some $25\%$. An important building block of our algorithm is "two-element insertion," which inserts two numbers $A$ and $B$, $A<B$, into a sorted sequence $T$. This insertion algorithm is still sufficiently simple for rigorous mathematical analysis and works well for a certain range of the length of $T$ for which the simple binary insertion does not, thus allowing us to take a complementary approach with the binary insertion.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑