首页> 外文期刊>Algorithmica >On Smoothed Analysis of Quicksort and Hoare's Find
【24h】

On Smoothed Analysis of Quicksort and Hoare's Find

机译:关于Quicksort和Hoare's Find的平滑分析

获取原文
获取原文并翻译 | 示例
           

摘要

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 or one-sided quicksort—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. In the first perturbation model, an adversary specifies a sequence of n numbers of [0,1], and then, to each number of the sequence, we add a random number drawn independently from the interval [0, d. We prove that Hoare's find needs Θ(n/(d+n)√n/d+ n) comparisons in expectation if the adversary may also specify the target element (even after seeing the perturbed sequence) and slightly fewer comparisons for finding the median.In the second perturbation model, each element is marked with a probability of 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 Ω((1- p)n/p log n).rnFinally, 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.
机译:我们提供了对Hoare的find算法的平滑分析,并且我们将重新讨论quicksort的平滑分析。 Hoare的查找算法(通常称为快速选择或单面快速排序)是一种易于实现的算法,用于查找序列的第K个最小元素。 Hoare的发现需要的最坏情况下的比较数是Θ(n〜2),而平均情况下的数目是Θ(n)。我们通过提供平滑的分析来分析这两个极端之间发生的情况。在第一个扰动模型中,对手指定n个[0,1]的序列,然后向序列的每个数字添加独立于间隔[0,d]绘制的随机数。我们证明,如果对手也可以指定目标元素(即使在看到扰动序列之后),Hoare的发现也需要进行Θ(n /(d + n)√n/ d + n)比较,并且寻找中位数的比较少。在第二个扰动模型中,每个元素都以p的概率标记,然后将随机排列应用于标记的元素。我们证明寻找中位数的期望比较数是Ω((1-p)n / p log n)。最后,我们为quicksort和Hoare的中位数比较的平滑数提供了下界。三个枢轴规则,通常产生比总是选择第一个元素更快的算法:枢轴是序列的第一个,中间和最后一个元素的中值。我们显示三位数的中位数不会比经典规则产生明显的改善。

著录项

  • 来源
    《Algorithmica》 |2012年第4期|p.879-905|共27页
  • 作者单位

    Department of Computer Science, Saarland University, Postfach 151150, 66041 Saarbrucken,Germany;

    FMI, Universitat Stuttgart, Universitaetsstrasse 38, 70569 Stuttgart, Germany;

    Department of Applied Mathematics, University of Twente, Postbus 217, 7500 AE Enschede,The Netherlands;

    Department of Computer Science, Saarland University, Postfach 151150, 66041 Saarbrucken,Germany;

  • 收录信息 美国《科学引文索引》(SCI);美国《工程索引》(EI);
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

    Smoothed analysis; Hoare's find; Quickselect; Quicksort; Median-of-three;

    机译:平滑的分析;霍尔的发现;快速选择;快速排序;三分中位数;

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号