1
Sublinear Algorithms
Lecture 6
Sofya Raskhodnikova
Penn State University
Thanks to Madhav Jha (Penn State) for help with creating these slides.
Sublinear Algorithms Lecture 6 Sofya Raskhodnikova Penn State - - PowerPoint PPT Presentation
Sublinear Algorithms Lecture 6 Sofya Raskhodnikova Penn State University Thanks to Madhav Jha (Penn State) for help with creating these slides. 1 Communication Complexity A Method for Proving Lower Bounds [Blais Brody Matulef 11 ] Use known
1
Thanks to Madhav Jha (Penn State) for help with creating these slides.
[Blais Brody Matulef 11]
Use known lower bounds for other models of computation
Partially based on slides by Eric Blais
3
Compute π· π¦, π§ 0100 11 001 β― 0011 Bob Alice π½πππ£π’: π¦ Input: π§ 1101000101110101110101010110β¦ πβππ ππ π πππππ π‘π’π πππ Goal: minimize the number of bits exchanged.
exchanged by the protocol.
communication complexity of the best protocol for computing C.
4
π 2.
Compute πΈπ½ππΎπ π, π = ππ π πππ if π β© π = β πππππ π otherwise Bob Alice π½πππ£π’: π β [π], π = π. Input: π β [π], π = π 1101000101110101110101010110β¦
6
β Other accepted notation for πΎ2: π»πΊ
2 and β€2
β Addition and multiplication is mod 2 β π= π¦1, β¦ , π¦π , π= π§1, β¦ , π§π , that is, π, π β 0,1 π π + π= π¦1 + π§1, β¦ , π¦π + π§π no free term
001001 011001 010000
+ example
7
πβS
πβπ
[π] is a shorthand for {1, β¦ π}
8
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)? Later in the course: Famous BLR (Blum Lubi Rubinfeld 90) test runs in π
1 π time
9
A function π βΆ 0,1 π β {0,1} is a π-parity if π π¦ = ππ π¦ = π¦π
πβπ
for some set π β π of size π = π.
10
Input: Boolean function π: 0,1 π β {0,1} and an integer π Question: Is the function a π-parity or π-far from a π-parity (β₯ π2π values need to be changed to make it a π-parity)? Time: O π log π [Chakraborty GarciaβSoriano Matsliah]
W min (π, π β π ) [Blais Brody Matulef 11]
(π, π β π )
β Let π be an element on which π and π differ (w.l.o.g. π β π β π) β Pair up all π-bit strings: (π, π π ) where π π is π with the πth bit flipped. β For each such pair, ππ(π) β ππ(π π ) but ππ(π) = ππ(π π ) So, ππ and ππ differ on exactly one of π, π π . β Since all πβs are paired up,
ππ and ππ differ on half of the values.
11
π π π
ππ(x) ππ(x)
1 1 π β β β 1 β π 1 1 π 1 β β β π 1 Two different linear functions disagree on half of the values. Fact. A πβ²-parity function, where πβ² β π, is Β½-far from any k-parity. Corollary.
β query complexity of T is π testing πβparity .
12
holds for CC of every protocol for πΈπ½ππΎπ [Hastad Wigderson 07]
13
Bob Alice π½πππ£π’: π β [π], π = π/2. Compute: π = ππ Input: π β [π], π = π/2 Compute: π = ππ 1101000101110101110101010110β¦ Output Tβs answer T
β = π + π (πππ 2) ππ π πππ/πππππ π
β π¦ ? π π¦ + π π¦ πππ 2
π(π¦) π(π¦)
Queries: Alice and Bob exchange 2 bits for every bit queried by π Correctness:
π if Sβ©T = β β€ π β 2 if Sβ©T β β β is πβparity if Sβ©T = β πβ²βparity where πβ² β π if Sβ©T β β Summary: π(testing π-parity) β₯ Ξ© π for π β€ π/2
14
1/2-far from every π-parity
16
[Jha Raskhodnikova]
(π has to change on many points to become Lipschitz)? β Edge π¦ β π§ is violated by π if π π¦ β π(π§) > 1.
Time:
β π(π2/π), logarithmic in the size of the input, 2π
β Ξ©(π)
1 1 2 1 2 1 2 2 2 2 Lipschitz
1 2-far from Lipschitz
17
Prove it.
β testing membership in 1*, sortedness of a list and monotonicity
β testing if a Boolean function is a π-parity
20
22
Tolerant Property Tester
πΊ-close to YES
π»-far from
YES
Reject with probability 2/3 Donβt care Accept with probability β₯ π/π
Randomized Algorithm
Accept with probability β₯ π/π Reject with probability 2/3
23
Input: Function π nearly satisfying some property π Requirement: Reconstruct function π to ensure that the reconstructed function π satisfies π, changing π only when necessary. For each input π¦, compute π(π¦) with a few queries to π. π π Input: A program π computing π correctly on most inputs. Requirement: Self-correct program π: for a given input π¦, compute π(π¦) by making a few calls to P. Input: A slightly corrupted codeword Requirement: Recover individual bits of the closest codeword with a constant number of queries per recovered bit. π
24
25
Motivation: internet traffic analysis Model the stream as π elements from [π], e.g., π¦1, π¦2, β¦ , π¦π = 3, 5, 3, 7, 5, 4, β¦ Goal: Compute a function of the stream, e.g., median, number of distinct elements, longest increasing sequence.
26
B L A - B L A - B L A - B L A - B L A - B L A - B L A -
(2) Limited working memory (3) Quickly produce output (1) Quickly process each element
Based on Andrew McGregorβs slides: http://www.cs.umass.edu/~mcgregor/slides/10-jhu1.pdf
A stream contains π β 1 distinct elements from π in arbitrary order. Problem: Find the missing element, using π(log π) space.
27
28
29