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

确定性缓存遗忘的漏斗选择算法

Deterministic Cache-Oblivious Funnelselect

Gerth Stølting Brodal, Sebastian Wild

AI总结:

本文提出确定性缓存遗忘的 funnelselect 算法,通过基于查询秩熵的递归反向漏斗计算替代随机采样,在不使用随机化的情况下达到与随机化版本相同的最优 I/O 复杂度。

摘要:

在多选问题中,给定一个包含 N 个元素的无序数组 S 和一个由 q 个查询秩组成的数组 r_1<...<r_q,任务是以排序顺序分别返回 S 中秩为 r_1, ..., r_q 的 q 个元素。该问题的渐近确定性比较复杂度已由 Dobkin 和 Munro [JACM 1981] 解决。在 I/O 模型中,Hu 等人 [SPAA 2014] 实现了最优 I/O 复杂度。最近 [ESA 2023],我们提出了一个具有匹配 I/O 复杂度的缓存遗忘算法,命名为 funnelselect,因为它大量借鉴了 Frigo、Leiserson、Prokop 和 Ramachandran [FOCS 1999] 开创性论文中缓存遗忘排序算法 funnelsort 的思想。Funnelselect 本质上是随机化的,因为它依赖采样来廉价地找到许多好的主元。在本文中,我们提出了确定性的 funnelselect,在缓存遗忘条件下无需随机化即可实现相同的最优 I/O 复杂度。我们的新算法本质上将一次(期望意义上的)使用随机主元的反向漏斗计算替换为使用多次反向漏斗计算的递归算法。为了满足 I/O 界限,这需要根据查询秩序列的熵精心选择子问题规模;因此,确定性 funnelselect 带来了随机化 funnelselect 所没有遇到的独特技术挑战。最终的最坏情况 I/O 界限为 O(∑_{i=1}^{q+1} (Δ_i/B) · log_{M/B}(N/Δ_i) + N/B),其中 B 是外部存储器块大小,M ≥ B^{1+ε} 是内部存储器大小(对于某个常数 ε>0),Δ_i = r_i - r_{i-1}(假设 r_0=0 且 r_{q+1}=N+1)。

英文摘要:

In the multiple-selection problem one is given an unsorted array $S$ of $N$ elements and an array of $q$ query ranks $r_1<\cdots<r_q$, and the task is to return, in sorted order, the $q$ elements in $S$ of rank $r_1, \ldots, r_q$, 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 $O\bigl(\sum_{i=1}^{q+1} \frac{Δ_i}{B} \cdot \log_{M/B} \frac{N}{Δ_i} + \frac{N}{B}\bigr)$, where $B$ is the external memory block size, $M\geq B^{1+ε}$ is the internal memory size, for some constant $ε>0$, and $Δ_i = r_{i} - r_{i-1}$ (assuming $r_0=0$ and $r_{q+1}=N + 1$).

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

↑