arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2502.05613cs.DS
收藏

种子组合搜索与编码及其在最小完美哈希中的应用

Combined Search and Encoding for Seeds, with an Application to Minimal Perfect Hashing

Hans-Peter Lehmann, Peter Sanders, Stefan Walzer, Jonatan Ziegler

AI总结:

本文提出一种种子组合搜索与编码算法,使成功种子序列的熵比传统方法减少 Ω(n) 比特,并基于此构造出空间需求 (1+ε)OPT、构造时间 O(n/ε) 的最小完美哈希函数,在 ε ≤ 3% 时构造吞吐量超越现有方法两个数量级以上。

摘要:

随机化算法常采用可能失败的方法,并以独立随机性重试直至成功。因此,随机化数据结构通常存储成功尝试的索引,称为种子。如果需要 n 个这样的种子(例如用于独立子结构),标准做法是对每个 i ∈ [n] 计算最小的成功种子 S_i,并存储向量 S = (S_1, …, S_n)。本文的核心观察是这种做法并非空间最优。我们提出一种不同的算法,计算成功种子序列 S' = (S_1', …, S_n'),使得在大多数情况下 S' 的熵比 S 的熵少 Ω(n) 比特。为实现 OPT + εn 的内存消耗,检查种子的期望数量增加 O(1/ε) 倍。我们通过一种新颖的最小完美哈希函数构造展示了研究结果的实用性:对于 n 个键和任意 ε ∈ [n^{-3/7}, 1],其空间需求为 (1+ε)OPT,构造时间为 O(n/ε)。所有先前方法仅支持 ε = ω(1 / log n),或构造时间随 1/ε 呈指数增长。在 ε ≤ 3% 时,我们的实现将构造吞吐量提升至现有最优水平的两倍以上(即超过两个数量级)。

英文摘要:

Randomised algorithms often employ methods that can fail and that are retried with independent randomness until they succeed. Randomised data structures therefore often store indices of successful attempts, called seeds. If $n$ such seeds are required (e.g., for independent substructures) the standard approach is to compute for each $i \in [n]$ the smallest successful seed $S_i$ and store $\vec{S} = (S_1, \ldots, S_n)$. The central observation of this paper is that this is not space-optimal. We present a different algorithm that computes a sequence $\vec{S}' = (S_1', \ldots, S_n')$ of successful seeds such that the entropy of $\vec{S'}$ undercuts the entropy of $\vec{S}$ by $Ω(n)$ bits in most cases. To achieve a memory consumption of $\mathrm{OPT}+\varepsilon n$, the expected number of inspected seeds increases by a factor of $O(1/\varepsilon)$. We demonstrate the usefulness of our findings with a novel construction for minimal perfect hash functions that, for $n$ keys and any $\varepsilon \in [n^{-3/7}, 1]$, has space requirement $(1+\varepsilon)\mathrm{OPT}$ and construction time $O(n/\varepsilon)$. All previous approaches only support $\varepsilon = ω(1 / \log n)$ or have construction times that increase exponentially with $1/\varepsilon$. Our implementation beats the construction throughput of the state of the art by more than two orders of magnitude for $\varepsilon \leq 3\%$.

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

↑