Products of tug-of-war sums #
Let h i : X → Y be a hash family with seed i drawn uniformly, and ε : Y → ℝ a sign of mean
zero and square one. For two weight functions f g : X → ℝ on a finite set S, the tug-of-war
sums X = ∑ x ∈ S, f x ε (h i x) and Y = ∑ x ∈ S, g x ε (h i x) with shared signs form the
tug-of-war join signature of Alon, Gibbons, Matias and Szegedy [AlonGibbonsMatiasSzegedy1999,
Lemma 4.4]: their product XY estimates the inner product ∑ x ∈ S, f x g x, which for the
frequency vectors of two relations is their join size.
- under pairwise independence
𝔼 XY = ∑ f g(Cslib.Probability.IsKWiseIndependentHash.expect_sum_mul_sign_mul_sum_mul_sign); - under four-wise independence the variance is exactly
𝔼 (XY - ∑ f g)² = (∑ f²)(∑ g²) + (∑ f g)² - 2 ∑ f² g²(Cslib.Probability.IsKWiseIndependentHash.expect_sq_sum_mul_sign_mul_sum_mul_sign_sub), and so by the Cauchy–Schwarz inequality at most2 (∑ f²)(∑ g²)(Cslib.Probability.IsKWiseIndependentHash.expect_sq_sum_mul_sign_mul_sum_mul_sign_sub_le).
For f = g these are the moments of the tug-of-war estimator of F₂
(Cslib.Probability.IsKWiseIndependentHash.expect_sq_sum_mul_sign_sub_sq); both variances come from
the second moment of a sum over ordered pairs of signs
(Cslib.Probability.IsKWiseIndependentHash.expect_sq_sum_offDiag_mul_sign_mul_sign). The source
proves the bound 2 (∑ f²)(∑ g²) through the same exact expression, equation (3) of its proof.
Main results #
Cslib.Probability.IsKWiseIndependentHash.expect_sum_mul_sign_mul_sum_mul_sign: the product of two tug-of-war sums with shared signs is an unbiased estimate of the inner product.Cslib.Probability.IsKWiseIndependentHash.expect_sq_sum_mul_sign_mul_sum_mul_sign_sub,Cslib.Probability.IsKWiseIndependentHash.expect_sq_sum_mul_sign_mul_sum_mul_sign_sub_le: its variance.
References #
The tug-of-war join signature is unbiased [AlonGibbonsMatiasSzegedy1999, Lemma 4.4]: for a
pairwise independent family of signs of mean zero, the product of the tug-of-war sums of f and
g with shared signs has average ∑ x ∈ S, f x g x.
The variance of the tug-of-war join signature [AlonGibbonsMatiasSzegedy1999, Lemma 4.4,
equation (3)]: for a four-wise independent family of signs of mean zero, the product of the
tug-of-war sums of f and g with shared signs has
𝔼 (XY - ∑ f g)² = (∑ f²)(∑ g²) + (∑ f g)² - 2 ∑ f² g².
The variance bound for the tug-of-war join signature [AlonGibbonsMatiasSzegedy1999,
Lemma 4.4]: for a four-wise independent family of signs of mean zero,
𝔼 (XY - ∑ f g)² ≤ 2 (∑ f²)(∑ g²).