View
1
Download
0
Category
Preview:
Citation preview
11/10/2020
Sublinear Algorithms
LECTURE 19Last timeβ’ Testing linearity of Boolean functions
[Blum Luby Rubinfeld]
Todayβ’ Testing linearity
β’ Tolerant testing and distance approximation
Sofya Raskhodnikova; Boston University
Thanks to Madhav Jha (Penn State) for help with creating these slides.
Testing If a Boolean Function Is Linear
2
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)?
Today: can answer in π1
πtime
Linearity Test [Blum Luby Rubinfeld 90]
3
1. Pick π and π independently and uniformly at random from 0,1 π.
2. Set π = π + π and query πon π, π, and π. Accept iff π π = π π + π π .
Analysis
If πis linear, BLR always accepts.
If π is π-far from linear then > π fraction of pairs π and π fail BLR test.
β’ Then, by Witness Lemma (Lecture 1), 2/π iterations suffice.
BLR Test (Ξ΅, query access to π)
Correctness Theorem [Bellare Coppersmith Hastad Kiwi Sudan 95]
Representing Functions as Vectors
Stack the 2π values of π(π) and treat it as a vector in {0,1}2π
.
π =
01101β β β 100
π(0000)π(0001)π(0010)π(0011)π(0100)
β β β
π(1101)π(1110)π(1111)
5
Linear functions
There are 2π linear functions: one for each subset π β [π].
πβ =
00000β β β 000
, π 1 =
01010β β β 101
, β―β―, π π =
01101β β β 100
6
Parity on the positions indexed by set π is ππ π₯1, β¦ , π₯π =
πβS
π₯π
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 ππ π = Οπβπ π₯π.
7
Benefits of New Notation
π, π =1
2πdot product of π and π as vectors
= avgπβ β1,1 π
π π π π = πΌπβ β1,1 π
[ π π π π ].
π, π = 1 β 2 β (fraction of disagreements between π and π)
8
Inner product of functions π, π βΆ β1, 1 π β {β1, 1}
The functions ππ πβ π form an orthonormal basis for β2π.Claim.
Idea: Work in the basis ππ πβ π , so it is easy to see how close a specific
function π is to each of the linear functions.
Every function π βΆ β1, 1 π β β is uniquely expressible as a linear combination (over β) of the 2π linear functions:
where απ π = π, ππ is the Fourier Coefficient of π on set π.
Fourier Expansion Theorem
9
Fourier Expansion Theorem
π =
πβ π
απ π ππ,
Parseval Equality
10
Parseval Equality for Boolean Functions
Let π: β1, 1 π β β1, 1 . Then
π, π =
πβ π
απ π 2 = 1
Vector product notation: π β π = (π₯1π¦1, π₯2π¦2, β¦ , π₯ππ¦π)
Proof: Indicator variable ππ΅πΏπ = α1 if BLR accepts0 otherwise
ππ΅πΏπ =1
2+
1
2π π π π π π .
Prπ,πβ β1,1 π
BLR π accepts = πΌπ±,π²β β1,1 π
ππ΅πΏπ =1
2+1
2πΌ
π±,π²β β1,1 ππ π π π π π
BLR Test in {-1,1} Notation
11
BLR Test (f, Ξ΅)
1. Pick π and π independently and uniformly at random from β1,1 π.
2. Set π = π β π and query π on π, π, and π. Accept iff π π π π π π = 1.
Prπ±,π²β β1,1 π
BLR π accepts =1
2+1
2
πβ[π]
απ π 3Sum-Of-Cubes Lemma.
By linearity of expectation
So far: Prπ±,π²β β1,1 π
BLR π accepts =1
2+
1
2E
π±,π²β β1,1 ππ π π π π π
Next:
Proof of Sum-Of-Cubes Lemma
12
=
π,π,πβ[π]
απ π απ π απ π πΌπ±,π²β β1,1 π
[ππ(π)ππ(π)ππ(π)]
= πΌπ±,π²β β1,1 π
π,π,πβ[π]
απ π απ π απ π ππ(π)ππ(π)ππ(π)
πΌπ±,π²β β1,1 π
π π π π π π
= πΌπ±,π²β β1,1 π
πβ[π]
απ π ππ(π)
πβ[π]
απ π ππ(π)
πβ[π]
απ π ππ(π)
By Fourier Expansion Theorem
Distributing out the product of sums
By linearity of expectation
Prπ±,π²β β1,1 π
BLR π accepts
β’ Let πΞπdenote symmetric difference of sets π and π
Proof of Sum-Of-Cubes Lemma (Continued)
13
a= πΌπ±,π²β β1,1 π
Οπβπ π₯πΟπβπ π¦πΟπβπ π₯ππ¦π
a= πΌπ±,π²β β1,1 π
ΟπβπΞπ π₯πΟπβπΞπ π¦π
a= πΌπ±β β1,1 π
ΟπβπΞπ π₯π β πΌπ²β β1,1 π
ΟπβπΞπ π¦π
a= ΟπβπΞπ πΌπ±β β1,1 π
[π₯π] β ΟπβπΞπ πΌπ²β β1,1 π
[π¦π]
a πΌπ±,π²β β1,1 π
[ππ(π)ππ(π)ππ(π)]
= α1 when πΞπ = β and πΞπ = β β π = π = π0 otherwise
a= πΌπ±,π²β β1,1 π
Οπβπ π₯πΟπβπ π¦πΟπβπ π§π
=1
2+1
2
π,π,πβ[π]
π π π π π π πΌπ±,π²β β1,1 π
[ππ(π)ππ(π)ππ(π)]
Since π₯π2 = π¦π
2 = 1
Since π± and π² are independent
Since π³ = π± β π²
Since π± and π²β²s coordinatesare independent
a= ΟπβπΞπ πΌπ₯πβ{β1,1}
[π₯π] β ΟπβπΞπ πΌπ¦πβ{β1,1}
[π¦π]
πΌπ±,π²β β1,1 π
[ππ(π)ππ(π)ππ(π)] is 1 if π = π = π and 0 otherwise.Claim.
Proof of Sum-Of-Cubes Lemma (Done)
14
=1
2+1
2
πβ[π]
απ π 3
Prπ±,π²β β1,1 π
BLR π accepts =1
2+1
2
πβ[π]
απ π 3Sum-Of-Cubes Lemma.
Prπ±,π²β β1,1 π
BLR π accepts =1
2+1
2
π,π,πβ[π]
π π π π π π Eπ±,π²β β1,1 π
[ππ(π)ππ(π)ππ(π)]
Proof of Correctness Theorem
Proof: Suppose to the contrary that
β’ Then maxπβ π
απ π > 1 β 2π. That is, απ π > 1 β 2π for some π β π .
β’ But απ π = π, ππ = 1 β 2 β (fraction of disagreements between π and ππ)
β’ π disagrees with a linear function ππ on < π fraction of values.
15
By Sum-Of-Cubes Lemma
Since απ π 2 β₯ 0
Parseval Equality
Correctness Theorem (restated)
If π is Ξ΅-far from linear then Pr BLR π accepts β€ 1 β π.
=1
2+1
2
πβ[π]
απ π 3
β€1
2+1
2β max
πβ παπ π β
πβ π
απ π 2
=1
2+1
2β max
πβ παπ π
1 β π < Prπ±,π²β β1,1 π
BLR π accepts
⨳
Summary
BLR tests whether a function π: 0,1 π β {0,1} is
linear or π-far from linear
(β₯ π2π values need to be changed to make it linear)
in π1
πtime.
16
17
Tolerant Property Tester
Far from
YES
YES
Reject with probability 2/3
Donβt care
Accept with probability β₯ π/π
Tolerant Property Testing [Parnas Ron Rubinfeld]
Two objects are at distance π = they differ in an π fraction of places
Equivalent problem: approximating distance to the property with
additive error.
Property Tester
Close to YES
Far from
YES
YES
Reject with probability 2/3
Donβt care
Accept with probability β₯ π/π
π π1π2
Distance Approximation to Property π
Input: Parameter π β (0,1/2] and query access to an object ππππ π‘ π,π = min
πβππππ π‘ π, π
πππ π‘ π, π = fraction of representation on which π and π differ
Output: An estimate ΖΈπ such that w.p. β₯2
3
ΖΈπ β πππ π‘(π,π) β€ π
18
Approximating Distance to Monotonicity for 0/1 Sequences
19
Input: Parameter π β (0,1/2] and
a list of π zeros and ones (equivalently, π: π β {0,1})
Question: How far is this list to being sorted?
(Equivalently, how far is π from monotone?)
dist π,ππππ =distance from π to monotone
Dist π,ππππ = π β dist π,ππππ
Note: Dist π,ππππ = π β πΏπΌπ ,where LIS is the longest increasing subsequence
Output: An estimate ΖΈπ such that w.p. β₯2
3
ΖΈπ β dist π,ππππ β€ π
Today: can answer in π1
π2time [Berman Raskhodnikova Yaroslavtsev]
Distance to Monotonicity over POset Domains
β’ Let π be a function over a partially ordered domain π·.
β’ Violated pair:
β’ The violation graph πΊπ is a directed graph with vertex set π· whose edge set
is the set of pairs (π₯, π¦) violated by π.
β’ ππΆπ is a minimum vertex cover of πΊπ
β’ πππ is a maximum matching in πΊπ
20
Characterization of Dist π,Mono for π: π· β 0,1 [FLNRRS 02]Dist π,Mono = MMπ = |ππΆπ|
01
Distance to Monotonicity for 0/1 Sequences
β’ Let π: π β 0,1
β’ Great notation switch: ππ = β1 π(π) for π β [π]
β’ Cumulative sums: π 0 = 0 and π π = π πβ1 + ππ for π β [π]
β’ Final sum: π π = π π
β’ Maximum sum: ππ = maxπ=0π π π
Proof:
1. Construct a matching of that size
2. Construct a vertex cover of that size.
21
dist(π,ππππ) for π: [π] β 0,1 [Berman Raskhodnikova Yaroslavtsev]
Dist π,Mono =π β 2ππ + π π
2
Distance to Monotonicity for 0/1 Sequences
Proof: (1) Construct a matching that leaves 2ππ β π π nodes unmatched
22
Characterization dist(π,ππππ) for π: [π] β 0,1
Dist π,Mono =π β 2ππ + π π
2
Recommended