Universal Hashing and Collision Expectations

Derive an expected chain size from pairwise collision probabilities and separate the hash seed from the chosen keys.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. A random family can bound collisions for fixed pairs
  2. Linearity of expectation handles the chain

A random family can bound collisions for fixed pairs

For two distinct \(d\)-bit keys, their XOR is a nonzero vector over \(\mathbb F_2\). Choose \(b\) independent, uniformly random binary row vectors and let the hash be their dot products with the key. A random row has dot product zero with that XOR with probability one-half. Therefore the two keys collide with probability \(2^{-b}\). The output can address a table with \(2^b\) buckets. A practical family can use a cheaper representation with a similar collision property.

Linearity of expectation handles the chain

For one stored key among \(n\), sum indicator variables for the other keys colliding with it. Their expected sum is \((n-1)/2^b\), without requiring simultaneous independence of all collisions. The guarantee fixes the keys before choosing the random seed. Changing what an adversary learns changes the analysis. Hash tables with open addressing need stronger control over probe patterns, while streaming sketches use pairwise collision bounds to estimate counts.[1]

References

  1. MIT OpenCourseWare, Design and Analysis of Algorithms: Lecture Notes ↩