Documentation

CslibFrontier.Probability.KWiseIndependent.TugOfWarProduct

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.

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 #

References #

theorem Cslib.Probability.IsKWiseIndependentHash.expect_sum_mul_sign_mul_sum_mul_sign {ι : Type u_1} {X : Type u_2} {Y : Type u_3} [Fintype ι] [Fintype Y] [DecidableEq Y] {h : ι → X → Y} {ε : Y → ℝ} (hh : IsKWiseIndependentHash 2 h) (hε : ∀ (y : Y), ε y ^ 2 = 1) (hε₀ : (Finset.univ.expect fun (y : Y) => ε y) = 0) (S : Finset X) (f g : X → ℝ) :
(Finset.univ.expect fun (i : ι) => (∑ x ∈ S, f x * ε (h i x)) * ∑ x ∈ S, g x * ε (h i x)) = ∑ x ∈ S, f x * g x

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.

theorem Cslib.Probability.IsKWiseIndependentHash.expect_sq_sum_mul_sign_mul_sum_mul_sign_sub {ι : Type u_1} {X : Type u_2} {Y : Type u_3} [Fintype ι] [Fintype Y] [DecidableEq Y] {h : ι → X → Y} {ε : Y → ℝ} (hh : IsKWiseIndependentHash 4 h) (hε : ∀ (y : Y), ε y ^ 2 = 1) (hε₀ : (Finset.univ.expect fun (y : Y) => ε y) = 0) (S : Finset X) (f g : X → ℝ) :
(Finset.univ.expect fun (i : ι) => ((∑ x ∈ S, f x * ε (h i x)) * ∑ x ∈ S, g x * ε (h i x) - ∑ x ∈ S, f x * g x) ^ 2) = (∑ x ∈ S, f x ^ 2) * ∑ x ∈ S, g x ^ 2 + (∑ x ∈ S, f x * g x) ^ 2 - 2 * ∑ x ∈ S, f x ^ 2 * g x ^ 2

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².

theorem Cslib.Probability.IsKWiseIndependentHash.expect_sq_sum_mul_sign_mul_sum_mul_sign_sub_le {ι : Type u_1} {X : Type u_2} {Y : Type u_3} [Fintype ι] [Fintype Y] [DecidableEq Y] {h : ι → X → Y} {ε : Y → ℝ} (hh : IsKWiseIndependentHash 4 h) (hε : ∀ (y : Y), ε y ^ 2 = 1) (hε₀ : (Finset.univ.expect fun (y : Y) => ε y) = 0) (S : Finset X) (f g : X → ℝ) :
(Finset.univ.expect fun (i : ι) => ((∑ x ∈ S, f x * ε (h i x)) * ∑ x ∈ S, g x * ε (h i x) - ∑ x ∈ S, f x * g x) ^ 2) ≤ 2 * ((∑ x ∈ S, f x ^ 2) * ∑ x ∈ S, g x ^ 2)

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²).