Linear Probing with Non-Greedy Insertions
This paper proposes a non-greedy insertion strategy for linear probing hash tables, improving worst-case expected insertion time from Θ(x^2) to O(x log x).
Proposed a new non-greedy insertion strategy for linear probing hash tables.
Before reading this…
Applications
- →Data structures
- →Database systems
- →Computer science
To understand this paper, make sure you know these concepts first:
- Basic understanding of hash tables and data structures.find papers →
Abstract
More Like ThisLinear probing hash tables classically use a \emph{greedy} insertion strategy, placing a key $u$ in the first available position out of $h(u), h(u) + 1, h(u) + 2, \ldots$. If the hash table is filled to $1 - 1/x$ full, this results in $Θ(x^{2})$ worst-case expected insertion time. In this note, we show that there is a simple \emph{non-greedy} insertion strategy that does better, and without requiring elements to be reordered within the table over time. Given $x$ in advance, the strategy is able to bring the worst-case expected insertion time down to $O(x \log x)$.