Deterministic communication protocols #
Alice holds x : X and Bob holds y : Y. A deterministic protocol is a binary tree whose internal
nodes are owned by one of the players, who sends one bit computed from their input to choose the
branch, and whose leaves are labelled by outputs (Protocol.run)
Kushilevitz and Nisan, Chapter 1. Its depth is the number of bits sent in
the worst case, and a protocol of depth d has at most 2 ^ d leaves
(Protocol.leaves_le_two_pow_depth). A function of the two inputs solves a relation R on
inputs from A × B when its value on every such pair is related to the pair (Solves), and a
protocol solves R when its output does (Protocol.Solves); the communication complexity of R
on A × B is the least depth of a protocol solving it, or ⊤ if there is none
(Protocol.ecomplexity) Kushilevitz and Nisan, Chapter 5. The
communication complexity of computing a function f is that of the relation f x y = z on all
inputs (Protocol.ecomplexityFun), and a protocol solves that relation exactly when it computes
f (Protocol.solves_univ_iff). A protocol can be run on transformed inputs (Protocol.comap).
Alice can send a bit string in as many bits (Protocol.aliceSend), so every Boolean function of
Alice's n bits and Bob's input has a protocol with n + 1 bits: Alice sends her input and Bob
announces the value (Protocol.ecomplexityFun_le_succ).
Main definitions #
Cslib.Communication.Solves: a function of the two inputs solves a relation.Cslib.Communication.Protocol: deterministic two-party protocols.Cslib.Communication.Protocol.run,Cslib.Communication.Protocol.depth,Cslib.Communication.Protocol.leaves,Cslib.Communication.Protocol.Solves.Cslib.Communication.Protocol.ecomplexity: the communication complexity of a relation.Cslib.Communication.Protocol.ecomplexityFun: the communication complexity of a function.Cslib.Communication.Protocol.comap: running a protocol on transformed inputs.Cslib.Communication.Protocol.aliceSend: Alice sends a bit string.
Main results #
Cslib.Communication.Protocol.leaves_le_two_pow_depth: a protocol has at most2 ^ depthleaves.Cslib.Communication.Protocol.ecomplexity_le_iff,Cslib.Communication.Protocol.le_ecomplexity_iff: upper and lower bounds on communication complexity.Cslib.Communication.Protocol.ecomplexityFun_le_iff,Cslib.Communication.Protocol.le_ecomplexityFun_iff: the same for functions.Cslib.Communication.Protocol.ecomplexityFun_le_succ: the trivial protocol.
References #
A function f of Alice's input x : X and Bob's input y : Y solves the relation R on
A × B when f x y is related to x and y for every pair from A × B. A protocol solves a
relation when its output does (Protocol.Solves).
Instances For
A function solving a relation solves every weaker relation.
A deterministic protocol between Alice, holding x : X, and Bob, holding y : Y, with
outputs in Z.
- output {X : Type u_1} {Y : Type u_2} {Z : Type u_3} (z : Z) : Protocol X Y Z
Output
z. - alice {X : Type u_1} {Y : Type u_2} {Z : Type u_3} (send : X → Bool) (ifFalse ifTrue : Protocol X Y Z) : Protocol X Y Z
Alice sends
send xand the protocol continues withifFalseorifTrue. - bob {X : Type u_1} {Y : Type u_2} {Z : Type u_3} (send : Y → Bool) (ifFalse ifTrue : Protocol X Y Z) : Protocol X Y Z
Bob sends
send yand the protocol continues withifFalseorifTrue.
Instances For
A protocol solves the relation R on A × B when its output does: its output on every pair
of inputs from A × B is related to them. Communication.Solves.mono and
Communication.Solves.of_imp apply to it.
Instances For
Upper bounds on communication complexity: R has communication complexity at most k on
A × B exactly when some protocol of depth at most k solves it.
Computing a function #
The communication complexity of computing f on all inputs: the least depth of a protocol
whose output is f x y on every x and y, or ⊤ if there is none. It is ecomplexity of the
relation f x y = z on all inputs.
Instances For
Computing f has communication complexity at most k exactly when some protocol of depth at
most k computes f.
Lower bounds on the communication complexity of f are lower bounds on the depth of every
protocol computing f, including when there is none.
Changing the inputs #
Sending a bit string #
The trivial protocol. Every Boolean function of Alice's n bits and Bob's input has a
protocol with n + 1 bits: Alice sends her input and Bob announces the value.