arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 1905.09656cs.DS
收藏

关于MergeInsertion的平均情况

On the Average Case of MergeInsertion

Florian Stober, Armin Weiß

摘要:

MergeInsertion,也被称为Ford-Johnson算法,是一种排序算法,到今天为止,对于许多输入大小,它都能达到比较次数的最佳上限。事实上,它非常接近信息论的下限。虽然最坏的情况下的行为是很好的理解,只有很少的人知道的平均情况。这项工作需要仔细研究的平均情况下的行为。特别是,我们建立了一个上限的$n \log n - 1.4005n + o(n)$比较。我们还给出了一个精确的描述链的长度的概率分布的一个给定的元素被插入,并使用它来近似的平均数的比较数字。此外,我们计算精确的平均数比较$n$高达148。此外,我们实验探索不同的决策树的二进制插入的影响。总之,我们进行的实验表明,略有不同的插入顺序导致一个更好的平均情况下,我们比较该算法与最近的组合(1,2)-Insertionsort岩间和照山。

英文摘要:

MergeInsertion, also known as the Ford-Johnson algorithm, is a sorting algorithm which, up to today, for many input sizes achieves the best known upper bound on the number of comparisons. Indeed, it gets extremely close to the information-theoretic lower bound. While the worst-case behavior is well understood, only little is known about the average case. This work takes a closer look at the average case behavior. In particular, we establish an upper bound of $n \log n - 1.4005n + o(n)$ comparisons. We also give an exact description of the probability distribution of the length of the chain a given element is inserted into and use it to approximate the average number of comparisons numerically. Moreover, we compute the exact average number of comparisons for $n$ up to 148. Furthermore, we experimentally explore the impact of different decision trees for binary insertion. To conclude, we conduct experiments showing that a slightly different insertion order leads to a better average case and we compare the algorithm to the recent combination with (1,2)-Insertionsort by Iwama and Teruyama.

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

↑