FreivaldsTrick

ClassS04CS141 | recent changes | Preferences

Showing revision 1

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

PROOF: Fix X. Let i be an index such that Xi\neq 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\cdot X, F(R)\cdot 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

Exercise: Generalize this to any finite field.


References:


ClassS04CS141 | recent changes | Preferences
This page is read-only | View other revisions | View current revision
Edited February 10, 2004 8:24 pm by NealYoung (diff)
Search: