分析Quickselect所需的预期位比较次数
Analysis of the expected number of bit comparisons required by Quickselect
摘要:
当排序和搜索算法应用于表示为位串的关键字时,我们不仅可以根据算法所需的关键字比较次数,而且可以根据位比较次数来量化算法的性能。一些标准的排序和搜索算法已经分析了关键字比较,但没有分析位比较。在本文中,我们研究了快速选择(也称为查找)所需的预期位比较数。我们开发的精确和渐近公式的预期数量的位比较需要找到最小或最大的键的快速选择,并表明,预期是渐近线性的键的数量。对于平均情况也得到了类似的结果。为了找到任意秩的密钥,我们推导出一个精确的公式,用于(使用有理算术)只需要有限求和(而不是像数值积分这样的运算)的比特比较的预期数量,并使用它来计算每个目标秩的期望值。
英文摘要:
When algorithms for sorting and searching are applied to keys that are represented as bit strings, we can quantify the performance of the algorithms not only in terms of the number of key comparisons required by the algorithms but also in terms of the number of bit comparisons. Some of the standard sorting and searching algorithms have been analyzed with respect to key comparisons but not with respect to bit comparisons. In this paper, we investigate the expected number of bit comparisons required by Quickselect (also known as Find). We develop exact and asymptotic formulae for the expected number of bit comparisons required to find the smallest or largest key by Quickselect and show that the expectation is asymptotically linear with respect to the number of keys. Similar results are obtained for the average case. For finding keys of arbitrary rank, we derive an exact formula for the expected number of bit comparisons that (using rational arithmetic) requires only finite summation (rather than such operations as numerical integration) and use it to compute the expectation for each target rank.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。