arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1810.12047cs.DS
收藏

使用Lomuto分区方案的简单快速的BlockQuicksort

Simple and Fast BlockQuicksort using Lomuto's Partitioning Scheme

Martin Aumüller, Nikolaj Hass

摘要:

本文介绍了Edelkamp和Weiss(ESA 2016)描述的BlockQuicksort算法的简单变体。简化是通过使用Lomuto的分区方案,而不是Hoare的交叉指针技术来划分输入。为了实现一个强大的排序算法,以及在许多不同的输入类型,本文介绍了一种新的两个枢轴Lomuto的分区方案的变体。一个令人惊讶的简单扭曲的通用两个枢轴快速排序方法使算法强大。本文提供了一个分析所提出的算法的理论特性,并将它们与竞争对手进行比较。分析表明,基于Lomuto的方法比基于Hoare的BlockQuicksort方法产生更高的平均排序成本。此外,分析是特别有用的理由约枢纽选择,适合双枢纽的方法。一项广泛的实验研究表明,尽管它们的理论行为较差,但更简单的变体的性能与原始版本的BlockQuicksort一样好。

英文摘要:

This paper presents simple variants of the BlockQuicksort algorithm described by Edelkamp and Weiss (ESA 2016). The simplification is achieved by using Lomuto's partitioning scheme instead of Hoare's crossing pointer technique to partition the input. To achieve a robust sorting algorithm that works well on many different input types, the paper introduces a novel two-pivot variant of Lomuto's partitioning scheme. A surprisingly simple twist to the generic two-pivot quicksort approach makes the algorithm robust. The paper provides an analysis of the theoretical properties of the proposed algorithms and compares them to their competitors. The analysis shows that Lomuto-based approaches incur a higher average sorting cost than the Hoare-based approach of BlockQuicksort. Moreover, the analysis is particularly useful to reason about pivot choices that suit the two-pivot approach. An extensive experimental study shows that, despite their worse theoretical behavior, the simpler variants perform as well as the original version of BlockQuicksort.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑