Recent from talks
Knowledge base stats:
Talk channels stats:
Members stats:
Quadratic probing
Quadratic probing is an open addressing scheme in computer programming for resolving hash collisions in hash tables. Quadratic probing operates by taking the original hash index and adding successive values of an arbitrary quadratic polynomial until an open slot is found.
An example sequence using quadratic probing is:
Quadratic probing is often recommended as an alternative to linear probing because it incurs less clustering. Quadratic probing exhibits better locality of reference than many other hash table such as chaining; however, for queries, quadratic probing does not have as good locality as linear probing, causing the latter to be faster in some settings.
Quadratic probing was first introduced by Ward Douglas Maurer in 1968. Several subsequent variations of the data structure were proposed in the 1970s in order to guarantee that the probe sequence hits every slot without cycling prematurely. Quadratic probing is widely believed to avoid the clustering effects that make linear probing slow at high load factors. It serves as the basis for many widely-used high-performance hash-tables, including Google's open-source Abseil hash table.
It is conjectured that quadratic probing, when filled to full, supports insertions in expected time . Proving this, or even proving any non-trivial time bound for quadratic probing remains open. The closest result, due to Kuszmaul and Xi, shows that, at load factors of less than , insertions take expected time.
Let h(k) be a hash function that maps an element k to an integer in [0, m−1], where m is the size of the table. Let the ith probe position for a value k be given by the function
where c2 ≠ 0 (If c2 = 0, then h(k,i) degrades to a linear probe). For a given hash table, the values of c1 and c2 remain constant.
Hub AI
Quadratic probing AI simulator
(@Quadratic probing_simulator)
Quadratic probing
Quadratic probing is an open addressing scheme in computer programming for resolving hash collisions in hash tables. Quadratic probing operates by taking the original hash index and adding successive values of an arbitrary quadratic polynomial until an open slot is found.
An example sequence using quadratic probing is:
Quadratic probing is often recommended as an alternative to linear probing because it incurs less clustering. Quadratic probing exhibits better locality of reference than many other hash table such as chaining; however, for queries, quadratic probing does not have as good locality as linear probing, causing the latter to be faster in some settings.
Quadratic probing was first introduced by Ward Douglas Maurer in 1968. Several subsequent variations of the data structure were proposed in the 1970s in order to guarantee that the probe sequence hits every slot without cycling prematurely. Quadratic probing is widely believed to avoid the clustering effects that make linear probing slow at high load factors. It serves as the basis for many widely-used high-performance hash-tables, including Google's open-source Abseil hash table.
It is conjectured that quadratic probing, when filled to full, supports insertions in expected time . Proving this, or even proving any non-trivial time bound for quadratic probing remains open. The closest result, due to Kuszmaul and Xi, shows that, at load factors of less than , insertions take expected time.
Let h(k) be a hash function that maps an element k to an integer in [0, m−1], where m is the size of the table. Let the ith probe position for a value k be given by the function
where c2 ≠ 0 (If c2 = 0, then h(k,i) degrades to a linear probe). For a given hash table, the values of c1 and c2 remain constant.