The hash mixing lemma #
Let h i : X → X be a pairwise independent family of functions of a finite set X to itself and
let A and B be subsets of X, of densities α and β. For a uniformly random seed i, the
density of {x ∈ A | h i x ∈ B} has mean α β, the density of A × B, and variance exactly
α β (1 - β) / |X| (IsPairwiseIndependentHash.expect_dens_filter_apply_mem_sub_sq). Hence its
mean absolute deviation from α β is at most √(α β / |X|)
(IsPairwiseIndependentHash.expect_abs_dens_filter_apply_mem_sub_le): a random member of the
family mixes every rectangle A × B up to an error that is small when |X| is large. This is the
hash mixing lemma of Nisan's generator for space-bounded computation [Nis92], in expectation
form. Its proof rescales the variance of the number of retained points
(IsPairwiseIndependentHash.expect_card_filter_apply_mem_sub_sq).
Main results #
Cslib.Probability.IsPairwiseIndependentHash.expect_dens_filter_apply_mem_sub_sq: the variance of the density of{x ∈ A | h i x ∈ B}.Cslib.Probability.IsPairwiseIndependentHash.expect_abs_dens_filter_apply_mem_sub_le: the hash mixing lemma.
References #
The variance of a hashed rectangle: for a pairwise independent family h i : X → X, the
density of {x ∈ A | h i x ∈ B} has variance α β (1 - β) / |X| about α β, where α and β
are the densities of A and B.
The hash mixing lemma [Nis92]: for a pairwise independent family h i : X → X and
sets A and B of densities α and β, the density of {x ∈ A | h i x ∈ B} differs from
α β on average by at most √(α β / |X|).