684 lines
10 KiB
Markdown
684 lines
10 KiB
Markdown
---
|
||
title: "Communication complexity"
|
||
chunk: 2/8
|
||
source: "https://en.wikipedia.org/wiki/Communication_complexity"
|
||
category: "reference"
|
||
tags: "science, encyclopedia"
|
||
date_saved: "2026-05-05T14:40:16.151030+00:00"
|
||
instance: "kb-cron"
|
||
---
|
||
|
||
=== Example: EQ ===
|
||
We consider the case where Alice and Bob try to determine whether or not their input strings are equal. Formally, define the Equality function, denoted
|
||
|
||
|
||
|
||
E
|
||
Q
|
||
:
|
||
{
|
||
0
|
||
,
|
||
1
|
||
|
||
}
|
||
|
||
n
|
||
|
||
|
||
×
|
||
{
|
||
0
|
||
,
|
||
1
|
||
|
||
}
|
||
|
||
n
|
||
|
||
|
||
→
|
||
{
|
||
0
|
||
,
|
||
1
|
||
}
|
||
|
||
|
||
{\displaystyle EQ:\{0,1\}^{n}\times \{0,1\}^{n}\rightarrow \{0,1\}}
|
||
|
||
, by
|
||
|
||
|
||
|
||
E
|
||
Q
|
||
(
|
||
x
|
||
,
|
||
y
|
||
)
|
||
=
|
||
1
|
||
|
||
|
||
{\displaystyle EQ(x,y)=1}
|
||
|
||
if
|
||
|
||
|
||
|
||
x
|
||
=
|
||
y
|
||
|
||
|
||
{\displaystyle x=y}
|
||
|
||
. As we demonstrate below, any deterministic communication protocol solving
|
||
|
||
|
||
|
||
E
|
||
Q
|
||
|
||
|
||
{\displaystyle EQ}
|
||
|
||
requires
|
||
|
||
|
||
|
||
n
|
||
|
||
|
||
{\displaystyle n}
|
||
|
||
bits of communication in the worst case. As a warm-up example, consider the simple case of
|
||
|
||
|
||
|
||
x
|
||
,
|
||
y
|
||
∈
|
||
{
|
||
0
|
||
,
|
||
1
|
||
|
||
}
|
||
|
||
3
|
||
|
||
|
||
|
||
|
||
{\displaystyle x,y\in \{0,1\}^{3}}
|
||
|
||
. The equality function in this case can be represented by the matrix below. The rows represent all the possibilities of
|
||
|
||
|
||
|
||
x
|
||
|
||
|
||
{\displaystyle x}
|
||
|
||
, the columns those of
|
||
|
||
|
||
|
||
y
|
||
|
||
|
||
{\displaystyle y}
|
||
|
||
.
|
||
|
||
In this table, the function only evaluates to 1 when
|
||
|
||
|
||
|
||
x
|
||
|
||
|
||
{\displaystyle x}
|
||
|
||
equals
|
||
|
||
|
||
|
||
y
|
||
|
||
|
||
{\displaystyle y}
|
||
|
||
(i.e., on the diagonal). It is also fairly easy to see how communicating a single bit divides someone's possibilities in half. When the first bit of
|
||
|
||
|
||
|
||
y
|
||
|
||
|
||
{\displaystyle y}
|
||
|
||
is 1, consider only half of the columns (where
|
||
|
||
|
||
|
||
y
|
||
|
||
|
||
{\displaystyle y}
|
||
|
||
can equal 100, 101, 110, or 111).
|
||
|
||
=== Theorem: D(EQ) = n ===
|
||
Proof. Assume that
|
||
|
||
|
||
|
||
D
|
||
(
|
||
E
|
||
Q
|
||
)
|
||
≤
|
||
n
|
||
−
|
||
1
|
||
|
||
|
||
{\displaystyle D(EQ)\leq n-1}
|
||
|
||
. This means that there exists
|
||
|
||
|
||
|
||
x
|
||
≠
|
||
|
||
x
|
||
′
|
||
|
||
|
||
|
||
{\displaystyle x\neq x'}
|
||
|
||
such that
|
||
|
||
|
||
|
||
(
|
||
x
|
||
,
|
||
x
|
||
)
|
||
|
||
|
||
{\displaystyle (x,x)}
|
||
|
||
and
|
||
|
||
|
||
|
||
(
|
||
|
||
x
|
||
′
|
||
|
||
,
|
||
|
||
x
|
||
′
|
||
|
||
)
|
||
|
||
|
||
{\displaystyle (x',x')}
|
||
|
||
have the same communication transcript
|
||
|
||
|
||
|
||
h
|
||
|
||
|
||
{\displaystyle h}
|
||
|
||
. Since this transcript defines a rectangle,
|
||
|
||
|
||
|
||
f
|
||
(
|
||
x
|
||
,
|
||
|
||
x
|
||
′
|
||
|
||
)
|
||
|
||
|
||
{\displaystyle f(x,x')}
|
||
|
||
must also be 1. By definition
|
||
|
||
|
||
|
||
x
|
||
≠
|
||
|
||
x
|
||
′
|
||
|
||
|
||
|
||
{\displaystyle x\neq x'}
|
||
|
||
and we know that equality is only true for
|
||
|
||
|
||
|
||
(
|
||
a
|
||
,
|
||
b
|
||
)
|
||
|
||
|
||
{\displaystyle (a,b)}
|
||
|
||
when
|
||
|
||
|
||
|
||
a
|
||
=
|
||
b
|
||
|
||
|
||
{\displaystyle a=b}
|
||
|
||
. This yields a contradiction.
|
||
This technique of proving deterministic communication lower bounds is called the fooling set technique.
|
||
|
||
== Randomized communication complexity ==
|
||
In the above definition, we are concerned with the number of bits that must be deterministically transmitted between two parties. If both the parties are given access to a random number generator, can they determine the value of
|
||
|
||
|
||
|
||
f
|
||
|
||
|
||
{\displaystyle f}
|
||
|
||
with much less information exchanged? Yao, in his seminal paper
|
||
answers this question by defining randomized communication complexity.
|
||
A randomized protocol
|
||
|
||
|
||
|
||
R
|
||
|
||
|
||
{\displaystyle R}
|
||
|
||
for a function
|
||
|
||
|
||
|
||
f
|
||
|
||
|
||
{\displaystyle f}
|
||
|
||
has two-sided error.
|
||
|
||
|
||
|
||
|
||
Pr
|
||
[
|
||
R
|
||
(
|
||
x
|
||
,
|
||
y
|
||
)
|
||
=
|
||
0
|
||
]
|
||
>
|
||
|
||
|
||
2
|
||
3
|
||
|
||
|
||
,
|
||
|
||
|
||
if
|
||
|
||
|
||
|
||
f
|
||
(
|
||
x
|
||
,
|
||
y
|
||
)
|
||
=
|
||
0
|
||
|
||
|
||
{\displaystyle \Pr[R(x,y)=0]>{\frac {2}{3}},{\textrm {if}}\,f(x,y)=0}
|
||
|
||
|
||
|
||
|
||
|
||
Pr
|
||
[
|
||
R
|
||
(
|
||
x
|
||
,
|
||
y
|
||
)
|
||
=
|
||
1
|
||
]
|
||
>
|
||
|
||
|
||
2
|
||
3
|
||
|
||
|
||
,
|
||
|
||
|
||
if
|
||
|
||
|
||
|
||
f
|
||
(
|
||
x
|
||
,
|
||
y
|
||
)
|
||
=
|
||
1
|
||
|
||
|
||
{\displaystyle \Pr[R(x,y)=1]>{\frac {2}{3}},{\textrm {if}}\,f(x,y)=1}
|
||
|
||
|
||
A randomized protocol is a deterministic protocol that uses an extra random string in addition to its normal input. There are two models for this: a public string is a random string that is known by both parties beforehand, while a private string is generated by one party and must be communicated to the other party. A theorem presented below shows that any public string protocol can be simulated by a private string protocol that uses O(log n) additional bits compared to the original.
|
||
In the probability inequalities above, the outcome of the protocol is understood to depend only on the random string; both strings x and y remain fixed. In other words, if R(x,y) yields g(x,y,r) when using random string r, then g(x,y,r) = f(x,y) for at least 2/3 of all choices for the string r.
|
||
The randomized complexity is simply defined as the number of bits exchanged in such a protocol.
|
||
Note that it is also possible to define a randomized protocol with one-sided error, and the complexity is defined similarly.
|
||
|
||
=== Example: EQ ===
|
||
Returning to the previous example of EQ, if certainty is not required, Alice and Bob can check for equality using only
|
||
|
||
|
||
|
||
O
|
||
(
|
||
log
|
||
|
||
n
|
||
)
|
||
|
||
|
||
{\displaystyle O(\log n)}
|
||
|
||
messages. Consider the following protocol: Assume that Alice and Bob both have access to the same random string
|
||
|
||
|
||
|
||
z
|
||
∈
|
||
{
|
||
0
|
||
,
|
||
1
|
||
|
||
}
|
||
|
||
n
|
||
|
||
|
||
|
||
|
||
{\displaystyle z\in \{0,1\}^{n}}
|
||
|
||
. Alice computes
|
||
|
||
|
||
|
||
z
|
||
⋅
|
||
x
|
||
|
||
|
||
{\displaystyle z\cdot x}
|
||
|
||
and sends this bit (call it b) to Bob. (The
|
||
|
||
|
||
|
||
(
|
||
⋅
|
||
)
|
||
|
||
|
||
{\displaystyle (\cdot )}
|
||
|
||
is the dot product in GF(2).) Then Bob compares b to
|
||
|
||
|
||
|
||
z
|
||
⋅
|
||
y
|
||
|
||
|
||
{\displaystyle z\cdot y}
|
||
|
||
. If they are the same, then Bob accepts, saying x equals y. Otherwise, he rejects.
|
||
Clearly, if
|
||
|
||
|
||
|
||
x
|
||
=
|
||
y
|
||
|
||
|
||
{\displaystyle x=y}
|
||
|
||
, then
|
||
|
||
|
||
|
||
z
|
||
⋅
|
||
x
|
||
=
|
||
z
|
||
⋅
|
||
y
|
||
|
||
|
||
{\displaystyle z\cdot x=z\cdot y}
|
||
|
||
, so
|
||
|
||
|
||
|
||
P
|
||
r
|
||
o
|
||
|
||
b
|
||
|
||
z
|
||
|
||
|
||
[
|
||
A
|
||
c
|
||
c
|
||
e
|
||
p
|
||
t
|
||
]
|
||
=
|
||
1
|
||
|
||
|
||
{\displaystyle Prob_{z}[Accept]=1}
|
||
|
||
. If x does not equal y, it is still possible that
|
||
|
||
|
||
|
||
z
|
||
⋅
|
||
x
|
||
=
|
||
z
|
||
⋅
|
||
y
|
||
|
||
|
||
{\displaystyle z\cdot x=z\cdot y}
|
||
|
||
, which would give Bob the wrong answer. How does this happen?
|
||
If x and y are not equal, they must differ in some locations:
|
||
|
||
|
||
|
||
|
||
|
||
|
||
{
|
||
|
||
|
||
|
||
x
|
||
=
|
||
|
||
c
|
||
|
||
1
|
||
|
||
|
||
|
||
c
|
||
|
||
2
|
||
|
||
|
||
…
|
||
p
|
||
…
|
||
|
||
p
|
||
′
|
||
|
||
…
|
||
|
||
x
|
||
|
||
n
|
||
|
||
|
||
|
||
|
||
|
||
|
||
y
|
||
=
|
||
|
||
c
|
||
|
||
1
|
||
|
||
|
||
|
||
c
|
||
|
||
2
|
||
|
||
|
||
…
|
||
q
|
||
…
|
||
|
||
q
|
||
′
|
||
|
||
…
|
||
|
||
y
|
||
|
||
n
|
||
|
||
|
||
|
||
|
||
|
||
|
||
z
|
||
=
|
||
|
||
z
|
||
|
||
1
|
||
|
||
|
||
|
||
z
|
||
|
||
2
|
||
|
||
|
||
…
|
||
|
||
z
|
||
|
||
i
|
||
|
||
|
||
…
|
||
|
||
z
|
||
|
||
j
|
||
|
||
|
||
…
|
||
|
||
z
|
||
|
||
n
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
{\displaystyle {\begin{cases}x=c_{1}c_{2}\ldots p\ldots p'\ldots x_{n}\\y=c_{1}c_{2}\ldots q\ldots q'\ldots y_{n}\\z=z_{1}z_{2}\ldots z_{i}\ldots z_{j}\ldots z_{n}\end{cases}}}
|
||
|