On the optimal time/space tradeoff for hash tables
Michael A. Bender, Martin Farach-Colton, John Kuszmaul, William Kuszmaul, Mingmou Liu
Abstract
For nearly six decades, the central open question in the study of hash tables has been to determine the optimal achievable tradeoff curve between time and space. State-of-the-art hash tables offer the following guarantee: If keys/values are Θ(log n) bits each, then it is possible to achieve constant-time insertions/deletions/queries while wasting only O(log log n) bits of space per key when compared to the information-theoretic optimum. Even prior to this bound being achieved, the target of O(log log n) wasted bits per key was known to be a natural end goal, and was proven to be optimal for a number of closely related problems (e.g., stable hashing, dynamic retrieval, and dynamically-resized filters).
This paper shows that O(log log n) wasted bits per key is not the end of the line for hashing. In fact, for any k ∈ [log * n], it is possible to achieve O(k)-time insertions/deletions, O(1)-time queries, and
wasted bits per key (all with high probability in n). This means that, each time we increase insertion/deletion time by an additive constant, we reduce the wasted bits per key exponentially. We further show that this tradeoff curve is the best achievable by any of a large class of hash tables, including any hash table designed using the current framework for making constant-time hash tables succinct.
Our results hold not just for fixed-capacity hash tables, but also for hash tables that are dynamically resized (this is a fundamental departure from what is possible for filters); and for hash tables that store very large keys/values, each of which can be up to n o(1) bits (this breaks with the conventional wisdom that larger keys/values should lead to more wasted bits per key). For very small keys/values, we are able to tighten our bounds to o(1) wasted bits per key, even when k = O(1). Building on this, we obtain a constant-time dynamic filter that uses n log ε -1 + n log e + o(n) bits of space for a wide choice of false-positive rates ε, resolving a long-standing open problem for the design of dynamic filters.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext c14a5530-26cf-4100-a524-7cce075d0b49Cited by top-tier papers15
- Tiny PointersMichael A. Bender, Alex Conway, Martin Farach-Colton, William Kuszmaul et al.SODA 2023 · 11 citations
- Tight Cell-Probe Lower Bounds for Dynamic Succinct DictionariesTianxiao Li, Jingxun Liang, Huacheng Yu, Renfei ZhouFOCS 2023 · 11 citations
- A Hash Table Without Hash Functions, and How to Get the Most Out of Your Random BitsWilliam KuszmaulFOCS 2022 · 7 citations
- Strongly History-Independent Storage Allocation: New Upper and Lower BoundsWilliam KuszmaulFOCS 2023 · 7 citations
- Balanced Allocations: The Heavily Loaded Case with DeletionsNikhil Bansal, William KuszmaulFOCS 2022 · 6 citations
Builds on1
Related papers
- Optimal Non-oblivious Open AddressingMichael A. Bender, William Kuszmaul, Renfei ZhouSTOC 2025 · 1 citation
- Tight Bounds for Classical Open AddressingMichael A. Bender, William Kuszmaul, Renfei ZhouFOCS 2024 · 2 citations
- Optimal Static Dictionary with Worst-Case Constant Query TimeYang Hu, Jingxun Liang, Huacheng Yu, Junkai Zhang et al.STOC 2025 · 3 citations
- Optimal Bounds for Open Addressing Without ReorderingMartín Farach-Colton, Andrew Krapivin, William KuszmaulFOCS 2024 · 3 citations
- Space Lower Bounds for Dynamic Filters and Value-Dynamic RetrievalWilliam Kuszmaul, Stefan WalzerSTOC 2024 · 2 citations
