快速排序对于许多相等的键是最优的

Sebastian Wild
{"title":"快速排序对于许多相等的键是最优的","authors":"Sebastian Wild","doi":"10.1137/1.9781611975062.2","DOIUrl":null,"url":null,"abstract":"I prove that the average number of comparisons for median-of-$k$ Quicksort (with fat-pivot a.k.a. three-way partitioning) is asymptotically only a constant $\\alpha_k$ times worse than the lower bound for sorting random multisets with $\\Omega(n^\\varepsilon)$ duplicates of each value (for any $\\varepsilon>0$). The constant is $\\alpha_k = \\ln(2) / \\bigl(H_{k+1}-H_{(k+1)/2} \\bigr)$, which converges to 1 as $k\\to\\infty$, so Quicksort is asymptotically optimal for inputs with many duplicates. This resolves a conjecture by Sedgewick and Bentley (1999, 2002) and constitutes the first progress on the analysis of Quicksort with equal elements since Sedgewick's 1977 article.","PeriodicalId":340112,"journal":{"name":"Workshop on Analytic Algorithmics and Combinatorics","volume":"19 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-08-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":"{\"title\":\"Quicksort Is Optimal For Many Equal Keys\",\"authors\":\"Sebastian Wild\",\"doi\":\"10.1137/1.9781611975062.2\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"I prove that the average number of comparisons for median-of-$k$ Quicksort (with fat-pivot a.k.a. three-way partitioning) is asymptotically only a constant $\\\\alpha_k$ times worse than the lower bound for sorting random multisets with $\\\\Omega(n^\\\\varepsilon)$ duplicates of each value (for any $\\\\varepsilon>0$). The constant is $\\\\alpha_k = \\\\ln(2) / \\\\bigl(H_{k+1}-H_{(k+1)/2} \\\\bigr)$, which converges to 1 as $k\\\\to\\\\infty$, so Quicksort is asymptotically optimal for inputs with many duplicates. This resolves a conjecture by Sedgewick and Bentley (1999, 2002) and constitutes the first progress on the analysis of Quicksort with equal elements since Sedgewick's 1977 article.\",\"PeriodicalId\":340112,\"journal\":{\"name\":\"Workshop on Analytic Algorithmics and Combinatorics\",\"volume\":\"19 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2016-08-17\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"5\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Workshop on Analytic Algorithmics and Combinatorics\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1137/1.9781611975062.2\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Workshop on Analytic Algorithmics and Combinatorics","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1137/1.9781611975062.2","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5

摘要

我证明了对于中位数($k$)快速排序(使用胖枢轴,也就是三向划分)的平均比较次数,其渐进地仅仅是一个常数$\alpha_k$倍于对每个值有$\Omega(n^\varepsilon)$个重复的随机多集排序的下界(对于任意$\varepsilon>0$)。常数是$\alpha_k = \ln(2) / \bigl(H_{k+1}-H_{(k+1)/2} \bigr)$,收敛到1为$k\to\infty$,所以对于有很多重复项的输入,快速排序是渐近最优的。这解决了Sedgewick和Bentley(1999, 2002)的一个猜想,并构成了自Sedgewick 1977年的文章以来对具有等元素的快速排序分析的第一个进展。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Quicksort Is Optimal For Many Equal Keys
I prove that the average number of comparisons for median-of-$k$ Quicksort (with fat-pivot a.k.a. three-way partitioning) is asymptotically only a constant $\alpha_k$ times worse than the lower bound for sorting random multisets with $\Omega(n^\varepsilon)$ duplicates of each value (for any $\varepsilon>0$). The constant is $\alpha_k = \ln(2) / \bigl(H_{k+1}-H_{(k+1)/2} \bigr)$, which converges to 1 as $k\to\infty$, so Quicksort is asymptotically optimal for inputs with many duplicates. This resolves a conjecture by Sedgewick and Bentley (1999, 2002) and constitutes the first progress on the analysis of Quicksort with equal elements since Sedgewick's 1977 article.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Protection Number of Recursive Trees Ranked Schröder Trees QuickSort: Improved right-tail asymptotics for the limiting distribution, and large deviations (Extended Abstract) Subcritical random hypergraphs, high-order components, and hypertrees Esthetic Numbers and Lifting Restrictions on the Analysis of Summatory Functions of Regular Sequences
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1