FreivaldsTrick

Top | recent changes | Preferences

LEMMA: Let X be any vector (not all zeros) in Z2n. Let R be a random vector over Z2n. Then Pr[X.R = 0] ≤ 1/2

PROOF: Fix X. Let i be an index such that Xi≠ 0.

For each vector R, let F(R) denote R with the ith bit flipped. Pair each vector R to its "partner" F(R). Since F(F(R)) = R, the partner relation is symmetric.

Now, for each pair of partners, (R, F(R)), exactly one of the two values {R.X, F(R).X} is 0 and the other is 1. Thus, half the vectors in Z2n have dot-product 1 with X, the remaining vectors have dot-product 0 with X.

QED

Note X.R = i Xi Ri (mod 2).

Exercise: Generalize this to any finite field.


References:


Top | recent changes | Preferences
This page is read-only | View other revisions
Last edited February 10, 2004 8:27 pm by NealYoung (diff)
Search: