43
Circuit Circuit and and Communication Communication Complexity Complexity

Circuit and Communication Complexity. Karchmer – Wigderson Games Given The communication game G f : Alice getss.t. f(x)=1 Bob getss.t. f(y)=0 Goal: Find

Embed Size (px)

Citation preview

Circuit Circuit andand

Communication Complexity Communication Complexity

Karchmer – Wigderson Games

Given The communication game Gf :

:{0,1} {0,1}nf

•Alice gets s.t. f(x)=1

•Bob gets s.t. f(y)=0

Goal: Find i s.t.

{0,1}nx

{0,1}ny

i ix y

The deterministic communication complexity of a game G:

Depth(C): The longest path from input to output in a boolean circuit C

Depth(f): The minimal depth of a circuit that computes f

has a boolean circuit C that computes it.:{0,1} {0,1}nf

The minimal CC of a protocol for G.

CC of a protocol: the maximal number of bits (over all inputs) exchanged when running the protocol

Boolean circuits using AND,OR,NOT gates with fan-in=2

CC(Gf ) = Depth( f )Lemma 1:

Proof:

Alice and Bob can simply answer: i(No need to exchange bits) ( ) 0fCC G

C : circuit with minimal depth

that computes f

- by induction on Depth(C)( ) ( )fCC G Depth f

Base: Depth(C )=0 then f(z) is zi or zi for some i

f1, f2 : the functions computed by C1, C2

1 2( ), ( ) ( ) 1f fCC G CC G Depth C

By inductive hypothesis:

Induction step: look at C’s top gate

1 2C C C •

f1(x) = f2(x) = 1

f1(y) = 0 or f2(y) = 0

f(x)=1

f(y)=0

CC(Gf ) = Depth(f)

1 2( ), ( ) ( ) 1Depth C Depth C Depth C

f1(x) = f2(x) = 1 f1(y) = 0 or f2(y) = 0f(x)=1 f(y)=0

Protocol for Gf :

•Bob sends a value in {1,2} indicating whether f1(y) = 0 or f2(y) = 0

- If Bob sends 1, Alice and Bob know: f1(y) = 0 , f1(x) = 1

Bob and Alice can apply a protocol for1f

G

- If Bob sends 2, Alice and Bob know: f2(y) = 0 , f2(x) = 1

Bob and Alice can apply a protocol for2f

G

CC(Gf ) = Depth(f)

Either way, we get a protocol for Gf with one additional bit

1 2( ) 1 max{ ( ), ( )}

1 ( ( ) 1) ( )

f f fCC G CC G CC G

Depth C Depth f

1 2( ), ( ) ( ) 1f fCC G CC G Depth C

1 2C C C •

f1(x) = 1 or f2(x) = 1

f1(y) = f2(y) = 0

f(x)=1

f(y)=0

By the same idea, Alice sends a value in {1,2} indicating whether f1(x) = 1 or f2(x) = 1

CC(Gf ) = Depth(f)

CC(Gf ) = Depth(f)

We’ll define a more general communication game:

For any two disjoint sets: GA,B is:, {0,1}nA B

•Alice gets

•Bob gets

Goal: Find i s.t.

x A

y B

i ix y

Gf is the same as1 1(1), (0)f f

G

f -1(1)={x | f(x)=1}

f -1(0)={y | f(y)=0}

( ) ( )fDepth f CC G

CC(Gf ) = Depth(f)

Claim: if CC(GA,B )=d then there’s a function

:{0,1} {0,1}nf such that:

• f(x)=1 for every x A

• f(y)=0 for every y B

( )Depth f d•

f separates A from B

For 1 1(1), (0)f f fG G , such a function is f itself

Hence, ( ) ( )fDepth f CC G

We’ll prove the claim by induction on d =CC(GA,B )

We’ll prove the claim by induction on d =CC(GA,B )

CC(Gf ) = Depth(f)

Base: d=0

Bob and Alice don’t need to exchange bits

So there’s i such that for every and every , x A y B

i ix y

The functions f=zi or f= satisfy the claim requirements.For both, Depth(f )=0.

iz

Assume Alice sends the first bit.

Induction step:

We have a protocol P with CC(P)=d for GA,B

This bit partitions A into two disjoint sets 0 1A A A

All x in A for which the

first bit Alice sends is 0

All x in A for which the

first bit Alice sends is 1

If Alice sends 0, the rest of the protocol is a protocol for

0 ,A BG

If Alice sends 1, the rest of the protocol is a protocol for

1 ,A BG

For and we have protocols P1, P2 s.t.0 ,A BG

1 ,A BG

1 2( ), ( ) 1CC P CC P d

CC(Gf ) = Depth(f)

By the inductive hypothesis, we have f0 and f1 that satisfy:

• f0(x)=1 for every0x A

• f1(x)=1 for every1x A

• f0(y)= f1(y)=0 for every y B

• 0 1( ), ( ) 1Depth f Depth f d

We define 0 1f f f Then:

• 0 1( ) 1 max( ( ), ( ))}Depth f Depth f Depth f d

f satisfies the requirements.

• for every , we have 0 1( ) ( ) ( ) 1f x f x f x x A

• for every , we have 0 1( ) ( ) ( ) 0f y f y f y y B

CC(Gf ) = Depth(f)

CC(Gf ) = Depth(f)

Similarly, if Bob sends the first bit, B is partitioned intotwo disjoint sets

0 1B B B

The rest of the protocol is either for or (depending on the bit Bob sent)

0,A BG1,A BG

By the inductive hypothesis, we have g0 and g1 that satisfy:

• 0 1( ), ( ) 1Depth g Depth g d

• g0(y)=0 for every0y B

• g1(y)=0 for every1y B

• g0(x)= g1(x)=1 for every x A

We define 0 1g g g Then:

• 0 1( ) 1 max( ( ), ( ))}Depth g Depth g Depth g d

g satisfies the requirements.

• for every , we have 0 1( ) ( ) ( ) 1g x g x g x x A

• for every , we have 0 1( ) ( ) ( ) 0g y g y g y y B

CC(Gf ) = Depth(f)

We have seen:

( ) ( )fDepth f CC G ( ) ( )fCC G Depth f,

=>CC(Gf ) = Depth( f )

Example:

• Alice gets a graph x on n vertices that contains a clique of size n/2.

• Bob gets a graph y on n vertices that doesn’t contain a clique of size n/2

• Goal: Find an edge in x that doesn’t exist in y (or vice versa)

By lemma 1: the Communication Complexity of this game = the circuit depth of the (n/2)-Clique function.

By proving lower bounds on the CC of such games, It would be possible to find lower bounds for certain functions’ circuit depth.

Monotone Complexity

Monotone functions:

:{0,1} {0,1}nf is a monotone function if

for every , {0,1}nx y x y implies, ( ) ( )f x f y

x y iff i ix y For every i

This order (called Hamming partial order) can be thought of as the containment order between sets:

A vector {0,1}nx corresponds to the set { | 1}x iS i x

x y iff y xS S

:{0,1} {0,1}nf Let be a monotone function.

• A minterm of f is {0,1}nx s.t. f(x) = 1

and for every x’< x , f(x’) = 0

• A maxterm of f is {0,1}ny s.t. f(y) = 0

and for every y’> y , f(y’) = 1

Example:

(0,0,…,0,1), (0,1,0,…,0) are maxterms

1

1n

ii

x

0

1 otherwisef(x)=

:{0,1} {0,1}nf

(1,1,0,…,0), (1,0,…,0,1) are minterms

Monotone boolean circuit: A circuit which uses only AND and OR gates

Monotone circuits can’t compute all functions: it’s impossible to simulate

NOT by using AND and OR

Monotone circuits can compute all monotone functions.

For example, this can be done by taking the DNF of all 1’s in all minterms, or the CNF of all 0’s in all maxterms

is monotone iff it can be computed by a monotone circuit

:{0,1} {0,1}nf

For a monotone function :{0,1} {0,1}nf :

• Mon-Size(f ): the minimal size of a monotone circuit for f

• Mon-Depth(f ): the minimal depth of a monotone circuit for f

For a monotone function f,

( ) ( )Mon Size f Size f •

• ( ) ( )Mon Depth f Depth f

Several lower bounds were proved for the monotone size and the monotone depth of certain functions.

For the non-monotone case, there are no non-trivial lower bounds.

There is no lower bound better than linear for the circuit size of any explicit function, and no lower bound better than logarithmic for the circuit depth of any explicit function.

Monotone Karchmer – Wigderson Games

Given a monotone function The communication game Mf :

:{0,1} {0,1}nf

•Alice gets s.t. f(x)=1

•Bob gets s.t. f(y)=0

Goal: Find i s.t.

{0,1}nx

{0,1}ny

i ix y

That is: Find i s.t. xi=1 and yi=0

The goal is always achievable, otherwise, which means

y x( ) ( )f y f x

Lemma 2: for every monotone function :{0,1} {0,1}nf

CC(Mf) = Mon-Depth(f )

Proof: similar to the non-monotone case with the followingmodifications:

Base case: if Depth(f ) = 0, f(z) = zi. So xi=1, yi=0, and Alice and Bob always answer: i

Induction step: When dividing the circuit into two sub-circuits, each is monotone and has a suitable protocol.

Bob or Alice (depending on the top gate) send the first bit,and decide which of the two monotone games to solve.

• When constructing a protocol from a given circuit:

• When constructing a circuit from a given protocol:

Base case: if there is no communication, Alice and Bobboth know an i for which xi>yi, so the circuit is f(z)=zi

Induction step: Each communication bit splits the gameInto two sub-games of smaller CC.

Since the original game is monotone, so are the two sub-games.

The circuits for these games are monotone. Since we only add an AND or an OR gate, the entire circuitRemains monotone.

Example:

• Alice gets a graph x on n vertices that contains a clique of size n/2

• Bob gets a graph x on n vertices that doesn’t contain a clique of size n/2

• Goal: find an edge in x that doesn’t exist in y

By lemma 2: the Communication Complexity of this game = the monotone circuit depth of the (n/2)-Clique function.

A lower bound of was proved for the monotone depth of the (n/2)-Clique function

( )n

•Alice gets s.t. x is a minterm of f (so f(x)=1)

•Bob gets s.t. y is a maxterm of f (so f(y)=0)

Goal: Find i s.t.

{0,1}nx

{0,1}ny

i ix y

Monotone KW Game, fM

Given a monotone function The communication game :

:{0,1} {0,1}nf

fM

That is: Find i s.t. xi=1 and yi=0

is a restriction of to a subset of inputs.fM fM

Hence, any protocol for is also a protocol for fM fM

So: ( ) ( )f fCC M CC M

In fact, for every monotone :{0,1} {0,1}nf

( ) ( )f fCC M CC M

We have to prove ( ) ( )f fCC M CC M

( ) ( )f fCC M CC M :

Given a protocol for , we will construct a protocol for with the same communication complexity.

fM

fM

Alice gets x s.t. f(x)=1, and finds a minimal x’ s.t.

'x x And f(x’)=1 .

x’ is a minterm

This is done by successively changing 1’s to 0’s in x

In the same way, Bob finds a maxterm 'y y

Since 'x x and 'y y we have xi=1 and yi=0

Alice and bob run the protocol for on x’ and y’, and find i s.t. x’i = 1 and y’i = 0

fM

( ) ( )f fCC M CC M ( ) ( )f fCC M CC M

We get: for every monotone :{0,1} {0,1}nf

( ) ( )fMon Depth f CC M

Lower Bound for Matching

We will prove a lower bound of for the monotonedepth of the Matching function.

( )n

The function Match:

Let n=3k, and x a graph on n vertices.

Match(x) =1 x contains k independent edges

0 otherwise

The monotone KW game M0 for Match :

• Alice gets a graph x on n vertices that contains a k-matching

• Bob gets a graph y on n vertices that doesn’t contain a k-matching

• Goal: find an edge in x that doesn’t exist in y

By Lemma 2: 0( ) ( )CC M Mon Depth Match

To prove a lower bound for Mon-Depth(Match) it’s enough to prove a lower bound for CC(M0)

The game M1:

• Alice gets k independent edges x on n vertices (k-matching)

• Bob gets a set y of k-1 vertices

• Goal: find an edge in x that doesn’t touch any of the vertices in y

Claim:1 0( ) ( )CC M CC M

Proof: • Every k-matching is a minterm of Match

• Every set of k-1 vertices is a maxterm of Match, by considering all edges that touch y.

Every protocol for M0 can by applied on x,y to solve the game M1.

We get: 1( ) ( )CC M Mon Depth Match

To prove a lower bound for Mon-Depth(Match) it’s enough to prove a lower bound for CC(M1)

P- a protocol for M1.

We can assume that P outputs each possible answer with the same probability.

Alice and Bob can use a common random string to permute the vertices before applying P

The game M2:

• Alice gets a k-matching x

• Bob gets a set y of k vertices

• Goal: output 1 if there’s an edge in x that doesn’t touch any of the vertices, and 0 otherwise.

Claim: for any there exists a constant a s.t.0

2 1( ) ( )CC M a CC M

The minimal CC of a probabilistic protocol P for which:Pr[P answers right] 1

Proof:

Claim: for any there exists a constant a s.t.0 2 1( ) ( )CC M a CC M

Assume we have a deterministic protocol P1 for M1

We will construct a probabilistic protocol P2 for M2,with the same CC as P1

Bob has a set y of k vertices, and will randomly choose

v y and remove it.

Bob is left with a set y’ of k-1 vertices.

Alice and Bob can apply P1 for M1 on (x,y’) and get e x That doesn’t touch any of the vertices in y’.

• If the edge e doesn’t touch v then P2 outputs 1.

• If e touches v then P2 outputs 0.

Analysis:

If P2 outputs 1: e doesn’t touch v or any other vertex in y.

e doesn’t touch any vertex in y

P2 assumes all edges in x touch y

In this case, there is no mistake

If P2 outputs 0: there may be an edge e’ in x that doesn’ttouch any of the vertices in y, P1 outputs e that touches v.

Since the edges are independent, there’s at most oneedge e that touches v.

We are analyzing the case where there’s at least one edge e’ that doesn’t touch any of the vertices in y.

An error occurs if e was output instead of any e’.

e’

ve

yy’

The probability of that is at most 1/2

P1 outputs each answer with the same probability.If there are m answers, the probability is 1/m.

To reduce the error probability, we can repeat this protocol any number of times.

for any error prob. there exists a constant a s.t.0

2 1( ) ( )CC M a CC M

We have:2( ( )) ( )CC M Mon Depth Match

We’ll show: 2( ) ( )CC M n

The 3-Distinctness problem:

• Alice and Bob each get a string of n letters from {a,b,c}

• Goal: decide whether or not there’s i s.t. xi=yi.

The communication complexity of this problem is ( )n

To prove the lower bound for M2, We’ll show a reduction from the 3-distinctness problem.

?

Alice and Bob convert their input from the 3-distinctness Problem to the following graph:

For each coordinate construct an independent triangle with vertices labeled a,b,c.

Denote each edge by the same letter as the vertex it doesn’t touch

a

ab

b

c

c

•Alice interprets her n coordinates of x as the corresponding n edges in the n triangles.

Example: Alice’s input is {a,c,…,b}

•Bob interprets his n coordinates of y as the corresponding n vertices in the n triangles.

Example: Bob’s input is {b,b,…,a}

a a

ab

bc

c

1 2 nab

bc

ca

ab

bcc

a

ab

b

cc

1 2 n

a

ab

b

cc

a

ab

bc

c

We’ll call Alice’s set of edges x’,and Bob’s set of vertices y’

There’s an edge in x’ that doesn’t touch y’iff there’s a coordinate i such that xi=yi

In each triangle, vertex d doesn’t touch edge d

We’ve obtained a lower bound of for theProbabilistic communication complexity of M2

( )n

( ) ( )Mon Depth Match n

CC(3-Distinctness) is ( )n

In the disjointness problem:

• Alice gets {0,1}nx

• Bob gets {0,1}ny

• Goal: return 1 iff there’s i s.t. xi=yi=1

To get a 3-distinctness problem:

By reduction from the Disjointness problem, which has CC :( )n

• Alice turns each 0 to b and each 1 to a and gets x’

• Bob turns each 0 to c and each 1 to a and gets y’

There’s i for which xi=yi=1 iff there’s i for which x’i=y’i

!