We introduce a classical open-addressed hash table, called rainbow hashing, that supports a load factor of up to $1 - \varepsilon$, while also supporting $O(1)$ expected-time queries, and $O(\log \log \varepsilon^{-1})$ expected-time insertions and deletions. We further prove that this tradeoff curve is optimal: any classical open-addressed hash table that supports load factor $1 - \varepsilon$ must incur $\Omega(\log \log \varepsilon^{-1})$ expected time per operation. Finally, we extend rainbow hashing to the setting where the hash table is dynamically resized over time. Surprisingly, the addition of dynamic resizing does not come at any time cost -- even while maintaining a load factor of $\ge 1 - \varepsilon$ at all times, we can support $O(1)$ queries and $O(\log \log \varepsilon^{-1})$ updates. Prior to our work, achieving any time bounds of the form $o(\varepsilon^{-1})$ for all of insertions, deletions, and queries simultaneously remained an open question.
翻译:我们提出了一种称为彩虹哈希的经典开放寻址哈希表,它支持高达 $1 - \varepsilon$ 的负载因子,同时支持 $O(1)$ 期望时间查询,以及 $O(\log \log \varepsilon^{-1})$ 期望时间的插入和删除操作。我们进一步证明这一权衡曲线是最优的:任何支持负载因子 $1 - \varepsilon$ 的经典开放寻址哈希表,其每次操作必须耗费 $\Omega(\log \log \varepsilon^{-1})$ 的期望时间。最后,我们将彩虹哈希扩展到哈希表随时间动态调整大小的场景。令人惊讶的是,增加动态调整大小功能并不会带来任何时间代价——即使在始终保持 $\ge 1 - \varepsilon$ 负载因子的情况下,我们仍能支持 $O(1)$ 的查询和 $O(\log \log \varepsilon^{-1})$ 的更新操作。在我们的工作之前,对于插入、删除和查询同时实现 $o(\varepsilon^{-1})$ 形式的时间界,一直是一个悬而未决的问题。