首页> 外文会议>International Computing and Combinatorics Conference >On Smoothed Analysis of Quicksort and Hoare's Find
【24h】

On Smoothed Analysis of Quicksort and Hoare's Find

机译:关于Quicksort的平滑分析,HOARE的发现

获取原文

摘要

We provide a smoothed analysis of Hoare's find algorithm and we revisit the smoothed analysis of quicksort. Hoare's find algorithm -often called quickselect - is an easy-to-implement algorithm for finding the k-th smallest element of a sequence. While the worst-case number of comparisons that Hoare's find needs is Θ(n~2), the average-case number is Θ(n). We analyze what happens between these two extremes by providing a smoothed analysis of the algorithm in terms of two different perturbation models: additive noise and partial permutations. In the first model, an adversary specifies a sequence of n numbers of [0,1], and then each number is perturbed by adding a random number drawn from the interval [0,d]. We prove that Hoare's find needs Θ(n/d+1(n/d)~(1/2) + n) comparisons in expectation if the adversary may also specify the element that we would like to find. Furthermore, we show that Hoare's find needs fewer comparisons for finding the median. In the second model, each element is marked with probability p and then a random permutation is applied to the marked elements. We prove that the expected number of comparisons to find the median is in Ω((1 - p)n/p log n), which is again tight. Finally, we provide lower bounds for the smoothed number of comparisons of quicksort and Hoare's find for the median-of-three pivot rule, which usually yields faster algorithms than always selecting the first element: The pivot is the median of the first, middle, and last element of the sequence. We show that median-of-three does not yield a significant improvement over the classic rule: the lower bounds for the classic rule carry over to median-of-three.
机译:我们提供了对Hoare的查找算法的平滑分析,我们重新审视了Quicksort的平滑分析。 HOARE的查找算法 - 名为QuickSelect的often - 是一个易于实现序列的k-th最小元素的易于实现算法。虽然HOARE发现需要的最坏情况的比较数量是θ(n〜2),但平均壳体编号是θ(n)。我们通过在两个不同的扰动模型方面提供对算法的平滑分析来分析这两个极端之间的发生:添加噪声和部分排列。在第一个模型中,对手指定了一系列n个数量的[0,1],然后通过添加从间隔[0,d]绘制的随机数来扰乱每个数字。如果对手指定了我们要查找的元素,我们证明HOARE的发现需要θ(n / d + 1(n / d + 1(n / d)〜(1/2)+ n)比较。此外,我们表明,Hoare的发现需要更少的比较来寻找中位数。在第二模型中,每个元素用概率p标记,然后将随机置换施加到标记元件。我们证明了查找中位数的预期比较次数是ω((1 - p)n / p log n),其再次紧张。最后,我们为Quicksort的比较和Hoare的光滑比较数为三个枢轴规则提供了下限,这通常会产生比始终选择第一元素的速度更快:枢轴是第一,中间的中位数,中间,中间,和序列的最后一个元素。我们表明,三个中位数不产生经典规则的重大改进:经典规则的下限随身携带到三个中位数。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号