HackerPapers

arXiv:1409.3600cs.DS

Selection Algorithms with Small Groups

Ke Chen, Adrian Dumitrescu

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

We revisit the selection problem, namely that of computing the $i$th order statistic of $n$ given elements, in particular the classic deterministic algorithm by grouping and partition due to Blum, Floyd, Pratt, Rivest, and Tarjan (1973). Whereas the original algorithm uses groups of odd size at least $5$ and runs in linear time, it has been perpetuated in the literature that using smaller group sizes will force the worst-case running time to become superlinear, namely $Ω(n \log{n})$. We first point out that the usual arguments found in the literature justifying the superlinear worst-case running time fall short of proving this claim. We further prove that it is possible to use group size smaller than $5$ while maintaining the worst case linear running time. To this end we introduce three simple variants of the classic algorithm, the repeated step algorithm, the shifting target algorithm, and the hyperpair algorithm, all running in linear time.

arXiv comments
13 pages, 5 figures, 1 table
Journal reference
DOI
Subjects
cs.DSData Structures and Algorithms math.COCombinatorics

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Jul 2024 to Jul 2024.

Comments linking this paper, per year.

Discussed in comments1 thread

    • 3 and 4 elements will fail to prove the complexity is linear You still can do 3 or 4 but with slight modifications https://arxiv.org/abs/1409.3600 For example, for 4 elements, it's advised to take lower median for the first half and upper median for the second half. Then the…

      danlarkView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.