10/6/2020
Sublinear Algorithms
LECTURE 10
Last time
- Multipurpose sketches
- Count-min and count-sketch
- Range queries, heavy hitters, quantiles
Today
- Limitations of streaming algorithms
- Communication complexity
Sofya Raskhodnikova;Boston University
L ECTURE 10 Last time Multipurpose sketches Count-min and - - PowerPoint PPT Presentation
Sublinear Algorithms L ECTURE 10 Last time Multipurpose sketches Count-min and count-sketch Range queries, heavy hitters, quantiles Today Limitations of streaming algorithms Communication complexity 10/6/2020 Sofya
10/6/2020
Sofya Raskhodnikova;Boston University
Input: a stream ๐1, ๐2, โฆ , ๐๐ โ ๐ ๐
1, โฆ , ๐ ๐),
where ๐
๐ is the number of times ๐ appears in the stream
๐ =
๐
๐ ๐ = ฯ๐=1 ๐
๐
๐ ๐
๐บ0 is the number of nonzero entries of ๐ (# of distinct elements) ๐บ
1 = ๐ (# of elements in the stream)
๐บ2 = ๐
2 2 is a measure of non-uniformity
used e.g. for anomaly detection in network analysis ๐บ
โ = max ๐
๐
๐ is the most frequent element
0, ๐บ 1, ๐บ 2.
3 to ๐บ โ?
2
4
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.
Partially based on slides by Eric Blais
5
๐ 2.
Compute ๐ธ๐ฝ๐๐พ๐ ๐, ๐ = แ๐๐ ๐ ๐๐๐ if ๐ โฉ ๐ = โ ๐๐๐๐๐ ๐
Bob Alice ๐ฝ๐๐๐ฃ๐ข: ๐ โ [๐], ๐ = ๐. Input: ๐ โ [๐], ๐ = ๐ 1101000101110101110101010110โฆ
6
Compute ๐ท ๐ฆ, ๐ง ๐1 Bob Alice ๐ฝ๐๐๐ฃ๐ข: ๐ฆ Input: ๐ง 1101000101110101110101010110โฆ ๐โ๐๐ ๐๐ ๐ ๐๐๐๐๐ ๐ก๐ข๐ ๐๐๐ Goal: minimize the number of bits Alice sends to Bob. One-way communication complexity of a function ๐ท, denoted ๐โ(๐ท), is the communication complexity of the best one-way protocol for computing C.
7
๐โ๐๐ ๐๐ ๐ ๐๐๐๐๐ ๐ก๐ข๐ ๐๐๐ Goal: minimize ๐1 + |๐2|.
Carol Alice ๐ฝ๐๐๐ฃ๐ข: ๐ฆ Input: ๐จ Input: ๐ง ๐1 ๐2 1101000101110101110101010110โฆ Bob Compute ๐ท ๐ฆ, ๐ง, ๐จ
8
An ๐ก-bit algorithm ๐ต for ๐ gives a 2๐ก-bit protocol for ๐ท
computes ๐ท(๐ฆ, ๐ง, ๐จ) ๐ฝ๐๐๐ฃ๐ข: ๐ฆ Input: ๐จ Input: ๐ง ๐1 ๐2 Let ๐ be a streaming problem.
๐ (๐ก1 โ ๐ก2 โ ๐ก3) suffices to compute ๐ท(๐ฆ, ๐ง, ๐จ) Compute ๐ท ๐ฆ, ๐ง, ๐จ ๐ก1 ๐ก2 ๐ก3
Based on Andrew McGregorโs slides: https://people.cs.umass.edu/~mcgregor/711S18/lowerbounds-1.pdf
9
An ๐ก-bit algorithm ๐ต for ๐ gives a 2๐ก-bit protocol for ๐ท
๐ ๐
๐ฝ๐๐๐ฃ๐ข: ๐ฆ Input: ๐จ Input: ๐ง ๐1 ๐2 Let ๐ be a streaming problem.
๐ (๐ก1 โ ๐ก2 โ ๐ก3) suffices to compute ๐ท(๐ฆ, ๐ง, ๐จ) Compute ๐ท ๐ฆ, ๐ง, ๐จ ๐ก1 ๐ก2 ๐ก3
Based on Andrew McGregorโs slides: https://people.cs.umass.edu/~mcgregor/711S18/lowerbounds-1.pdf
Proof: Reduction from Set Disjointness On input ๐ฆ, ๐ง โ 0,1 ๐, players generate ๐ก1 = {๐: ๐ฆ๐ = 1} and ๐ก2 = {๐: ๐ง๐ = 1}
โ = 1 if ๐ฆ, ๐ง represent disjoint sets, and ๐บ โ = 2, otherwise.
๐ก = ฮฉ ๐
11
Example: 0 0 1 1 0 0 (1 0 1 0 1 0) โ โฉ3,4; 1,3,5โช
by communication complexity of ๐๐๐ข ๐ธ๐๐ก๐๐๐๐๐ข๐๐๐ก๐ก Output โค 4/3
Based on Andrew McGregorโs slides: https://people.cs.umass.edu/~mcgregor/711S18/lowerbounds-1.pdf
Output โฅ 3/2
โ
13
14
Proof: Reduction from Index.
๐ก2 = ๐ โ ๐ copies of 0 and ๐ โ 1 copies of 2๐ + 2
๐ก = ฮฉ ๐
Example: 0 0 1 1 0 1 1 โ โฉ2,4,7,9,10,13,15โช Example: ๐ = 2 โ โฉ0,0,0,0,0,16โช
Based on Andrew McGregorโs slides: https://people.cs.umass.edu/~mcgregor/711S18/lowerbounds-1.pdf
by 1-way communication complexity of ๐ฝ๐๐๐๐ฆ
[Bar-Yossef, Jayram, Kumar, Sivakumar 04]
1 1 1 1 1 1 1 1
๐ธ๐ฝ๐๐พ ๐ ๐ = แ0 if there is a column of 1s 1
๐ ๐
16
1 4 3 5 6
Example:
Based on Andrew McGregorโs slides: https://people.cs.umass.edu/~mcgregor/711S18/lowerbounds-1.pdf
Proof: Reduction from multi-party Set Disjointness
๐
๐
๐ ๐ โค ๐
1 ๐
๐ก = ฮฉ ๐ ๐2 = ฮฉ ๐ 4๐
2 ๐
= ฮฉ ๐1โ2
๐
17
Every algorithm that 2-approximaes ๐บ๐ (w.p. โฅ2/3) needs ฮฉ ๐1โ2
๐
space Thm.
1 4 3 5 6
Example: 1 1 1 1 1 1 1 1 โ โฉ3,4; 1,3,5; 3; 3,6โช
by communication complexity of ๐ธ๐ฝ๐๐พ(๐) for constant ๐
Based on Andrew McGregorโs slides: https://people.cs.umass.edu/~mcgregor/711S18/lowerbounds-1.pdf
differ.
even when |๐ฆ| and |๐ง| are known to both players
19
Based on Andrew McGregorโs slides: https://people.cs.umass.edu/~mcgregor/711S18/lowerbounds-1.pdf
Proof: Reduction from Gap Hamming On input ๐ฆ, ๐ง โ 0,1 ๐, players generate ๐ก1 = {๐: ๐ฆ๐ = 1} and ๐ก2 = {๐: ๐ง๐ = 1}
(1 + ๐)-approximation of ๐บ0 gives an additive approximation to Ham ๐ฆ, ๐ง ๐ โ ๐ฆ + ๐ง + ๐ผ๐๐ ๐ฆ, ๐ง 2 โค ๐๐ โค ๐
๐ก = ฮฉ ๐ = ฮฉ 1 ๐2
20
Thm. Example: 0 0 1 1 0 0 (1 0 1 0 1 0) โ โฉ3,4; 1,3,5โช
by communication complexity of ๐ป๐๐ ๐ผ๐๐๐๐๐๐ for ๐ โค 1/ ๐
Based on Andrew McGregorโs slides: https://people.cs.umass.edu/~mcgregor/711S18/lowerbounds-1.pdf
Every algorithm (1 + ๐)-approximing ๐บ0 (w.p. โฅ2/3) needs ฮฉ 1/๐2 space