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

Java 7的Dual Pivot快速排序的平均情况分析

Average Case Analysis of Java 7's Dual Pivot Quicksort

Sebastian Wild, Markus E. Nebel

摘要:

最近,Yaroslavskiy的一个新的Quicksort变体被选为Oracle Java 7运行时库的标准排序方法。这一变化的决定是基于经验研究,这些研究表明,平均而言,新算法比以前使用的经典快速排序更快。令人惊讶的是,这种改进是通过使用双枢轴方法实现的,这种方法在过去的几项理论研究中被认为是没有前途的。在本文中,我们确定了这一意外成功的原因。此外,我们提出了第一个精确的平均情况下分析的新算法显示,例如,随机排列的长度$n$排序使用$1.9n\ln n-2.46n+\mathcal{O}(\ln n)$密钥比较和$0.6n\ln n+0.08n+\mathcal{O}(\ln n)$交换。

英文摘要:

Recently, a new Quicksort variant due to Yaroslavskiy was chosen as standard sorting method for Oracle's Java 7 runtime library. The decision for the change was based on empirical studies showing that on average, the new algorithm is faster than the formerly used classic Quicksort. Surprisingly, the improvement was achieved by using a dual pivot approach, an idea that was considered not promising by several theoretical studies in the past. In this paper, we identify the reason for this unexpected success. Moreover, we present the first precise average case analysis of the new algorithm showing e.g. that a random permutation of length $n$ is sorted using $1.9n\ln n-2.46n+\mathcal{O}(\ln n)$ key comparisons and $0.6n\ln n+0.08n+\mathcal{O}(\ln n)$ swaps.

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

↑