sublinear algorithms
play

Sublinear Algorithms Lecture 26 Sofya Raskhodnikova Penn State - PowerPoint PPT Presentation

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


  1. Sublinear Algorithms Lecture 26 Sofya Raskhodnikova Penn State University Thanks to Madhav Jha (Penn State) for help with creating these slides. 1

  2. Testing Linearity

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

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

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

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

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

  8. Analysis Technique: Fourier Expansion

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

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

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

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

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

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

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

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

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

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

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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend