Manuscript Offprint
arXiv:2611.04186Incremental Open Addressing Has No Time-Space Tradeoff
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 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 amortized expected positive query time together with 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:
-
The data structure itself consists of an array of slots, each of which can store at most one element, along with at most words of auxiliary metadata (such as a counter of the number of elements present) stored outside the array.
-
Each element is associated with a fixed probe sequence that is fully determined by , and random bits (i.e., hash functions).
-
The procedure for querying an element is to examine the array locations in order, terminating either when is found (a positive query) or when the query is able to conclude, based on what it has seen so far, that is not present in the table (a negative query).
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,
This 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 until reaching some target load factor (meaning that a 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 .
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 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 .
Recently, Bender, Kuszmaul, and Zhou [BKZ24] gave a full resolution to this question in the dynamic setting. They introduced a hash table that supports expected-time queries with expected-time insertions and deletions. They also proved a matching lower bound, showing that any dynamic open-addressed hash table must incur worst-case expected time per operation.
What remains unclear is what the optimal tradeoff should be in the incremental setting. Does the 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 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 ). 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 worst-case expected time.
Here, as is standard, worst-case expected time means that the 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 -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 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 worst-case expected query time at high load factors: even for positive queries, known lower bounds force a worst-case expected query time of [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 . Indeed, in a celebrated 1985 result, Yao [Yao85] (proving a conjecture of Ullman [Ull72]) showed that 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 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 . 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 fraction of slots, then we cannot hope to do this in fewer than probes.
Our first result is an incremental open-addressed hash table without reordering that overcomes this coupon-collecting bottleneck. The hash table achieves for both amortized expected positive query time and worst-case expected insertion time (while also matching the 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 worst-case expected time and positive queries in amortized expected time. Moreover, the worst-case expected positive query time is .
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 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 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 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 amortized expected time to 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 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 with a (close to) random victim element . We place in a position that is guaranteed to be cheap to query, we evict the element formerly in that position, and we complete the rest of the insertion as though 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 worst-case expected time.
Challenge 2: Supporting negative queries. The second, and more difficult, challenge is to support -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 that reside in some high level of the tree satisfy , where is a hash function. This means that, when querying an element , in the common case where , we can be relatively confident that is not in any of levels 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 time, even if bits of information are being encoded!). Here, we make use of the following basic idea: to encode a value at a leaf , we swap an element currently stored at the leaf with an element stored in the leaf's level- ancestor. We then make use of the fact that elements stored at level- nodes (usually) satisfy (where is the hash function from the previous paragraph). So, the simple fact that the leaf now contains an element with such an unusually small value can serve as the “breadcrumb” to encode the number (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 fraction of slots are occupied. Given the results of this paper, one might hope that in this stronger setting -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 (while maintaining -time queries) must incur 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.
Greedy open addressing and open addressing without reordering. The study of open addressing began with Peterson's 1957 paper [Pet57], the first published study of open addressing (including linear probing and uniform probing), and Knuth's seminal 1963 memorandum [Knu63] analyzing the amortized expected query cost of linear probing. Over the subsequent decades, a large body of work analyzed specific greedy collision-resolution strategies (in which each insertion places its element in the first empty slot of its probe sequence), including linear probing [Pet57, Knu63, KW66, AK74, SS90, PPR09, PT12, PT16, BKK21, BK24], quadratic probing [Rad70, HD72, Eck74, Bat75, Mau83, KX24, HKL+26b, HKL+26a, GPW26b, GPW26a], double hashing [GS78, LM93] (see also [Mit14, Mit16] for double hashing in balanced allocations), and uniform probing [Pet57, Ull72, Yao85, FKK24].
In 1972, Ullman [Ull72] formalized the notion of greedy open addressing and conjectured that no greedy probe distribution can beat the amortized expected insertion and positive query time of uniform probing at load factor . Knuth [Knu74] posed a special case of Ullman's conjecture for single-hashing strategies, which was resolved by Ajtai, Komlós, and Szemerédi [AKS78] in 1978; building on their potential-function technique, Yao [Yao85] proved Ullman's full conjecture in 1985.
To bypass Yao’s amortized lower bound without reordering elements over time, an insertion algorithm must be non-greedy (i.e., it cannot simply place each element into the first empty slot along its query probe sequence). Two such algorithms have been proposed in prior work, elastic hashing [FKK24] and pretzel probing [FKK26], both of which achieve amortized expected query time, and worst-case expected query time (for positive queries). Non-greedy insertions without reordering have also recently been studied for linear probing [KKW26], as has the locality of open addressing without reordering [Zam26].
Both elastic hashing [FKK24] and pretzel probing [FKK26] require amortized expected insertion time due to the coupon collecting bottleneck discussed earlier. The first result of this paper, Theorem 1.2, resolves this bottleneck, showing that worst-case expected insertion time and amortized expected positive query time can be achieved simultaneously without reordering, even at load factor 1.
Open addressing with reordering. Starting in the 1970s, there has also been a great deal of interest in whether open-addressed hash tables with reordering can do better. It has been known since Brent's 1973 breakthrough [Bre73] (see [Kus26] for a formal analysis) that one can achieve amortized expected positive query time at any load factor. Brent's paper inspired a rich line of work in the 1970s and 1980s on reordering-based incremental hash tables, including ordered hash tables [AK74], Mallach's method [Mal77], binary tree hashing [GM79], Robin Hood hashing [CLM85], and last-come-first-served hashing [PM89] (as well as optimal arrangements of elements computed via the assignment problem [Riv78]). In all of these classical reordering schemes, fast positive queries came at the expense of slow insertions (requiring or expected insertion time at load factor ). The main contribution of the current paper is to show that such a tradeoff is not necessary.
Over the past two decades, much of the work on reordering has centered on cuckoo hashing [PR04] and its generalizations to high load factors, such as d-ary cuckoo hashing [FPSS05] and bucketized cuckoo hashing [DW07] (which have also been the subject of extensive probabilistic analysis establishing tight load thresholds and insertion times [CSW07, FR07, LP09, FP10, GW10, KMW09, DGM⁺10, FMM11, FM12, Le12, FPS13, FKP16, FP18, FJ19, KA19, Wal23, Wal22, BF24, KM25, BK26]). When configured with hash functions [FPSS05, BF24, KM25], cuckoo hashing supports worst-case -time positive and negative queries at load factor . Nevertheless, prior to [BKZ24] (which we discuss next), every known dynamic open-addressed hash table with -time queries required at least expected time per insertion just to find empty slots.
Recently, Bender, Kuszmaul, and Zhou [BKZ24] broke the insertion barrier by introducing rainbow hashing, which supports expected-time positive and negative queries and expected-time insertions and deletions (even with dynamic resizing), and proved a matching amortized update lower bound for any dynamic open-addressed hash table with expected query time. Our Theorems 1.1 and 1.3 show that in the incremental setting with fixed capacity, even this barrier disappears.
Implicit data structures, non-oblivious open addressing, and partner hashing. Our construction in Section 4 supports -time negative queries by encoding structural information directly into the relative arrangement of the elements in the array. The technique of encoding metadata in the permutation of stored elements dates back to the classic literature on implicit data structures by Munro and Suwanda [MS80] and Yao [Yao81]. In the context of open addressing, this paradigm has traditionally been studied in the non-oblivious model, where queries are allowed to inspect elements, decode information from their arrangement, and use that information to adaptively decide which array slot to probe next. In the static setting, Fiat, Naor, Schmidt, and Siegel [FNSS92] and Fiat and Naor [FN93] used non-oblivious probing to achieve worst-case lookup time in a completely full table with little or no auxiliary memory.
Recently, Bender, Kuszmaul, and Zhou [BKZ25] resolved the dynamic non-oblivious setting by introducing partner hashing, a dynamic non-oblivious open-addressed hash table that supports -time insertions, deletions, and queries with high probability even at load factor 1 and under dynamic resizing. At the heart of partner hashing is a swapping trick in which elements are paired up as “partners” and swapped out of their home locations so that the displacement of one element encodes routing information for the other.
The swapping trick that we use to support negative queries in Section 4 can be viewed as a cousin of the swapping trick in partner hashing [BKZ25]. However, there is a fundamental difference between the two settings. In partner hashing [BKZ25], when an element is swapped out of its home location in order to encode information, a query for that element can no longer find it along a fixed, oblivious probe sequence (instead, the query must read an encoded pointer and adaptively jump to the element’s new slot). In our classical (oblivious) setting, adaptive jumps are forbidden, so moving an element off its fixed probe sequence would destroy its query time. Somewhat remarkably, we are able to design our tree-swapping mechanism so that every swap moves elements only between nearby locations on their fixed probe sequences, and in such a way that it does not hurt the overall worst-case expected query time. This allows the encoding trick to be used as part of an oblivious solution, where the decoded information is used solely to determine when to stop probing rather than where to probe next.
Succinct dictionaries, retrieval, and other hashing models. Beyond open addressing, there has been a great deal of work on understanding the optimal time-space tradeoffs for succinct dictionaries, which aim to store elements from a universe using OPT + bits of space, where is the information-theoretic minimum and is the redundancy [Pag01, RR03, Păt08, ANS10, Yu22, HLY+25, BFK+22, BCF+23, BE23, LLYZ23b, LLYZ23a, LLYZ24, BCF+25, LPP+24]. For dynamic dictionaries, Bender, Farach-Colton, Kuszmaul, Kuszmaul, and Liu [BFK+22] and Li, Liang, Yu, and Zhou [LLYZ23b, LLYZ24] established a tight cell-probe tradeoff showing that achieving wasted bits per element ( ) requires time per operation. Just as our work establishes a separation between incremental and dynamic open addressing, Kuszmaul, Putterman, Xu, Zhou, and Zhou [KPX+25] recently established an analogous separation between incremental and dynamic retrieval data structures (see also [KPX+26] for resizable retrieval). Other related directions in hash-table design include history-independent hashing [NT01, BG07, NSW08, Kus23], external-memory hashing [JP08, IP12, VZ13, CFS18], and hash tables with high-probability or deterministic guarantees [Sun91, HMP01, DadHPP06, Ruž08, ANS09, GHMT12, Kus22, BCF+23]. See [BFKK24] for a simple presentation of some of the basic techniques that have been developed in these settings.
Random hash functions. As is standard for this problem, we assume random hash functions throughout the paper, but there is also a large body of work on how to simulate them efficiently. This line of work began with the universal hash functions of Carter and Wegman [CW79, WC81], and has since produced constant-time hash functions with high independence [Sie04, Tho13, CPT15], hash functions that are fully random on any fixed set of elements with high probability [ÖP03, PP08, DW03], and tabulation-based hash functions [Zob70, PT12, PT13, Tho13, DKRT15, Tho17, AKK+20], including recent work on locally uniform hashing [DKRT15, BBK+23, ABH+24]. Techniques such as the splitting trick [DR09] allow these hash functions to simulate full randomness in essentially any hash table. There has also been work specifically on open addressing under limited independence [SS90, PPR09, PT16].
2 An Optimal Construction Without Reordering
In this section, we establish that there is no tension between insertion time and amortized positive query time in incremental open addressing without reordering. This is one of our two main results and sets the stage for the other.
In particular, we establish that there is a table that never moves an element after placing it, that fills all n slots, that spends only constant expected time per insertion, and that achieves constant amortized expected positive query time.
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 worst-case expected time and positive queries in amortized expected time. Moreover, the worst-case expected positive query time is .
2.1 The Algorithm
We assume for now that is a power of two; Section A.1 removes this assumption. We logically organize the array as a forest of perfect binary trees , where . For , the tree has slots, so has four slots, and has the remaining four slots. The slots are mapped to the nodes of the tree so that each node covers two slots, except for the root of each tree, which covers four. See Figure 1 for an illustration. We count the levels of each tree from the
The root node has extra slots just to make sure is a power of 2.

Figure 1: The layout for : trees with 16, 8, 4, and 4 slots and heights 3, 2, 1, and 1. The thick boxes are nodes, of two slots each except that each root has four. Each tree is stored as an implicit binary heap: its root first, then the nodes of the next level down, and so on, with the leaves last.
Algorithm 1 TryInsertSubtree(x, i, j)
1: 's level- ancestor in
2: if is full then
3: return false \quad \triangleright \text{the whole subtree of } V \text{ is full}
4:
5: while is not a leaf and some child of is nonfull do
6: the child of above if there is one and it is nonfull, else a nonfull child
7: place in an empty slot of \quad \triangleright is nonfull
8: return true
bottom: leaves are at level 1, their parents are at level 2, and so on. Each tree covers a contiguous part of the array in breadth-first order; Section A.1 gives the exact addresses, which are slightly involved when is not a power of 2.
Hashing. Each element selects a candidate set of leaves, one per tree. Specifically, it selects leaf in tree via a set of uniformly and independently random hash functions . The level- ancestor of is 's level- ancestor in , and its subtree is 's level- home subtree. In addition, each is given a uniformly random priority for each tree .
2.1.1 Insertions
The primary building block used in insertions is TryInsertSubtree(x, i, j) (detailed in Algorithm 1), which inserts into its level- home subtree in and returns true if that subtree has room, in time proportional to the height of the subtree. If the subtree is full, TryInsertSubtree(x, i, j) returns false in time. We call 's level- ancestor in , the root of this subtree, the target node of the call.
Naively checking every slot would take time . To avoid this issue, we will enforce the invariant that a node hold an element only if both of its child subtrees are full. Thus, a subtree is full if and only if its root node is full, so we can return false after checking the slots in the root node of the subtree. To maintain the invariant, we make sure to insert into a node only if there is no room lower down in its subtree.
The schedule. Insertions are grouped into epochs. Epoch one just fills until it is exactly a fraction full (up to roundoff error), for a small constant to be specified in the analysis.
Every later epoch has two jobs: it cleans up , getting it from exactly a fraction full to completely full while filling from empty to exactly a fraction full (the last epoch fills completely).
Each epoch is further subdivided into phases 1, 2, ..., , where is the height of ; the last of these, phase , is the final phase. Each nonfinal phase consists of a fraction of the insertions in the epoch.
Conceptually, at the start of epoch , is already nearly full, but its remaining empty slots may be scattered throughout the tree. The phases gradually fill these empty slots, first cleaning up small subtrees and then progressively larger ones. More precisely, for each fixed subtree rooted at level of , the probability that it is full by the end of phase of epoch is at least . Thus, by the end of phase , is completely full with all but exponentially small probability. The final phase then deterministically ensures that becomes completely full.
Concretely, the epoch boundaries are
so that epoch consists of insertions . If insertions have already been performed in epoch , the next insertion belongs to the final phase if , and to phase otherwise.
Note that, for , the epoch boundaries give at most insertions in epoch , and epoch one has at most . Thus the epoch lengths decrease geometrically:
For a power of two, the stronger bound trivially holds. We use the weaker bound in (2) because it also holds for arbitrary , as shown in Section A.1.
The following simple lemma establishes that each nonfinal phase indeed consists of insertions (up to rounding), and the final phase consists of at least as many insertions as has empty slots when the epoch begins.
Lemma 2.1 (Phase lengths). In every epoch :
-
each nonfinal phase consists of at least and at most insertions;
-
the final phase consists of at least insertions.
Proof. Since if and only if , phase consists of the insertions with . Since , its length is at least and at most .
For the final phase, write . By (1), the epoch consists of insertions ( in the last epoch), and the nonfinal phases consist of the first of them, where because of the larger root. So it suffices to show that (or ). If , then , so by (16). For , direct calculation yields the desired bound, including when is the final single-node tree of Section A.1.
The insertion algorithm. Suppose x arrives during epoch i, phase j. We try two things in order.
- Cleanup attempt. Which call we make depends on the epoch, the phase, and x's priority:
- Final phase of epoch : run TryInsertSubtree , where is the height of ; that is, try the whole of .
- Nonfinal phase of epoch , and : try 's level- home subtree in by running TryInsertSubtree.
A call made in this step is a cleanup attempt: it is x's contribution to cleaning up the previous tree. If it succeeds, we are done; otherwise proceed to step 2.
- Current-array insertion. Place in by trying TryInsertSubtree for in turn, that is, up the home path, stopping at the first success. If we never succeed, the algorithm is said to have failed (but this never happens, as shown below). We call this a current-array insertion.
We remark that the condition used in the cleanup attempt ends up playing a somewhat subtle role in the paper. For the main purpose of this section, obtaining an amortized expected positive query bound of , the condition is actually not necessary at all (although it is used to obtain an worst-case expected positive-query bound). The condition ends up being crucial, however, for supporting negative queries in Section 4; there, we will make extensive use of the fact that most elements x stored at a high level j of a tree satisfy .
Before continuing, we verify the correctness of the insertion algorithm. To see that insertions never fail, we must show that each epoch succeeds at its two jobs: it cleans up , and it fills to a fraction. The first is simple to see. begins the epoch only -short of full, while the final phase of epoch makes roughly cleanup attempts at the root of , that is, into the entire tree, and each of them fills an empty slot as long as one remains. So even if all the earlier phases do absolutely nothing, the final phase alone fills completely. The second job then follows by counting: the remaining insertions of the epoch all go to , and (1) makes their number exactly .
Lemma 2.2 (Insertions never fail). Deterministically, the algorithm never fails. Specifically, for each , the tree holds exactly elements at time , all of them placed by current-array insertions made during epoch , and is full at time .
Proof. We show by induction on that no insertion of epochs fails and that, at time , the trees are full and holds exactly elements, all placed by current-array insertions of epoch . Note that each tree is empty when epoch begins, since nothing before epoch targets it. Every insertion of epoch one is a current-array insertion into , and by (1) there are of them (or if ), so always has an empty slot, and no insertion in epoch one fails.
Now suppose the claim holds for some , so that has empty slots at time . By (1), epoch consists of insertions, where , or if . First, gets filled. Every insertion of the final phase makes a cleanup attempt at the root of , whatever its priority, and this fills an empty slot unless is already full. By Lemma 2.1 there are at least such insertions, so exactly cleanup attempts succeed, and is full at time . All of the other insertions of the epoch are current-array insertions into . Before each of them, holds fewer than elements, so it has an empty slot and the insertion succeeds. Thus no insertion of epoch fails, and ends the epoch holding exactly elements, all placed by its current-array insertions, which for is the claim for .
2.2 The Query Sequence and an Element's Search Bound
A query for probes a fixed sequence computed from 's hashes alone; it does not know which tree holds , let alone which node. Generally, the query should spend its probes where elements are likely to be, and two facts tell us where that is. First, within a tree , most elements are placed near their home leaves. Second, the trees shrink geometrically, so most elements lie in the larger, earlier trees. Accordingly, for each tree we fix a local list of probes that explores the places in where TryInsertSubtree could have put , roughly in order of how likely they are. Then, we merge the local lists of all the trees, giving the larger trees priority.
The local list for interleaves the following two probe sequences:
-
the ancestor list: u's home leaf , followed by the nodes on the path from it up to the root;
-
the expanding-subtree list: u's entire level-1 home subtree, then its entire level-2 home subtree, and so on, ending with the whole tree.
The ancestor list finds quickly when was placed in one of its own ancestor nodes, which is the typical outcome of a cleanup attempt. The expanding-subtree list catches the case where TryInsertSubtree descended from 's ancestor into some other part of a home subtree. Within 's local list for , 's level- ancestor is read within the first probes, and its level- home subtree within the first .
These local lists are merged into one sequence, u's query probe sequence, such that
the kth probe of 's local list occurs within the first probes of u's query probe sequence.
(3)
An injection achieving this bound is given in [FKK24]. To maintain constant-time operations using words of working memory, we use a different interleaving with the same bound, described in Section A.2.
It will be convenient to have a name for how far down its sequence an element can possibly sit. We call this a search bound. The definition is in terms of the destination node, not the particular slot inside that node, so that we can later shuffle elements inside a node without invalidating the bound.
Definition 2.3. The search bound for an element (that is in the hash table) is an integer defined as follows. Let be a sufficiently large constant, and let be the tree containing . If the node containing is the level- ancestor of , then . Otherwise, if is the smallest integer such that the node containing is in the level- home subtree of , then . Either way, serves as an upper bound for the number of probes to query .
2.3 Probabilistic Preliminaries
Our analyses will make use of two standard probabilistic facts. The first is a multiplicative Chernoff bound:
Lemma 2.4 (Chernoff bounds [MU17, Ch. 4]). Let be a sum of independent zero-one random variables, and let . Then for every ,
Moreover, if , then
The second fact allows us to apply Chernoff bounds in settings where the randomness comes from balls being thrown into bins (meaning that the bin loads are technically not quite independent). The lemma follows from standard negative association arguments [Waj17].
Lemma 2.5 (Monotone functions of bin loads [DR98, Waj17]). Throw a fixed number of balls into bins independently, each ball according to its own distribution (a ball may land in no bin). Let be disjoint sets of bins, and let each be a function of the loads of the bins in , where either every is nondecreasing in these loads or every is nonincreasing. Then satisfies the bounds of Lemma 2.4, with , as if the were independent; and for every .
2.4 Phase Fills Almost Every Height- Subtree
We now show that the cleanup attempts do their job, meaning that, by the end of phase of epoch , essentially every level- subtree of is completely full. This is the technical heart of the construction, and it is what an insertion relies on when it assumes that a cheap fullness test will usually come back “full.”
The whole argument is a counting argument. During phase , a predictable number of insertions each, with probability , pick a uniformly random level- node of and fill an empty slot somewhere beneath it, unless its subtree is already full. If a node receives at least as many attempts as its subtree has empty slots, the subtree ends up full. So we need two things: a lower bound on the number of attempts a node receives, which is a simple balls-and-bins calculation, and an upper bound on the number of empty slots still present when the phase begins, which we will obtain by an induction argument. The counts concentrate only once a subtree is large, so the induction starts at a level , a large constant that appears only in the analysis. The phases below level are not needed at all: there the current-array attempts of epoch have already left so few empty slots, because is small, that phase can happily fill them.
Some basic notation and calculations. A tree of height has exactly slots (recall the root has 4 slots). So has height for , and the final tree is a single four-slot root with . We write for the th node at level of , counting from on the left, so that the children of are and . The subtree of a level- node has leaves, nodes, and slots, or two more if the node is a root.
From now on, is a sufficiently large constant, and we fix the constant in the schedule as a function of :
As we will see in Lemma 2.6, this makes the current-array insertions of epoch leave very few empty slots in each level- subtree, except with doubly exponentially small probability as a function of .
For each node in , we will be interested in the number of direct attempts it receives, defined as follows. During epoch and phase , if the insertion of an element makes a cleanup attempt (i.e., calls TryInsertSubtree), the level- ancestor of is said to have received a direct attempt. Additionally, during epoch , whenever there is a current-array insertion of an element , the level- ancestor of is said to have received a direct attempt. In both cases, whenever a direct attempt is made on some node , if the subtree rooted at contains any empty slots, then one of those empty slots is guaranteed to be filled.
Analyzing the probability that subtrees are filled. We want to bound the probability that a given subtree has any empty slots at the end of phase . Instead of directly computing the probability of this event, we consider a slightly weaker notion of failure (a subtree being bad, as we define below) that can be analyzed in a recursive fashion. It is built from a simpler per-node event, that the node receives too few direct attempts.
Let be the number of direct attempts on node . Let be the indicator of the event that these attempts are too few to be useful: for any , set
a constant fraction of the number of direct attempts we expect; for , let if ; and let if (just below the number of slots in a level- subtree).
The next lemma bounds the probability for any i, j, k.
Lemma 2.6 (Each node is rarely bad). For every and every k,
where the hidden constant is absolute (in particular, independent of ).
Proof. We apply the Chernoff bound (4). By symmetry, the number of direct attempts each subtree at level receives is in expectation at least (the minus 1 handles rounding issues from the number of insertions into during epoch ).
Since (6) gives , this mean exceeds the threshold by at least . That is a fraction of the mean, so the probability that is below the threshold is .
For , phase of epoch is a nonfinal phase, so it consists of at least insertions. Each of them makes a direct attempt on exactly when its priority is below and its level- home subtree is the one rooted at , which happens with probability , since that subtree contains a fraction of the leaves. So the mean of is at least , and the probability that is .
We now define bad subtrees. For , let if some in the subtree of , at levels through , equals one. For , set , so that , and let if
We call a subtree bad if . In words, we call a subtree bad if it receives too few attempts of its own, or if too many of its half-height subtrees were already bad.
The next lemma says that if a subtree at level j is not bad, then it is full at the end of phase j.
Lemma 2.7. If and , the subtree of is full by the end of phase of epoch .
Proof. First, a fact about a single phase . Let be a level- node with whose subtree has at most empty slots when phase begins. Each attempt at fills an empty slot of its subtree unless that subtree is already full, and receives at least attempts, so its subtree is full when the phase ends.
We now prove the lemma by induction on . The base case is , where means that every in the subtree, at levels through , is zero. The base case is itself an induction, on the level : we show that every level- subtree inside ours is full after phase . Each level- subtree has fewer than empty slots at time , and so also when phase begins. Each level-() subtree then has fewer than empty slots, counting the node's own two slots, so by the fact above it is full after phase . For , both children of each level- node are full after phase , so only the node's own slots can be empty when phase begins, and the fact applies again.
For the inductive step, take and let , so that . By the induction hypothesis applied to each level- subtree, after phase the only level- subtrees that can still contain empty slots are the bad ones, and since , the second clause of (8) tells us there are fewer than of them inside our subtree. Each such subtree has fewer than slots. Above the level- subtrees, our subtree contains fewer than nodes, holding at most slots. So when phase begins, the number of empty slots is at most
where the last inequality, which is equivalent to , holds because and is large. Since , the fact above applies, and filled slots never empty again, so the subtree is full when the phase ends.
In the following lemma, we bound the probability that a given subtree is bad. This is where it matters that (8) compares a subtree against its half-height subtrees rather than against its two children. A bad child of may leave as many as empty slots, far more than the empty slots that phase can be relied on to fill, so a recursion through the children would have to treat a single bad child as fatal. The probability that a level- subtree is bad would then be at least the probability that its child is, and it would not decay with at all. A bad level- subtree, by contrast, has fewer than slots, and the proof of Lemma 2.7 tolerates up to of them. So for to be bad, many rare events must occur at once.
These events are not independent, because all of the half-height subtrees draw their attempts from the same insertions. But they concern disjoint sets of nodes and are monotone in the numbers of attempts those nodes receive, so Lemma 2.5 lets us treat them as negatively associated, and apply the tail bound (5) to their number as if they were independent. Because there are of them, each bad with probability at most , the probability that of them are bad is essentially the product of such probabilities, about . This comfortably beats the target , which is what lets us complete the induction.
Lemma 2.8 (Probability of a bad subtree). If is a sufficiently large constant and satisfies (6), then for every ,
Proof. We first show that, at any fixed level, Lemma 2.5 applies to the variables. Each is a nonincreasing function of its own node's count . By induction on , each is a nondecreasing function of the variables of the nodes in its subtree at levels through . In the base case it is their maximum, and in (8) it is nondecreasing in and in the , which by induction are nondecreasing functions of the variables lower down in the subtree. So is a nonincreasing function of the counts of the nodes in its subtree. The direct attempts on form a single balls-and-bins experiment with the nodes of as bins: each of the current-array insertions into (Lemma 2.2) lands in a uniformly random level- node, and each insertion of phase of epoch lands in a uniformly random level- node with probability , and in no bin otherwise. Each ball's bin is determined by its own hashes and , so the balls are independent. So at any fixed level, the variables are monotone functions of the loads of disjoint sets of bins, and Lemma 2.5 applies to them.
We prove (9) by strong induction on . For the base case, start with . If , then some node of the subtree at levels through has . There are such nodes, and each of them is at level at least , so by (7) each has with probability . A union bound gives as was chosen to be sufficiently large (recall the constant in the exponent does not depend on ).
For the induction step, let and assume (9) at every level strictly between and . Let . Since , the inductive hypothesis applies at level : each of the half-height subtrees inside is bad with probability at most . Let be the number of them that are bad, which is the sum in (8). By the first paragraph of this proof, applied at level , obeys the bounds of Lemma 2.4, and its mean is at most . Since ,
where the last inequality holds because and is large. Thus, a Chernoff bound (5) bounds the probability of the second event in (8) by
where the last inequality, , again holds because is large.
For the first event in (8), (7) gives , where the second inequality again holds because is large. A union bound over the two events gives .
2.5 Analyzing Current-Array Insertions
Next, we analyze the state of at the start of epoch , meaning that it has already received all of its current-array insertions but none of its cleanup insertions. We wish to show that, at this point in time, almost all insertions have interacted with only small subtrees. This ensures that those insertions (and corresponding queries) are cheap.
Call a subtree with at least two leaves overcrowded if one of its two children receives at least its own capacity in home arrivals, that is, current-array insertions into whose home leaf lies in that child.
Lemma 2.9 (Where overflow can go). (i) A specified subtree with s leaves is overcrowded with probability , where the constant depends only on . For disjoint subtrees, these upper bounds multiply.
(ii) In a process consisting only of current-array attempts, the target subtree of every call TryInsertSubtree(x, i, ) with lies inside an overcrowded subtree at level or above. In particular, an element whose current-array attempt reaches level J is placed inside an overcrowded subtree at level J or above.
Proof. For (i), a child with leaves has capacity . Each of the current-array insertions into has its home leaf in that child with probability , so the child's expected number of home arrivals is at most , which is below once . Apply (4) and sum over the two children. Distinct parents that are disjoint have disjoint sets of possible witness children, so the product bound of Lemma 2.5, followed by a sum over the two choices of witness for each parent, gives the product bound.
Part (ii) is deterministic, and is the statement that overflow cannot travel far without leaving evidence behind. A call TryInsertSubtree with is made only because 's level- home subtree was full. Consider the largest subtrees that such calls ever target; these are disjoint. Look at the first call that targets such a maximal subtree . At that moment one child of was full. Since neither nor any ancestor of had ever been targeted before, that child cannot have received any element from outside itself, so all of the elements filling it arrived at their own homes inside it: its home arrivals number at least its capacity, and is overcrowded. Every other call, including where it inserts its element below its target, stays inside some maximal .
Lemma 2.10 (Early overflow). Before epoch , the probability that a call of TryInsertSubtree targets a specified level-j subtree of the tree , for , is , where the constant depends only on . The same bound holds for a fixed current-array insertion to reach level j on its home path.
Proof. Before epoch the only calls of TryInsertSubtree into are those of the current-array attempts of epoch , so by Lemma 2.9(ii) a specified subtree is targeted only if it or one of its ancestors is overcrowded. There is at most one ancestor at each level from upward, so summing over proves the first claim.
The second claim follows in the same way: a current-array insertion of reaches level only through a call TryInsertSubtree, which targets 's level- home subtree.
2.6 Bounding Insertion and Query Time
First, we show insertions are cheap.
Lemma 2.11 (Insertion cost). Every fixed insertion takes expected time.
Proof. Consider the two steps in turn. Checking the priority takes constant time. A cleanup attempt in phase first reads its target node and, if is nonfull, the two children of . If is full, or both children are full, the attempt ends after these constant many probes. Only if a child of is nonfull does it insert below , at cost . For this cost is a constant outright. For , the children of are level- subtrees with , and a nonfull one at this point was already nonfull at the end of phase . The incoming element's home is fresh, so Lemma 2.7 and Lemma 2.8 bound the probability of this case, and the expected cost of the cleanup attempt is at most
In the final phase, the target is the root, and the same estimate holds with replaced by the height of .
For the current-array attempt, each call that fails costs one node read, and the one that succeeds costs at level . Lemma 2.10 bounds the probability of reaching level by , so summing over the levels, up to and including the root, gives a constant. In the last epoch the current tree has constant size.
We next bound query time. The search bound of an element in carries a factor i, and the next lemma shows that this factor is the only thing that matters: up to constants, an element's expected search bound is its epoch number. This is where the priority condition in the cleanup attempt earns its keep.
Lemma 2.12 (A fixed element's search bound). For a fixed element inserted during epoch ,
Proof. We bound the contribution of each way in which can be placed. If , only the last case arises; otherwise let be the phase.
-
Step 1, nonfinal phase , placement at or within the target. The cleanup attempt places in its level- home subtree (phase ) or in its target node (later phases). The search bound is respectively and . In the second case the cleanup attempt must have been made at all, which requires , an event of probability independent of the table and of 's home, so the expected contribution is .
-
Step 1, nonfinal phase , placement below the target. The cleanup attempt inserts its element below its target node. As in Lemma 2.11, this has probability at most , and the search bound is .
-
Step 1, final phase. The cleanup attempt places anywhere in . Let be the height of . Phase is a nonfinal phase at the root, so this requires to be nonfull at the end of phase , which by Lemmas 2.7 and 2.8 has probability at most . The search bound is .
-
Step 2, current-array insertion. This covers every element whose cleanup attempt was not made or failed. The current-array insertion reaches level , with probability at most by Lemma 2.10, and search bound .
Each of these contributions is , and the sum over converges because doubly exponential decay beats the polynomial factors. (A placement into one of the constant-size trees has search bound outright.) Finally, .
The factor costs nothing on average, because late epochs are short. So the total of all search bounds is linear.
Lemma 2.13 (Total search bounds). Let be the search bound of the element placed by insertion . Then
Proof. By (2), epoch has insertions, and by Lemma 2.12 each has expected search bound . Summing, .
Putting the pieces together, we obtain our first theorem.
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 worst-case expected time and positive queries in amortized expected time. Moreover, the worst-case expected positive query time is .
Proof. Correctness of insertion holds on every outcome, by Lemma 2.2, and Lemma 2.11 gives the expected insertion cost. A query for a present element stops by the time it reaches the element's search bound. For each fixed element, Lemma 2.12 bounds the expected search bound by , where is the epoch in which the element was inserted. For the amortized bound: during epoch one every element has , and after epoch one we have , so by Lemma 2.13 the expected search bounds of the first elements sum to . The only metadata stored outside the array is a counter of the elements present, from which the epoch and phase of an insertion are computed (Section A.1). (Queries do not read it; the probe schedule of Section A.2 needs only words of scratch space during a query.) No inserted element is ever moved, so the table is stable.
3 Worst-Case Expected Positive Queries
In the previous section, we showed that we can get an amortized expected query time of without reordering—on average, each element is cheap to query. In this section, we show that the following simple modification to the insertion algorithm turns this amortized bound into a worst-case expected bound: on an insertion of an element during an epoch , we swap with the element in the first slot of (recall that , and thus , is full by the end of epoch 2) and then run the algorithm of Section 2 on instead of . We say the element is evicted during epoch .
Intuitively, this modification makes it so that some random previously inserted element pays the expected query cost of an element inserted during epoch instead of . There are leaves of , and there are only elements inserted in epoch , so any given element has only a small chance of having a high query cost. This intuition is made formal in the following lemma.
Lemma 3.1. For any element and epoch , the probability that is evicted in epoch is .
Proof. At any insertion during epoch , may only be evicted if it is in the first slot of a leaf of , and, as has leaves, the chance is evicted is . By (2), epoch consists of insertions, so is evicted in epoch with probability .
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 worst-case expected time.
Proof. An element in has been placed using only and possibly . The hashes , , and used to reinsert an element evicted in epoch are still fresh and independent. Its reinsertion therefore has the same distribution as an insertion in Section 2. Our modification only adds work to insertions, so the expected insertion time remains . It remains to show the worst-case expected query time is .
An element can be evicted at most once: after it is evicted from in epoch , it is inserted either into or and thus can never be evicted again. The moment after is inserted, its expected query time is : if it is inserted in epoch , this follows from Lemma 2.12, and, otherwise, this follows from the fact that is inserted into . Further, conditioned on being evicted in epoch , its expected query time is by Lemma 2.12. Therefore, at any given point in time, the expected query time for is at most
By Lemma 3.1, it follows that the expected query time for x is
4 O(1) Worst-Case Expected Negative Queries
Whereas a positive query for can simply stop when is found, a negative query needs an explicit stopping rule to avoid searching through the entire table. To do this, we leave implicitly encoded “breadcrumbs” throughout the data structure that let a negative query know when to stop (or, perhaps more accurately, when to continue).
We will use these breadcrumbs to keep track of three types of bounds on the query time for an element . First, we track an index such that can only reside in one of the trees . Second, for each , we track two levels and with the following guarantee:
-
if resides in , then it lies either in an ancestor of at level at most , or somewhere in its level- home subtree;
-
if resides in for some , then it lies either in an ancestor of at level at most , or somewhere in its level- home subtree.
The level covers where would typically be placed, and it will depend only on ; the level , together with in , covers every other possibility. A query can conclude is not in once it finishes probing all of these slots: the ancestors of up to if or if , and all slots in the level- home subtree of . A query can then stop looking for once it has concluded is not in for all . See Figure 2 for an illustration.
It remains to explain how , , and are encoded. Their precise definitions are given in Table 1; this paragraph covers some of the intuition behind them. is simply the largest such that and represents the node a successful nonfinal-phase cleanup attempt may place in. and , on the other hand, are calculated from the breadcrumbs, which are stored in one of two ways. First, placing an element of unusually low priority in a leaf of (such elements usually reside higher up in ) allows us to encode (an upper bound for) . Insertions can find these low-priority elements efficiently by looking at higher levels of and can then swap such an element into a leaf in order to update efficiently. This search can fail, however, with small probability, which is why ends up partially relying on in Table 1. Second, the relative order of the two elements in a node encodes a single bit: a node encodes 0 if it holds zero

Figure 2: The stopping condition for a query for with . (In the construction, ; the figure uses a smaller value for illustration.) Each dot is an element. The shaded nodes are the only ones that may hold : in each tree with , the ancestors of at levels 1 through (braces), or through in , together with all of 's level- home subtree (dashed outline). Each is the largest with , so it is determined by 's priority alone. The later tree (grey) is not searched at all.
| Definition | |
|---|---|
| The largest with . Depends only on 's priority. | |
| , where is the largest level such that the level- ancestor of has bit 1 for and for every ; or 1 if there is no such . | |
| , where ranges over the leaves of that the query waits for and the leaves of 's level- home subtree), and is the largest of an element of , or 1 if is empty. |
Table 1: The three bounds that a query for tracks. The query computes before , since depends on it.
elements, one element, or two elements in increasing order, and it encodes 1 otherwise. These bits are used to encode : specifically, , where is the largest level such that the level- ancestor of is set to 1 and such that, for all , the level- ancestor of is also set to 1; if no such exists then . The full details are given in Table 1.
Insertions. An insertion of during epoch performs the following three steps. As a rule, apart from the bits that steps 2 and 3 deliberately set, we implicitly assume that the insertion is implemented so that every node that the insertion touches keeps its bit as it was prior to the insertion. Additionally, it is worth noting that the algorithm does not explicitly reason about ; instead, it implicitly updates the breadcrumbs so that queries continue to be correct. The three steps of the insertion are as follows:
-
Insert as in Section 3. If , insert with the algorithm of Section 2. Otherwise, put in place of the element in the first slot of , and insert with the algorithm of Section 2, which places in or .
-
Leave a trail. Let be the element that step 1 placed with the algorithm of Section 2 (namely if , and otherwise), let be the tree in which it was placed, and let be the smallest level such that lies in its level- home subtree in . Unless lies in its own level- ancestor and (i.e., ), set the bits of 's ancestors at levels 1 through to 1.
-
Record the eviction. If , do nothing. Otherwise, let , let be the level- ancestor of in , and let be the element of that is not . If holds an element with , that is, with , exchange and , and, if is an ancestor of , set to 1 the bit of the child of that is an ancestor of . Otherwise, set the bits of and of all of its ancestors below to 1.
It is worth briefly justifying that this algorithm always succeeds. Setting the bit of a node to 1 requires that node to be full, and the following lemma establishes that this is always the case.
Lemma 4.1. The insertion algorithm above never tries to set the bit of a nonfull node to 1.
Proof. For step 2: if , step 2 sets no bits, so assume . TryInsertSubtree places in its level- ancestor, or leaves 's path at that ancestor, only if the child on 's path, at level , is full (this is where we use the preference in Algorithm 1 for the child above ). A node holds an element only if both of its child subtrees are full, so the whole level- home subtree is full, and it contains every node whose bit step 2 sets. For step 3, which acts only on : is full by the end
For a root node, we only consider the elements in the first two slots of the node to calculate what bit it encodes.

Figure 3: Step 3 of a late insertion of during an epoch with . Each element of is labeled with ; for simplicity, every element at level has . The element takes the first slot of the leaf , and the element that it displaces is reinserted by the algorithm of Section 2 into a later tree (grey). The level-3 ancestor of holds an element with , which is exchanged with the other element of ; if is an ancestor of , the bit of the child of above is set to 1. Afterwards holds , so .
of epoch two (Lemma 2.2) and stays full, since step 1 only swaps one element of for another and step 3 only exchanges elements.
Queries. A query for probes its query probe sequence, as always, and reports as soon as it sees it. We say that the query waits for a node if it does not report as absent until that node has been read. To decide which nodes to wait for, it computes the bounds of Table 1 from the slots it has read so far. Fix a tree , and let be the ancestors of in , with at level . To compute , the query waits for , and then, as long as the last of these ancestors has bit 1, it also waits for the next one up; that is, it waits up to the first with whose bit is 0, or up to the root. The level in the definition of is the highest level among these ancestors whose bit is 1, so once they have been read, the query knows , and it waits for all of 's level- home subtree (the whole tree, if is the level of the root). In , once that subtree has been read, the query knows , since the leaves in its definition are exactly those that it waits for in , and it waits for the ancestors of up to level . It reports that is absent once it has read every node that it waits for in , for every (recall is the number of trees). See Figure 4.
So the query waits for exactly what the stopping condition at the start of this section prescribes. Every quantity here depends only on slots that the query has already read, and these quantities only decide when the query stops, never where it probes next.
4.1 Correctness
We now show that queries are correct. That is, a query for a previously inserted element does not stop prematurely and conclude is absent from the table. Let be 's level- home subtree in . Restating the stopping condition, a query for waits, in each tree with , for all the nodes in and for the path from to its level- ancestor, or to its level-max ancestor if . We say that is safe if it lies in one of these nodes.
Recall that the insertion algorithm never computes the search bounds explicitly; it updates them implicitly by moving elements and setting bits. The bounds and behave simply:

Figure 4: Computing in a tree with and . The blue ancestor path has bits 1, 0, 1, 0 from bottom to top; the displayed elements illustrate their encoding. The query must wait for levels 1 through 3 despite the 0 at level 2. The 1 at level 3 makes it wait for level 4, whose bit is 0, and thus . The query then waits for the entire level-4 home subtree.
depends only on 's priority and is fixed, while can only increase as bits are set to 1. The bound requires more care: changing the contents of a leaf can decrease (the largest -value stored there) and thereby decrease for other elements whose queries include , even if those elements do not move. Thus we cannot rely on being nondecreasing. However, during epoch , all elements reside in , so it suffices to track . The next lemma shows that this quantity never decreases during an insertion and provides the lower bounds on we need to prove correctness.
Lemma 4.2. Consider an insertion of during epoch , and let . After the insertion,
Moreover, the insertion does not decrease for any element .
Proof. Once a node's bit is set to 1, it remains 1, so each never decreases, and each can only grow. If , both claims follow from . Otherwise, let , and consider step 3. If the exchange succeeds, ends up with an element with , so . Thus every with a leaf of has .
If the exchange fails, step 3 sets the bits of and its ancestors through level to 1. We claim that, for every with a leaf of , . Otherwise, the root of is the level- ancestor of , whose bit is now 1. But the definition of requires this root to have its bit set to 0, a contradiction. Hence , and . This proves (12).
To see that does not decrease for any element , observe that the only leaf of whose contents change is . If does not contain after the insertion, none of its leaf values has changed, and can only increase, so cannot decrease. Otherwise, (12) gives afterward, so cannot be a decrease either.
We now prove, by induction on the insertions, that every element in the table is always safe.
Lemma 4.3. After every insertion during an epoch , every element in the table is safe, even with replaced by .
Proof. We induct over the insertions; initially, the table is empty. Consider an insertion of during epoch , and say that an element is -safe if it is safe with replaced by . Increasing can only increase this quantity, so every element is -safe before the insertion. Let , and, if , let , , , and be as in step 3. If an -safe element lies in a leaf of , that leaf belongs to .
Elements that the insertion does not move. Their values are fixed, their values never decrease, and Lemma 4.2 shows that their bounds never decrease. Thus they remain -safe.
Elements that the insertion places or moves. Since the algorithm of Section 2 never moves an element that is already placed, it suffices to check the following cases for an element placed or moved by the insertion:
-
The element , when . It lands in , which lies in .
-
The element placed by Section 2. Let be its destination tree, where . Either lies in an ancestor of at a level at most , or step 2 sets the bits of its ancestors at levels 1 through to 1, where is the smallest level of a home subtree containing its new location, as in step 2. In the latter case, the definition of gives , so its new location lies in . It remains to check that . If , this follows from and . Otherwise, , which was safe in before the insertion. Hence belonged to and still does, since never decreases. By (12), .
-
The element moved down from to in step 3. This swap requires . If is not an ancestor of , 's prior safety implies that already contains (and thus ). Otherwise, step 3 sets the bit of 's level- ancestor to 1. Since , the definition of gives , so contains the subtree of , including .
-
The element moved up from to in step 3. Since was safe in before the insertion, is a leaf of and (12) gives . If lies outside , it is above that subtree's root and hence is also the level- ancestor of , where . Thus is -safe in either case.
Lemma 4.4 (Correctness). At every time, a query never reports a present element as absent.
Proof. The set of nodes that a query for waits for only grows with , so by Lemma 4.3, every element in the table is always safe.
4.2 Proving Theorem 1.1
We now show that all operations (insertions, positive queries, and negative queries) take expected time. For our analysis, we lump together many of the events that can make insertions or queries expensive, and bound their cost very loosely: whenever one occurs at a node, we assume that a query for any element residing in that node's subtree may have to search the entire subtree. In some cases this bound is exponentially loose, but these events are also exponentially unlikely, so the loose bound still suffices.
Expensive nodes. A node is expensive at a given time if, before then, any of the following has occurred:
-
a current-array insertion runs TryInsertSubtree with target node ;
-
a cleanup attempt in a nonfinal phase has target node V and inserts its element below V;
-
V is the root of its tree and a cleanup attempt in the final phase succeeds in that tree;
-
V is in and step 3 of an insertion in some epoch s > 100 selects V.
For our analysis, we assume that, if is expensive, then an insertion or query for an element in the subtree rooted at must search through the entire subtree. Accordingly, for a leaf , let be the level of the highest expensive node on the path from to the root, or 1 if there is none. The following lemma shows that it is unlikely for nodes to be expensive.
Lemma 4.5. A fixed node at level of any tree is expensive at any fixed time with probability .
Proof. We bound the probability of each of the four cases in the definition in turn. The first case has probability by Lemma 2.10. For the second case, a nonfinal cleanup attempt with target node is made in phase , and it inserts its element below only if a child of is still nonfull after phase . For the third case, a final-phase cleanup attempt succeeds only if the tree is still nonfull after its last nonfinal phase. By Lemmas 2.7 and 2.8, each of these has probability .
For the fourth case, step 3 of an insertion of in epoch selects only if and lies below . Since has leaves and the size of the subtree rooted at is , lies below with probability . By (2), there are insertions in total in epochs with . Each of them selects with probability , so by a union bound, the probability is ever selected is at most
Note that, for any fixed leaf , a union bound over the levels gives
Insertion time. An insertion takes time unless it triggers one of the first three cases at a level- node, or step 3 fails at a level- node; the latter requires , since otherwise every element in that node was placed there by a phase- cleanup attempt, and so has . Either way it costs , including the bits written by step 2. The node involved is determined by the fresh hashes of the element being placed, so by Lemma 2.10 and (13) this happens with probability , and the expected insertion time is .
Positive queries. Fix an element . By the same reasoning as in the proof of Theorem 1.3, has expected search bound immediately after its insertion (the recording step of its own insertion never moves ), and its possible later eviction from adds in expectation. The only other way 's search bound can increase is through a later exchange in step 3 of the insertion algorithm, so it remains to bound the probability and cost of such exchanges.
An exchange at a node may only move between and a leaf below . If is not above , this keeps in the same home subtree, so does not increase. If is above at level , then ends up in its level- home subtree, so . So exchanges add at most to for each level- node above that step 3 of a later insertion selects. For each later insertion of an element , is independent of , so the analysis of the fourth case in Lemma 4.5 still applies, and this has probability . Hence
Negative queries. To analyze negative queries, we fix some element and a time when is not present. The table at this time does not depend on later insertions, so we may assume that is never inserted; then 's hashes are independent of the table at all times. A node's bit is 1 only if that node or one of its ancestors is expensive, since every step that sets a bit does so below a node that it makes expensive. So every bit above level is 0, and . Since is independent of the table, (13) gives at any fixed time, and hence
We now bound . By definition, is the maximum of and the values of the elements in the leaves of . depends on the table, so, to avoid issues arising from this dependence, we directly bound the probability that for any value . Let , and let be 's level- home subtree in (all of if exceeds its height). Then only if one of the following three events occurs:
-
-
some element with has been moved into ;
-
some inserted element has and .
Each of the first two events implies , which has probability by (13). For the first event, observe that , because a node's bit is 1 only if that node or one of its ancestors is expensive, and thus every bit on 's path above level is 0. For the second, such an element can only have entered by first going through a node above : either the target of a call of TryInsertSubtree, or a node at which step 3 performs an exchange. Either way, that node is expensive and lies on 's path at a level above .
We now bound the third event. Each of the at most inserted elements has with probability and, independently, with probability , so a union bound gives . Together,
In particular, .
The nodes waited for in occur within the first probes of its local list, with an additional probes in . By (3), the total query cost is at most
The and terms have constant expectation, by (14) and the fact that . For , depends only on , so it is independent of , and hence
By Hölder’s inequality, (14), and (15) we have that
The expected negative-query cost is therefore .
Putting the pieces together, we obtain our final theorem.
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 worst-case expected time.
Proof. Insertions succeed by Lemma 4.1, and queries are correct by Lemma 4.4. Insertions, positive queries, and negative queries take expected time by the bounds above.
Acknowledgments
Martín Farach-Colton was supported in part by the Leonard J. Shustek Professorship and by NSF grants 2551614, 2420942, 2247576, and 2230742. Andrew Krapivin and William Kuszmaul were supported in part by NSF grant 2504471, by NSF CAREER award 2542165, and by a Jane Street Research Grant. Andrew Krapivin was also partially supported by the Jeanne B. and Richard F. Berdik ARCS Pittsburgh Endowed Scholar Award, the David and Lucile Packard Foundation (Award #202071730), and gifts from Nikolai Mushegian and Microsoft.
AI Methodology
All of the major technical contributions in this paper were made by the authors. AI tools (Claude Opus 5.5, GPT 6 Astra, Gemini 4 Argon) were used to help structure the paper and produce initial drafts of the main sections of the paper; those sections were then almost entirely rewritten by the authors. The AI tools were also used to help clean-up and tighten the prose in the final editing pass.
The lower bound in Appendix B, which itself is a natural extension of the existing dynamic-hash-table lower bound in [BKZ24], was produced with guidance from the authors by Claude Opus 5.5 and GPT 6 Astra. The authors have independently verified the correctness of the proof.
References
[ABH24] Anders Aamand, Ioana O. Bercea, Jakob Bæk Tejs Houen, Jonas Klausen, and Mikkel Thorup. Hashing for sampling-based estimation. CoRR, abs/2411.19394, 2024.
[AK74] Ole Amble and Donald E. Knuth. Ordered hash tables. Comput. J., 17(2):135–142, 1974.
[AKK20] Anders Aamand, Jakob Bæk Tejs Knudsen, Mathias Bæk Tejs Knudsen, Peter Michael Reichstein Rasmussen, and Mikkel Thorup. Fast hashing with strong concentration bounds. In Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing, STOC 2020, 2020.
[AKS78] Miklós Ajtai, János Komlós, and Endre Szemerédi. There is no fast single hashing algorithm. Inf. Process. Lett., 7(6):270–273, 1978.
[ANS09] Yuriy Arbitman, Moni Naor, and Gil Segev. De-amortized cuckoo hashing: Provable worst-case performance and experimental results. In Automata, Languages and Programming, 36th International Colloquium, ICALP 2009, 2009.
[ANS10] Yuriy Arbitman, Moni Naor, and Gil Segev. Backyard cuckoo hashing: Constant worst-case operations with a succinct representation. In 51st Annual IEEE Symposium on Foundations of Computer Science, FOCS 2010, 2010.
[Bat75] Vladimir Batagelj. The quadratic hash method when the table size is not a prime number. Commun. ACM, 18(4):216–217, 1975.
[BBK+23] Ioana O. Bercea, Lorenzo Beretta, Jonas Klausen, Jakob Bæk Tejs Houen, and Mikkel Thorup. Locally uniform hashing. In 64th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2023, 2023.
[BCF+23] Michael A. Bender, Alex Conway, Martín Farach-Colton, William Kuszmaul, and Guido Tagliavini. Iceberg hashing: Optimizing many hash-table criteria at once. J. ACM, 70(6):40:1–40:51, 2023.
[BCF+25] Michael A. Bender, Alexander Conway, Martín Farach-Colton, William Kuszmaul, and Guido Tagliavini. Tiny pointers. ACM Trans. Algorithms, 21(4):38:1–38:43, 2025.
[BE23] Ioana O. Bercea and Guy Even. Dynamic dictionaries for multisets and counting filters with constant time operations. Algorithmica, 85(6):1786–1804, 2023.
[BF24] Tolson Bell and Alan M. Frieze. O(1) insertion for random walk d-ary cuckoo hashing up to the load threshold. In 65th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2024, 2024.
[BFK+22] Michael A. Bender, Martín Farach-Colton, John Kuszmaul, William Kuszmaul, and Mingmou Liu. On the optimal time/space tradeoff for hash tables. In 54th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2022, 2022.
[BFKK24] Michael A. Bender, Martín Farach-Colton, John Kuszmaul, and William Kuszmaul. Modern hashing made simple. In 2024 Symposium on Simplicity in Algorithms, SOSA 2024, 2024.
[BG07] Guy E. Blelloch and Daniel Golovin. Strongly history-independent hashing with applications. In 48th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2007, 2007.
[BK24] Mark Braverman and William Kuszmaul. Tight analyses of ordered and unordered linear probing. In 65th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2024, 2024.
[BK26] Tolson Bell and William Kuszmaul. Fast insertion for bucketized cuckoo hashing. CoRR, abs/2607.24545, 2026.
[BKK21] Michael A. Bender, Bradley C. Kuszmaul, and William Kuszmaul. Linear probing revisited: Tombstones mark the demise of primary clustering. In 62nd IEEE Annual Symposium on Foundations of Computer Science, FOCS 2021, 2021.
[BKZ24] Michael A. Bender, William Kuszmaul, and Renfei Zhou. Tight bounds for classical open addressing. In 65th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2024, 2024.
[BKZ25] Michael A. Bender, William Kuszmaul, and Renfei Zhou. Optimal non-oblivious open addressing. In Proceedings of the 57th Annual ACM Symposium on Theory of Computing, STOC 2025, 2025.
[Bre73] Richard P. Brent. Reducing the retrieval time of scatter storage techniques. Commun. ACM, 16(2):105–109, 1973.
[CFS18] Alexander Conway, Martín Farach-Colton, and Philip Shilane. Optimal hashing in external memory. In 45th International Colloquium on Automata, Languages, and Programming, ICALP 2018, 2018.
[CLM85] Pedro Celis, Per-Åke Larson, and J. Ian Munro. Robin Hood hashing (preliminary report). In 26th Annual Symposium on Foundations of Computer Science, FOCS 1985, 1985.
[CPT15] Tobias Christiani, Rasmus Pagh, and Mikkel Thorup. From independence to expansion and back again. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, STOC 2015, 2015.
[CSW07] Julie Anne Cain, Peter Sanders, and Nicholas C. Wormald. The random graph threshold for k-orientability and a fast algorithm for optimal multiple-choice allocation. In Proceedings of the Eighteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2007, 2007.
[CW79] Larry Carter and Mark N. Wegman. Universal classes of hash functions. J. Comput. Syst. Sci., 18(2):143–154, 1979.
[DadHPP06] Erik D. Demaine, Friedhelm Meyer auf der Heide, Rasmus Pagh, and Mihai Pătrașcu. De dictionariis dynamicis pauco spatio utentibus. In LATIN 2006, 2006.
[DGM 10] Martin Dietzfelbinger, Andreas Goerdt, Michael Mitzenmacher, Andrea Montanari, Rasmus Pagh, and Michael Rink. Tight thresholds for cuckoo hashing via XORSAT. In Automata, Languages and Programming, 37th International Colloquium, ICALP 2010, 2010.
[DKRT15] Søren Dahlgaard, Mathias Bæk Tejs Knudsen, Eva Rotenberg, and Mikkel Thorup. Hashing for statistics over k-partitions. In IEEE 56th Annual Symposium on Foundations of Computer Science, FOCS 2015, 2015.
[DR98] Devdatt P. Dubhashi and Desh Ranjan. Balls and bins: A study in negative dependence. Random Struct. Algorithms, 13(2):99–124, 1998.
[DR09] Martin Dietzfelbinger and Michael Rink. Applications of a splitting trick. In Automata, Languages and Programming, 36th International Colloquium, ICALP 2009, 2009.
[DW03] Martin Dietzfelbinger and Philipp Woelfel. Almost random graphs with simple hash functions. In Proceedings of the 35th Annual ACM Symposium on Theory of Computing, STOC 2003, 2003.
[DW07] Martin Dietzfelbinger and Christoph Weidling. Balanced allocation and dictionaries with tightly packed constant size bins. Theor. Comput. Sci., 380(1-2):47–68, 2007.
[Eck74] A. Ecker. The period of search for the quadratic and related hash methods. Comput. J., 17(4):340–343, 1974.
[FJ19] Alan M. Frieze and Tony Johansson. On the insertion time of random walk cuckoo hashing. Random Struct. Algorithms, 54(4):721–729, 2019.
[FKK24] Martín Farach-Colton, Andrew Krapivin, and William Kuszmaul. Optimal bounds for open addressing without reordering. In 65th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2024, 2024.
[FKK26] Martín Farach-Colton, Andrew Krapivin, and William Kuszmaul. Greedy open addressing revisited: Beyond Yao's lower bound. In Proceedings of the 58th Annual ACM Symposium on Theory of Computing, STOC 2026, 2026.
[FKP16] Nikolaos Fountoulakis, Megha Khosla, and Konstantinos Panagiotou. The multiple-orientability thresholds for random hypergraphs. Comb. Probab. Comput., 25(6):870–908, 2016.
[FM12] Alan M. Frieze and Päll Melsted. Maximum matchings in random bipartite graphs and the space utilization of cuckoo hash tables. Random Struct. Algorithms, 41(3):334–364, 2012.
[FMM11] Alan M. Frieze, Päll Melsted, and Michael Mitzenmacher. An analysis of random-walk cuckoo hashing. SIAM J. Comput., 40(2):291–308, 2011.
[FN93] Amos Fiat and Moni Naor. Implicit probe search. SIAM J. Comput., 22(1):1–10, 1993.
[FNSS92] Amos Fiat, Moni Naor, Jeanette P. Schmidt, and Alan Siegel. Nonoblivious hashing. J. ACM, 39(4):764–782, 1992.
[FP10] Nikolaos Fountoulakis and Konstantinos Panagiotou. Orientability of random hypergraphs and the power of multiple choices. In Automata, Languages and Programming, 37th International Colloquium, ICALP 2010, 2010.
[FP18] Alan M. Frieze and Samantha Petti. Balanced allocation through random walk. Inf. Process. Lett., 131:39–43, 2018.
[FPS13] Nikolaos Fountoulakis, Konstantinos Panagiotou, and Angelika Steger. On the insertion time of cuckoo hashing. SIAM J. Comput., 42(6):2156–2181, 2013.
[FPSS05] Dimitris Fotakis, Rasmus Pagh, Peter Sanders, and Paul G. Spirakis. Space efficient hash tables with worst case constant access time. Theory Comput. Syst., 38(2):229–248, 2005.
[FR07] Daniel Fernholz and Vijaya Ramachandran. The k-orientability thresholds for . In Proceedings of the Eighteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2007, 2007.
[GHMT12] Michael T. Goodrich, Daniel S. Hirschberg, Michael Mitzenmacher, and Justin Thaler. Cache-oblivious dictionaries and multimaps with negligible failure probability. In Design and Analysis of Algorithms – First Mediterranean Conference on Algorithms, MedAlg 2012, 2012.
[GM79] Gaston H. Gonnet and J. Ian Munro. Efficient ordering of hash tables. SIAM J. Comput., 8(3):463–478, 1979.
[GPW26a] Yuhao Guo, Seth Pettie, and Chengzhang Wan. A sharp analysis of fixed offset hash tables. arXiv preprint arXiv:2610.31363, 2026.
[GPW26b] Yuhao Guo, Seth Pettie, and Chengzhang Wan. A simple analysis of quadratic probing and other open addressing schemes. CoRR, abs/2608.08013, 2026.
[GS78] Leonidas J. Guibas and Endre Szemerédi. The analysis of double hashing. J. Comput. Syst. Sci., 16(2):226–274, 1978.
[GW10] Pu Gao and Nicholas C. Wormald. Load balancing and orientability thresholds for random hypergraphs. In Proceedings of the 42nd ACM Symposium on Theory of Computing, STOC 2010, 2010.
[HD72] F. Robert A. Hopgood and James H. Davenport. The quadratic hash method when the table size is a power of 2. Comput. J., 15(4):314–315, 1972.
[HKL+26a] Yang Hu, William Kuszmaul, Jingxun Liang, Stefan Walzer, Huacheng Yu, and Renfei Zhou. Quadratic probing insertions are time. CoRR, abs/2608.28512, 2026.
[HKL+26b] Yang Hu, William Kuszmaul, Jingxun Liang, Stefan Walzer, Huacheng Yu, and Renfei Zhou. Quadratic probing revisited: Smoothed analysis and the fall of Robin Hood. CoRR, abs/2607.13247, 2026.
[HLY+25] Yang Hu, Jingxun Liang, Huacheng Yu, Junkai Zhang, and Renfei Zhou. Optimal static dictionary with worst-case constant query time. In Proceedings of the 57th Annual ACM Symposium on Theory of Computing, STOC 2025, 2025.
[HMP01] Torben Hagerup, Peter Bro Miltersen, and Rasmus Pagh. Deterministic dictionaries. J. Algorithms, 41(1):69–85, 2001.
[IP12] John Iacono and Mihai Pătrașcu. Using hashing to solve the dictionary problem. In Proceedings of the Twenty-Third Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2012, 2012.
[JP08] Morten Skaarup Jensen and Rasmus Pagh. Optimality in external memory hashing. Algorithmica, 52(3):403–411, 2008.
[KA19] Megha Khosla and Avishek Anand. A faster algorithm for cuckoo insertion and bipartite matching in large graphs. Algorithmica, 81(9):3707–3724, 2019.
[KKW26] Andrew Krapivin, William Kuszmaul, and Jolyne Wang. Linear probing with non-greedy insertions. CoRR, abs/2607.17494, 2026.
[KM25] William Kuszmaul and Michael Mitzenmacher. Efficient d-ary cuckoo hashing at high load factors by bubbling up. In Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2025, 2025.
[KMW09] Adam Kirsch, Michael Mitzenmacher, and Udi Wieder. More robust hashing: Cuckoo hashing with a stash. SIAM J. Comput., 39(4):1543–1561, 2009.
[Knu63] Donald E. Knuth. Notes on “open” addressing. Unpublished memorandum, 1963.
[Knu74] Donald E. Knuth. Computer science and its relation to mathematics. The American Mathematical Monthly, 81(4):323–343, 1974.
[Knu98] Donald E. Knuth. The Art of Computer Programming, Volume 3: Sorting and Searching. Addison-Wesley, 2nd edition, 1998.
[KPX 25] William Kuszmaul, Aaron Putterman, Tingqiang Xu, Hangrui Zhou, and Renfei Zhou. Tight bounds and phase transitions for incremental and dynamic retrieval. In Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2025, 2025.
[KPX 26] William Kuszmaul, Aaron Putterman, Tingqiang Xu, Hangrui Zhou, and Renfei Zhou. Resizable retrieval. CoRR, abs/2606.15944, 2026.
[Kus22] William Kuszmaul. A hash table without hash functions, and how to get the most out of your random bits. In 63rd IEEE Annual Symposium on Foundations of Computer Science, FOCS 2022, 2022.
[Kus23] William Kuszmaul. Strongly history-independent storage allocation: New upper and lower bounds. In 64th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2023, 2023.
[Kus26] William Kuszmaul. An analysis of Brent's insertion method for hash tables. CoRR, abs/2608.00762, 2026.
[KW66] Alan G. Konheim and Benjamin Weiss. An occupancy discipline and applications. SIAM J. Appl. Math., 14(6):1266–1274, 1966.
[KX24] William Kuszmaul and Zoe Xi. Towards an analysis of quadratic probing. In 51st International Colloquium on Automata, Languages, and Programming, ICALP 2024, 2024.
[Lel12] Marc Lelarge. A new approach to the orientation of random hypergraphs. In Proceedings of the Twenty-Third Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2012, 2012.
[LLYZ23a] Tianxiao Li, Jingxun Liang, Huacheng Yu, and Renfei Zhou. Dynamic “succincter”. In 64th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2023, 2023.
[LLYZ23b] Tianxiao Li, Jingxun Liang, Huacheng Yu, and Renfei Zhou. Tight cell-probe lower bounds for dynamic succinct dictionaries. In 64th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2023, 2023.
[LLYZ24] Tianxiao Li, Jingxun Liang, Huacheng Yu, and Renfei Zhou. Dynamic dictionary with subconstant wasted bits per key. In Proceedings of the 2024 ACM-SIAM Symposium on Discrete Algorithms, SODA 2024, 2024.
[LM93] George S. Lueker and Mariko Molodowitch. More analysis of double hashing. Comb., 13(1):83–96, 1993.
[LP09] Eric P. Lehman and Rina Panigrahy. 3.5-way cuckoo hashing for the price of 2-and-a-bit. In 17th Annual European Symposium on Algorithms, ESA 2009, 2009.
[LPP+24] Kasper Green Larsen, Rasmus Pagh, Giuseppe Persiano, Toniann Pitassi, Kevin Yeo, and Or Zamir. Optimal non-adaptive cell probe dictionaries and hashing. In 51st International Colloquium on Automata, Languages, and Programming, ICALP 2024, 2024.
[Mal77] Efrem G. Mallach. Scatter storage techniques: A unifying viewpoint and a method for reducing retrieval times. Comput. J., 20(2):137–140, 1977.
[Mau83] W. Douglas Maurer. An improved hash code for scatter storage (reprint). Commun. ACM, 26(1):36–38, 1983.
[Mit14] Michael Mitzenmacher. Balanced allocations and double hashing. In 26th ACM Symposium on Parallelism in Algorithms and Architectures, SPAA '14, 2014.
[Mit16] Michael Mitzenmacher. More analysis of double hashing for balanced allocations. In Proceedings of the Thirteenth Workshop on Analytic Algorithms and Combinatorics, ANALCO 2016, 2016.
[MS80] J. Ian Munro and Hendra Suwanda. Implicit data structures for fast search and update. J. Comput. Syst. Sci., 21(2):236–250, 1980.
[MU17] Michael Mitzenmacher and Eli Upfal. Probability and Computing: Randomization and Probabilistic Techniques in Algorithms and Data Analysis. Cambridge University Press, 2nd edition, 2017.
[NSW08] Moni Naor, Gil Segev, and Udi Wieder. History-independent cuckoo hashing. In Automata, Languages and Programming, 35th International Colloquium, ICALP 2008, 2008.
[NT01] Moni Naor and Vanessa Teague. Anti-persistence: History independent data structures. IACR Cryptol. ePrint Arch., 2001:36, 2001.
[ÖP03] Anna Östlin and Rasmus Pagh. Uniform hashing in constant time and linear space. In Proceedings of the 35th Annual ACM Symposium on Theory of Computing, STOC 2003, 2003.
[Pag01] Rasmus Pagh. Low redundancy in static dictionaries with constant query time. SIAM J. Comput., 31(2):353–363, 2001.
[Pät08] Mihai Pătrașcu. Succincter. In 49th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2008, 2008.
[Pet57] W. Wesley Peterson. Addressing for random-access storage. IBM J. Res. Dev., 1(2):130–146, 1957.
[PM89] Patricio V. Poblete and J. Ian Munro. Last-come-first-served hashing. J. Algorithms, 10(2):228–248, 1989.
[PP08] Anna Pagh and Rasmus Pagh. Uniform hashing in constant time and optimal space. SIAM J. Comput., 38(1):85–96, 2008.
[PPR09] Anna Pagh, Rasmus Pagh, and Milan Ružić. Linear probing with constant independence. SIAM J. Comput., 39(3):1107–1120, 2009.
[PR04] Rasmus Pagh and Flemming Friche Rodler. Cuckoo hashing. J. Algorithms, 51(2):122–144, 2004.
[PT12] Mihai Pătrascu and Mikkel Thorup. The power of simple tabulation hashing. J. ACM, 59(3):14:1–14:50, 2012.
[PT13] Mihai Pătrascu and Mikkel Thorup. Twisted tabulation hashing. In Proceedings of the Twenty-Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2013, 2013.
[PT16] Mihai Pătrascu and Mikkel Thorup. On the k-independence required by linear probing and minwise independence. ACM Trans. Algorithms, 12(1):8:1–8:27, 2016.
[Rad70] Charles E. Radke. The use of quadratic residue research. Commun. ACM, 13(2):103–105, 1970.
[Riv78] Ronald L. Rivest. Optimal arrangement of keys in a hash table. J. ACM, 25(2):200–209, 1978.
[RR03] Rajeev Raman and S. Srinivasa Rao. Succinct dynamic dictionaries and trees. In Automata, Languages and Programming, 30th International Colloquium, ICALP 2003, 2003.
[Ruž08] Milan Ružić. Uniform deterministic dictionaries. ACM Trans. Algorithms, 4(1):1:1–1:23, 2008.
[Sie04] Alan Siegel. On universal classes of extremely random constant-time hash functions. SIAM J. Comput., 33(3):505–543, 2004.
[SS90] Jeanette P. Schmidt and Alan Siegel. The analysis of closed hashing under limited randomness. In Proceedings of the 22nd Annual ACM Symposium on Theory of Computing, STOC 1990, 1990.
[Sun91] Rajamani Sundar. A lower bound for the dictionary problem under a hashing model. In 32nd Annual Symposium on Foundations of Computer Science, FOCS 1991, 1991.
[Tho13] Mikkel Thorup. Simple tabulation, fast expanders, double tabulation, and high independence. In 54th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2013, 2013.
[Tho17] Mikkel Thorup. Fast and powerful hashing using tabulation. Commun. ACM, 60(7):94–101, 2017.
[Ull72] Jeffrey D. Ullman. A note on the efficiency of hashing functions. J. ACM, 19(3):569–575, 1972.
[VZ13] Elad Verbin and Qin Zhang. The limits of buffering: A tight lower bound for dynamic membership in the external memory model. SIAM J. Comput., 42(1):212–229, 2013.
[Waj17] David Wajc. Negative association: Definition, properties, and applications, 2017. Manuscript.
[Wal22] Stefan Walzer. Insertion time of random walk cuckoo hashing below the peeling threshold. In 30th Annual European Symposium on Algorithms, ESA 2022, 2022.
[Wal23] Stefan Walzer. Load thresholds for cuckoo hashing with overlapping blocks. ACM Trans. Algorithms, 19(3):24:1–24:22, 2023.
[WC81] Mark N. Wegman and Larry Carter. New hash functions and their use in authentication and set equality. J. Comput. Syst. Sci., 22(3):265–279, 1981.
[Yao81] Andrew Chi-Chih Yao. Should tables be sorted? J. ACM, 28(3):615–628, 1981.
[Yao85] Andrew Chi-Chih Yao. Uniform hashing is optimal. J. ACM, 32(3):687–693, 1985.
[Yu22] Huacheng Yu. Nearly optimal static Las Vegas succinct dictionary. SIAM J. Comput., 51(3):20–174, 2022.
[Zam26] Or Zamir. Locality in open addressing hash tables. CoRR, abs/2607.16390, 2026.
[Zob70] Albert L. Zobrist. A new hashing method with application for game playing. Technical Report 88, Computer Sciences Department, University of Wisconsin, 1970. Reprinted in ICGA Journal 13(2):69–73, 1990.
A Explicit Calculations of Addresses and Probe Sequences
Section A.1 removes the assumption that is a power of two and shows how to compute, in constant time from and the number of insertions performed so far, the address of every slot and the current epoch and phase (which is straightforward when is a power of two). Section A.2 gives the fixed probe schedule used by queries, shows that it satisfies (3), its next address is also computable in constant time, and the bounds necessary for negative queries can be tracked with words of scratch space.
Computational model. We use words of bits, with unit-cost integer arithmetic (including multiplication and division), bitwise operations, shifts, population count, and the highest-set-bit operation. The word length is large enough for the polynomially bounded counters below. Hash evaluations and priority threshold comparisons are assumed to take constant time.
A.1 Arbitrary Table Sizes, and Exact Addresses
Without loss of generality, we assume throughout this subsection.
Assumptions used in the proofs. Throughout the paper, the proofs use only the following property of the sizes of the trees: they shrink geometrically, but not too quickly,
For a power of two, both bounds hold trivially; below, we choose the sizes for arbitrary so that they still hold. Writing , the second bound gives , so and ; together with (1), this gives (2). It also gives .
Layout within a tree. Each tree occupies a contiguous part of the array; for concreteness we use the implicit layout of a binary heap, as in Figure 1. That is, in a tree of height , node sits at depth and has heap index . The root, with , occupies the first four slots of the tree, and node occupies the two slots at offsets and . Conversely, from a heap index we recover , , and . The children of heap index are and , and the level- ancestor of the leaf with heap index has index .
Arbitrary . Let and write with . Start from the forest for , which has one tree of each size and a second tree of size 4. For each set bit of , add one more tree of size . If is not a multiple of four, the remaining slots form one final single-node tree. Trees are laid out in order of non-increasing size (i.e. we maintain ).
Every size above four occurs once or twice, size four occurs two or three times, and the final small node, if any, has at least one slot, so . After a tree of size come at most one more tree of size , at most two of each smaller size, one extra tree of size four, and at most three further slots. For these total at most , and for at most . So , and (16) holds.
Addresses. The trees larger than are the trees of sizes from the forest for , together with one extra tree for each set bit of above position . So the first tree of size begins at offset
and each later tree of the same size begins further on. The final small node, if any, begins at offset . All of this is a constant number of shifts, masks, and additions. For it places at offset .
The current epoch. Insertions find their epoch from alone, the number of elements present, by first finding the tree that contains array position , counting from zero. Since , the offset formula above says that the first tree of size begins at , so the trees of size at most , together with the final small node, occupy exactly the positions from on. Hence, if , then is the final small node and . Otherwise has size for the smallest with , and it is copy of that size, so
To compute , let , set , and increase by one if . This is correct because , so the condition fails when and holds when ; hence the smallest valid is or .
Let be the offset of . By (1), , and if , so the next insertion belongs to epoch if and to epoch otherwise, where , or if is the last tree. Given the epoch , the phase follows from the formula in Section 2 with . If , this needs the tree before , which has offset , where is if , if , and 4 if is the final small node. So insertions need no stored state besides .
A.2 An Explicit Fixed Probe Schedule
We now describe the probe schedule queries follow and show that the next probe location can always be computed in constant time. The schedule is designed so that negative queries, as in Section 4, need only words of scratch space (with a naive use of the injection of [FKK24], a query may need to remember its progress toward the stopping rule in each of the trees, using words). Our schedule instead returns to each tree repeatedly, reading progressively longer prefixes of its local list, and rereads each prefix from scratch, so this progress can be discarded between visits. For simplicity, the schedule spends exactly four probes on every node it reads, rereading the first slot of nodes with fewer than four slots.
The local lists. The local list of alternates between the ancestor list and the expanding-subtree list, with the latter reading each home subtree in breadth-first order. Calculating the node to read at each probe of the local list then takes constant time: since every visit reads the list from its start, the query can keep the current level and breadth-first index as counters, and the th node in breadth-first order of a subtree rooted at is , where . The level- ancestor is read within the first probes of the local list, and the whole level- home subtree within the first .
Merging across trees. In round , for each in turn, the schedule visits the trees in order, reading the first probes of each one's local list; visits to trees with are spent on probes of some arbitrary fixed address. Since each round visits consecutively, the query can keep the current tree's offset and size as counters and step to the next tree in constant time using Section A.1, so the schedule needs only a constant number of counters, each updated in constant time per probe. Every local list has length , so by round the query has read every address it can ever read, and each counter fits in a word.
Round takes probes. Now fix a tree and a position in its local list, and let and . Round reads the first probes of this local list in a single visit. The earlier rounds take fewer than probes, and the earlier visits in this round fewer than , so the th probe is reached within
probes, as required by (3). For , this uses and ; for , the left side is at most .
Combined with the bounds for the local lists, the level- ancestor in is read within probes and the level- home subtree within , so suffices in Definition 2.3.
Negative queries. Since each visit rereads its prefix from scratch, a negative query can recompute the bounds of Table 1 during each visit using words. The only subtlety is , which depends on the values of other elements, that is, on fourth roots of priorities. Instead of computing a fourth root to calculate , the query tracks the minimum priority of the elements in the leaves of that it waits for: for an integer , writing , we have exactly when or . The query can compute during its scan of the level- home subtree, since whether depends only on ancestors that are read before the expanding-subtree list reaches level .
Our stopping condition is that the query stops at the end of the first round in which, for every tree with , that round's visit to read every node the query waits for in . Since, for every , round reads the first probes of 's local list in a single visit, (3) bounds when this condition is first met, up to a constant factor.
B Growing Tables: An Lower Bound
Every table in this paper has a fixed capacity: it is told in advance and fills an array of exactly slots. A natural follow-up question is whether such a table can instead grow, keeping its array completely full at every moment as elements arrive, while still spending constant time per operation. Bender, Kuszmaul, and Zhou [BKZ24] showed that a classical open-addressed table can be resized so as to keep load factor at least at all times, with expected-time queries and expected-time insertions and deletions; at load factor one this is . They also showed that is optimal for fixed-capacity tables that support deletions. This appendix shows that for growing tables the log log is unavoidable even without deletions, however the table decides when and by how much to grow. The constant bounds of Theorems 1.1 to 1.3 are therefore a genuinely fixed-capacity phenomenon.
The proof adapts the potential-function argument of [BKZ24, Section 7]. The new difficulty is that a growing table may change its probe sequences every time it gains a slot, so there is no single probe function against which costs can be measured. We handle this with reference costs that stay frozen on nested time windows, with one window length per tier, combined across tiers by a running minimum. A table may also choose its size after seeing the elements, which makes these references depend on the elements. Each window, however, admits only polynomially many references, and the windows are long enough to absorb a union bound over all of them.
The proof in this appendix was generated with guidance from the authors by Claude Opus 5.5 and GPT 6 Astra. The authors take full responsibility for its correctness.
B.1 Model and Result
Growing tables. Elements arrive one at a time and are never deleted. After insertions the table stores elements in the first slots of an unbounded array, where . The table chooses itself, as an arbitrary function of the elements it has seen. It may grow one slot at a time or in large chunks, at moments of its choosing, and it may even shrink when its top slots are empty. At load factor one, and there is nothing to choose. For each size there is a probe function , fixed in advance, that maps each element to a sequence over . A query issued while the table has slots follows . We write for the first index of slot in (or ), the probe complexity of element in slot . We require that at every moment between operations the expected average probe complexity of the stored elements is at most .
Cost. Insertions may rearrange the stored elements arbitrarily. Following [BKZ24], each new element first sits in a special slot, outside the array, and every relocation of an element counts as one move; the switching cost is the total number of moves, including each new element's placement into the array. It is a lower bound on running time. For the analysis we allow any number of special slots, so that every rearrangement decomposes into half-moves, each of which carries one element between a special slot and an empty slot of the array. A move is at most two half-moves. During insertion the array consists of the first slots. An element that the table parks anywhere else in the middle of an insertion counts as sitting in a special slot.
Hard input. All elements, including the initial ones, are distinct and uniformly random from a universe of size polynomial in . By Yao's principle we may assume that the table is deterministic. We may also assume that . Otherwise, we start the analysis after insertion and treat the elements present at that moment as the initial elements. They are uniformly random, and at least insertions remain. Every size then lies in .
Theorem B.1. Let for a sufficiently small constant , and let . Consider a growing classical open-addressed table that chooses its size adaptively, keeps load factor at least at all times, and has expected average probe complexity at most at every moment; for instance . Insert uniformly random elements into it, starting from elements, where for and a constant . Then the expected switching cost is . In particular, at load factor one, a growing table with constant average query cost makes amortized expected moves per insertion.
Three remarks. First, the bound is tight: the resizable construction of [BKZ24] achieves it with expected queries. Second, only the average query cost needs to be small, so the theorem applies even to tables like the one in Theorem 1.2. Third, there is no contradiction with Theorem 1.3, which achieves constant insertion time at load factor one with fixed capacity. The argument below needs the table to stay within of full for many more than insertions. A fixed-capacity table that fills from empty is that close to full only during its last insertions, and over such a short stretch the budget can absorb every late element sitting at a high tier.
B.2 Tools from [BKZ24]
Near-uniformity. A probe function on slots is nearly uniform if for every slot and every , where is an absolute constant. Bender et al. show that every probe function on slots can be replaced by a nearly uniform probe function on the same slots such that every assignment of at most elements to slots has total probe complexity under at most times its total under , plus [BKZ24, Section 7]. We apply this to every separately and write for the resulting probe complexities. Every size we use lies in , so, after doubling , for all of them. The table then meets the budget with under . Since is again a probe sequence over , for every element , and for .
Tiers. Bender et al. call these levels; we say tiers to avoid a clash with the tree levels of Section 2. Given any cost function on element-slot pairs, the tier is 0 if ; it is if for ; and it is if . Empty slots and special slots have tier . An element has tier at least exactly when its cost exceeds
Stanzas and the potential. Fix a tier and a tier function . A -stanza is a sequence of slots with , such that:
• is nonempty with tier at least k;
• has tier at least k, and may be nonempty or empty;
• are distinct and nonempty, with tier at most ;
• writing for the element in , for every r < j.
Its potential is
is the maximum total potential of a collection of stanzas in which every slot of tier at least k serves at most once as a start and at most once as an end, and every other slot serves at most once as an internal slot. Special slots are never ends, since no probe sequence contains them. Let be the number of elements whose tier at their current position is at least k, counting elements in special slots, and let
Lemma B.2. .
Proof. The empty collection gives . Every stanza has potential at most 1, and a collection of positive-potential stanzas uses distinct starts, each of which is a nonempty slot of tier at least ; hence .
The next lemma is the second property of the potential in [BKZ24, Section 7], written one tier at a time. Let
for a suitable absolute constant , and let .
Lemma B.3 ([BKZ24]). Fix and . Suppose an element moves from a special slot to an empty slot of the array, or from to an empty special slot. Let . Then .
Proof. For the move into b, the case analysis of [BKZ24] gives:
• if , then ;
• if , then and ;
• if , then and .
The move out of b is the reverse of a move into b between the same two states. Bender et al. state this for the tiers of a single probe function. Their proof, however, examines one tier at a time, and it uses only:
• the tier of each pair;
• that empty and special slots have tier ;
• that special slots are never ends;
• that b is empty before the move.
It therefore applies verbatim to any tier function, and to an array of any length, including one padded with empty slots that the table never uses. □
Short paths. For a cost function , let be the bipartite graph whose left vertices are a set of uniformly random elements and whose right vertices are slots; it has an edge between and whenever , labelled by that tier. For , an -short path uses no edge of tier above , and, for every , at most edges of tier . If an -stanza has positive potential, then is an -short path [BKZ24, Section 7], since every edge it uses contributes a term to the potential. Let
A pair has tier at most exactly when its cost is at most . For a slot , let be the number of elements with . Call \textbf{heavy} for if for some , and let consist of the heavy slots for together with the elements joined to them by edges of tier at most . Call the cost function admissible if it is finite only on slots below and, for every element , slot , and ,
Lemma B.4 ([BKZ24]). Let be admissible. Then for every vertex set , the vertices reachable from by -short paths number at most .
Proof. Admissibility bounds every left degree at tier by . Outside the heavy slots, every right degree at tier is at most as well. These are the low-degree thresholds of [BKZ24, Section 7], and their path-encoding count shows that from any vertex, at most vertices are reachable by -short paths that avoid heavy slots. Now take an -short path from to a vertex . If it meets a heavy slot, cut it just after the last one. The remaining path starts at an element joined to that slot by an edge of tier at most , which lies in , and it is again -short. (If the last heavy slot is itself, then .)
Admissibility also makes heavy slots extremely rare. We need this in a strong form, because we shall apply it to polynomially many cost functions at once.
Lemma B.5. Let be small enough. Fix and an admissible cost function . Then .
Proof. We use the Chernoff bound for , where is a sum of independent -valued variables with mean at most . By Hoeffding's comparison theorem, it also holds when the summands are indexed by a sample drawn without replacement, such as . Recall that , so is large.
Let . Since , we have , and hence . Fix a tier , write , and fix a set of slots below . Then
By admissibility, each summand is at most and the mean is at most . So the sum reaches with probability at most . There are at most such sets , and far exceeds . A union bound over the sets and over the tiers therefore shows that, except with probability , every set of at most slots has total tier- degree below , for every .
On this event, fewer than slots are heavy at each tier , since of them would have total degree above . So fewer than slots are heavy for . Split them into at most groups of at most slots each. Their total tier- degree, which bounds the number of elements joined to them by edges of tier at most , is then below . Hence , and .
B.3 Frozen References on Nested Windows
Constants. Throughout, ranges over . Fix
These satisfy and , and also , the exponent in Lemma B.5. Since , every is below , and hence
Since , choosing small also makes as large as we need. By (17), tier at least means cost above . Let be the number of elements whose true tier, measured with , is at least at time . Markov's inequality then gives, at every time,
Here time means the state after the th insertion has been fully processed. At such a moment, every element is in the array.
Windows. Let . This is a power of two, at least , and non-increasing in . A -window is a block of consecutive insertions. Since divides , every -window is a union of -windows. We write for the last insertion of the -window containing .
References. For each insertion and tier , define the reference cost
and let be its tier function. It has four properties.
(R1) depends on t only through the k-window containing t, because every coarser window containing it is the same.
(R2) pointwise, hence .
(R3) . In particular, at time , an element whose -tier at its slot is at least has true tier at least .
(R4) lies in the family of all functions with . This family is fixed in advance and depends on only through its -window. It has at most members, and each is admissible, being a minimum of at most nearly uniform probe sequences over at most slots.
The reference looks into the future, toward the ends of the windows containing . This is harmless: it is never used to bound the cost of a query at time , only as a yardstick that holds still while the potential is tracked. Because the table picks its sizes after seeing the elements, the reference also depends on the elements, including elements that arrive during the window itself. Property (R4) limits the damage: a union bound over costs per window, while windows have length .
B.4 The Windowed Potential
The analysis array. The potential never looks at the table's actual size. Let . This is the largest size the table may have after insertions, so . Unlike , it is fixed in advance; it is non-decreasing, and . For each tier , draw uniformly from
, where , independently of everything else. This choice exists only in the analysis.
For tier , the analysis works with an array of slots. Every slot of it that holds no element counts as empty, including every slot from on, which the table cannot use. While insertion is processed, every element that is not in a special slot lies below . After insertion , all empty slots of the array lie below , and at most of them lie below . The empty slots at the top play the role of the lookahead slots of [BKZ24]: because is random, the table cannot aim a chain of displacements at the next slot to appear.
The potential. While insertion is being processed, we compute , , and as in Section B.2, using the tier function and the array of slots. The processing of insertion consists of the following events:
(i) the array grows from to slots, one allocation at a time;
(ii) the new element enters a special slot;
(iii) the elements are rearranged by half-moves;
(iv) if is the last insertion of a -window, the reference for tier switches to the next window, a switch.
Lemma B.6. For every tier k:
(a) when the new element enters a special slot, for some ;
(b) each allocation has for some ;
(c) each half-move of an element x to or from slot b has ;
(d) each switch, at the end e of a k-window, has ;
(e) no other event changes .
Proof. (a) The new element adds 1 to and creates one new possible start. Any collection afterwards uses that start at most once, so rises by at most 1.
(b) An allocation adds one empty slot. Every old collection stays valid, and the new slot can only end a stanza, at most one per collection; so rises by between 0 and 1. is unchanged, because tiers are frozen within a window by (R1).
(c) This is Lemma B.3.
(d) After the switch, by Lemma B.2. Before it, , by Lemma B.2 and (R3); no element is in a special slot at time .
Finally, by (R1), tiers change only at switches, and queries do not change the state. Nor do the table's own changes of size: a slot between and counts as an empty slot of the array either way.
B.5 Three Estimates
Lemma B.7 (slack is summable). For a half-move of element to or from slot during insertion , .
Proof. By (R2), is non-increasing in , so is strictly increasing in . The sum therefore evaluates at distinct integers.
Without the running minimum this step can fail. With plain window-end references, one can build nearly uniform families whose pairs become cheaper over time, for instance with an element-dependent factor r. In such a family a typical destination lands a few tiers below k for tiers at once, costing slack per move.
Lemma B.8 (expensive elements are transient). Let be a -window with last insertion , and let be the number of moves made while processing the insertions of . Let denote at the start of insertion , before any allocation. Then for every ,
Proof. Let be an element counted in , sitting in slot . By (R1) and (R3), the pair has true tier at least at time . So either moves during the processing of insertions , or is still in at time and is counted in . This proves the pointwise bound. For the sum, each move is counted for at most values of .
Lemma B.9 (gains are rare). Let be small enough, and let be a -window with last insertion . Let and be the totals of over the insertions of and of over its allocations, and let be as in Lemma B.8. Then
Proof. Let consist of the elements of the input together with further uniformly random elements. Then is a uniformly random set of elements, and the input is a uniformly random sequence of distinct elements of . Let be generated by , by , and by the first inserted elements, together with the initial elements. The table is deterministic, so its state after insertion , size included, is determined by . Given , the new element is uniform over the at least elements of that have not been inserted yet.
The reference on is not determined by : it depends on sizes at the ends of windows, which the table chooses after seeing later elements. By (R4), however, lies in a fixed family of at most admissible cost functions. Let be the event that for every , where is the set computed for . By Lemma B.5, . The event depends only on . Write .
Insertion gains. For and , let consist of:
- the slots that are nonempty after insertion and have -tier at least k;
• the slots below that are empty after insertion t - 1.
It is determined by and , and . Let be the event that is reachable from by an i-short path in the graph of . By Lemma B.4,
A gain at insertion requires a positive stanza that starts at 's special slot. Its end lies in : between the end of insertion and the arrival of , only allocations have happened, and they add empty slots below . The stanza gives an -short path from to that end. Hence .
Fix . Since whenever , the process is a supermarkingale. So has probability at most . Take and take a union bound over . Then, except with probability , this bound fails for no , and in particular not for the reference . On this event and on ,
Otherwise , and the exceptional events have probability at most . So
Allocation gains. Consider an allocation during insertion ; it adds the empty slot , where . A gain requires a positive stanza ending at this slot, which gives an -short path to it from an element in a nonempty slot of tier at least . By Lemma B.4, applied with the set of these elements, the vertices reachable from number at most . This set does not depend on , since internal slots of a stanza are nonempty. It is determined by the elements and the behaviour of the table, which never sees . Neither does , which depends only on . Given all of these, is still uniform over slots. Hence . There are at most two allocations per insertion, and , so
Combining. By Lemma B.8, . By (18), . Add the two bounds above to , and use . The coefficient of is then at most . The remaining terms are times:
The differences , and all exceed 2.7. For small, is large, so the coefficient of and the last two items are at most in total.
B.6 Proof of Theorem B.1
Let be the largest multiple of that is at most . Since , we have . We work with insertions , and so every -window lies inside this range.
One tier. Fix and add up over all events, using Lemma B.6. By Lemma B.2, at the start. At the end, just before the final switch, , by Lemma B.2 and (R3). Therefore
where ranges over the windows of tier , and is the last insertion of .
All tiers. Sum (19) over the tiers and take expectations. By Lemma B.7, the left side is at most times the number of half-moves, which is at most . On the right, apply Lemma B.9 to every window. The windows of one tier partition the insertions, so and . Since ,
and hence
because is small and . Finally, .
B.7 Discussion
Why changing probe sequences does not help. A growing table may redefine its probe sequences every time it gains a slot, and one might hope that this churn substitutes for moves. The proof shows why it cannot. Inside a k-window the reference is frozen, so churn never enters the accounting. All of it is paid at window ends, and each payment is at most the number of elements that are genuinely expensive at that moment, which the query budget makes negligible compared with .
An element that is cheap now but expensive under the reference is transient. It must move before its window closes, or else be genuinely expensive when it does. So the time such elements spend counted as expensive is at most times the number of moves. And because , the potential that random new elements can extract from them is a vanishing multiple of the move count. This is the precise sense in which an element whose probe sequence keeps changing must pay for it in moves. The windows can be made short enough because of the gap between the budget exponent and the reach exponent , and that gap is exactly what the separation of ten tiers inside a stanza buys.
Why choosing when to grow does not help. At load factor one the size is forced. At load factor the table may grow or shrink whenever it likes, by any amount, after seeing the elements. Two devices neutralize this freedom.
-
The potential never looks at the actual size. It works with an array of slots, whose length is fixed in advance up to the hidden offset , and treats unused slots as empty. So allocations, and the fresh empty slots they create, happen at fixed times, no more than two per insertion.
-
Adaptivity therefore enters only through the references, and only through the at most sizes at window ends. That leaves at most candidates per window. Both random ingredients of Lemma B.9, the new element and the heavy-slot set, can be union bounded over all of them, at a cost of per window of length .
Windows stay defined by insertion counts, so the switch bound only ever uses the query budget at fixed times, never at stopping times.
The argument never uses that the probe function is indexed by the size. Suppose that at each time , queries follow one of at most probe functions over , fixed in advance for that time and chosen by the table after seeing the elements. Choosing the size is the case . Near-uniformize each of these functions on slots. Then the families of (R4) have at most members, and the proof goes through with in Lemma B.9 increased by , as long as . The term in Lemma B.9 then becomes , and the theorem survives because .
In particular, Theorem B.1 still holds if the table, besides choosing its size, keeps bits of metadata outside the array, which queries read for free.