🤖 AI Summary
Brent hashing demonstrates excellent practical performance, yet its theoretical analysis has long been hindered by the "randomness contamination" problem—repeated probes violate the independence assumptions of hash functions. This work presents the first concise formal proof for Brent’s method, overcoming this challenge through rigorous probabilistic modeling that accurately captures the influence of prior probes on hash behavior. Serving as a pedagogical exemplar, the analysis establishes that even under full table occupancy, the expected query time for a randomly chosen existing key remains O(1), thereby providing a solid theoretical foundation for Brent hashing.
📝 Abstract
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).