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

最优非透明开放寻址

Optimal Non-Oblivious Open Addressing

Michael A. Bender, William Kuszmaul, Renfei Zhou

AI总结:

本文构造完全装满时仍以高概率支持 O(1) 操作的非透明开放寻址哈希表,并可动态紧凑调整大小,从而突破透明开放寻址的 Ω(log log ε⁻¹) 下界。

摘要:

如果哈希表将元素(以及空闲槽位)存储在数组中,且没有额外元数据,则称其为开放寻址(或非透明开放寻址)哈希表。直观上,开放寻址哈希表必然承受一种空间—时间权衡:哈希表运行的负载因子越高,插入/删除/查询所花费的时间就应越长。本文证明这种权衡并不存在:可以构造一种开放寻址哈希表,即使哈希表完全装满,也能支持常数时间操作。事实上,甚至可以构造该数据结构的一个版本,使其:(1) 可动态调整大小,从而在任意给定时刻,它在内存中使用的槽位数与其包含的元素数相同;(2) 支持 O(1) 时间操作,这不仅是期望意义上的,而且是以高概率成立的;(3) 只需外部访问 O(1) 个哈希函数,并且每个哈希函数只需 O(1)-wise independent。我们的结果补充了 Bender、Kuszmaul 和 Zhou 最近提出的一个下界,该下界表明透明开放寻址哈希表的操作必然需要 Ω(log log ε⁻¹) 时间。本文中的哈希表是非透明的,这正是它们能够绕过先前下界的原因。

英文摘要:

A hash table is said to be open-addressed (or non-obliviously open-addressed) if it stores elements (and free slots) in an array with no additional metadata. Intuitively, open-addressed hash tables must incur a space-time tradeoff: The higher the load factor at which the hash table operates, the longer insertions/deletions/queries should take. In this paper, we show that no such tradeoff exists: It is possible to construct an open-addressed hash table that supports constant-time operations even when the hash table is entirely full. In fact, it is even possible to construct a version of this data structure that: (1) is dynamically resized so that the number of slots in memory that it uses, at any given moment, is the same as the number of elements it contains; (2) supports $O(1)$-time operations, not just in expectation, but with high probability; and (3) requires external access to just $O(1)$ hash functions that are each just $O(1)$-wise independent. Our results complement a recent lower bound by Bender, Kuszmaul, and Zhou showing that oblivious open-addressed hash tables must incur $Ω(\log \log \varepsilon^{-1})$-time operations. The hash tables in this paper are non-oblivious, which is why they are able to bypass the previous lower bound.

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

↑