betaFeedback

WorksComputer Science

Fine-Grained Analysis of SIMD-Based Hash Table Implementations

Abstract

In recent years, several variants of classical hash table schemes have been developed by engineers in order to take advantage of the processor's internal parallelism using SIMD instructions, which make it possible to operate on multiple bytes simultaneously. At a small additional memory cost, this enables a significant speedup, making it a data structure that is increasingly popular in practice, when very high performance is required. In this article, we provide a detailed theoretical analysis of the dynamics of such hash tables. From a methodological standpoint, we use and adapt a technique developed by Wormald in the 1990s to study dynamic graphs. This approach, which can be adapted to many variants, enables us to accurately estimate the quantities of interest by capturing the dynamics of the data structure through systems of differential equations. Although complex, we provide an explicit description of the solutions of these systems, which can furthermore be efficiently approximated numerically. Our main results are stated with high probability, which is significantly more precise than average-case analyses, and they match experimental results remarkably well, even for hash tables of moderate size.

2012 ACM Subject Classification Theory of computation → Design and analysis of algorithms; Mathematics of computing → Probability and statistics

Introduction

Hash tables are a fundamental data structure that has become indispensable in practice and is now natively available in nearly all programming languages, yet their concrete implementation varies considerably from one language to another. For instance, one can find separate chaining (Java, C++), separate chaining with array-backed nodes (C#), open addressing with various probing schemes: pseudo-random perturbation (Python, Ruby), quadratic probing (V8), linear probing (Swift), …

The importance of hash tables is such that the organization of the table structures themselves takes up a non-negligible portion of the RAM of data servers and search engines, which has led engineers developing programming languages and performance-oriented libraries to revisit the classic academic results on hash tables in order to optimize them in terms of space and time. While the classic theoretical literature [7, 8, 11] long favored minimizing collisions as the primary performance criterion, a broader trend has emerged in recent years: the dominant constraint on modern hardware is cache locality rather than the number of collisions in the combinatorial sense, which has driven the convergence of several major languages and libraries toward the Swiss Table design, as seen in Google’s Abseil (C++), Rust, Go, and Meta’s F14. They all use compact metadata and SIMD instructions to drastically reduce memory accesses per probe. The goal of this paper is to propose a mathematical methodology for analyzing this type of hash table.

Model of hash tables

Open addressing is by far the most widely used method nowadays when it comes to optimizing performance. With this method, collisions are resolved through probing: in case of collisions when inserting a key, several strategies exist to find a free slot, such as linear probing, where the key is inserted into the next available slot, quadratic probing, double hashing, … This is usually preferred to closed addressing, where each slot in the table can hold any number of keys, in a linked list, for instance. This choice minimizes memory overhead and takes cache locality into account, at the cost of slightly more algorithmic management when collisions occur. Above all, it is compatible with the use of SIMD instructions, which make it possible to perform several elementary operations simultaneously within the processor. Thus, if we look in detail at hash tables in Rust, in the boost library of C++, or in the implementations used by Google (Abseil) or Meta (F14), we see these two characteristics every time: open addressing and vectorization with SIMD instructions.

The mathematical analysis of hash tables, as initiated by D. Knuth [8], we avoid complex considerations about hash functions by adopting the uniform hashing model, where each hash function hh is modeled by a uniform random map: if the table has size nn, the image of any key xx by hh is taken uniformly at random and independently in {0,…,n−1}\{0,\ldots,n-1\}. When several hash functions are used, they are independent (in the probabilistic sense).

For collision resolution, we use the random probing model, where we pick a slot uniformly at random each time (which amounts to using a new hash function at each iteration of the probe sequence). In practice, setting aside linear probing which is very different, quadratic probing is one of the most used. Experimentally, the performance of quadratic probing does not differ very significantly from that of random probing [8]. However, the theoretical analysis of quadratic probing is particularly difficult, and no significant result existed in the literature before the recent breakthrough by Kuszmaul and Xi [9].

Finally, from reading engineers’ blog posts1 and from the conferences they gave about their implementations, the main performance metric is the number of hops (i.e., the number of probes to find a free slot), since this is quite directly related to cache misses, the cost of other operations being of secondary importance. Consequently, in this article we study hash tables in which collisions are handled by open addressing, under the uniform hashing model and random probing, where the time cost is estimated by counting the number of hops.

It is standard practice not to specify the size of a hash table when it is created, and to resize it, reinserting all its elements in the process, when it becomes too full. We do not include this mechanism in our model, since we are primarily interested in the state of the table after a given number insertions, which is exactly equivalent to looking at the situation just after the last resizing. This changes the total construction cost, but it is easy to derive it from our results using a standard amortized analysis once the resizing parameters are given.

Using vectorization for hash tables operations

SIMD instructions introduce parallelism within the CPU by allowing simultaneous operations on multiple bytes (typically 16 bytes in one instruction on a modern architecture).

In a nutshell, the general mechanism considered in this article can be described as follows. The table TT is made of nn buckets, each containing up to bb keys (for example, b=16b = 16 to match the inner parallelism of the processor). The table is accompanied by a header HH, also composed of nn buckets, each containing bb bytes. When a key xx is inserted into the hash table, it is assigned to a bucket T[i]T[i] identified through a probing sequence that searches for a bucket that is not full. We also use a hash function hfh_f that maps xx to a byte, say, an integer between 0 and 254, to add hf(x)h_f(x) to the header, in the bucket H[i]H[i] (see Figure 1). The value 255 (or equivalently −1-1) is used to denote an empty slot. This byte hf(x)h_f(x) is used as a fingerprint for xx. When searching for xx in the hash table, each probe (at position jj) begins by using a few SIMD instructions to quickly test whether hf(x)h_f(x) appears in H[j]H[j]. If the fingerprint is absent, the algorithm can skip querying T[j]T[j] altogether. It is only when we try to insert into a bucket that already contains 16 keys that we need to perform a hop to try a new slot.

Diagram of the hash table and header

Figure 1. The hash table for b=16b = 16. The nn buckets are made of a size-16 header to store the fingerprints and a size-16 array to store the keys. In this example, the ii-th bucket contains the keys xx, yy, zz and uu, of fingerprints hf(x)=hf(z)=9h_f(x) = h_f(z) = 9, hf(y)=5h_f(y) = 5 and hf(u)=4h_f(u) = 4. When looking for a key kk in this bucket, the algorithm first computes hf(k)h_f(k) and then uses a few SIMD instructions to check whether H[i]H[i] contains this fingerprint, in order to know whether it has to look in T[i]T[i] or not.

In this article, we do not mathematically study the impact of deletions, mainly due to the lack of a simple, commonly accepted scenario for hash table usage that is relevant in practice (see the end of the conclusion for a discussion of this point and possible directions for extension). For the sake of completeness, we nevertheless present the algorithmic mechanisms that make it possible to handle deletions for these hash tables. Deletions are handled using tombstones: another of the 256 header values is used to mark bucket slots that are unused but previously contained a key that has been deleted. For instance, hfh_f maps a key to {0,…,253}\{0,\ldots,253\}, the value 255 ≡−1\equiv-1 denote an empty slot and the value 254 ≡−2\equiv-2 denote a tombstone. A bucket has an available slot for inserting a new key when its header contains at least a −1-1 or a −2-2 and requires a hop for lookups when the current search is unsuccessful and its header does not contain a −1-1.

Figure 2 details the main mechanisms that allow quick probing of the ii-th bucket. Throughout the article, the number of such probes is the main measure of complexity for our algorithms. Even though these queries do not always require the same amount of computation, the table jumps are the most costly, due to their impact on the cache, and are therefore the only parameter that really matters in practice. As a result, it will be important to know how many buckets are full, and to be able to calculate this, we will need to provide a precise estimation, at any given time, of how many buckets contain jj keys, for all jj from 0 to 16.

Figure 2. The main SIMD instructions at play, without going into all the details. We use x86-64 assembly for the instruction’s names. When looking for a key xx, the algorithm first computes hf(x)h_f(x), then creates a 128-bit SIMD integer vector made of 16 copies of the byte hf(x)h_f(x) using the instruction _mm_set1_epi8. Each time we search for xx in a bucket T[i]T[i], we use the _mm_cmpeq_epi8 instruction to compare, in parallel, the 16 bytes of its header H[i]H[i] with hf(x)h_f(x). If there is no match, the output is a vector of 0’s, which can be checked very quickly. Otherwise, xx is compared to each key within the bucket having same fingerprint (yielding two comparisons in the example).

Since we use headers, another idea that can be easily implemented is to store other types of information in them besides fingerprints. This can originally be attributed to Amble and Knuth [1], who proposed a mechanism related to adding an extra bit in each slot of a classical open-addressing hash table. This bit is used as a flag to remember whether this slot has already been subject to a hop during an insertion. This costs some space, but it makes it possible to prematurely interrupt the probing sequence during a search. In our settings, this simple idea has been implemented in different ways, using one or more slots in the header to store some information. A common use is as follows: each bucket now contains up to b=15b = 15 keys, and the associated header contains 15 fingerprints and one byte to account for overflows, i.e. when a hop occurred previously. For the ii-th probe in the sequence, we have a hash function ho(i)h_o^{(i)} that returns a number between 0 and 7, and if we try to insert a new key xx into a bucket that is already full, the ho(i)(x)h_o^{(i)}(x)-th bit of the overflow byte is set to 1 (initially, all its bits are set to 0). This allows us, when searching for the key xx, to avoid performing a hop if the overflow bit ho(i)(x)h_o^{(i)}(x) is zero, even if the bucket is full with 15 keys. This only improves unsuccessful searches, but can be significantly faster. Using this method, one does not need tombstones anymore: one keeps looking for a key xx if its overflow bit ho(i)(x)h_o^{(i)}(x) is 1, even if the bucket is not full. Indeed, it indicates that the bucket was previously full and that xx may have been inserted elsewhere. If ho(i)(x)=0h_o^{(i)}(x) = 0 and xx is not in the current bucket, then xx cannot be in the table. Using a different overflow hash for each probe best describes what is observed in practice and is consistent with the model of random probing.

Algorithm 1 AddNewElement($x$)

1  $c,i \leftarrow 0,h^{(0)}(x)$
2  while $|T[i]|=b$ do
3    $B[i][h_o^{(c)}(x)] \leftarrow 1$
4    $c \leftarrow c+1$
5    $i \leftarrow h^{(c)}(x)$
6  Add $x$ in $T[i]$ and update $H[i]$
Algorithm 2 Search($x$)

1  $c,i \leftarrow 0,h^{(0)}(x)$
2  while True do
3    if $x \in T[i]$ then return True
4    if $B[i][h_o^{(c)}(x)]=0$ then return False
5    $c \leftarrow c+1$
6    $i \leftarrow h^{(c)}(x)$
Algorithms to insert a new element and to search for an element

Figure 3. The algorithms to insert a new element and to search for an element. We used TT, HH and BB for the tables of buckets, headers and overflow bits, respectively. The SIMD operations are performed in Line 3 of Search. The random probing model is realized using sequences of hash functions (h(c))c≥0(h^{(c)})_{c\ge0} for probing and (ho(c))c≥0(h_o^{(c)})_{c\ge0} for overflows. We assume that the resizing is handled separately.

In the examples we found in different programming languages, we observed buckets of sizes between 14 and 16, and 0, 1, 7 or 8 overflow bits. In the sequel, these two values will be treated as parameters (bb for the buckets’ size and dd for the number of overflow bits), allowing us to cover all cases.

Since Knuth’s seminal work [8], many variants of hash tables have been proposed. Among those directly related to this article, one can mention the paper by Knuth and Amble [1], which introduces and studies a notion related to adding an overflow bit. More recently, the work of Larson [10] provides an analysis of hash tables with buckets and using 0 or 1 overflow bits, and Martini and Burkhard [13] started to study what happens with more overflow bits, but with algorithms that differ slightly from those that were developed many years later, when SIMD instructions became fully accessible: it is not exactly the same model we use this article, as, for them, ho(x)h_o(x) remains the same throughout the sequence of probes.

Although the papers [10, 13] correctly state some weaker versions of some results presented in Section 2, they are not entirely complete, in the sense that some proofs are more heuristic than fully rigorous. For example, certain arguments based on expectations would require concentration around the mean to be made rigorous, and approximating the number of times a slot is accessed by independent Poisson distributions is only asymptotically valid, requiring careful handling of error terms. The equations that appear when studying the dynamics of that kind of hash tables are indeed quite involved, and probably very difficult to handle using elementary combinatorial and probabilistic techniques. More advanced methodologies, as concentration inequalities and Poissonization-Depoissonization techniques, should help to finalize the proofs, but it is not the path we followed in the sequel.

Indeed, we use results stemming from the work of Wormald [17, 18] on dynamic graphs which were later revisited by Warnke [16], tailored to our needs, and which are particularly well suited to studying the dynamics of the parameters of interest in our hash tables. These theorems are powerful and make it possible to obtain results that hold with high probability during the whole trajectory, which is far more useful than results in expectation, and they also provide usable bounds on the error terms. In Section 2, we present this method and explain how to use it to precisely analyze hash tables without overflow bits. More precisely, we can analyze after kk insertions the number of buckets containing ii elements, simultaneously for every i∈{0,…,b}i \in\{0,\ldots,b\}. Theorem 2 states that with high probability, this number is nui(knb)+o(n)n u_i\left(\frac{k}{nb}\right)+o(n), with ui(t)=1i!λb(t)ie−λb(t)u_i(t)=\frac{1}{i!}\lambda_b(t)^i e^{-\lambda_b(t)}, where λb(t)\lambda_b(t) is implicitly defined by a single equation. In Theorem 6 we link λb(t)\lambda_b(t) to the typical number of hops, by proving that with high probability it is nλb(knb)+o(n)n\lambda_b\left(\frac{k}{nb}\right)+o(n). Consequently, we obtain the typical cost of a successful and unsuccessful search in a table containing kk elements, in Corollary 7 and Corollary 8. Our theoretical results allow a very precise description of the behavior of SIMD hash tables, as depicted in Figure 4. Since our statements hold with high probability, which is much stronger than in expectation, only one trial was used for the experimental plots.

Proportion of full groups

(a)

Extra hops for successful search

(b)

Figure 4. On the left, the proportion of full buckets (containing bb elements) as the occupancy increases. On the right, the expected number of additional hops for a successful search. The blue dots were obtained experimentally, using b=16b=16, n=214=16 384n=2^{14}=16\,384 and only one trial to illustrate the fact that our statements hold with high probability. The red line corresponds to the theoretical solutions established in this paper, Theorem 2 and Corollary 7. Though asymptotic, our results fit the experiments particularly well.

To conclude this related work section, we would like to mention two recent breakthroughs in the theoretical study of hash tables, although the problems they address are orthogonal to those studied in this paper, which focuses on how hash tables are implemented in contemporary programming languages. The first is Kuszmaul and Xi’s paper [9], which makes the first tangible progress on a question open since 1968 by proving that quadratic probing supports constant-time operations at small constant load factors, a result that extends more generally to any fixed-offset open-addressing scheme. The second is due to Bender, Kuszmaul and Zhou [3]. They show that, if insertions and deletions are allowed to rearrange existing elements (see also [5, 6] for recent results when reordering the keys is not allowed), classical open addressing can achieve O(1)\mathcal{O}(1) expected query time with only O(log⁡ε−1)\mathcal{O}(\log\varepsilon^{-1}) expected insertion/deletion time at load factor 1−ε1-\varepsilon, via a new “rainbow hashing” scheme.

placed. They also established a matching Ω(log⁡log⁡ε−1)\Omega(\log\log\varepsilon^{-1}) lower bound for the amortized expect time of insertions and deletions, when the successful search time is O(log⁡log⁡ε−1)\mathcal{O}(\log\log\varepsilon^{-1}), hence proving the optimality of their solution.

Plan of the article and contributions

In Section 2 we show how to apply Wormald’s Differential Equation method to study the tables without overflow. In particular we obtain precise estimates of the total number of buckets with a given number of occupied slots in Theorem 2 and the total number of hops in Theorem 6. These results involve an implicitly defined function λb(t)\lambda_b(t) tightly related to the number of hops. After presenting some properties of λb(t)\lambda_b(t) in Section 3, we move on to study the hash tables with overflow bits in Section 4. To overcome technical difficulties, we change the scale of (discrete) time by considering every insertion attempt, successful or not, as one time unit. We can then derive the system of equations for the dynamics of the table, considering simultaneously the number of buckets with ii elements for i∈{0,…,b−1}i \in\{0,\ldots,b-1\} and the number of full buckets with jj overflow bits set to 1, for j∈{0,…,d}j \in\{0,\ldots,d\}. As Wormald’s technique provides tight asymptotic results with high probability, we obtain a precise estimation of these quantities, in Theorem 11, and of the cost of an unsuccessful search, in Theorem 13 (insertions and successful searches are not affected by overflow bits).

Analysis without overflow

Throughout the article, the hash table is made of nn buckets, each containing up to bb elements. We denote by Uj(k)U_j(k) the number of buckets with exactly jj elements at time kk. Notice that U0(0)=nU_0(0)=n and Uj(0)=0U_j(0)=0 for j∈[b]j \in[b], where [b]:={1,…,b}[b]:=\{1,\ldots,b\}, since we start with an empty table (or just after resizing, see the discussion in § 1). Using the uniform hashing with random probing model, each of Uj(k)U_j(k) is a random variable, which is our main interest for the analysis. They are linked by the equation ∑j=0bUj(k)=n\sum_{j=0}^{b} U_j(k)=n, which always holds.

Recurrence relations

In our model, the probe sequence when looking for a bucket for inserting a new element at time k+1k+1 is simply a sequence of independent uniform random variables on {0,…,n−1}\{0,\ldots,n-1\}. The bucket it is inserted into goes from jj to j+1j+1 elements, so Uj(k+1)=Uj(k)−1U_j(k+1)=U_j(k)-1 and Uj+1(k+1)=Uj+1(k)+1U_{j+1}(k+1)=U_{j+1}(k)+1. Since it cannot be inserted in one of the Ub(k)U_b(k) buckets that are already full, by uniformity this yields:

Uj(k+1)−Uj(k)={+1,with probability Uj−1(k)n−Ub(k) if j>0,−1,with probability Uj(k)n−Ub(k) if j<b,0,otherwise.(1)U_j(k+1)-U_j(k)= \begin{cases} +1, & \text{with probability } \dfrac{U_{j-1}(k)}{n-U_b(k)} \text{ if } j>0,\\ -1, & \text{with probability } \dfrac{U_j(k)}{n-U_b(k)} \text{ if } j<b,\\ 0, & \text{otherwise.} \end{cases} \tag*{(1)}

If Fk\mathcal{F}_k denotes the σ\sigma-algebra of all random choices up to time kk, this means that the conditional expectation of the difference, which is a random variable, satisfies

E[Uj(k+1)−Uj(k)∣Fk]=1j>0Uj−1(k)/n1−Ub(k)/n−1j<bUj(k)/n1−Ub(k)/n,(2)\mathbb{E}[U_j(k+1)-U_j(k)\mid\mathcal{F}_k]=\mathbf{1}_{j>0}\frac{U_{j-1}(k)/n}{1-U_b(k)/n}-\mathbf{1}_{j<b}\frac{U_j(k)/n}{1-U_b(k)/n}, \tag*{(2)}

where 1P\mathbf{1}_P is 1 if PP holds and 0 otherwise, is used to account for the border effects. That kind of system of equations is amenable to our main tool, Wormald’s Theorem, which gives precise asymptotic estimates for the Uj(k)U_j(k)’s, with high probability. In a nutshell, it consists in moving to continuous time, using the fluid limits uj(t)=lim⁡nUj(⌊tbn⌋)/nu_j(t)=\lim_n U_j(\lfloor tbn\rfloor)/n, for t∈[0,1)t\in[0,1). Eq. (2) directly produces a system of differential equations u˙j(t)=fj(u0(t),…,ub(t))\dot{u}_j(t)=f_j(u_0(t),\ldots,u_b(t)), where2{}^{2} fj(u0,…,ub):=b⋅1j>0uj−11−ub−b⋅1j<buj1−ubf_j(u_0,\ldots,u_b):=b\cdot\mathbf{1}_{j>0}\dfrac{u_{j-1}}{1-u_b}-b\cdot\mathbf{1}_{j<b}\dfrac{u_j}{1-u_b}. A variant of Wormald Theorem (see § 2.2 for the details) then implies that with high probability Uj(⌊tbn⌋)=uj(t)n+o(n)U_j(\lfloor tbn\rfloor)=u_j(t)n+o(n). After this, it remains to study the solutions uju_j of the system of differential equations.

Wormald’s differential equation method

Fix a bounded, connected and open set D⊆R×Rℓ\mathcal{D}\subseteq\mathbb{R}\times\mathbb{R}^{\ell}. Consider functions fj:D→Rf_j:\mathcal{D}\to\mathbb{R} that are continuous and satisfy a Lipschitz condition: there exists L>0L>0 such that, for all (t1;u1,…,uℓ),(t2;w1,…,wℓ)∈U(t_1;u_1,\ldots,u_\ell),(t_2;w_1,\ldots,w_\ell)\in U, and for all j∈{1,…,ℓ}j\in\{1,\ldots,\ell\}

∣fj(t1;u1,…,uℓ)−fj(t2;w1,…,wℓ)∣≤L×max⁡{∣t1−t2∣,∣u1−w1∣,…,∣uℓ−wℓ∣}.\left|f_j(t_1;u_1,\ldots,u_\ell)-f_j(t_2;w_1,\ldots,w_\ell)\right|\le L\times\max\left\{\left|t_1-t_2\right|,\left|u_1-w_1\right|,\ldots,\left|u_\ell-w_\ell\right|\right\}.

Suppose (t0,v1,…,vℓ)∈D(t_0,v_1,\ldots,v_\ell)\in D, then the well-known Picard-Lindelöf Theorem (see for instance [2, Theorem 7.19]) ensures that, for tt in some open interval containing t0t_0, there is a unique solution (y1(t),…,yℓ(t))(y_1(t),\ldots,y_\ell(t)) to the system of ordinary differential equations:

yi′(t)=fi(t;y1(t),…,yℓ(t)),∀i∈{1,…,ℓ},(3)y_i'(t)=f_i(t;y_1(t),\ldots,y_\ell(t)),\quad\forall i\in\{1,\ldots,\ell\}, \tag*{(3)}

with the initial condition y1(t0)=v1,…,yℓ(t0)=vℓy_1(t_0)=v_1,\ldots,y_\ell(t_0)=v_\ell. In principle, this statement is local, but, by connectedness, the solution can be extended as long as (t,y(t))(t,y(t)) is in DD. The solution stops existing, if ever, when (t,y(t))(t,y(t)) reaches the boundary of the domain DD.

We can now present our main tool: Wormald’s differential equation method. The statement of Theorem 1 is an adaptation of Warnke’s result [16], which revisits and makes more precise the original theorems of Wormald [17, 18]. We describe the different parameters intuitively after the statement of Theorem 1.

Theorem 1 (Wormald’s method for increments bounded with high probability). Let ℓ≥1\ell\ge1 be a fixed integer. Consider discrete random processes (Yj)j=1ℓ(Y_j)_{j=1}^{\ell} taking real values, where Yj(k)Y_j(k) is the value of the jj-th process at time kk.

Consider an integer variable N≥1N\ge1. Suppose that there are functions m:=m(N)m:=m(N), β=β(N)\beta=\beta(N), γ:=γ(N)\gamma:=\gamma(N) and δ:=δ(N)\delta:=\delta(N), such that lim⁡Nγ(N)=lim⁡Nδ(N)=0\lim_{N}\gamma(N)=\lim_{N}\delta(N)=0 and

  1. for all k<mk<m and j∈[ℓ]j\in[\ell], Pr⁡(∣Yj(k+1)−Yj(k)∣≤β(N))≥1−γ(N)\Pr(\lvert Y_j(k+1)-Y_j(k)\rvert\le\beta(N))\ge1-\gamma(N);

  1. for all j∈[ℓ]j\in[\ell], and k<mk<m,

E[Yj(k+1)−Yj(k)∣Fk]=fj(k/N;Y1(k)/N,…,Yℓ(k)/N),\mathbb{E}[Y_j(k+1)-Y_j(k)\mid\mathcal{F}_k]=f_j(k/N;Y_1(k)/N,\ldots,Y_\ell(k)/N),

where the functions fjf_j are continuous, uniformly bounded by R>0R>0, and are LL-Lipschitz on an open and connected domain DD, for some L>0L>0.

  1. The initial vector Y(0)=(Y1(0),…,Yℓ(0))\mathbf{Y}(0)=(Y_1(0),\ldots,Y_\ell(0)) satisfies ∥Y(0)−Nv∥∞≤δ⋅N\|\mathbf{Y}(0)-N\mathbf{v}\|_\infty\le\delta\cdot N for some fixed v=(v1,…,vℓ)\mathbf{v}=(v_1,\ldots,v_\ell) with (0,v1,…,vℓ)∈D(0,v_1,\ldots,v_\ell)\in D.

Let y(t)=(y1(t),…,yℓ(t))\mathbf{y}(t)=(y_1(t),\ldots,y_\ell(t)) be the unique solution to the system of differential equations of Eq. (3), with initial condition y1(0)=v1,…,yℓ(0)=vℓy_1(0)=v_1,\ldots,y_\ell(0)=v_\ell. Let σ>0\sigma>0 be the supremum of t≥0t\ge0 such that the solution (s,y(s))∈D(s,y(s))\in D for all s∈[0,t)s\in[0,t) and fix θ∈(0,σ)\theta\in(0,\sigma).

Whenever δ≥R/N\delta\ge R/N, with probability at least 1−θℓNγ−2ℓexp⁡(−Nδ2/(8θβ2))1-\theta\ell N\gamma-2\ell\exp(-N\delta^2/(8\theta\beta^2)), we have

See Appendix § 6.§ 2 for details.

∣Yj(k)−Nyj(k/N)∣≤3eLθδ⋅N,for all j∈[ℓ] and k≤min⁡(m,θN).\left|Y_j(k)-Ny_j(k/N)\right|\le3e^{L\theta}\delta\cdot N,\quad\text{for all }j\in[\ell]\text{ and }k\le\min(m,\theta N).

Let us explain the main parameters introduced in Theorem 1. Here NN controls the discrete time. Indeed, notice that the final implication is that Yj(k)≈Nyj(k/N)Y_j(k)\approx Ny_j(k/N) with high probability, where the yjy_j’s are the solutions of the system of differential equations defined by the fjf_j’s. Hence, by renormalizing by NN, we obtain in the limit a system of continuous equations, which provide an accurate first-order approximation of the YjY_j. For this result to be useful, we need that γN\gamma N tend to 00 and Nδ2β2\frac{N\delta^2}{\beta^2} tend to ∞\infty. Hence, β\beta is relatively small and Condition 1 means that it bounds the increment of YjY_j with high probability. In the sequel, the value θ∈(0,1)\theta\in(0,1) corresponds to the maximum load factor of the table (typically around 80 percent).

The role of m=m(N)m=m(N) is to delimit the applicability of the recurrence conditions 1 and 2. In our case simply considering m(N)=⌈θN⌉m(N)=\lceil\theta N\rceil works. We have chosen to keep the parameters mm and σ\sigma in the statement of the theorem to give a more general statement, since this method should apply for the analysis of the dynamic of many discrete systems.

The equation for the conditional expectation is given exactly in Condition 2 (called the trending hypothesis) since it is sufficient for our needs, but can be weakened [17, 18] to an approximation up to uniform o(1)o(1).

The upper bound of θℓNγ+2ℓexp⁡(−Nδ2/(8θβ2))\theta\ell N \gamma+ 2\ell\exp(-N\delta^2/(8\theta\beta^2)) on the probability of failure is obtained quite directly from Theorem 2 and Lemma 9 of Warnke’s article [16].

See Appendix § 6.§ 2 for details.

Results without overflow bits

Let N=bnN = bn be the maximum number of elements in the hash table. In what follows, we fix θ∈(0,1)\theta\in(0,1) and suppose that the time k≤θNk \le\theta N. This parameter θ\theta can be seen as the classical maximal load factor, the threshold that triggers resizing. Observe that, since there have been kk insertions we have ∑i=0bUi(k)i=k\sum_{i=0}^{b} U_i(k)i = k, so that Ub(k)≤k/bU_b(k) \le k/b and Ub(k)/n≤k/N≤θU_b(k)/n \le k/N \le\theta.

Applied to Eq. (2), Wormald’s method yields the following system for the associated ui(t)=lim⁡nU(⌊tbn⌋)/nu_i(t) = \lim_{n} U(\lfloor tbn\rfloor)/n. As the continuous time for tt is scaled to reaching a full table with N=bnN = bn elements at time t=1t = 1, differentiating tbtb produces an extra bb factor:

{u0′(t)=−bu0(t)1−ub(t),ui′(t)=bui−1(t)1−ub(t)−bui(t)1−ub(t),for all i∈{1,…,b−1},ub′(t)=bub−1(t)1−ub(t).(4)\begin{cases} u_0'(t) = -b \dfrac{u_0(t)}{1-u_b(t)},\\ u_i'(t) = b \dfrac{u_{i-1}(t)}{1-u_b(t)} - b \dfrac{u_i(t)}{1-u_b(t)}, \quad\text{for all } i \in\{1,\ldots,b-1\},\\ u_b'(t) = b \dfrac{u_{b-1}(t)}{1-u_b(t)}. \tag*{(4)} \end{cases}

We also have the following properties of this system:

  • We fix the initial condition u0(0)=1,u1(0)=…ub(0)=0u_0(0) = 1, u_1(0) = \ldots u_b(0) = 0, which corresponds exactly to the initial condition for (Ui)i=0b(U_i)_{i=0}^{b}, namely U0(0)=n,U1(0)=…=Ub(0)=0U_0(0) = n, U_1(0) = \ldots= U_b(0) = 0.

  • The sum ∑i=0bui(t)=1\sum_{i=0}^{b} u_i(t) = 1, since the derivatives in Eq. (4) sum to zero.

  • The sum ∑i=0bui(t)i=bt\sum_{i=0}^{b} u_i(t)i = bt, which can be derived by simple computations.

One can prove that ui(t)≥0u_i(t) \ge0, and that the latter property implies ub(t)≤tu_b(t) \le t. Therefore, the system satisfies all of the hypothesis of the Picard-Lindelöf Theorem and is well-defined defined in t∈[0,1−ε)t \in[0,1-\varepsilon), for every ε\varepsilon.

See Lemma 17 in Appendix § 7.§ 1 for a proof of ui(t)≥0u_i(t) \ge0.

Thus taking any θ<1\theta< 1 is a valid choice, which allows us to apply Theorem 1 to obtain that Ui(k)=nui(k/N)+o(n)U_i(k) = nu_i(k/N) + o(n). The associated system of differential equations already appears, in a very similar form, in [18 p. 13–18], where it comes up as the approximation to a process (the dd-process) of adding random edges to a graph, in such a way that the degree never exceeds dd. Although the discrete objects counted are not the same, the system of differential equations is, but restricted only to b=2b = 2 in [18] due to the edges of the graphs. A direct adaptation gives the following solution of the system, characterized in terms of an implicit function λb(t)\lambda_b(t).

See Appendix § 7.§ 1 for the remaining details of the proof.

Theorem 2. Fix θ∈(0,1)\theta\in(0,1). Starting from an empty table with nn buckets of size bb, the number Ui(k)U_i(k) of buckets containing exactly i∈[b]i \in[b] elements after k≤θNk \le\theta N insertions satisfies

Ui(k)=nui(k/N)+o(n),U_i(k) = nu_i(k/N) + o(n),

with high probability, where the oo-term is uniform in ii and kk (but depends on θ\theta), and u1(t),…,ub(t)u_1(t),\ldots,u_b(t) are the solutions to the system of ordinary differential equations of Eq. (4) with initial condition u0(0)=1,u1(0)=0,…,ub(0)=0u_0(0) = 1, u_1(0) = 0,\ldots,u_b(0) = 0.

Moreover, for each i∈{0,1,…,b−1}i \in\{0,1,\ldots,b-1\}, we have ui(t)=1i!λb(t)ie−λb(t)u_i(t) = \frac{1}{i!}\lambda_b(t)^i e^{-\lambda_b(t)}, where λb(t)\lambda_b(t) is defined implicitly from the equation e−λb(t)∑i<b(b−i)1i!λb(t)i=b−bte^{-\lambda_b(t)} \sum_{i<b}(b-i)\frac{1}{i!}\lambda_b(t)^i = b-bt.

Remark 3. The condition e−λb(t)∑i<b(b−i)1i!λb(t)i=b−bte^{-\lambda_b(t)} \sum_{i<b}(b-i)\frac{1}{i!}\lambda_b(t)^i = b-bt follows from the equations ∑iui(t)=1\sum_i u_i(t) = 1 and ∑iiui(t)=bt\sum_i iu_i(t) = bt by subtracting. Two equations are needed, as we have to define both ub(t)=1−u0(t)−…−ub−1(t)u_b(t) = 1-u_0(t)-\ldots-u_{b-1}(t) and λb(t)\lambda_b(t).

Differentiating u0(t)=e−λb(t)u_0(t)=e^{-\lambda_b(t)}, we obtain u0′(t)=−u0(t)λb′(t)u_0'(t)=-u_0(t)\lambda_b'(t). Using Eq. (4), we have λb′(t)=−u0′(t)u0(t)=11−ub(t)\lambda_b'(t)=-\frac{u_0'(t)}{u_0(t)}=\frac{1}{1-u_b(t)}. This proves the following lemma.

Lemma 4. For each t∈[0,1)t\in[0,1), λb(t)=b∫0tdu1−ub(t)\lambda_b(t)=b\int_0^t\frac{du}{1-u_b(t)}.

Lemma 4 leads to a connection between λb\lambda_b and the total number of hops R(k)R(k), stated formally in Theorem 6. Indeed, the expected increment of R(k)R(k) is E[R(k+1)−R(k)∣Fk]=∑r≥1r(1−Ub(k)/n)(Ub(k)/n)r−1=11−Ub(k)/n\mathbb{E}[R(k+1)-R(k)\mid\mathcal{F}_k]=\sum_{r\geq1}r(1-U_b(k)/n)(U_b(k)/n)^{r-1}=\frac{1}{1-U_b(k)/n}. Thus Wormald’s Method almost applies here, the only detail to deal with being the probabilistic upper bound of R(k+1)−R(k)R(k+1)-R(k), Condition 1 of Theorem 1. This is done using Lemma 5 below, which provides a bound to the increments of R(k)R(k), with high probability.

Lemma 5. Fix θ∈(0,1)\theta\in(0,1). The total number of hops satisfies R(k+1)−R(k)>(log⁡N)2R(k+1)-R(k)>(\log N)^2 with probability at most 1θ(1−θ)exp⁡(−(1−θ)×(log⁡N)2)\frac{1}{\theta(1-\theta)}\exp(-(1-\theta)\times(\log N)^2), for each k≤θNk\leq\theta N.

Proof. Note that Ub(k)≤k/bU_b(k)\leq k/b, as a bucket must have bb elements to be full. Thus, Ub(k)/n≤k/N≤θU_b(k)/n\leq k/N\leq\theta. Given Fk\mathcal{F}_k, the number of hops follows a geometric law of parameter Ub(k)/nU_b(k)/n, so

Pr⁡(R(k+1)−R(k)=r∣Fk)=(1−Ub(k)/n)(Ub(k)/n)r−1≤θr−1.\Pr(R(k+1)-R(k)=r\mid\mathcal{F}_k)=(1-U_b(k)/n)(U_b(k)/n)^{r-1}\leq\theta^{r-1}.

Thus, by the tower property of conditional expectation,

Pr⁡(R(k+1)−R(k)=r)=E[Pr⁡(R(k+1)−R(k)=r∣Fk)]≤θr−1.\Pr(R(k+1)-R(k)=r)=\mathbb{E}[\Pr(R(k+1)-R(k)=r\mid\mathcal{F}_k)]\leq\theta^{r-1}.

Hence, Pr⁡(R(k+1)−R(k)>x)≤θ⌊x⌋1−θ≤θx−11−θ\Pr(R(k+1)-R(k)>x)\leq\frac{\theta^{\lfloor x\rfloor}}{1-\theta}\leq\frac{\theta^{x-1}}{1-\theta}. The formula follows from log⁡θ≤θ−1\log\theta\leq\theta-1.

All the ingredients are now established to estimate the total number of hops, which is also the cost of the construction of the hash table, starting from an empty one.

Theorem 6. Fix θ∈(0,1)\theta\in(0,1), the total number of hops satisfies R(k)=Nbλb(k/N)+o(n)R(k)=\frac{N}{b}\lambda_b(k/N)+o(n) with probability tending to one, for all k≤θNk\leq\theta N, where the oo-term is uniform in kk.

Proof. We apply Theorem 1 to the trending hypothesis E[R(k+1)−R(k)∣Fk]=11−Ub(k)/n\mathbb{E}[R(k+1)-R(k)\mid\mathcal{F}_k]=\frac{1}{1-U_b(k)/n}, plus Eq. (2) in order to complete the system with b+2b+2 equations, R(k),U0(k),…,Ub(k)R(k),U_0(k),\ldots,U_b(k).

Lemma 5 tells us that R(k+1)−R(k)≤(log⁡N)2R(k+1)-R(k)\leq(\log N)^2 is satisfied for any k≤θNk\leq\theta N with probability at least 1−11−θexp⁡(−(1−θ)×(log⁡N)2)1-\frac{1}{1-\theta}\exp(-(1-\theta)\times(\log N)^2). Let β(N):=(log⁡N)2\beta(N):=(\log N)^2 and γ(N):=11−θexp⁡(−(1−θ)×(log⁡N)2)\gamma(N):=\frac{1}{1-\theta}\exp(-(1-\theta)\times(\log N)^2), so that hypothesis (1) of Theorem 1 is satisfied.

The function δ=δ(N)\delta=\delta(N) in Theorem 1, in this case should satisfy δ≥R~/N\delta\geq\widetilde{R}/N and tend to 00, where R~=11−θ\widetilde{R}=\frac{1}{1-\theta}, as ub(t)≤θ<1u_b(t)\leq\theta<1. At this point we have to check that θbNγ(N)→0\theta bN\gamma(N)\to0, and Nδ2/(8θβ2)→∞N\delta^2/(8\theta\beta^2)\to\infty for an appropriate choice of δ=δ(N)\delta=\delta(N). Clearly, Nγ(N)→0N\gamma(N)\to0. Picking δ(N)=N−1/2+ε\delta(N)=N^{-1/2+\varepsilon}, for fixed ε∈(0,12)\varepsilon\in(0,\frac{1}{2}), makes Nδ2/(8θβ2)=N2ε/(8θ(log⁡N)4)→∞N\delta^2/(8\theta\beta^2)=N^{2\varepsilon}/(8\theta(\log N)^4)\to\infty. Thus the probability tends to one. Finally, the error term is O(δ(N)N)=O(N1/2+ε)=o(n)O(\delta(N)N)=O(N^{1/2+\varepsilon})=o(n).

To analyze the expected cost of searches in an already built hash table, one usually adds a level of randomness for such elementary operations. The classical setting [8] is to consider that all elements are equally likely to be queried during a successful search, and that an independent uniform random sequence of probes is used for an unsuccessful search. In the statements below, the with high probabilities refers to the construction of the hash table, and the average cost to the random choice of the element that is searched. For the result below, we need to add the condition that t∈(ϑ,θ)t\in(\vartheta,\theta) for some ϑ>0\vartheta>0 to have the uniformity of the error term o(1)o(1). It is not a restriction, as the full hash table mechanism usually involves resizing, so it cannot be almost empty, except at the very beginning of the building process. Corollary 7 follows from Theorem 6, as the expected number of hops in a successful search is R(k)/kR(k)/k. Indeed, the number of hops needed to insert an element corresponds to its look-up time, thus R(k)R(k) is the sum of all of the look-up times, while the factor 1/k1/k corresponds to the choice of the element to look-up as the table has kk elements, since it is chosen uniformly at random amongst the kk elements in the table.

Corollary 7 (Successful search). For any ϑ∈(0,θ)\vartheta\in(0,\theta), with high probability, the expected number of hops in a successful search in a hash table with kk elements is λb(t)/(bt)+o(1)\lambda_b(t)/(bt) + o(1), where t=k/Nt = k/N and the oo term is uniform for t∈(ϑ,θ)t \in(\vartheta,\theta).

Corollary 8 is a direct consequence of Theorem 2, since the expected number of hops for an unsuccessful search follows a geometric law of parameter Ub(k)/nU_b(k)/n. This can also be interpreted as the number of hops for inserting a new element, since we have no overflow bit in this section to stop the sequence of probes of a unsuccessful search prematurely.

Corollary 8 (Unsuccessful search with no overflow bits). With high probability, the expected number of hops in a unsuccessful search in a hash table with kk elements is (1−ub(t))−1+o(1)(1-u_b(t))^{-1} + o(1), where t=k/Nt = k/N and the oo term is uniform for t∈[0,θ)t \in[0,\theta).

Some properties of the number of hops function λb(t)\lambda_b(t)

Since the function λb(t)\lambda_b(t) turns out to be particularly important for the study of modern hash tables, we devote a short section to give some of its properties. First, for small bb one has:

  • If b=1b = 1, we simply have λ1(t)=log⁡(11−t)\lambda_1(t) = \log\left(\frac{1}{1-t}\right). Then the successful search time from Corollary 7 coincides with the classical 1tlog⁡(11−t)\frac{1}{t}\log\left(\frac{1}{1-t}\right) (see [8]).

  • If b=2b = 2, then 2−2t=(2+λb(t))e−λb(t)2 - 2t = (2 + \lambda_b(t))e^{-\lambda_b(t)}. This equation can be solved in terms of the −1-1-branch W−1(x)W_{-1}(x) of the Lambert-W function [4] as λb(t)=−2−W−1(−2−2te2)\lambda_b(t) = -2 - W_{-1}\left(-\frac{2-2t}{e^2}\right).

Our first result states that λb(t)\lambda_b(t) is always of logarithmic magnitude. See Appendix C for the proofs of this section.

Proposition 9. The inequalities log⁡(11−t)≤λb(t)≤blog⁡(11−t)\log\left(\frac{1}{1-t}\right) \le\lambda_b(t) \le b\log\left(\frac{1}{1-t}\right) are satisfied for all tt.

Moreover λb(t)∼log⁡(11−t)\lambda_b(t) \sim\log\left(\frac{1}{1-t}\right) as t→1−t \to1^{-} and λb(t)∼blog⁡(11−t)\lambda_b(t) \sim b\log\left(\frac{1}{1-t}\right) as t→0+t \to0^{+}.

Combined with Corollary 7, Proposition 9 shows shows that the classical framework without SIMD instructions uses bb times as many instructions when the table (of same capacity) is almost full, and roughly the same number when it is almost empty. The latter is to be expected, as the element is usually found with only one probe in this case. It is not an issue in practice, since after the first resizing mechanism is triggered, the hash table always has a load factor greater than some positive ϑ\vartheta; for example, if ϑ=1/2\vartheta= 1/2, a SIMD-based hash table uses, in the limit, at least 27

The following proposition provides an alternative characterization of λb(t)\lambda_b(t) by means of an ordinary differential equation involving the classical upper incomplete Γ\Gamma-function Γ(a,x)\Gamma(a,x) and the lower incomplete Γ\Gamma-function γ(a,x)\gamma(a,x), for a>0a > 0 and x≥0x \ge0,

Γ(a,x):=∫x∞ta−1e−t dt,γ(a,x):=∫0xta−1e−t dt,Γ(a):=∫0∞ta−1e−t dt.\Gamma(a,x) := \int_x^\infty t^{a-1}e^{-t}\,\mathrm{d}t,\qquad\gamma(a,x) := \int_0^x t^{a-1}e^{-t}\,\mathrm{d}t,\qquad\Gamma(a) := \int_0^\infty t^{a-1}e^{-t}\,\mathrm{d}t.

In particular, their regularized versions Q(a,x)=Γ(a,x)/Γ(a)Q(a,x) = \Gamma(a,x)/\Gamma(a), the regularized upper-incomplete Γ\Gamma-function, and the regularized lower-incomplete Γ\Gamma-function P(a,x)=γ(a,x)/Γ(a)P(a,x) = \gamma(a,x)/\Gamma(a).

The net gain here is that these functions have efficient implementations [15], that are implemented in mathematical packages such as SciPy, mpmath3 or boost, amongst many.

Proposition 10. The function λb(t)\lambda_b(t) satisfies λb′(t)=b/Q(b,λb(t))\lambda'_b(t)=b/Q(b,\lambda_b(t)), while ub(t)=P(b,λb(t))u_b(t)=P(b,\lambda_b(t)).

Analysis with overflow

In this section, we analyze the impact of having dd overflow bits, by proving Theorem 11, where Vj(k)V_j(k) is the number of full buckets having jj bits at 1 at time kk, for j∈{0,…,d}j \in\{0,\ldots,d\}. The use of integral forms may seem complicated at first, but they allow for very fast and accurate numerical estimations, this is what we used to obtain the curves given in this paper.

Theorem 11. Fix θ∈(0,1)\theta\in(0,1). Starting from an empty table with nn buckets of size bb and dd overflow bits, the number Vj(k)V_j(k) of full buckets with jj overflow bits on at time kk satisfies Vj(k)=nvj(k/N)+o(n)V_j(k)=nv_j(k/N)+o(n) with high probability and uniformly for all k≤θNk\le\theta N, where

v0′(t)=bub−1(t)1−ub(t)−bv0(t)1−ub(t),v1′(t)=b(1−1d)v0(t)1−ub(t)−b(1−1d)v1(t)1−ub(t), ⋮vd−1′(t)=b(1−d−2d)vd−2(t)1−ub(t)−b(1−d−1d)vd−1(t)1−ub(t),vd′(t)=b(1−d−1d)vd−1(t)1−ub(t).(5)\begin{aligned} v'_0(t)&=b\frac{u_{b-1}(t)}{1-u_b(t)}-b\frac{v_0(t)}{1-u_b(t)},\\ v'_1(t)&=b\left(1-\frac{1}{d}\right)\frac{v_0(t)}{1-u_b(t)}-b\left(1-\frac{1}{d}\right)\frac{v_1(t)}{1-u_b(t)},\\ &\ \vdots\\ v'_{d-1}(t)&=b\left(1-\frac{d-2}{d}\right)\frac{v_{d-2}(t)}{1-u_b(t)}-b\left(1-\frac{d-1}{d}\right)\frac{v_{d-1}(t)}{1-u_b(t)},\\ v'_d(t)&=b\left(1-\frac{d-1}{d}\right)\frac{v_{d-1}(t)}{1-u_b(t)}. \tag*{(5)} \end{aligned}

Moreover, for all j=0,…,dj=0,\ldots,d and t∈[0,1)t\in[0,1), the solutions to the system in Eq. (5) can be written explicitly in terms of λb(t)\lambda_b(t):

vj(t)=(dj)e−(d−j)λb(t)/d∫0λb(t)xb−1(b−1)!(e−x/d−e−λb(t)/d)j dx.(6)v_j(t)=\binom{d}{j}e^{-(d-j)\lambda_b(t)/d}\int_0^{\lambda_b(t)}\frac{x^{b-1}}{(b-1)!}\left(e^{-x/d}-e^{-\lambda_b(t)/d}\right)^j\,dx. \tag*{(6)}

In order to prove this, it proves simpler to study V~j(r)\widetilde{V}_j(r), the number of full-buckets with jj bits after rr hops, instead of after kk insertions. So we change the time scale, each increment corresponding to a successful or unsuccessful access to a bucket, i.e. a hop. We can prove that these new random variables satisfy equations amenable to Wormald’s Theorem:

E[V~j(r+1)−V~j(r)∣F~r]=(1−j−1d)V~j−1(r)−(1−jd)V~j(r),for j>0\mathbb{E}[\widetilde{V}_j(r+1)-\widetilde{V}_j(r)\mid\widetilde{\mathcal{F}}_r]=\left(1-\frac{j-1}{d}\right)\widetilde{V}_{j-1}(r)-\left(1-\frac{j}{d}\right)\widetilde{V}_j(r),\quad\text{for }j>0

and

E[V~0(r+1)−V~0(r)∣F~r]=U~b−1(r)−V~0(r),\mathbb{E}[\widetilde{V}_0(r+1)-\widetilde{V}_0(r)\mid\widetilde{\mathcal{F}}_r]=\widetilde{U}_{b-1}(r)-\widetilde{V}_0(r),

where U~b−1(r)\widetilde{U}_{b-1}(r) is the analog of Ub−1U_{b-1} but on the time-scale of hops rr. Intuitively, the terms in j/dj/d (resp. (j−1)/d(j-1)/d) account for the probability that the overflow bit chosen for this hop collides one of the jj (resp. j−1j-1) bits set to 1 for the current bucket. More generally, we define new random variables U~0,U~1,…,U~b\widetilde{U}_0,\widetilde{U}_1,\ldots,\widetilde{U}_b that denote the number of buckets with 0,1,…,b0,1,\ldots,b spots occupied, at the new scale of time. They satisfy, for j=0,…,b−2j=0,\ldots,b-2

E[U~j+1(r+1)−U~j+1(r)∣F~r]=U~j(r)−U~j+1(r),\mathbb{E}[\widetilde{U}_{j+1}(r+1)-\widetilde{U}_{j+1}(r)\mid\widetilde{\mathcal{F}}_r]=\widetilde{U}_j(r)-\widetilde{U}_{j+1}(r),

while

E[U~0(r+1)−U~0(r)∣F~r]=−U~0(r)\mathbb{E}[\widetilde{U}_0(r+1)-\widetilde{U}_0(r)\mid\widetilde{\mathcal{F}}_r]=-\widetilde{U}_0(r)

and

E[U~b(r+1)−U~b(r)∣F~r]=U~b−1(r).\mathbb{E}[\widetilde{U}_b(r+1)-\widetilde{U}_b(r)\mid\widetilde{\mathcal{F}}_r]=\widetilde{U}_{b-1}(r).

These are related to the following system of ODE, again by a direct application of Wormald’s Theorem:

u~0′(s)=bu~b−1(s)−bu~0(s),u~1′(s)=bu~0(s)−bu~1(s) ⋮u~b−1′(s)=bu~b−2(s)−bu~b−1(s),u~b′(s)=bu~b−1(s).\begin{aligned} \tilde{u}'_0(s) &= b\tilde{u}_{b-1}(s)-b\tilde{u}_0(s),\\ \tilde{u}'_1(s) &= b\tilde{u}_0(s)-b\tilde{u}_1(s)\\ &\ \vdots\\ \tilde{u}'_{b-1}(s) &= b\tilde{u}_{b-2}(s)-b\tilde{u}_{b-1}(s),\\ \tilde{u}'_b(s) &= b\tilde{u}_{b-1}(s). \end{aligned}

These functions are defined and continuously differentiable on s∈[0,∞)s \in[0,\infty) and Wormald’s Theorem implies that U~j(s)=nu~j(s/N)+o(n)\widetilde{U}_j(s)=n\tilde{u}_j(s/N)+o(n). A key property linking the two scales of time is the following:

Proposition 12. For all j=0,…,bj=0,\ldots,b and t∈[0,1)t\in[0,1), we have uj(t)=u~j(λb(t)/b)u_j(t)=\tilde{u}_j(\lambda_b(t)/b).

Proof sketch. By definition Uj(k)=U~j(R(k))U_j(k)=\widetilde{U}_j(R(k)). Theorem 6 tells us that R(k)=Nbλb(k/N)+o(n)R(k)=\frac{N}{b}\lambda_b(k/N)+o(n) with high probability. Then U~j(R(k))=nu~j(λb(k/N)/b)+o(n)\widetilde{U}_j(R(k))=n\tilde{u}_j(\lambda_b(k/N)/b)+o(n) and Uj(k)=nuj(k/N)+o(n)U_j(k)=nu_j(k/N)+o(n) both occur with high probability, the intersection of the events also occurs with high probability. This gives uj(k/N)∼u~j(λb(k/N)/b)u_j(k/N)\sim\tilde{u}_j(\lambda_b(k/N)/b), the rest follows by continuity.

Back to the number of buckets with a given number of overflow its, we are led to the following system of ordinary differential equations, involving u~b−1(t)\tilde{u}_{b-1}(t):

v~0′(s)=bu~b−1(s)−bv~0(s),v~1′(s)=b(1−0d)v~0(s)−b(1−1d)v~1(s) ⋮v~d−1′(s)=b(1−d−2d)v~d−2(s)−b(1−d−1d)v~d−1(s),v~d′(s)=b(1−d−1d)v~d−1(s).\begin{aligned} \tilde{v}'_0(s) &= b\tilde{u}_{b-1}(s)-b\tilde{v}_0(s),\\ \tilde{v}'_1(s) &= b\left(1-\frac{0}{d}\right)\tilde{v}_0(s)-b\left(1-\frac{1}{d}\right)\tilde{v}_1(s)\\ &\ \vdots\\ \tilde{v}'_{d-1}(s) &= b\left(1-\frac{d-2}{d}\right)\tilde{v}_{d-2}(s)-b\left(1-\frac{d-1}{d}\right)\tilde{v}_{d-1}(s),\\ \tilde{v}'_d(s) &= b\left(1-\frac{d-1}{d}\right)\tilde{v}_{d-1}(s). \end{aligned}

In this case the solutions are defined for s∈[0,∞)s\in[0,\infty) and Wormald’s Differential Equation Method applies, yielding V~j(s)=nv~j(s/N)+o(n)\widetilde{V}_j(s)=n\tilde{v}_j(s/N)+o(n). We are interested in s=R(k)s=R(k), which are the actual insertion times. The relationship between R(k)R(k) and λb(t)\lambda_b(t) was studied in Theorem 6. In particular, we recall that R(k)=Nbλb(k/N)+o(n)R(k)=\frac{N}{b}\lambda_b(k/N)+o(n) with high probability. Thus Vj(k)=V~j(R(k))=nv~j(λb(k/N)/b)+o(n)V_j(k)=\widetilde{V}_j(R(k))=n\tilde{v}_j(\lambda_b(k/N)/b)+o(n) with high probability. Set vj(t):=v~j(λb(t)/b)v_j(t):=\tilde{v}_j(\lambda_b(t)/b). Then

vj′(t)=v~j′(λb(t)/b)λb′(t)/b=v~j′(λb(t)/b)1−ub(t).v'_j(t)=\tilde{v}'_j(\lambda_b(t)/b)\lambda'_b(t)/b=\frac{\tilde{v}'_j(\lambda_b(t)/b)}{1-u_b(t)}.

and we deduce, since u~b−1(λb(t)/b)≡ub−1(t)\tilde{u}_{b-1}(\lambda_b(t)/b)\equiv u_{b-1}(t), that the system in Eq. (5) holds. It only remains to find manageable expressions for the vjv_j’s. The details of this inductive proof are left out of this extended abstract.

See Annex D.1 for the proof.

Recall that insertions and successful searches are not affected by the overflow mechanism, which can only interrupt sequences of probes for unsuccessful searches. Our result for unsuccessful searches is based on the observation that the probability of continuing the sequence of probes is well approximated by p:=∑j=0dvj(t)jdp:=\sum_{j=0}^{d}v_j(t)\frac{j}{d}, where vjv_j is the probability of hitting a full bucket having jj overflow bits set to 11, and j/dj/d is the probability of hitting one of those bits. Thus, the number of hops strongly resembles a geometric law of parameter pp. Following the formula in Eq. (6) for the functions vj(t)v_j(t), we have the following result.

Theorem 13 (Unsuccessful search with overflow bits). The expected number of hops for a unsuccessful search in a table having kk elements and using dd overflow bits, with high probability and uniformly for t=kN∈[0,θ)t = \frac{k}{N} \in[0,\theta):

(1−Fb,d(λb(k/N)))−1+o(1),Fb,d(λ):=∫0λxb−1(b−1)!e−(1−1/d)x(e−x/d−e−λ/d) dx.\left(1-F_{b,d}(\lambda_b(k/N))\right)^{-1}+o(1), \qquad F_{b,d}(\lambda):=\int_0^\lambda\frac{x^{b-1}}{(b-1)!}e^{-(1-1/d)x}\left(e^{-x/d}-e^{-\lambda/d}\right)\,dx.

Moreover, Fb,d(λ)=P(b,λ)−(1−1/d)−be−λ/dP(b,λ⋅(1−1/d))F_{b,d}(\lambda)=P(b,\lambda)-(1-1/d)^{-b}e^{-\lambda/d}P(b,\lambda\cdot(1-1/d)), where PP is the regularized lower-incomplete Γ\Gamma-function defined in § 3.

See Annex D.2 for the full proof.

Conclusion

As Figure 4 shows, the results obtained in this article, although asymptotic, describe very precisely the behavior of modern hash tables that exploit SIMD instructions. The mathematical functions that enable the analysis are involved, implicitly defined, but easily estimated numerically thanks to the integral representations that we have proposed. From a methodological point of view, the use of variants of the differential equation method developed by Wormald has proved to be particularly well suited, as it produces advanced results with high probability, and gives a very precise description of the state of the table after kk insertions; this is why we only need one experimental trial in Figure 4. For example, Theorem 13 can be used to compare the impact of adding more overflow bits, as depicted in Figure 5.

Expected number of additional hops for an unsuccessful search for different values of b and d

Figure 5. The expected number of additional hops for a unsuccessful search, for n=214n=2^{14}. We use different values of bb and dd at constant header size, to compare the impact of the overflow bits. Observe that the capacities slightly differ since bb is not constant, but they do not vary much.

In the results, there is a tradeoff between the error term and the speed of convergence in probability: the smaller the error term, the slower the convergence in probability. For each of the o(n)o(n) terms in the results provided, we can prove that these are O(n1/2+ε)O(n^{1/2+\varepsilon}), for any fixed ε>0\varepsilon>0, with probability tending to one. This follows from taking δ(n)=n−1/2+ε\delta(n)=n^{-1/2+\varepsilon} when applying Theorem 1. In consequence, the o(1)o(1) terms are O(n−1/2+ε)O(n^{-1/2+\varepsilon}). The probability depends on the choice of ε>0\varepsilon>0, but it is always 1−o(n−M)1-o(n^{-M}) for every any M>0M>0. See the proof of Theorem 6, for an example. This also applies to Section 4 when composing.

As we already mentioned in the introduction, the engineers of each programming language have implemented their own algorithms, and it is difficult to cover everything. However, many of the variants we encountered can most likely be handled in the same way as what we have just done, perhaps with solutions that are harder to describe, but certainly still exploitable. For example, this method could be used to refine the analysis to count the number of element comparisons instead of the number of hops, since it is not difficult to add the fingerprint collisions in the equations. A notable exception to this statement concerns algorithms in which groups of bb elements are not arranged by bucket, but overlap within the table: such overlaps greatly complicate the analysis by introducing dependencies between the different buckets, and new ideas will be required to study them.

Finally, we did not address deletions in this article. The main reason for this is that there is no commonly accepted model for the use of deletions in hash tables. In practice, it is often the case that elements are never deleted, but even when they are, defining typical usage scenarios is not an easy task. Some suggestions can be found in [10, 12, 14], for instance, but without real validation from practice 4. Such scenarios, using a simple probabilistic modeling, are most certainly amenable to analysis using the methodology of this article, though solving the systems might be difficult, but more advanced descriptions will likely require significant improvements of the method.

For example, consider the simple model introduced in [12] in which, at time kk, an insertion occurs with probability p∈(12,1)p \in(\frac{1}{2},1), and a deletion is performed (uniformly among all elements inside) with probability 1−p1-p. Observe that now it is possible to have buckets which are not full but have a number of overflow bits. Thus we are led to a system of ordinary differential equations with (b+1)×(d+1)(b+1) \times(d+1) unknown functions. If Ui,j(k)U_{i,j}(k) corresponds to the number of buckets with ii elements and jj bits on, we expect a system for the fluid limit ui,j(t)=lim⁡Ui,j(⌊tbn⌋)/nu_{i,j}(t)=\lim U_{i,j}(\lfloor tbn\rfloor)/n by similar methods. Observe that we should have ∑i,jui,j(t)⋅i=(2p−1)bt\sum_{i,j}u_{i,j}(t)\cdot i=(2p-1)bt, as this corresponds to the expected number of elements in the table. The variable tt must be constrained to t≤θ/(2p−1)t \leq\theta/(2p-1), at which point the table attains the maximal load factor θ\theta for the first time, with high probability. This system, which can be written explicitly, is more involved and we do not succeed in obtaining a simple solution, even though it can easily be evaluated by numerical methods.

A Theorem 1

Wormald's Theorem

In this section we cite Wormald’s original version of Wormald’s Differential Equation method, as presented in [17], for reference. In order to prove Theorem 2 we could have used a result of Wormald’s in almost its original form, but for the rest (e.g., Theorem 6) we need a stronger result that we present in Section A.2.

Theorem 14 (Adapted from Wormald’95 [17]). Let ℓ≥1\ell\ge1 be an integer. Consider discrete random processes (Yj)j=1ℓ(Y_j)_{j=1}^{\ell} taking on real values, where Yj(k)Y_j(k) is the value of the jj-th process at time kk. Suppose there exists C>0C > 0 such that ∣Yj(k)∣≤C⋅N\lvert Y_j(k)\rvert\le C \cdot N for all k≤Nk \le N and j∈{1,…,ℓ}j \in\{1,\ldots,\ell\}.

Suppose also that for some m=m(N)m = m(N),

  1. there is a constant β>0\beta> 0 such that for all k<mk < m and j∈[ℓ]j \in[\ell],

    ∣Yj(k+1)−Yj(k)∣≤β\lvert Y_j(k+1) - Y_j(k)\rvert\le\beta;

  1. for all j∈[ℓ]j \in[\ell], and k<mk < m,

    E[Yj(k+1)−Yj(k)∣Fk]=fj(k/N;Y1(k)/N,…,Yℓ(k)/N),\mathbb{E}[Y_j(k+1) - Y_j(k) \mid\mathcal{F}_k] = f_j(k/N;Y_1(k)/N,\ldots,Y_\ell(k)/N),

    where the functions fjf_j are continuous and satisfy a Lipschitz condition on an open and connected domain DD;

  1. the initial vector Y(0)=(Y1(0),…,Yℓ(0))\mathbf{Y}(0) = (Y_1(0),\ldots,Y_\ell(0)) satisfies ∥Y(0)−Nv∥∞=o(N)\lVert\mathbf{Y}(0)-N\mathbf{v}\rVert_\infty= o(N) for some fixed v=(v1,…,vℓ)\mathbf{v} = (v_1,\ldots,v_\ell) with (0,v1,…,vℓ)∈D(0,v_1,\ldots,v_\ell) \in D.

Let y(t)=(y1(t),…,yℓ(t))\mathbf{y}(t) = (y_1(t),\ldots,y_\ell(t)) be the unique solution to the system of differential equations in Eq. (3), with initial condition y1(0)=v1,…,yℓ(0)=vℓy_1(0) = v_1,\ldots,y_\ell(0) = v_\ell. Let σ>0\sigma> 0 be the supremum of t≥0t \ge0 such that (s,y(s))∈D(s,\mathbf{y}(s)) \in D for all s∈[0,t)s \in[0,t).

Fix any θ∈(0,σ)\theta\in(0,\sigma), then with probability tending to one we have Yj(k)=Nyj(k/N)+o(N)Y_j(k) = Ny_j(k/N)+o(N), for some oo-term that is actually uniform on jj and k≤min⁡(m,θN)k \le\min(m,\theta N).

Theorem 14 can be extended to allow for differences bounded by β=β(N)→∞\beta= \beta(N) \to\infty, provided that β(N)\beta(N) does not grow too fast. Moreover, it still holds if ∣Yj(k+1)−Yj(k)∣≤β(N)\lvert Y_j(k+1) - Y_j(k)\rvert\le\beta(N) occurs with high probability instead instead of always. These variants already appear in the paper of Wormald [17]. We have supposed that the initial condition is deterministic, as the initial state of our algorithm is deterministic. Wormald’s Theorem, in its original form, allows for a random initial condition. It also allows for the trending hypothesis (2.) to be an approximation up to an uniform o(1)o(1). The condition k≤θNk \le\theta N for θ<σ\theta< \sigma simplifies the statement somewhat. This can be lifted by being more precise regarding the distance to the border of DD and the growth of the functions fjf_j. Hence Theorem 14 is both an extension and a restriction of the statement of [17], but everything can be deduced directly from the work of Wormald. Our main tool, Theorem 1, which is proved in the next section, is derived from Theorem 14.

Proof of Theorem 1

To prove Theorem 1, we rely on two results from Warnke [16]. First, we improve on Theorem 14 by precising the error term.

Theorem 15 (Adapted Theorem 2 from [16]). Let ℓ>1\ell> 1 be an integer. Consider discrete random processes (Yj)j=1ℓ(Y_j)_{j=1}^{\ell} taking real values, where Yj(k)Y_j(k) is the value of the jj-th process at time kk. Suppose that there are functions m:=m(N)m := m(N), β:=β(N)\beta:= \beta(N), and δ:=δ(N)\delta:= \delta(N), such that lim⁡Nγ(N)=lim⁡Nδ(N)=0\lim_{N} \gamma(N) = \lim_{N} \delta(N) = 0 and

  1. for all k<mk < m and j∈[ℓ]j \in[\ell], ∣Yj(k+1)−Yj(k)∣≤β\lvert Y_j(k+1)-Y_j(k)\rvert\le\beta;

  1. for all j∈[ℓ]j \in[\ell], and k<mk < m,

E[Yj(k+1)−Yj(k)∣Fk]=fj(k/N;Y1(k)/N,…,Yℓ(k)/N),\mathbb{E}\left[Y_j(k+1)-Y_j(k)\mid\mathcal{F}_k\right]=f_j\left(k/N;Y_1(k)/N,\ldots,Y_\ell(k)/N\right),

where the functions fjf_j are continuous, uniformly bounded by R>0R>0, and are LL-Lipschitz on an open and connected domain D\mathcal{D}, for some L>0L>0.

  1. The initial vector Y(0)=(Y1(0),…,Yℓ(0))\mathbf{Y}(0)=(Y_1(0),\ldots,Y_\ell(0)) satisfies ∥Y(0)−Nv∥∞≤δ⋅N\lVert\mathbf{Y}(0)-N\mathbf{v}\rVert_\infty\le\delta\cdot N for some fixed v=(v1,…,vℓ)\mathbf{v}=(v_1,\ldots,v_\ell) with (0,v1,…,vℓ)∈D(0,v_1,\ldots,v_\ell)\in\mathcal{D}.

Let y(t)=(y1(t),…,yℓ(t))\mathbf{y}(t)=(y_1(t),\ldots,y_\ell(t)) be the unique solution to the system of differential equations of Eq. (3), with initial condition y1(0)=v1,…,yℓ(0)=vℓy_1(0)=v_1,\ldots,y_\ell(0)=v_\ell. Let σ>0\sigma>0 be the supremum of t≥0t\ge0 such that the solution (s,y(s))∈D(s,\mathbf{y}(s))\in\mathcal{D} for all s∈[0,t)s\in[0,t) and fix θ∈(0,σ)\theta\in(0,\sigma).

Whenever δ≥R/N\delta\ge R/N, with probability at least 1−2ℓexp⁡(−Nδ2/(8θβ2))1-2\ell\exp(-N\delta^2/(8\theta\beta^2)), we have ∣Yj(k)−Nyj(k/N)∣≤3eLθδ⋅N\lvert Y_j(k)-Ny_j(k/N)\rvert\le3e^{L\theta}\delta\cdot N, for all j∈[ℓ]j\in[\ell] and k≤min⁡(m,θN)k\le\min(m,\theta N).

In order to prove Theorem 1 we still need Condition 1 to be probabilistic, rather than deterministic, which is done in the following lemma from [16].

Lemma 16 (Lemma 9 from [16]). Consider events (Ei)i≤I(E_i)_{i\le I} with Ei∈FiE_i\in\mathcal{F}_i. Suppose that we only verified Condition 1 and Condition 2 of Theorem 15 under the assumption that EiE_i holds. Let E=⋂i≤IEiE=\bigcap_{i\le I}E_i. Then the probability of having EE and the conclusion of Theorem 15 not holding is at most 2ℓexp⁡(−Nδ2/(8θβ2))2\ell\exp(-N\delta^2/(8\theta\beta^2)).

We are now ready to prove the theorem.

Proof of Theorem 1. Let EjE_j be the event ∣Yj+1(k)−Yj(k)∣≤β(N)\lvert Y_{j+1}(k)-Y_j(k)\rvert\le\beta(N) for all j∈[ℓ]j\in[\ell] and k≤θNk\le\theta N (here we can take m=Nm=N). Let S=S(N,δ,β)S=S(N,\delta,\beta) be the event that corresponds to the conclusions of Theorem 15. Lemma 16 tells us that if E=⋂j<θNEjE=\bigcap_{j<\theta N}E_j, the probability Pr⁡(E∩S‾)≤2ℓexp⁡(−Nδ2/(8θβ2))\Pr(E\cap\overline{S})\le2\ell\exp(-N\delta^2/(8\theta\beta^2)), where S‾\overline{S} is the complement of SS. Observe that Pr⁡(E‾)≤ℓ×θN×γ(N)\Pr(\overline{E})\le\ell\times\theta N\times\gamma(N) by applying the union-bound. We deduce that Pr⁡(S‾)≤Pr⁡(E‾)+Pr⁡(E∩S‾)≤ℓθNγ(N)+2ℓexp⁡(−Nδ2/(8θβ2))\Pr(\overline{S})\le\Pr(\overline{E})+\Pr(E\cap\overline{S})\le\ell\theta N\gamma(N)+2\ell\exp(-N\delta^2/(8\theta\beta^2)) and the conclusion follows by taking the complement.

Proofs from Section 2.3

Proof of Theorem 2

In this section we complete the proof of the following theorem.

Theorem 2. Fix θ∈(0,1)\theta\in(0,1). Starting from an empty table with nn buckets of size bb, the number Ui(k)U_i(k) of buckets containing exactly i∈[b]i\in[b] elements after k≤θNk\le\theta N insertions satisfies

Ui(k)=nui(k/N)+o(n),U_i(k)=nu_i(k/N)+o(n),

with high probability, where the oo-term is uniform in ii and kk (but depends on θ\theta), and u1(t),…,ub(t)u_1(t),\ldots,u_b(t) are the solutions to the system of ordinary differential equations of Eq. (4) with initial condition u0(0)=1u_0(0)=1, u1(0)=0,…,ub(0)=0u_1(0)=0,\ldots,u_b(0)=0.

Moreover, for each i∈{0,1,…,b−1}i\in\{0,1,\ldots,b-1\}, we have ui(t)=1i!λb(t)ie−λb(t)u_i(t)=\frac{1}{i!}\lambda_b(t)^i e^{-\lambda_b(t)}, where λb(t)\lambda_b(t) is defined implicitly from the equation e−λb(t)∑i<b(b−i)1i!λb(t)i=b−bte^{-\lambda_b(t)}\sum_{i<b}(b-i)\frac{1}{i!}\lambda_b(t)^i=b-bt.

We begin by proving the following lemma, which we need in order to prove that ub(t)≤tu_b(t)\le t holds. This is required in order to assert that the solution to the system of ODEs exists on [0,1)[0,1), because of the denominators 1−ub(t)1-u_b(t). Another consequence of the lemma is that ui(t)≤1u_i(t) \le1 holds for every ii, and every tt where the solutions are defined. Given these properties, we can verify that for every ε∈(0,1)\varepsilon\in(0,1) the system satisfies the hypothesis of the Picard-Lindelöf Theorem for t∈[0,1−ε)t \in[0,1-\varepsilon).

Lemma 17. The solution (u0(t),u1(t),…,ub(t))(u_0(t),u_1(t),\ldots,u_b(t)) to the system of ODEs in Equation (4) with initial condition u0(0)=1u_0(0)=1, u1(0)=0,…,ub(0)=0u_1(0)=0,\ldots,u_b(0)=0, satisfies ui(t)>0u_i(t)>0, for every i>0i>0, and every t>0t>0 where the solution can be extended.

Proof. It is immediate that u0(t)>0u_0(t)>0 for t>0t>0 as the system implies

u0(t)=exp⁡(−b∫0tdt1−ub(t)).u_0(t)=\exp\left(-b\int_0^t\frac{\mathrm{d}t}{1-u_b(t)}\right).

For i>0i>0, we claim that ui(t)>0u_i(t)>0 for t>0t>0 holds too. Suppose for the sake of contradiction that t′>0t'>0 were the smallest (by continuity) possible so that ui(t′)=0u_i(t')=0 for some i>0i>0. We take the smallest ii without loss of generality, so that ui−1(t′)>0u_{i-1}(t')>0. Observe that 1−ub(t′)=u0(t′)+…+ub−1(t′)>01-u_b(t')=u_0(t')+\ldots+u_{b-1}(t')>0 by our choice of t′t'. By the system,

ui′(t′)=bui−1(t′)1−ub(t′)−bui(t′)1−ub(t′)=bui−1(t′)1−ub(t′)>0,u_i'(t')=b\frac{u_{i-1}(t')}{1-u_b(t')}-b\frac{u_i(t')}{1-u_b(t')}=b\frac{u_{i-1}(t')}{1-u_b(t')}>0,

but this is a contradiction, as we must have ui′(t′)≤0u_i'(t')\le0 by the choice of t′t'.

Corollary 18. The solution (u0(t),u1(t),…,ub(t))(u_0(t),u_1(t),\ldots,u_b(t)) to the system of ODEs in Equation (4) with initial condition u0(0)=1u_0(0)=1, u1(0)=0,…,ub(0)=0u_1(0)=0,\ldots,u_b(0)=0, satisfies ui(t)≤1u_i(t)\le1 for every i=0,1,…,bi=0,1,\ldots,b, and for every t>0t>0 where the solution can be extended.

Proof. Follows from ∑i=0bui(t)=1\sum_{i=0}^{b}u_i(t)=1 and the non-negativity.

Corollary 19. The solution (u0(t),u1(t),…,ub(t))(u_0(t),u_1(t),\ldots,u_b(t)) to the system of ODEs in Equation (4) with initial condition u0(0)=1u_0(0)=1, u1(0)=0,…,ub(0)=0u_1(0)=0,\ldots,u_b(0)=0, satisfies ub(t)≤tu_b(t)\le t for every t>0t>0 where the solution can be extended.

Proof. From the system of ODEs in Eq. (4) and simple calculations we deduce that

∑i=0biui′(t)=b∑i<bui(t)1−ub(t)=b,\sum_{i=0}^{b}iu_i'(t)=b\frac{\sum_{i<b}u_i(t)}{1-u_b(t)}=b,

as we know that ∑i=0bui(t)=1\sum_{i=0}^{b}u_i(t)=1. We deduce that ∑iiui(t)=bt\sum_i iu_i(t)=bt. Then, since ui(t)>0u_i(t)>0 for t>0t>0 and i=0,…,bi=0,\ldots,b, we deduce that bub(t)≤btbu_b(t)\le bt, thus ub(t)≤tu_b(t)\le t.

We now conclude the proof of Theorem 2. Theorem 1 already gives the approximations of the Ui(k)U_i(k)’s by nui(k/N)nu_i(k/N), so it remains to prove the expressions for the uiu_i’s are correct in the statement Theorem 2. Since the solution to the system of ODEs (ordinary differential equations) in Equation (4) is unique, given the initial conditions u0(0)=1u_0(0)=1, u1(0)=0,…,ub(0)=0u_1(0)=0,\ldots,u_b(0)=0, it suffices to check that the proposed formula satisfies the system of ODEs. Note that λb(t)\lambda_b(t) is well defined, differentiable, and unique, due to the Implicit Function Theorem. Indeed, let F(t,λ):=b−bt−∑i=0b(b−i)λii!e−λF(t,\lambda):=b-bt-\sum_{i=0}^{b}(b-i)\frac{\lambda^i}{i!}e^{-\lambda}. Then

∂λF(t,λ)=−∑i=0b−1(b−i−1)λii!e−λ+∑i=0b(b−i)λii!e−λ=∑i=0b−1λii!e−λ≥e−λ>0\partial_\lambda F(t,\lambda)=-\sum_{i=0}^{b-1}(b-i-1)\frac{\lambda^i}{i!}e^{-\lambda}+\sum_{i=0}^{b}(b-i)\frac{\lambda^i}{i!}e^{-\lambda}=\sum_{i=0}^{b-1}\frac{\lambda^i}{i!}e^{-\lambda}\ge e^{-\lambda}>0

for any λ\lambda.

Let ui(t)u_i(t) be the functions defined by the formulas at the end of the statement of Theorem 2, we show that they verify the system. They clearly satisfy the initial conditions. Observe that, for 0<i<b0<i<b, the functions defined by the formulas satisfy

ui′(t)=λb′(t)(ui−1(t)−ui(t)).(7)u_i'(t)=\lambda_b'(t)\left(u_{i-1}(t)-u_i(t)\right). \tag*{(7)}

while u0′(t)=−u0(t)λb′(t)u_0'(t)=-u_0(t)\lambda_b'(t) and ub′(t)=−u0′(t)−…−ub−1′(t)u_b'(t)=-u_0'(t)-\ldots-u_{b-1}'(t). Hence, the system of ODEs is satisfied if we can also prove that λb′(t)=b1−ub(t)\lambda_b'(t)=\frac{b}{1-u_b(t)} and ub′(t)=λb′(t)ub−1(t)u_b'(t)=\lambda_b'(t)u_{b-1}(t).

  • Observe that we have a telescoping sum ub′(t)=−u0′(t)−⋯−ub−1′(t)=−λb′(t)ub(t)u_b'(t)=-u_0'(t)-\cdots-u_{b-1}'(t)=-\lambda_b'(t)u_b(t), hence it only remains to prove that λb′(t)=b1−ub(t)\lambda_b'(t)=\frac{b}{1-u_b(t)}.

  • Remark that by Eq. (7), we have ∑i=0bui′(t)i=λb′(t)∑i=0b−1ui(t)\sum_{i=0}^{b}u_i'(t)i=\lambda_b'(t)\sum_{i=0}^{b-1}u_i(t).

  • Finally, using basic computations and the identity above, the equation defining λb(t)\lambda_b(t) is equivalent to b−bt=b−∑i=0bui(t)ib-bt=b-\sum_{i=0}^{b}u_i(t)i, since ub(t):=1−u0(t)−⋯−ub−1(t)u_b(t):=1-u_0(t)-\cdots-u_{b-1}(t).

Differentiating the equation b−bt=b−∑i=0bui(t)ib-bt=b-\sum_{i=0}^{b}u_i(t)i yields

−b=−∑i=0bui′(t)i=−λb′(t)∑i=0b−1ui(t)=−λb′(t)×(1−ub(t)),\begin{aligned} -b=-\sum_{i=0}^{b}u_i'(t)i \\ &=-\lambda_b'(t)\sum_{i=0}^{b-1}u_i(t) \\ &=-\lambda_b'(t)\times(1-u_b(t)), \end{aligned}

completing the proof of Theorem 2.

C Proofs from Section 3

Proposition 9. The inequalities log⁡(11−t)≤λb(t)≤blog⁡(11−t)\log\left(\frac{1}{1-t}\right)\leq\lambda_b(t)\leq b\log\left(\frac{1}{1-t}\right) are satisfied for all tt. Moreover λb(t)∼log⁡(11−t)\lambda_b(t)\sim\log\left(\frac{1}{1-t}\right) as t→1−t\to1^{-} and λb(t)∼blog⁡(11−t)\lambda_b(t)\sim b\log\left(\frac{1}{1-t}\right) as t→0+t\to0^{+}.

Proof. First, the inequality ub(t)≤tu_b(t)\leq t implies that λb′(t)=b1−ub(t)≤b1−t\lambda_b'(t)=\frac{b}{1-u_b(t)}\leq\frac{b}{1-t} and integrating we obtain λb(t)≤blog⁡(11−t)\lambda_b(t)\leq b\log\left(\frac{1}{1-t}\right) for all t∈[0,1)t\in[0,1).

Next, observe that p(λb(t))e−λb(t)=b−btp(\lambda_b(t))e^{-\lambda_b(t)}=b-bt for p(x):=∑i≤b(b−i)xii!p(x):=\sum_{i\leq b}(b-i)\frac{x^i}{i!}. Clearly, the coefficients of the polynomial p(x)p(x) being positive, we have p(0)≤p(x)p(0)\leq p(x) for every x≥0x\geq0. It follows that be−λb(t)≤b−btbe^{-\lambda_b(t)}\leq b-bt. Taking logarithms we obtain that log⁡(11−t)≤λb(t)\log\left(\frac{1}{1-t}\right)\leq\lambda_b(t) for all t∈[0,1)t\in[0,1).

Finally, we move on to the asymptotics as t→0+t\to0^{+} and t→1−t\to1^{-}. Observe that λb(t)≥1\lambda_b(t)\geq1 for t≥1−e−1t\geq1-e^{-1} due to the previous inequality. Then we can bound simply p(λb(t))≤b2(λb(t))b−1p(\lambda_b(t))\leq b^2(\lambda_b(t))^{b-1}. Taking logarithms we obtain log⁡b+log⁡(1−t)≤−λb(t)+2log⁡b+(b−1)log⁡λb(t)\log b+\log(1-t)\leq-\lambda_b(t)+2\log b+(b-1)\log\lambda_b(t). Using λb(t)≤blog⁡(11−t)\lambda_b(t)\leq b\log\left(\frac{1}{1-t}\right), we deduce

λb(t)≤log⁡(11−t)+(b−1)log⁡log⁡(11−t)+blog⁡b,\lambda_b(t)\leq\log\left(\frac{1}{1-t}\right)+(b-1)\log\log\left(\frac{1}{1-t}\right)+b\log b,

for t≥1−e−1t\geq1-e^{-1}. Along with log⁡(11−t)≤λb(t)\log\left(\frac{1}{1-t}\right)\leq\lambda_b(t), this proves the asymptotic as t→1−t\to1^{-}.

On the other hand λb′(t)≥b\lambda_b'(t)\geq b and so λb(t)≥bt\lambda_b(t)\geq bt. Since bt∼blog⁡(11−t)bt\sim b\log\left(\frac{1}{1-t}\right) as t→0+t\to0^{+}, the other equivalent for t→0+t\to0^{+} follows because we have seen that λb(t)≤blog⁡(11−t)\lambda_b(t)\leq b\log\left(\frac{1}{1-t}\right) holds.

Proposition 10. The function λb(t)\lambda_b(t) satisfies λb′(t)=b/Q(b,λb(t))\lambda_b'(t)=b/Q(b,\lambda_b(t)), while ub(t)=P(b,λb(t))u_b(t)=P(b,\lambda_b(t)).

Proof. Note that 1−ub(t)=∑i=0b−1ui(t)=∑i=0b−1λb(t)ii!e−λb(t)=Q(b,λb(t))1-u_b(t)=\sum_{i=0}^{b-1}u_i(t)=\sum_{i=0}^{b-1}\frac{\lambda_b(t)^i}{i!}e^{-\lambda_b(t)}=Q(b,\lambda_b(t)), the last equality being a classical relation Q(b,ω)=Pr⁡(Poiss⁡(ω)<b)Q(b,\omega)=\Pr(\operatorname{Poiss}(\omega)<b) for b=1,2,…b=1,2,\ldots where Poiss⁡(ω)\operatorname{Poiss}(\omega) denotes a Poisson random variable of parameter ω\omega. The rest follows from Lemma 4.

Proofs from Section 4

Proving the formula

We will need the following lemma to prove the formula for vj(t)v_j(t).

Lemma 20. Let F(x,y)F(x,y), F:[0,∞)×[0,∞)→RF:[0,\infty)\times[0,\infty)\to\mathbb{R}, be continuous on (x,y)(x,y), and y↦F(x,y)y\mapsto F(x,y) continuously differentiable on yy for almost every xx, then

ddy(y↦∫0yF(x,y) dx)=F(y,y)+∫0y∂∂yF(x,y) dx.\frac{d}{dy}\left(y\mapsto\int_0^y F(x,y)\,\mathrm{d}x\right)=F(y,y)+\int_0^y\frac{\partial}{\partial y}F(x,y)\,\mathrm{d}x.

In particular, for any integers b,d,s≥1b,d,s\ge1,

ddy(∫0yxb−1(e−x/d−e−y/d)sdx)=sde−y/d∫0yxb−1(e−x/d−e−y/d)s−1dx.\frac{d}{dy}\left(\int_0^y x^{b-1}\left(e^{-x/d}-e^{-y/d}\right)^s\mathrm{d}x\right)=\frac{s}{d}e^{-y/d}\int_0^y x^{b-1}\left(e^{-x/d}-e^{-y/d}\right)^{s-1}\mathrm{d}x.

Proof. The proof is just a direct verification: we show that the primitives coincide, hence so do the functions. If we integrate the right-hand side from 00 to aa we obtain:

∫0aF(y,y) dy+∫0a(∫0y∂∂yF(x,y) dx)dy.\int_0^a F(y,y)\,\mathrm{d}y+\int_0^a\left(\int_0^y\frac{\partial}{\partial y}F(x,y)\,\mathrm{d}x\right)\mathrm{d}y.

Reversing the order of integration on the second term by Fubini’s Theorem (as the partial derivative ∂∂yF(x,y)\frac{\partial}{\partial y}F(x,y) is integrable on [0,a]×[0,y][0,a]\times[0,y]) we obtain

∫0aF(y,y) dy+∫0y(∫xa∂∂yF(x,y) dy)dx=∫0aF(y,y) dy+∫0a(F(x,a)−F(x,x))dx.\int_0^a F(y,y)\,\mathrm{d}y+\int_0^y\left(\int_x^a\frac{\partial}{\partial y}F(x,y)\,\mathrm{d}y\right)\mathrm{d}x=\int_0^a F(y,y)\,\mathrm{d}y+\int_0^a\left(F(x,a)-F(x,x)\right)\mathrm{d}x.

Thus we simplify

∫0aF(y,y) dy+∫0y(∫0a∂∂yF(x,y) dy)dx=∫0aF(y,y) dy+∫0aF(x,a) dx−∫0aF(x,x) dx,\int_0^a F(y,y)\,\mathrm{d}y+\int_0^y\left(\int_0^a\frac{\partial}{\partial y}F(x,y)\,\mathrm{d}y\right)\mathrm{d}x=\int_0^a F(y,y)\,\mathrm{d}y+\int_0^a F(x,a)\,\mathrm{d}x-\int_0^a F(x,x)\,\mathrm{d}x,

which is exactly a↦∫0aF(x,a) dxa\mapsto\int_0^a F(x,a)\,\mathrm{d}x. Thus the proof is complete.

Proof of the formula

We prove inductively that the result holds for all j≤dj\le d.

  • Base case (j=0j=0). Recall that v0v_0 can be defined by

    v0′(t)=bub−1(t)1−ub(t)−bv0(t)1−ub(t).v_0'(t)=b\frac{u_{b-1}(t)}{1-u_b(t)}-b\frac{v_0(t)}{1-u_b(t)}.

    Using the product rule and λb′(t)=b11−ub(t)\lambda_b'(t)=b\frac{1}{1-u_b(t)} (see Lemma 4) we obtain

(v0(t)eλb(t))′=ub−1(t)λb′(t)eλb(t)=λb(t)b−1(b−1)!λb′(t),\left(v_0(t)e^{\lambda_b(t)}\right)'=u_{b-1}(t)\lambda_b'(t)e^{\lambda_b(t)}=\frac{\lambda_b(t)^{b-1}}{(b-1)!}\lambda_b'(t),

where we have used that ub−1(t)=λb(t)b−1(b−1)!e−λb(t)u_{b-1}(t)=\frac{\lambda_b(t)^{b-1}}{(b-1)!}e^{-\lambda_b(t)}. Integrating, with the change of variables x=λb(t)x=\lambda_b(t), gives

v0(t)eλb(t)=∫0tλb(t)b−1(b−1)!λb′(t) dt=∫0λb(t)xb−1(b−1)! dx,v_0(t)e^{\lambda_b(t)}=\int_0^t\frac{\lambda_b(t)^{b-1}}{(b-1)!}\lambda_b'(t)\,\mathrm{d}t=\int_0^{\lambda_b(t)}\frac{x^{b-1}}{(b-1)!}\,\mathrm{d}x,

which proves the base case.

  • Inductive step: assume the result holds for all j′j', 0≤j′<j≤d0\le j'<j\le d. We prove that it holds for jj. Recall that

vj′(t)=b(1−j−1d)vj−1(t)1−ub(t)−b(1−jd)vs(t)1−ub(t).(8)v_j'(t)=b\left(1-\frac{j-1}{d}\right)\frac{v_{j-1}(t)}{1-u_b(t)}-b\left(1-\frac{j}{d}\right)\frac{v_s(t)}{1-u_b(t)}. \tag*{(8)}

which is also valid for j=dj=d, in which case the latter term is 00 due to the factor (1−jd)\left(1-\frac{j}{d}\right). Thus

(vj(t)e(1−jd)λb(t))′=b(1−j−1d)vj−1(t)1−ub(t)e(1−jd)λb(t)=(1−j−1d)λb′(t)e(1−jd)λb(t)vj−1(t).\left(v_j(t)e^{\left(1-\frac{j}{d}\right)\lambda_b(t)}\right)'=b\left(1-\frac{j-1}{d}\right)\frac{v_{j-1}(t)}{1-u_b(t)}e^{\left(1-\frac{j}{d}\right)\lambda_b(t)}=\left(1-\frac{j-1}{d}\right)\lambda_b'(t)e^{\left(1-\frac{j}{d}\right)\lambda_b(t)}v_{j-1}(t).

By the induction hypothesis vj−1(t)v_{j-1}(t) satisfies the proposed formula, thus

(vj(t)e(1−jd)λb(t))′=(1−j−1d)λb′(t)e(1−jd)λb(t)⋅(dj−1)e−(d−(j−1))λb(t)/d∫0λb(t)xb−1(b−1)!(e−x/d−e−λb(t)/d)j−1dx,=(d−j+1d)(dj−1)e−1dλb(t)λb′(t)×∫0λb(t)xb−1(b−1)!(e−x/d−e−λb(t)/d)j−1dx.\begin{aligned} \left(v_j(t)e^{\left(1-\frac{j}{d}\right)\lambda_b(t)}\right)'=\left(1-\frac{j-1}{d}\right)\lambda_b'(t)e^{\left(1-\frac{j}{d}\right)\lambda_b(t)}\cdot\binom{d}{j-1}e^{-\left(d-(j-1)\right)\lambda_b(t)/d}\int_0^{\lambda_b(t)}\frac{x^{b-1}}{(b-1)!}\left(e^{-x/d}-e^{-\lambda_b(t)/d}\right)^{j-1}dx, \\ &=\left(\frac{d-j+1}{d}\right)\binom{d}{j-1}e^{-\frac{1}{d}\lambda_b(t)}\lambda_b'(t)\times\int_0^{\lambda_b(t)}\frac{x^{b-1}}{(b-1)!}\left(e^{-x/d}-e^{-\lambda_b(t)/d}\right)^{j-1}dx. \end{aligned}

Integrating we find

vj(t)e(1−jd)λb(t)=(d−j+1d)(dj−1)∫0t(e−1dλb(t)λb′(t)×∫0λb(t)xb−1(b−1)!(e−x/d−e−λb(t)/d)j−1dx)dt.v_j(t)e^{\left(1-\frac{j}{d}\right)\lambda_b(t)}=\left(\frac{d-j+1}{d}\right)\binom{d}{j-1}\int_0^t\left(e^{-\frac{1}{d}\lambda_b(t)}\lambda_b'(t)\times\int_0^{\lambda_b(t)}\frac{x^{b-1}}{(b-1)!}\left(e^{-x/d}-e^{-\lambda_b(t)/d}\right)^{j-1}dx\right)dt.

And changing variables y=λb(t)y=\lambda_b(t) on the outer integral,

vj(t)e(1−jd)λb(t)=(d−j+1d)(dj−1)∫0λb(t)(e−y/d∫0yxb−1(b−1)!(e−x/d−e−y/d)j−1dx)dy.v_j(t)e^{\left(1-\frac{j}{d}\right)\lambda_b(t)}=\left(\frac{d-j+1}{d}\right)\binom{d}{j-1}\int_0^{\lambda_b(t)}\left(e^{-y/d}\int_0^y\frac{x^{b-1}}{(b-1)!}\left(e^{-x/d}-e^{-y/d}\right)^{j-1}dx\right)dy.

Integrating the result in Lemma 20, we have the identity

∫0λb(t)(e−y/d∫0yxb−1(e−x/d−e−y/d)j−1dx)dy=dj∫0λb(t)xb−1(e−x/d−e−λb(t)/d)jdx.\int_0^{\lambda_b(t)}\left(e^{-y/d}\int_0^y x^{b-1}\left(e^{-x/d}-e^{-y/d}\right)^{j-1}dx\right)dy=\frac{d}{j}\int_0^{\lambda_b(t)}x^{b-1}\left(e^{-x/d}-e^{-\lambda_b(t)/d}\right)^jdx.

which completes the proof for all j≤dj\le d, since d−j+1ddj(dj−1)=(dj)\frac{d-j+1}{d}\frac{d}{j}\binom{d}{j-1}=\binom{d}{j} for j>0j>0.

Remark 21. Equivalently, one could prove this in the time of “hops” and then retrieve the result by composing with λb(t)/b\lambda_b(t)/b.

Proof of Theorem 13

Theorem 13 (Unsuccessful search with overflow bits). The expected number of hops for a unsuccessful search in a table having kk elements and using dd overflow bits, with high probability and uniformly for t=kN∈[0,θ)t=\frac{k}{N}\in[0,\theta):

(1−Fb,d(λb(k/N)))−1+o(1),Fb,d(λ):=∫0λxb−1(b−1)!e−(1−1/d)x(e−x/d−e−λ/d)dx.\left(1-F_{b,d}(\lambda_b(k/N))\right)^{-1}+o(1),\qquad F_{b,d}(\lambda):=\int_0^\lambda\frac{x^{b-1}}{(b-1)!}e^{-(1-1/d)x}\left(e^{-x/d}-e^{-\lambda/d}\right)dx.

Moreover, Fb,d(λ)=P(b,λ)−(1−1/d)−be−λ/dP(b,λ⋅(1−1/d))F_{b,d}(\lambda)=P(b,\lambda)-(1-1/d)^{-b}e^{-\lambda/d}P(b,\lambda\cdot(1-1/d)), where PP is the regularized lower-incomplete Γ\Gamma-function defined in Section 3.

See Annex D.2 for the full proof.

Proof. We recall that the unsuccessful search, after kk insertions, is a geometric random variable with parameter P(k)=∑j=0dVj(k)njdP(k)=\sum_{j=0}^{d}\frac{V_j(k)}{n}\frac{j}{d}. Hence, the expected value is 11−P(k)\frac{1}{1-P(k)}. From Theorem 11 we deduce that P(k)=∑j=0dvj(t)jd+o(1)P(k)=\sum_{j=0}^{d}v_j(t)\frac{j}{d}+o(1) where t=k/Nt=k/N. Let p(t):=∑j=0dvj(t)jdp(t):=\sum_{j=0}^{d}v_j(t)\frac{j}{d}, then it follows that 11−P(k)=11−p(t)+o(1)\frac{1}{1-P(k)}=\frac{1}{1-p(t)}+o(1). This approximation is valid, because we have that P(k)≤Ub(k)/n≤θP(k)\le U_b(k)/n\le\theta and p(t)≤ub(t)≤θp(t)\le u_b(t)\le\theta when k≤θNk\le\theta N and t≤θt\le\theta, thus we are on the region where x↦11−xx\mapsto\frac{1}{1-x} has a bounded derivative. Let us now calculate p(t)p(t). As a consequence of Theorem 11 and the the Binomial Theorem, we obtain the following formula:

∑j=0dvj(t)zj=∫0λb(t)xb−1(b−1)!⋅(e−λb(t)/d+z⋅(e−x/d−e−λb(t)/d))d dx(9)\sum_{j=0}^{d} v_j(t)z^j = \int_{0}^{\lambda_b(t)} \frac{x^{b-1}}{(b-1)!} \cdot\left(e^{-\lambda_b(t)/d} + z \cdot\left(e^{-x/d} - e^{-\lambda_b(t)/d}\right)\right)^d \,\mathrm{d}x \tag*{(9)}

Differentiating in zz and letting z=1z=1 we obtain, after diving by dd

p(t)=∑j=0dvj(t)jd=∫0λb(t)xb−1(b−1)!e−(1−1/d)x(e−x/d−e−λb(t)/d) dx.p(t) = \sum_{j=0}^{d} v_j(t)\frac{j}{d} = \int_{0}^{\lambda_b(t)} \frac{x^{b-1}}{(b-1)!}e^{-(1-1/d)x}\left(e^{-x/d} - e^{-\lambda_b(t)/d}\right)\,\mathrm{d}x .

To deduce the given formula we expand

p(t)=∫0λb(t)xb−1(b−1)!e−x dx−e−λb(t)/d∫0λb(t)xb−1(b−1)!e−(1−1/d)x dx.p(t) = \int_{0}^{\lambda_b(t)} \frac{x^{b-1}}{(b-1)!}e^{-x}\,\mathrm{d}x - e^{-\lambda_b(t)/d}\int_{0}^{\lambda_b(t)} \frac{x^{b-1}}{(b-1)!}e^{-(1-1/d)x}\,\mathrm{d}x .

The first term is simply P(b,λb(t))P(b,\lambda_b(t)). For the second we set u=(1−1/d)xu=(1-1/d)x and we obtain

∫0λb(t)xb−1(b−1)!e−(1−1/d)x dx=(1−1/d)−bP(b,(1−1/d)λb(t)),\int_{0}^{\lambda_b(t)} \frac{x^{b-1}}{(b-1)!}e^{-(1-1/d)x}\,\mathrm{d}x = (1-1/d)^{-b}P\left(b,(1-1/d)\lambda_b(t)\right),

thus proving the formula.

References

  1. [1]Ole Amble and Donald E Knuth. Ordered hash tables. The Computer Journal, 17(2):135–142, 1974. doi:10.1093/comjnl/17.2.135.DOI
  2. [3]Michael A. Bender, William Kuszmaul, and Renfei Zhou. Tight bounds for classical open addressing. In 2024 IEEE 65th Annual Symposium on Foundations of Computer Science (FOCS), 2024. arXiv:2410.11280.
  3. [4]Robert M Corless, Gaston H Gonnet, David EG Hare, David J Jeffrey, and Donald E Knuth. On the lambert w function. Advances in Computational mathematics, 5(1):329–359, 1996.
  4. [5]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, Chicago, IL, USA, October 27-30, 2024, pages 594–605. IEEE, 2024.
  5. [6]Martín Farach-Colton, Andrew Krapivin, and William Kuszmaul. Greedy open addressing revisited: Beyond yao’s lower bound. In Aditya Bhaskara and Artur Czumaj, editors, Proceedings of the 58th Annual ACM Symposium on Theory of Computing, STOC 2026, Salt Lake City, UT, USA, June 22-26, 2026, pages 1116–1127. ACM, 2026.
  6. [7]Leo J. Guibas and Edme Szemerédi. The analysis of double hashing. Journal of Computer and System Sciences, 16(2):226–274, 1978. doi:10.1016/0022-0000(78)90046-6.DOI
  7. [8]Donald E Knuth. The art of computer programming: Sorting and searching, volume 3. Addison-Wesley Professional, 1998.
  8. [9]William Kuszmaul and Zoe Xi. Towards an analysis of quadratic probing. In 51st International Colloquium on Automata, Languages, and Programming (ICALP 2024), volume 297 of Leibniz International Proceedings in Informatics (LIPIcs), pages 103:1–103:19. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.ICALP.2024.103.DOI
  9. [10]Per-Åke Larson. Analysis of uniform hashing. Journal of the ACM (JACM), 30(4):805–819, 1983.DOI
  10. [11]George S. Lueker and Mariko Molodowitch. More analysis of double hashing. Combinatorica, 13(1):83–96, 1993. doi:10.1007/BF01202791.DOI
  11. [12]Conrado Martínez, Cyril Nicaud, and Pablo Rotondo. Mathematical models to analyze Lua hybrid tables. Theor. Comput. Sci., 1044, 2025.DOI
  12. [13]Paul M Martini and Walter A Burkhard. Double hashing with multiple passbits. International Journal of Foundations of Computer Science, 14(06):1165–1182, 2003.DOI
  13. [14]Patricio V. Poblete and Alfredo Viola. Analysis of robin hood and other hashing algorithms under the random probing model, with and without deletions. Comb. Probab. Comput., 28(4):600–617, 2019.DOI
  14. [15]N. M. Temme. A set of algorithms for the incomplete gamma functions. Probability in the Engineering and Informatical Sciences, 8(2):291–307, 1994. doi:10.1017/S0269964800003417.DOI
  15. [16]Lutz Warnke. On wormald’s differential equation method, 2019. To Appear in Combinatorics, Probability and Computing. URL: https://arxiv.org/abs/1905.08928, arXiv:1905.08928.
  16. [17]Nicholas C Wormald. Differential Equations for Random Processes and Random Graphs. The Annals of Applied Probability, 5(4):1217 – 1235, 1995. doi:10.1214/aap/1177004612.DOI
  17. [18]Nicholas C. Wormald. The differential equation method for random graph processes and greedy algorithms, 1999. URL: https://api.semanticscholar.org/CorpusID:17573365.

Paper details

vlnc:W_pjhtpe59
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents