10. Discrepancy

The last lecture ended with the challenge of finding a communication protocol for the inner product function with sublinear communication complexity. As it turns out, there is no such protocol. But how can we prove that? This and other similar lower bound questions is what we explore in the upcoming lectures.

Discrepancy and Communication Complexity

One good way to get some intuition for why the inner product function has large randomized communication complexity is to look at the matrix for this function:

Communication matrix of Inner Product

For a function to have low randomized communication complexity, the matrix should contain fairly large nearly monochromatic rectangles: rectangles for which almost all the entries have the same value. That’s because the leaves of a randomized communication protocol, if they have low error, correspond to nearly monochromatic rectangles. But even in this small example, we see that the structure of the matrix makes it impossible to find large rectangles which are close to monochromatic if we exclude the first row and the first column. The 4×4 matrices, for example, all contain at least 14 and at most a 34 fraction of 1s.

This intuition can indeed lead to formal lower bounds on the communication complexity of Boolean functions. We formalize it using the notion of discrepancy

As a first step, let us change the range of the Boolean functions that we consider so that they are {1,1}-valued. For example, we can redefine the inner product function to take the value

IPn(x,y)=(1)x,y.

With this change, the notion of balance or bias of a combinatorial rectangle can be expressed as an expectation. Specifically, let us fix a function f:{0,1}n×{0,1}n{1,1} and a distribution μ over the domain of f. The discrepancy of a rectangle R=A×B for some A,B{0,1}n with respect to f and μ is

discμ(f,R)=|E(x,y)μ[1R(x,y)f(x,y)]|,

where 1R is the indicator function for R that takes the value 1 on (x,y) if and only if (x,y)R or, equivalently, xA and yB.

The discrepancy of the function f with respect to μ is

discμ(f)=maxRdiscμ(f,R)

where the maximum is taken over all rectangles. Note that a function has large discrepancy if and only if it contains a large rectangle that is nearly monochromatic.

The discrepancy of a function can be used to give a lower bound on its randomized communication complexity.

Theorem 1. For any function f, distribution μ, and parameter ϵ>0,

Rϵ(f)log(12ϵdiscμ(f)).

Proof. Let π be a deterministic communication protocol that computes f with cost c and error at most ϵ with respect to μ. The leaves of the protocol tree for π partition the communication matrix for f into t2c rectangles R1,,Rt. Note that for any input (x,y),

π(x,y)f(x,y)={1if π(x,y)=f(x,y)1if π(x,y)f(x,y).

So the success guarantee on π implies that

12ϵEμ[π(x,y)f(x,y)].

We can expand the expression on the right and use linearity of expectation to obtain

Eμ[π(x,y)f(x,y)]=i=1tEμ[1Ri(x,y)π(x,y)f(x,y)]i=1t|Eμ[1Ri(x,y)f(x,y)]|

with the last inequality holding because π(x,y){1,1} takes the same value for all (x,y)Ri. But each term in the final sum is the discrepancy of a rectangle with respect to f and μ, so each of them is at most discμ(f). Combining everything, we then get

12ϵtdiscμ(f)2cdiscμ(f)

and rearranging gives the lower bound clog(12ϵdiscμ(f)) on the cost of π. The conclusion of the theorem then follows from the easy direction of Yao’s Minimax Principle.

Inner Product

We can use the last theorem to obtain a linear lower bound on the randomized query complexity of the inner product function. We do this by proving the following lower bound on the discrepancy of the inner product function with respect to the uniform distribution.

Lemma 2. Let μ denote the uniform distribution. Then discμ(IPn)2n/2.

Proof. Fix any rectangle R=A×B. We can write the square of the discrepancy of R with respect to IP and the uniform distribution as

discμ(IP)2=(E[1A(x)1B(y)(1)x,y])2=(Ex[1A(x)Ey[1B(y)(1)x,y]])2Ex[1A(x)2Ey[1B(y)(1)x,y]2]Ex[Ey[1B(y)(1)x,y]2].

The first upper bound above is by Jensen’s inequality and the second by the observation that 1A(x)21 and Ey[1B(y)(1)x,y]2 is non-negative. By expanding the square, the last expression equals

Ex,y,y[1B(y)1B(y)(1)x,y+x,y]Ey,y[|Ex[(1)x,y+y]|].

The key observation now is that

Ex[(1)x,y+y]={1when y+y=00otherwise.

And y+y=0 if and only if y=y. This occurs with probability 2n when y and y are drawn independently and uniformly at random. Therefore, combining the above inequalities we end up with

discμ(IPn)22n,

giving the desired conclusion.

Combining the lemma with the theorem from the last section, we obtain tight bounds on the randomized communication complexity of the inner product function.

Theorem 3. R(IPn)=Θ(n).

Set Disjointness

We can try bounding the discrepancy of the disjointness function against the uniform distribution as well, but a quick look at the matrix representation of this function shows why this is not a promising approach.

Communication matrix of Disjointness

There is a monochromatic rectangle that covers the bottom right corner of the matrix. And with larger values of n, the communication matrix always includes such a large monochromatic rectangle: for every pair of inputs x,y{0,1}n that satisfy |x|,|y|>n2 by the pigeonhole principle there must be some index i[n] for which xi=yi=1. So the discrepancy of this function with respect to the uniform distribution is constant and only gives a trivial lower bound on the communication complexity of the function.

But we can use the discrepancy method to obtain a non-trivial lower bound on the communication complexity of the disjointness function by considering a different distribution on the inputs. One natural candidate to consider is the 1n-biased product distribution on the inputs: we draw x1,,xn and y1,,yn independently at random with each of these 2n bits taking the value 1 with probability p=1n. This choice of p guarantees that the resulting strings correspond to disjoint sets with a constant probability that is bounded away from 0 and 1.

Th disjointness function has a non-trivial discrepancy bound under this distribution.

Lemma 4. When μ is the 1n-biased product distribution,

discμ(Disjn)=O(1/n).

This bound, however, only gives a weak lower bound of

R(Disjn)=Ω(logn)

on the randomized communication complexity of the disjointness function. And yet, this is the best bound that we can hope to achieve using the discrepancy method directly.

Theorem 5. For any distribution μ,

discμ(Disjn)=Ω(1/n).

Proof. Consider the following trivial protocol for computing disjointness: Alice and Bob, they sample i[n] uniformly at random using their shared public randomness. They exchange xi and yi. If xi=yi=1, they output 0. Otherwise, they output 0 with probability 121n and 1 with the remaining probability.

The protocol has constant cost. It also has error 121n on all inputs: whenever the inputs correspond to disjoint sets, they output 1 with probability 12+1n. And when the strings are not disjoint, the probability that the protocol outputs 0 is at least 1n+(11n)(121n)>12+1n.

This protocol shows that R121n(Disjn)=O(1). By Theorem 1 above, this means that the discrepancy of Disjn is bounded below by Ω(12(121n))=Ω(1/n).

Discrepancy and PP complexity

We will see in the next lectures that the randomized communication complexity of the disjointness function is linear in n. This is exponentially larger than the bound we get with the discrepancy method. In other words, that result will show that while discrepancy can be a useful method for proving lower bounds in communication complexity, it does not characterize it.

But this raises the question: does discrepancy characterize some other measure of communication complexity of functions? The answer is yes, and the notion of complexity that comes up in the answer is both useful and interesting in its own right.

Define the PP-cost of a communication protocol π with (standard) communication cost c and error 1δ2 to be

PPcost(π):=c+log(1/δ).

Note that the PP-cost of bounded-error communication protocols is the same as their standard cost up to an additive constant. But with this notion, we can now compare these bounded-error communication protocols with small-bias protocols like the one we introduced in the proof of Theorem 5. This lets us define a new measure of communication complexity of functions.

Definition. The PP complexity of the function f:{0,1}n×{0,1}n{0,1} is

PP(f)=infπPPcost(π)

where the infimum is taken over all communication protocols and the error of each protocol is measured with respect to f.

PP complexity provides a lower bound on the bounded-error randomized communication complexity of Boolean functions: for every f, PP(f)R(f). And in some cases (like the discrepancy function), the PP complexity of a function can be much smaller than its randomized communication complexity.

PP complexity is also closely related to discrepancy. In fact, PP complexity is exactly what is characterized by discrepancy. Writing disc(f)=infμdiscμ(f), we obtain the following result:

Theorem 6. For every function f, PP(f)=Θ(log(1/disc(f)).