Deterministic Cache-Oblivious Funnelselect
Abstract
In the multiple-selection problem one is given an unsorted array of elements and an array of query ranks , and the task is to return, in sorted order, the elements in of rank , respectively. The asymptotic deterministic comparison complexity of the problem was settled by Dobkin and Munro [JACM 1981]. In the I/O model an optimal I/O complexity was achieved by Hu et al. [SPAA 2014]. Recently [ESA 2023], we presented a cache-oblivious algorithm with matching I/O complexity, named funnelselect, since it heavily borrows ideas from the cache-oblivious sorting algorithm funnelsort from the seminal paper by Frigo, Leiserson, Prokop and Ramachandran [FOCS 1999]. Funnelselect is inherently randomized as it relies on sampling for cheaply finding many good pivots. In this paper we present deterministic funnelselect, achieving the same optional I/O complexity cache-obliviously without randomization. Our new algorithm essentially replaces a single (in expectation) reversed-funnel computation using random pivots by a recursive algorithm using multiple reversed-funnel computations. To meet the I/O bound, this requires a carefully chosen subproblem size based on the entropy of the sequence of query ranks; deterministic funnelselect thus raises distinct technical challenges not met by randomized funnelselect. The resulting worst-case I/O bound is , where is the external memory block size, is the internal memory size, for some constant , and (assuming and ).
Keywords
Cite
@article{arxiv.2402.17631,
title = {Deterministic Cache-Oblivious Funnelselect},
author = {Gerth Stølting Brodal and Sebastian Wild},
journal= {arXiv preprint arXiv:2402.17631},
year = {2024}
}