Pairwise-Independent Hash Discrepancy Bounds #
This module provides discrete probabilistic discrepancy bounds for pairwise-independent Boolean hash families:
- Exact second moment of signed sums under a pairwise-independent Boolean hash family
(
expect_sq_weighted_sign_sum), exact weighted discrepancy when a single weight is at least1 / 2(weighted_discrepancy_eq_of_ge_half), uniform discrepancy bound≤ |S| / 2for|S| ≥ 2(uniform_discrepancy_le_half), and the sharp three-case weighted discrepancy bound≤ 2 / 3whenever every probability weight is at most2 / 3(weighted_discrepancy_le_two_thirds).
Main results #
Cslib.Probability.expect_sq_weighted_sign_sum: exact second moment𝔼_i[(∑ a, w a * BitString.signVal (H i a))²] = ∑ a, (w a)².Cslib.Probability.weighted_discrepancy_eq_of_ge_half: exact weighted discrepancy= w a₁whenever1 / 2 ≤ w a₁.Cslib.Probability.uniform_discrepancy_le_half: uniform pairwise-independent discrepancy bound≤ |S| / 2for|S| ≥ 2.Cslib.Probability.weighted_discrepancy_le_two_thirds: sharp weighted discrepancy bound≤ 2 / 3when every weight is at most2 / 3.
1. Pairwise-Independent Hash Discrepancy (Uniform ≤ t/2 and Weighted ≤ 2/3) #
Cardinality of seeds hitting a given bit is |ι| / 2 for a pairwise-independent hash family.
Cardinality of seeds hitting (b₁, b₂) on distinct (a₁, a₂) is |ι| / 4.
Exact second moment of a weighted pairwise-independent sign sum:
𝔼_i[(∑ a, w a * BitString.signVal (H i a))²] = ∑ a, (w a)².
Exact pairwise-independent discrepancy when a single weight satisfies w a₁ ≥ 1 / 2:
𝔼_i[|∑ a, w a * BitString.signVal (H i a)|] = w a₁.
Uniform pairwise-independent discrepancy bound: for any subset S : Finset α with
2 ≤ S.card and any pairwise-independent Boolean hash family H,
𝔼_i[|∑_{a ∈ S} BitString.signVal (H i a)|] ≤ |S| / 2.
Sharp weighted pairwise-independent discrepancy bound: for any probability weights
w : α → ℝ (0 ≤ w a, ∑ w = 1, ∀ a, w a ≤ 2 / 3) and any pairwise-independent Boolean
hash family H : ι → α → Bool, 𝔼_i[|∑ a, w a * BitString.signVal (H i a)|] ≤ 2 / 3.