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

哈希表的Brent插入方法分析

An Analysis of Brent's Insertion Method for Hash Tables

William Kuszmaul

arXiv 2608.00762首次发表:更新:

AI 中文总结

本文对Brent哈希表插入方法展开形式化分析,解决其受损随机性问题,验证其100%填充时查询仍为O(1)的特性,可用于研究生随机算法教学。

AI 中文摘要

1968年,Richard P. Brent提出了一种构建哈希表的新方法,从经验来看,该方法具有一项显著特性:即便哈希表被填充至100%,查询「表中存在的随机键」的期望时间仍为O(1)。尽管Brent方法十分简单,但其理论保证从未得到形式化分析,原因在于处理「受损随机性(spoiled randomness)」这一微妙问题。该算法有时会对过去已探测过的键y使用哈希函数h_j,此时无法将哈希函数视为随机的,因为其随机比特已影响了表的状态,这一问题使得Brent方法的形式化推理异常微妙。本文对Brent哈希表进行了简单且形式化的分析,该分析可在研究生随机算法课程中讲授,为处理概率分析中的微妙问题(即受损随机性问题)提供了一个良好范例。

英文摘要

In 1968, Richard P.~Brent introduced a new way of building a hash table that, at least empirically, achieves a remarkable property: Even if the hash table is filled to 100\% full, the expected time to query a \emph{random key out of those present} is $O(1)$. Despite the simplicity of Brent's method, the guarantees of the method have never been formally analyzed. This is due to the subtle issue of handling \emph{spoiled randomness}. The algorithm will sometimes try to use hash functions $h_j$ on keys $y$ that it has already probed in the past. When the algorithm does this, we cannot treat the hash function as random, because its random bits have already affected the state of the table. This issue makes Brent's method surprisingly subtle to reason about formally. In this note, we give a simple and formal analysis of Brent's hash table. The analysis can be taught in a graduate randomized algorithms course, and provides a nice example of how to deal with subtle issues in a probabilistic analysis (namely, the issue of spoiled randomness).

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑