English

An Analysis of Brent's Insertion Method for Hash Tables

Data Structures and Algorithms 2026-08-01 v1

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)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 hjh_j on keys yy 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).

Cite

@article{arxiv.2608.00762,
  title  = {An Analysis of Brent's Insertion Method for Hash Tables},
  author = {William Kuszmaul},
  journal= {arXiv preprint arXiv:2608.00762},
  year   = {2026}
}