- The paper demonstrates that stable linear probing can achieve worst-case expected O(x log x) insertion time for the first (1−1/x)n insertions, assuming fully random hashing and x = o(n/log² n).
- The layered algorithm routes keys between geometrically spaced table layers using occupancy-dependent probabilities that offset clustering costs while preserving element locations and pointer stability.
- The result improves on prior stable variants with O(x log³ x) bounds but leaves open whether stability can reach the optimal O(x) cost, adapt to unknown load factors, or support deletions.
Linear probing is among the oldest open-addressing schemes, valued for its data locality but hampered by primary clustering: at load factor $1 - 1/x$, both expected insertion and query times degrade to Θ(x2) rather than the intuitive Θ(x) [Knuth63; benderlinearprobing]. Classical remedies—sorting runs by hash value, tombstone planting, and periodic rebuilding—all require moving elements after placement, sacrificing the stability that makes hash tables attractive for concurrency and pointer maintenance. The paper under review asks whether a stable linear-probing-style table can avoid this quadratic blowup without any reordering of elements over time. The authors answer affirmatively up to a logarithmic factor: a simple non-greedy insertion strategy achieves worst-case expected O(xlogx) time for all of the first (1−1/x)n insertions, given the parameter x in advance.
The non-greedy insertion model
The setting is a circular table of n slots (assumed a power of two for simplicity) with a fully random hash function h. Insertions must use linear probing—examining positions h(u),h(u)+1,…modn—but are permitted to be non-greedy: an insertion may skip free slots to reserve them for future keys. Query cost is still measured by the standard probe sequence, so positive queries remain correct and cheap. The goal is worst-case expected O(xlogx) insertion time across Θ(x2)0 insertions into an initially empty table.
This positions the work within the broader literature on stable hash tables, where stability enables faster concurrent implementations and allows external pointers to elements to remain valid. In concurrent work, Zamir achieves a related guarantee via a non-greedy bidirectional variant of linear probing with worst-case expected time Θ(x2)1 [zamirlocality]; the present construction improves on this by remaining unidirectional and reducing the polylogarithmic overhead from Θ(x2)2 to Θ(x2)3.
The layered insertion algorithm
The algorithm partitions the table into geometrically spaced layers: layer Θ(x2)4 consists of one slot every Θ(x2)5 positions and has size Θ(x2)6. Insertions proceed in phases. During phase Θ(x2)7, layer Θ(x2)8 is the active layer and Θ(x2)9 is the overflow layer. A key arriving during phase Θ(x)0 is routed to Θ(x)1 with probability
Θ(x)2
where Θ(x)3 is the current empty fraction of Θ(x)4, Θ(x)5 is a sufficiently large constant, and Θ(x)6. With the remaining probability the key goes to Θ(x)7. Within whichever layer it is assigned, the key is placed by ordinary greedy linear probing restricted to that layer. Phase Θ(x)8 ends when Θ(x)9 falls to the threshold O(xlogx)0, at which point phase O(xlogx)1 begins. If the active layer condition fails for all layers, the phase index simply advances.
The design intuition is a load-balancing argument. Late in phase O(xlogx)2, when O(xlogx)3 is small, an insertion routed to O(xlogx)4 costs O(xlogx)5 probes in expectation (the O(xlogx)6 clustering penalty scaled by layer spacing). But the routing probability O(xlogx)7 exactly cancels this penalty: the contribution O(xlogx)8 is constant in O(xlogx)9. Meanwhile, if the overflow layer stays at most half full—a property enforced by choosing (1−1/x)n0 large—insertions routed there cost only (1−1/x)n1, which is also (1−1/x)n2 since phases only run while (1−1/x)n3.
Correctness and capacity analysis
A first concern is whether the phased structure actually supports global load factor (1−1/x)n4: the algorithm terminates once (1−1/x)n5, and one must verify that this occurs only after enough insertions have been absorbed. Summing the residual capacity (1−1/x)n6 over all layers yields at most (1−1/x)n7, which is bounded by (1−1/x)n8 given the definition of (1−1/x)n9 with a large constant x0. Hence the table reaches load factor x1 before all phases complete. This capacity guarantee holds deterministically by construction, independent of randomness in routing.
Overflow control and the main theorem
The subtle correctness issue is overflow-layer congestion: if too many keys are diverted to x2 during phase x3, insertions there cease to be cheap. The paper proves an overflow-count bound: for every phase x4, provided x5 is large enough,
x6
where x7 counts keys routed to x8 during phase x9. The proof observes that between consecutive insertions into n0, the number of overflows is geometric with success probability n1 depending only on the remaining empty count n2. Summing n3 over the phase gives n4 (using n5), and a Chernoff-style argument over the sum of independent geometric variables—with the mgf bound n6 for n7—yields the exponential tail. Since n8, the exponent n9.
Under the assumption h0, this failure probability is at most h1 per phase, so no "critical failure" occurs across all phases with probability h2; in the rare failure case, the affected insertion can be completed in h3 time via trivial greedy insertion, contributing negligibly to expectation.
Combining these pieces gives the main result: each of the first h4 insertions completes in worst-case expected time h5, assuming h6. The cost analysis splits on the routing coin: the active-layer branch contributes h7 because h8 scales as h9, and the overflow branch contributes h(u),h(u)+1,…modn0 because critical failures keep h(u),h(u)+1,…modn1 at most half full. Notably, the guarantee is worst-case over insertion sequence position—no single early or late insertion incurs asymptotically worse expected cost than another.
Limitations and open questions
Several caveats qualify the result. First, the h(u),h(u)+1,…modn2 bound falls short of the h(u),h(u)+1,…modn3 achieved by unstable schemes with tombstones and rebuilding [benderlinearprobing], leaving open whether a stable linear-probing variant can close this logarithmic gap entirely. Second, the analysis requires knowledge of h(u),h(u)+1,…modn4 in advance, so the data structure does not adapt to unknown final load factors. Third, the theorem assumes fully random hashing and the regime h(u),h(u)+1,…modn5; behavior at very high load factors approaching h(u),h(u)+1,…modn6-scale gaps, or under realistic hash functions, is not addressed. Finally, deletions are not considered—the guarantee covers an insertion-only workload—and extending the approach to support deletions while preserving stability remains unresolved.
Conclusion
This note demonstrates that the classical h(u),h(u)+1,…modn7 clustering penalty of linear probing is not inherent to the probing discipline itself, but partly an artifact of greedy slot selection. By interleaving insertions across geometrically spaced layers with a carefully tuned, occupancy-dependent routing probability, a fully stable table attains worst-case expected h(u),h(u)+1,…modn8 insertions at load factor h(u),h(u)+1,…modn9. The result narrows the gap between stable and unstable open-addressed hash tables and sharpens the question of whether stability can be obtained at the optimal O(xlogx)0 expected cost.