Lably
Skip to content

Primary clustering

  • 3 min read
  • 4 chapters

Related on Lably

Through Computer programming

Causes of primary clustering

Primary clustering has two causes:

  • Winner keeps winning: The longer that a run becomes, the more likely it is to accrue additional elements. This causes a positive feedback loop that contributes to the clustering effect. However, this alone would not cause the quadratic blowup.
  • Joining of runs: A single insertion may not only increase the length of the run that it is in by one, but may instead connect together two runs that were already relatively long. This is what causes the quadratic blowup in expected run length.

Another way to understand primary clustering is by examining the standard deviation on the number of items that hash to a given region within the hash table. Consider a sub-region of the hash table of size x2. The expected number of items that hash into the region is (1−1/x)x2=x2−x. On the other hand, the standard deviation on the number of such items is Θ(x). It follows that, with probability Ω(1), the number of items that hash into the region will exceed the size x2 of the region. Intuitively, this means that regions of size Θ(x2) will often overflow, while larger regions typically will not. This intuition is often used as the starting point for formal analyses of primary clustering.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication