Skip to main content
QUICK REVIEW

[Paper Review] Incremental Edge Orientation in Forests

Michael A. Bender, Bradley C. Kuszmaul|arXiv (Cornell University)|Jan 1, 2021
Caching and Content DeliveryComputer Science118 references2 citations
TL;DR

This paper introduces graveyard hashing, a novel linear probing variant that eliminates primary clustering by strategically using tombstones to create an anti-clustering effect. By carefully managing deletions via tombstones rather than immediate compaction, the authors show that insertions and deletions maintain expected amortized cost of Õ(x) even at load factors approaching 1−1/x, achieving optimal 1+o(1) block transfers in external memory when x=o(B).

ABSTRACT

First introduced in 1954, linear probing is one of the oldest data structures in computer science, and due to its unrivaled data locality, it continues to be one of the fastest hash tables in practice. It is widely believed and taught, however, that linear probing should never be used at high load factors; this is because primary-clustering effects cause insertions at load factor $1 - 1 /x$ to take expected time $Θ(x^2)$ (rather than the ideal $Θ(x)$). The dangers of primary clustering, first discovered by Knuth in 1963, have been taught to generations of computer scientists, and have influenced the design of some of many widely used hash tables. We show that primary clustering is not a foregone conclusion. We demonstrate that small design decisions in how deletions are implemented have dramatic effects on the asymptotic performance of insertions, so that, even if a hash table operates continuously at a load factor $1 - Θ(1/x)$, the expected amortized cost per operation is $ ilde{O}(x)$. This is because tombstones created by deletions actually cause an anti-clustering effect that combats primary clustering. We also present a new variant of linear probing (which we call graveyard hashing) that completely eliminates primary clustering on \emph{any} sequence of operations: if, when an operation is performed, the current load factor is $1 - 1/x$ for some $x$, then the expected cost of the operation is $O(x)$. One corollary is that, in the external-memory model with a data blocks of size $B$, graveyard hashing offers the following remarkable guarantee: at any load factor $1 - 1/x$ satisfying $x = o(B)$, graveyard hashing achieves $1 + o(1)$ expected block transfers per operation. Past external-memory hash tables have only been able to offer a $1 + o(1)$ guarantee when the block size $B$ is at least $Ω(x^2)$.

Motivation & Objective

  • To address the long-standing performance degradation of linear probing at high load factors due to primary clustering.
  • To investigate whether tombstone-based deletion strategies can fundamentally alter the asymptotic behavior of linear probing.
  • To design a hash table variant that preserves data locality while eliminating primary clustering.
  • To achieve optimal external-memory performance with 1+o(1) expected block transfers per operation at high load factors.

Proposed method

  • Introduces 'graveyard hashing'—a variant of linear probing that uses tombstones to create an anti-clustering effect.
  • Analyzes the interaction between tombstones and insertions, showing that tombstones can reduce clustering by breaking up long runs.
  • Uses probabilistic analysis to demonstrate that tombstones cause insertions to behave as if the table were less clustered than it appears.
  • Proves that with proper tombstone management, expected amortized cost per operation remains Õ(x) even at load factor 1−1/x.
  • Applies the technique to external memory, showing that with block size B, graveyard hashing achieves 1+o(1) expected block transfers per operation when x=o(B).
  • Leverages known results on 2-independent and simple tabulation hash functions to ensure compatibility with practical hash families.

Experimental results

Research questions

  • RQ1Can tombstone-based deletion strategies eliminate primary clustering in linear probing?
  • RQ2Does the presence of tombstones in a hash table lead to an anti-clustering effect that improves insertion performance?
  • RQ3Can linear probing maintain O(x) expected amortized cost at load factors approaching 1−1/x when deletions are handled via tombstones?
  • RQ4What is the external-memory performance of a linear probing variant that uses tombstones to prevent clustering?
  • RQ5Can the use of tombstones transform the asymptotic behavior of linear probing, even in workloads without deletions?

Key findings

  • Graveyard hashing achieves expected amortized cost of Õ(x) per insertion or deletion even at load factor 1−1/x.
  • Tombstones cause an anti-clustering effect that prevents the formation of long runs, countering primary clustering.
  • In the external-memory model, graveyard hashing achieves 1+o(1) expected block transfers per operation when x=o(B), a significant improvement over prior work requiring B=Ω(x²).
  • The performance guarantee holds even in workloads without deletions, due to the persistent anti-clustering effect of tombstones.
  • The technique is compatible with 2-independent and simple tabulation hash functions, enabling practical deployment.
  • The results show that tombstone management is not just an engineering choice but a critical algorithmic design decision that alters the asymptotic behavior of linear probing.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.