Sublinear Algorithms Lecture 26 Sofya Raskhodnikova Penn State University Thanks to Madhav Jha (Penn State) for help with creating these slides. 1
Testing Linearity
Linear Functions Over Finite Field πΎ 2 A Boolean function π: 0,1 π β {0,1} is linear if π π¦ 1 , β¦ , π¦ π = π 1 π¦ 1 + β― + π π π¦ π for some π 1 , β¦ , π π β {0,1} no free term β’ Work in finite field πΎ 2 β Other accepted notation for πΎ 2 : π»πΊ example 2 and β€ 2 β Addition and multiplication is mod 2 001001 β π = π¦ 1 , β¦ , π¦ π , π = π§ 1 , β¦ , π§ π , that is, π, π β 0,1 π + 011001 π + π = π¦ 1 + π§ 1 , β¦ , π¦ π + π§ π 010000 Based on Ryan OβDonellβs lecture notes : http://www.cs.cmu.edu/~odonnell/boolean-analysis/ 3
Testing if a Boolean function is Linear Input: Boolean function π: 0,1 π β {0,1} Question: Is the function linear or π -far from linear ( β₯ π2 π values need to be changed to make it linear)? 1 Today: can answer in π π time 4
Motivation β’ Linearity test is one of the most celebrated testing algorithms β A special case of many important property tests β Computations over finite fields are used in β’ Cryptography β’ Coding Theory β Originally designed for program checkers and self-correctors β Low-degree testing is needed in constructions of Probabilistically Checkable Proofs (PCPs) β’ Used for proving inapproximability β’ Main tool in the correctness proof: Fourier analysis of Boolean functions β Powerful and widely used technique in understanding the structure of Boolean functions 5
Equivalent Definitions of Linear Functions Definition. π is linear if π π¦ 1 , β¦ , π¦ π = π 1 π¦ 1 + β― + π π π¦ π for some π 1 , β¦ , π π β πΎ 2 β [π] is a shorthand for {1, β¦ π} π π¦ 1 , β¦ , π¦ π = π¦ π for some π β π . πβS Definition β² . π is linear if π π + π = π π + π(π) for all π, π β 0,1 π . Definition β Definition β² β’ π π + π = π + π π = π¦ π + π§ π = π π + π π . πβπ πβπ πβπ Definition β² β Definition β’ π π Let π½ π = π((0, β¦ , 0,1,0, β¦ , 0 )) Repeatedly apply Definition β² : π π¦ 1 , β¦ , π¦ π = π π¦ π π π = π¦ π π π π = π½ π π¦ π . Based on Ryan OβDonellβs lecture notes : http://www.cs.cmu.edu/~odonnell/boolean-analysis/ 6
Linearity Test [Blum Luby Rubinfeld 90] BLR Test (f, Ξ΅ ) Pick π and π independently and uniformly at random from 0,1 π . 1. Set π = π + π and query π on π, π, and π . Accept iff π π = π π + π π . 2. Analysis If π is linear, BLR always accepts. Correctness Theorem [Bellare Coppersmith Hastad Kiwi Sudan 95] If π is π -far from linear then > π fraction of pairs π and π fail BLR test. Then, by Witness Lemma (Lecture 1), 2/π iterations suffice. β’ 7
Analysis Technique: Fourier Expansion
Representing Functions as Vectors Stack the 2 π values of π(π) and treat it as a vector in {0,1} 2 π . 0 π(0000) 1 π(0001) 1 π(0010) 0 π(0011) 1 π(0100) β π = β β β β β π(1101) 1 π(1110) 0 π(1111) 0 9
Linear functions There are 2 π linear functions: one for each subset π β [π] . 0 0 0 0 1 1 0 0 1 0 1 0 0 0 1 β β β π β = , π 1 = , β― β― , π π = β β β β β β 0 1 1 0 0 0 0 1 0 Parity on the positions indexed by set π is π π π¦ 1 , β¦ , π¦ π = π¦ π πβS 10
Great Notational Switch Idea: Change notation, so that we work over reals instead of a finite field. Vectors in 0,1 2 π βΆ Vectors in β 2 π . β’ 0/False βΆ 1 1/True βΆ -1. β’ Addition (mod 2) βΆ Multiplication in β . β’ Boolean function: π βΆ β1, 1 π β {β1,1} . β’ Linear function π π βΆ β1, 1 π β {β1,1} is given by π π π = π¦ π β’ . πβπ 11
Benefit 1 of New Notation The dot product of π and π as vectors in β1,1 2 π : β’ (# π βs such that π π = π(π) ) β (# π βs such that π π β π(π) ) = 2 π β 2 β (# π βs such that π π β π(π) ) disagreements between π and π Inner product of functions π, π βΆ β1, 1 β {β1, 1} π, π = 1 2 π dot product of π and π as vectors = πβ β1,1 π π π π π avg = πβ β1,1 π [ π π π π ]. E π, π = 1 β 2 β (fraction of disagreements between π and π) 12
Benefit 2 of New Notation The functions π π πβ π form an orthonormal basis for β 2 π . Claim. β’ If π β π then π π and π π are orthogonal: π π , π π = 0 . β1 +1 β Let π be an element on which π and π differ β1 +1 (w.l.o.g. π β π β π ) +1 +1 β Pair up all π -bit strings: (π, π π ) π +π π +1 +1 where π π is π with the π th bit flipped. β β β Each such pair contributes ππ β ππ = 0 to π π , π π . β β β Since all π βs are paired up, π π , π π = 0 . β β β’ Recall that there are 2 π linear functions π π . π π βπ π +1 β1 β’ π π , π π = 1 β1 +1 β In fact, π, π = 1 for all π βΆ β1, 1 π β β1, 1 . β1 +1 π π π π β (The norm of π, denoted π , is π, π ) 13
Fourier Expansion Theorem Idea: Work in the basis π π πβ π , so it is easy to see how close a specific function π is to each of the linear functions. Fourier Expansion Theorem Every function π βΆ β1, 1 π β β is uniquely expressible as a linear combination (over β ) of the 2 π linear functions: π π π, π = π πβ π π = π, π π is the Fourier Coefficient of π on set π . where π Proof: π can be written uniquely as a linear combination of basis vectors: π = π π β π π πβ π π for all π . It remains to prove that π π = π π = π, π π = π π π β π π , π π = π π β π π , π π = π π πβ[π] πβ[π] π π , π π = 1 if π = π Linearity of β ,β Definition of Fourier 0 otherwise coefficients 14
Examples: Fourier Expansion π Fourier transform π π = 1 1 π π = π¦ π π¦ π 2 + 1 1 2 π¦ 1 + 1 2 π¦ 2 β 1 AND (π¦ 1 , π¦ 2 ) 2 π¦ 1 π¦ 2 1 2 π¦ 1 + 1 2 π¦ 2 + 1 2 π¦ 3 β 1 MAJORITY (π¦ 1 , π¦ 2 , π¦ 3 ) 2 π¦ 1 π¦ 2 π¦ 3 15
Parseval Equality Parseval Equality Let π: β1, 1 π β β . Then π 2 π, π = π πβ π Proof: By Fourier Expansion Theorem π π π π π π π, π = π , π πβ π πβ π By linearity of inner product π π π π , π π = π π π π By orthonormality of π π βs π 2 = π π 16
Parseval Equality Parseval Equality for Boolean Functions Let π: β1, 1 π β β1, 1 . Then π 2 π, π = π = 1 πβ π Proof: By definition of inner product πβ β1,1 π [π π 2 ] π, π = E Since π is Boolean = 1 17
BLR Test in {-1,1} notation BLR Test (f, Ξ΅ ) Pick π and π independently and uniformly at random from β1,1 π . 1. Set π = π β π and query π on π, π, and π . Accept iff π π π π π π = 1 . 2. Vector product notation: π β π = (π¦ 1 π§ 1 , π¦ 2 π§ 2 , β¦ , π¦ π π§ π ) π²,π³β β1,1 π BLR π accepts = 1 2 + 1 π 3 Pr 2 π Sum-Of-Cubes Lemma. πβ[π] Proof: Indicator variable π πΆππ = 1 if BLR accepts 1 1 β π πΆππ = 2 + 2 π π π π π π . 0 otherwise π²,π³β β1,1 π π πΆππ = 1 2 + 1 π,πβ β1,1 π BLR π accepts = Pr E 2 π²,π³β β1,1 π π π π π π π E By linearity of expectation 18
Proof of Sum-Of-Cubes Lemma 1 1 π²,π³β β1,1 π BLR π accepts = Pr 2 + π²,π³β β1,1 π π π π π π π E So far: 2 Next: π²,π³β β1,1 π π π π π π π E By Fourier Expansion Theorem π π π (π) π π π (π) π π π (π) = E π π π π²,π³β β1,1 π πβ[π] πβ[π] πβ[π] Distributing out the product of sums π π π π π π π (π)π π (π)π π (π) = E π π²,π³β β1,1 π π,π,πβ[π] By linearity of expectation π π π π π = π π²,π³β β1,1 π [π π (π)π π (π)π π (π) E ] π,π,πβ[π] 19
Recommend
More recommend