arXiv:2611.04186cs.DSNov 2026

Manuscript Offprint

arXiv:2611.04186

Incremental Open Addressing Has No Time-Space Tradeoff

Martín Farach-Colton, Andrew Krapivin, William Kuszmaul

Abstract

In this paper, we show that there is no time-space tradeoff in incremental open addressing: there is an incremental open-addressed hash table that supports O(1)O(1) worst-case expected time insertions, positive queries, and negative queries, at any load factor (even load factor 1). As an intermediate result, we also revisit the problem of constructing an incremental open-addressed hash table that does not perform reordering (does not move elements around over time). In this setting, we show that it is possible to get O(1)O(1) amortized expected positive query time together with O(1)O(1) worst-case expected insertion time, a combination that was not previously known to be possible.

1 Introduction

Open addressing is a classic framework for hash-table design that captures many of the most widely used hash tables (e.g., linear probing, quadratic probing, double hashing, Robin Hood hashing, and cuckoo hashing). What these hash tables share in common, and what makes them examples of open addressing, is that in each case:

  1. The data structure itself consists of an array of nn slots, each of which can store at most one element, along with at most O(1)O(1) words of auxiliary metadata (such as a counter of the number of elements present) stored outside the array.

  2. Each element xx is associated with a fixed probe sequence h1(x),h2(x),⋯∈[n]h_1(x), h_2(x), \dots \in [n] that is fully determined by x,nx, n, and random bits (i.e., hash functions).

  3. The procedure for querying an element xx is to examine the array locations h1(x),h2(x),…h_1(x), h_2(x), \dots in order, terminating either when xx is found (a positive query) or when the query is able to conclude, based on what it has seen so far, that xx is not present in the table (a negative query).1^1

Insertions (and deletions, when supported), by contrast, are allowed to inspect slots of the array in any order, and may also rearrange (i.e., reorder) elements that are already stored in the table.

Open addressing comes in two natural forms: the incremental (or insert-only) setting [Pet57, Knu63, KW66, Ull72, Bre73, AK74, Mal77, GS78, AKS78, GM79, Yao85, CLM85, LM93, FKK24,

1^1This standard model of open addressing is sometimes referred to as classical or oblivious open addressing [BKZ24, BKZ25], in contrast to non-oblivious open addressing [FNSS92, FN93, BKZ25], where a query is permitted to adaptively choose which slot to probe next based on the contents of previously inspected slots.

FKK26], in which elements are inserted one after another into an initially empty array of size nn until reaching some target load factor 1−ϵ1-\epsilon (meaning that a 1−ϵ1-\epsilon fraction of the slots are occupied), and the dynamic setting [PR04, FPSS05, DW07, BKK21, BKZ24, BKZ25], in which elements are both inserted and deleted over time while maintaining a load factor of at most 1−ϵ1-\epsilon.

For more than half a century, the central question in the study of open-addressed hash tables has been to determine the optimal tradeoff between time and load factor. As the load factor parameter ϵ\epsilon goes to zero, it becomes more and more difficult to place additional elements into the hash table in a way that keeps both insertions and queries cheap. But, for most of the history of the problem, it has remained open what the optimal query and insertion costs are as a function of ϵ−1\epsilon^{-1}.

Recently, Bender, Kuszmaul, and Zhou [BKZ24] gave a full resolution to this question in the dynamic setting. They introduced a hash table that supports O(1)O(1) expected-time queries with O(log⁡log⁡ϵ−1)O(\log \log \epsilon^{-1}) expected-time insertions and deletions. They also proved a matching lower bound, showing that any dynamic open-addressed hash table must incur Ω(log⁡log⁡ϵ−1)\Omega(\log \log \epsilon^{-1}) worst-case expected time per operation.

What remains unclear is what the optimal tradeoff should be in the incremental setting. Does the Ω(log⁡log⁡ϵ−1)\Omega(\log \log \epsilon^{-1}) lower bound continue to hold, or can an alternative data structure somehow do better?

This paper: Optimal incremental open addressing. The main contribution of this paper is an optimal construction for incremental open addressing. We show that there is actually no fundamental time-space tradeoff in this setting: it is possible to achieve O(1)O(1) worst-case expected time for every operation (insertions, positive queries, and negative queries) at all load factors up to and including 1 (i.e., even when the hash table is completely full, with ϵ=0\epsilon=0). Note that, as a convention, we define the load factor of an insertion to be the load factor after the insertion is complete.

Theorem 1.1. There is an incremental open-addressed hash table with reordering that stores no metadata besides a counter of the number of elements present and, at every load factor up to and including 1, supports insertions, positive queries, and negative queries in O(1)O(1) worst-case expected time.

Here, as is standard, worst-case expected time means that the O(1)O(1) bound applies individually to every operation (with the expectation taken solely over the random hash functions), rather than merely on average across elements or insertions. In particular, even the nn-th insertion (which must fill the final remaining empty slot in the array), and even an arbitrary query (positive or negative) that is performed when the array is 100% full must take O(1)O(1) expected time.

Warmup: revisiting incremental open addressing without reordering. Consider first a more basic question: how to build an optimal incremental open-addressed hash table that cannot perform reordering. In this setting, once an element is placed in a slot of the array, the hash table is not permitted to move it in subsequent operations. The only modification an insertion makes to the array is to place the new element into some empty slot in the table.

Without reordering, it is not possible to achieve O(1)O(1) worst-case expected query time at high load factors: even for positive queries, known lower bounds force a worst-case expected query time of Ω(log⁡ϵ−1)\Omega(\log \epsilon^{-1}) [FKK24]. Consequently, research in this setting tends to focus on optimizing a weaker notion of query complexity known as amortized expected positive query time (or amortized query time for short), which is defined to be the expected time to query a uniformly random element among those currently in the table.

For most of the history of the problem, it was believed that even amortized query time had to be Ω(log⁡ϵ−1)\Omega(\log \epsilon^{-1}). Indeed, in a celebrated 1985 result, Yao [Yao85] (proving a conjecture of Ullman [Ull72]) showed that Ω(log⁡ϵ−1)\Omega(\log \epsilon^{-1}) amortized query time is unavoidable for any greedy open-addressed hash table (in which insertions follow the same probe sequence as queries, placing the element in the first empty slot). Recently, however, researchers have shown that non-greedy schemes [FKK24, FKK26] can actually do much better, achieving O(1)O(1) amortized expected positive query time at all load factors (even load factor 1).

The resulting hash tables [FKK24, FKK26] still suffer from slow insertions, however, incurring an amortized expected insertion time of Ω(log⁡ϵ−1)\Omega(\log \epsilon^{-1}). This time bound is forced by a basic coupon-collecting bottleneck: each insertion searches for an empty slot by performing random probes into (some large part of) the hash table. If, across all insertions, we must probe at least a (1−ϵ)(1-\epsilon) fraction of slots, then we cannot hope to do this in fewer than Ω(nlog⁡ϵ−1)\Omega(n \log \epsilon^{-1}) probes.

Our first result is an incremental open-addressed hash table without reordering that overcomes this coupon-collecting bottleneck. The hash table achieves O(1)O(1) for both amortized expected positive query time and worst-case expected insertion time (while also matching the Ω(log⁡n)\Omega(\log n) lower bound on worst-case expected positive query time without reordering [FKK24]).

Theorem 1.2. There is an incremental open-addressed hash table without reordering that stores no metadata besides a counter of the number of elements present and, at every load factor up to and including 1, supports insertions in O(1)O(1) worst-case expected time and positive queries in O(1)O(1) amortized expected time. Moreover, the worst-case expected positive query time is O(log⁡n)O(\log n).

To prove Theorem 1.2, our construction (Section 2) borrows the high-level structure of [FKK24], but replaces each of its subarrays (formerly just a uniform-probing hash table) with a new tree-based structure. The basic idea is to organize each subarray as a binary tree that fills bottom up, maintaining the invariant that a node can only contain elements if all of its descendant nodes are full. This means that an insertion can test whether a subtree contains any empty slots by inspecting just a single node (the root of the subtree): it can, in effect, collect a superconstant number of coupons in constant time. We then show how to design the hash table in such a way that the majority of insertions first attempt to insert into a subtree that is already full (and observe that it is full in O(1)O(1) time), and then immediately fall back to a much cheaper option (inserting into a tree that is only a constant fraction full). Finally, we show that with the right query probe sequence, this construction continues to allow for O(1)O(1) amortized queries, which allows us to obtain Theorem 1.2.

From the warmup to the full theorem: Two challenges to overcome. Having established our warmup result without reordering (Theorem 1.2), we next turn to the problem of proving our full result (Theorem 1.1), where reordering is permitted and we require O(1)O(1) worst-case expected time for insertions, positive queries, and negative queries. To get from the warmup to our full construction, there are two main challenges that we must overcome.

Challenge 1: Amortized vs. worst-case expected positive queries. The first challenge is to upgrade our bound on positive queries from O(1)O(1) amortized expected time to O(1)O(1) worst-case expected time for every element present in the table. In the warmup construction, an element's query cost depends heavily on when it is inserted. Elements inserted when the hash table is very full have much more expensive queries. This is fine for amortized query time because the vast majority of insertions are performed when the hash table is not very full. But to achieve an O(1)O(1) worst-case expected time bound, we must eliminate this inequity.

In Section 3, we give a simple solution to this problem. The idea is to swap each new element xx with a (close to) random victim element yy. We place xx in a position that is guaranteed to be cheap to query, we evict the element yy formerly in that position, and we complete the rest of the insertion as though yy is the element being inserted. This allows us to randomize which elements incur a large query cost, resulting in the following theorem:

Theorem 1.3. There is an incremental open-addressed hash table with reordering that stores no metadata besides a counter of the number of elements present and, at every load factor up to and including 1, supports insertions and positive queries in O(1)O(1) worst-case expected time.

Challenge 2: Supporting negative queries. The second, and more difficult, challenge is to support O(1)O(1)-time negative queries. Whereas positive queries can stop as soon as they find the element they are searching for, negative queries have no way a priori of determining when to stop. Naively, when the hash table is 100% full, a negative query would need to traverse the entire table before it can safely conclude that the queried element is not present.

To make negative queries fast, we combine two high-level ideas. The first is to design the hash table so that within each tree, almost all elements yy that reside in some high level jj of the tree satisfy g(y)<1/j4g(y) < 1/j^4, where gg is a hash function. This means that, when querying an element xx, in the common case where g(x)>1/j4g(x) > 1/j^4, we can be relatively confident that xx is not in any of levels j,j+1,…j, j+1, \ldots of the tree. (There will be some exceptions to this rule, but they will be rare enough that we can handle them with alternative techniques.) This simple idea is not enough to make negative queries fast, however, because a given element could still be in any of many trees.

The second high-level idea is to design insertions in such a way that they strategically leave “breadcrumbs” throughout the data structure (encoded implicitly within the arrangement of the stored elements themselves), so that negative queries can efficiently figure out when to stop.² Roughly speaking, the job of these breadcrumbs is to tell a (negative) query how many trees it needs to consider before it can give up.

What makes these “breadcrumbs” tricky is that we need insertions to be able to encode them very efficiently (in O(1)O(1) time, even if ω(1)\omega(1) bits of information are being encoded!). Here, we make use of the following basic idea: to encode a value jj at a leaf LL, we swap an element uu currently stored at the leaf with an element vv stored in the leaf's level-jj ancestor. We then make use of the fact that elements vv stored at level-jj nodes (usually) satisfy g(v)<1/j4g(v) < 1/j^4 (where gg is the hash function from the previous paragraph). So, the simple fact that the leaf LL now contains an element vv with such an unusually small g(v)g(v) value can serve as the “breadcrumb” to encode the number jj (albeit in a slightly imprecise way). This simple idea comes with many challenges to implement, but is what ends up allowing us to support negative queries efficiently. Putting the pieces together, we are able to obtain the main result of the paper, Theorem 1.1.

The cost of dynamic resizing. A natural extension of incremental open addressing is to allow the hash table to grow over time, preserving the invariant that at any given moment a 1−ϵ1-\epsilon fraction of slots are occupied. Given the results of this paper, one might hope that in this stronger setting O(1)O(1)-time operations continue to be possible.

In Section B, we show that this is not the case. Dynamic resizing, it turns out, is just as difficult as supporting deletions: any growing open-addressed hash table with load factor 1−ϵ1-\epsilon (while maintaining O(1)O(1)-time queries) must incur Ω(log⁡log⁡ϵ−1)\Omega(\log \log \epsilon^{-1}) amortized expected time per operation, matching the bounds that have already been achieved in [BKZ24] (and that hold for a hash table that is both dynamically resized and dynamic).

²Note that the query sequence is fixed ahead of time, so the algorithm is still oblivious. The role of the breadcrumbs is only to allow early termination.

References (100)

Couldn't load all references. Reload the page to try again.