快速排序使用的位比较数:平均情况分析
The number of bit comparisons used by Quicksort: an average-case analysis
摘要:
用于搜索和排序的许多算法和数据结构(例如数字搜索树)的分析都基于所涉及的键作为位串的表示,因此计算位比较的数量。另一方面,许多其他算法(如快速排序)的标准分析是根据键比较的数量来执行的。我们介绍了一个公平的比较两种类型的算法之间的前景,通过提供一个平均的情况下分析所需的位比较的快速排序。计数位比较而不是键比较将额外的对数因子引入渐近平均总数。我们还提供了一个新的算法,“BitsQuick”,通过消除不必要的位比较,减少了这个因素的恒定顺序。
英文摘要:
The analyses of many algorithms and data structures (such as digital search trees) for searching and sorting are based on the representation of the keys involved as bit strings and so count the number of bit comparisons. On the other hand, the standard analyses of many other algorithms (such as Quicksort) are performed in terms of the number of key comparisons. We introduce the prospect of a fair comparison between algorithms of the two types by providing an average-case analysis of the number of bit comparisons required by Quicksort. Counting bit comparisons rather than key comparisons introduces an extra logarithmic factor to the asymptotic average total. We also provide a new algorithm, "BitsQuick", that reduces this factor to constant order by eliminating needless bit comparisons.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。