Documentation

CslibFrontier.Computability.Communication.NOF.Randomized

Randomized number-on-forehead protocols #

In a public-coin number-on-forehead protocol the players share random bits, which they use to draw a deterministic protocol from a distribution and run it; so a public-coin protocol is a distribution over deterministic NOF protocols (NOF.PublicCoin), instantiating the model-generic kernel Cslib.RandomizedCost (NOF.Protocol.randomizedCost). It solves a relation R on a set A of inputs with error ε when on every input of A its output is not related to the input with probability at most ε (NOF.PublicCoin.Solves). Its cost bounds the tree depth over the random choices (NOF.PublicCoin.depth), and the public-coin communication complexity is the least cost (NOF.PublicCoin.ecomplexity, NOF.PublicCoin.ecomplexityFun). Deterministic protocols are public-coin protocols (NOF.PublicCoin.ecomplexity_le_protocol).

Instantiating Cslib.RandomizedCost on NOF.Protocol.randomizedCost extends the two-party public-coin minimax and amplification developments (after Kushilevitz and Nisan, Chapters 3 and 6 and [Yao1977, vonNeumann1928]) to multiparty NOF protocols: on a finite promise set A with nonempty output type Z, public-coin NOF complexity equals the supremum of distributional complexities (NOF.Protocol.distributionalComplexity) over input distributions supported on A, combining the averaging lower bound on arbitrary promise sets (NOF.PublicCoin.Solves.exists_distributionalError_le, NOF.PublicCoin.distributionalComplexity_le_ecomplexity) with the minimax converse (NOF.PublicCoin.ecomplexity_le_of_forall_distributionalComplexity_le, NOF.PublicCoin.ecomplexity_eq_iSup_distributionalComplexity).

For Boolean functions, taking the strict majority of 2 r independent runs (NOF.PublicCoin.amplify, sequenced via NOF.Protocol.runAll, after Kushilevitz and Nisan, Chapter 3) amplifies error ε ≤ 1 / 2 down to (4 ε (1 - ε)) ^ r at 2 r times the communication cost (NOF.PublicCoin.Solves.amplify, NOF.PublicCoin.ecomplexity_le_two_mul_mul).

Main definitions #

Main results #

References #

@[reducible, inline]
abbrev Cslib.Communication.NOF.PublicCoin {ι : Type u} (X : ι → Type v) (Z : Type w) :
Type (max u v w)

A public-coin number-on-forehead protocol: the players use shared random bits to draw a deterministic protocol from this distribution, and run it.

def Cslib.Communication.NOF.Protocol.randomizedCost {ι : Type u} (X : ι → Type v) (Z : Type w) :
RandomizedCost (Protocol X Z) ((i : ι) → X i) Z

Deterministic NOF protocols as a RandomizedCost model with evaluation Protocol.run and worst-case cost Protocol.depth.

noncomputable def Cslib.Communication.NOF.Protocol.distributionalError {ι : Type u} {X : ι → Type v} {Z : Type w} (p : Protocol X Z) (ν : PMF ((i : ι) → X i)) (R : ((i : ι) → X i) → Z → Prop) :

The error of a deterministic protocol on inputs drawn from ν: the probability that its output on an input drawn from ν is not related to it by R.

noncomputable def Cslib.Communication.NOF.Protocol.distributionalComplexity {ι : Type u} {X : ι → Type v} {Z : Type w} (ε : ℝ) (R : ((i : ι) → X i) → Z → Prop) (ν : PMF ((i : ι) → X i)) :

The distributional complexity D^ν_ε(R) of R under ν: the least depth of a deterministic NOF protocol erring with probability at most ε on inputs drawn from ν, or ⊤ if none exists.

theorem Cslib.Communication.NOF.Protocol.distributionalComplexity_le_depth {ι : Type u} {X : ι → Type v} {Z : Type w} {p : Protocol X Z} {ε : ℝ} {R : ((i : ι) → X i) → Z → Prop} {ν : PMF ((i : ι) → X i)} (hp : p.distributionalError ν R ≤ ε) :
theorem Cslib.Communication.NOF.Protocol.le_distributionalComplexity_iff {ι : Type u} {X : ι → Type v} {Z : Type w} {ε : ℝ} {R : ((i : ι) → X i) → Z → Prop} {ν : PMF ((i : ι) → X i)} {k : ℕ∞} :
k ≤ distributionalComplexity ε R ν ↔ ∀ (p : Protocol X Z), p.distributionalError ν R ≤ ε → k ≤ ↑p.depth
theorem Cslib.Communication.NOF.Protocol.distributionalComplexity_le_iff {ι : Type u} {X : ι → Type v} {Z : Type w} {ε : ℝ} {R : ((i : ι) → X i) → Z → Prop} {ν : PMF ((i : ι) → X i)} {k : ℕ} :
distributionalComplexity ε R ν ≤ ↑k ↔ ∃ (p : Protocol X Z), p.distributionalError ν R ≤ ε ∧ p.depth ≤ k
theorem Cslib.Communication.NOF.Protocol.distributionalComplexity_anti {ι : Type u} {X : ι → Type v} {Z : Type w} {ε ε' : ℝ} {R : ((i : ι) → X i) → Z → Prop} {ν : PMF ((i : ι) → X i)} (hε : ε ≤ ε') :

Allowing more error makes a relation easier under ν.

noncomputable def Cslib.Communication.NOF.PublicCoin.depth {ι : Type u} {X : ι → Type v} {Z : Type w} (μ : PublicCoin X Z) :

The supremum of the tree depths of protocols in the support, or ⊤ if these depths are unbounded. Each tree's depth counts even branches unreachable by any input.

noncomputable def Cslib.Communication.NOF.PublicCoin.errorProb {ι : Type u} {X : ι → Type v} {Z : Type w} (μ : PublicCoin X Z) (R : ((i : ι) → X i) → Z → Prop) (x : (i : ι) → X i) :

The probability that the protocol drawn from μ outputs, on the input x, a value not related to x by R.

def Cslib.Communication.NOF.PublicCoin.Solves {ι : Type u} {X : ι → Type v} {Z : Type w} (μ : PublicCoin X Z) (ε : ℝ) (R : ((i : ι) → X i) → Z → Prop) (A : Set ((i : ι) → X i)) :

A public-coin protocol μ solves R on A with error ε when on every input of A its output is not related to the input with probability at most ε.

noncomputable def Cslib.Communication.NOF.PublicCoin.ecomplexity {ι : Type u} {X : ι → Type v} {Z : Type w} (ε : ℝ) (R : ((i : ι) → X i) → Z → Prop) (A : Set ((i : ι) → X i)) :

The public-coin communication complexity of R on A with error ε: the least cost of a public-coin protocol solving it with error ε, or ⊤ if there is none.

noncomputable def Cslib.Communication.NOF.PublicCoin.ecomplexityFun {ι : Type u} {X : ι → Type v} {Z : Type w} (ε : ℝ) (f : ((i : ι) → X i) → Z) :

The public-coin communication complexity of computing f with error ε: ecomplexity of the relation f x = z on all inputs.

theorem Cslib.Communication.NOF.PublicCoin.depth_le_iff {ι : Type u} {X : ι → Type v} {Z : Type w} {μ : PublicCoin X Z} {c : ℕ∞} :
μ.depth ≤ c ↔ ∀ p ∈ PMF.support μ, ↑p.depth ≤ c
theorem Cslib.Communication.NOF.PublicCoin.depth_le_depth {ι : Type u} {X : ι → Type v} {Z : Type w} {μ : PublicCoin X Z} {p : Protocol X Z} (hp : p ∈ PMF.support μ) :
↑p.depth ≤ μ.depth
@[simp]
theorem Cslib.Communication.NOF.PublicCoin.depth_pure {ι : Type u} {X : ι → Type v} {Z : Type w} (p : Protocol X Z) :
theorem Cslib.Communication.NOF.PublicCoin.errorProb_nonneg {ι : Type u} {X : ι → Type v} {Z : Type w} {μ : PublicCoin X Z} {R : ((i : ι) → X i) → Z → Prop} {x : (i : ι) → X i} :
0 ≤ μ.errorProb R x
theorem Cslib.Communication.NOF.PublicCoin.errorProb_le_one {ι : Type u} {X : ι → Type v} {Z : Type w} {μ : PublicCoin X Z} {R : ((i : ι) → X i) → Z → Prop} {x : (i : ι) → X i} :
μ.errorProb R x ≤ 1
theorem Cslib.Communication.NOF.PublicCoin.errorProb_pure {ι : Type u} {X : ι → Type v} {Z : Type w} (p : Protocol X Z) (R : ((i : ι) → X i) → Z → Prop) (x : (i : ι) → X i) :
errorProb (PMF.pure p) R x = if R x (p.run x) then 0 else 1
theorem Cslib.Communication.NOF.PublicCoin.Solves.mono {ι : Type u} {X : ι → Type v} {Z : Type w} {μ : PublicCoin X Z} {R : ((i : ι) → X i) → Z → Prop} {A A' : Set ((i : ι) → X i)} {ε ε' : ℝ} (h : μ.Solves ε R A) (hε : ε ≤ ε') (hA : A' ⊆ A) :
μ.Solves ε' R A'
theorem Cslib.Communication.NOF.PublicCoin.solves_pure {ι : Type u} {X : ι → Type v} {Z : Type w} {p : Protocol X Z} {R : ((i : ι) → X i) → Z → Prop} {A : Set ((i : ι) → X i)} {ε : ℝ} (hp : p.Solves R A) (hε : 0 ≤ ε) :
Solves (PMF.pure p) ε R A

A deterministic protocol solving R is a public-coin protocol solving it with any nonnegative error.

theorem Cslib.Communication.NOF.PublicCoin.Solves.exists_distributionalError_le {ι : Type u} {X : ι → Type v} {Z : Type w} {μ : PublicCoin X Z} {R : ((i : ι) → X i) → Z → Prop} {A : Set ((i : ι) → X i)} {ε : ℝ} (h : μ.Solves ε R A) (ν : PMF ((i : ι) → X i)) (hν : ∀ x ∈ ν.support, x ∈ A) :
∃ p ∈ PMF.support μ, p.distributionalError ν R ≤ ε

The averaging argument, the easy direction of Yao's principle: if μ solves R on A with error ε, then for every distribution ν on A some protocol that μ can draw errs with probability at most ε on inputs drawn from ν.

theorem Cslib.Communication.NOF.PublicCoin.ecomplexity_le_depth {ι : Type u} {X : ι → Type v} {Z : Type w} {μ : PublicCoin X Z} {R : ((i : ι) → X i) → Z → Prop} {A : Set ((i : ι) → X i)} {ε : ℝ} (h : μ.Solves ε R A) :
theorem Cslib.Communication.NOF.PublicCoin.le_ecomplexity_iff {ι : Type u} {X : ι → Type v} {Z : Type w} {R : ((i : ι) → X i) → Z → Prop} {A : Set ((i : ι) → X i)} {ε : ℝ} {k : ℕ∞} :
k ≤ ecomplexity ε R A ↔ ∀ (μ : PublicCoin X Z), μ.Solves ε R A → k ≤ μ.depth
theorem Cslib.Communication.NOF.PublicCoin.ecomplexity_le_iff {ι : Type u} {X : ι → Type v} {Z : Type w} {R : ((i : ι) → X i) → Z → Prop} {A : Set ((i : ι) → X i)} {ε : ℝ} {k : ℕ} :
ecomplexity ε R A ≤ ↑k ↔ ∃ (μ : PublicCoin X Z), μ.Solves ε R A ∧ μ.depth ≤ ↑k
theorem Cslib.Communication.NOF.PublicCoin.ecomplexity_anti {ι : Type u} {X : ι → Type v} {Z : Type w} {R : ((i : ι) → X i) → Z → Prop} {A : Set ((i : ι) → X i)} {ε ε' : ℝ} (hε : ε ≤ ε') :
ecomplexity ε' R A ≤ ecomplexity ε R A

Allowing more error makes a relation easier.

theorem Cslib.Communication.NOF.PublicCoin.ecomplexity_mono {ι : Type u} {X : ι → Type v} {Z : Type w} {R : ((i : ι) → X i) → Z → Prop} {A A' : Set ((i : ι) → X i)} {ε : ℝ} (hA : A' ⊆ A) :
ecomplexity ε R A' ≤ ecomplexity ε R A

Solving a relation on a larger set is harder.

theorem Cslib.Communication.NOF.PublicCoin.ecomplexity_le_protocol {ι : Type u} {X : ι → Type v} {Z : Type w} {R : ((i : ι) → X i) → Z → Prop} {A : Set ((i : ι) → X i)} {ε : ℝ} (hε : 0 ≤ ε) :

Public-coin protocols with nonnegative error are at least as good as deterministic ones.

theorem Cslib.Communication.NOF.PublicCoin.ecomplexityFun_le_protocol {ι : Type u} {X : ι → Type v} {Z : Type w} {ε : ℝ} {f : ((i : ι) → X i) → Z} (hε : 0 ≤ ε) :

Distributional lower bounds and minimax duality for NOF protocols #

theorem Cslib.Communication.NOF.PublicCoin.distributionalComplexity_le_ecomplexity {ι : Type u} {X : ι → Type v} {Z : Type w} {R : ((i : ι) → X i) → Z → Prop} {A : Set ((i : ι) → X i)} {ε : ℝ} {ν : PMF ((i : ι) → X i)} (hν : ∀ x ∈ ν.support, x ∈ A) :

Multiparty NOF instantiation of RandomizedCost.distributionalComplexity_le_ecomplexity (the averaging direction, after [Yao77] and Kushilevitz and Nisan, Chapter 3): under every distribution ν supported on A, distributional NOF complexity is at most public-coin NOF complexity on A.

theorem Cslib.Communication.NOF.PublicCoin.ecomplexity_le_of_forall_distributionalComplexity_le {ι : Type u} {X : ι → Type v} {Z : Type w} {R : ((i : ι) → X i) → Z → Prop} {A : Set ((i : ι) → X i)} {ε : ℝ} [Finite ↑A] [Nonempty Z] {c : ℕ} (h : ∀ (ν : PMF ((i : ι) → X i)), (∀ x ∈ ν.support, x ∈ A) → Protocol.distributionalComplexity ε R ν ≤ ↑c) :
ecomplexity ε R A ≤ ↑c

Multiparty NOF instantiation of RandomizedCost.ecomplexity_le_of_forall_distributionalComplexity_le (the minimax converse, after Kushilevitz and Nisan, Theorem 3.20 and Chapter 6 and [Yao1977, vonNeumann1928]): on a finite promise set A with nonempty output type Z, if under every distribution supported on A some deterministic NOF protocol of depth at most c errs with probability at most ε, then ecomplexity ε R A ≤ c.

theorem Cslib.Communication.NOF.PublicCoin.ecomplexity_le_iff_forall_distributionalComplexity_le {ι : Type u} {X : ι → Type v} {Z : Type w} {R : ((i : ι) → X i) → Z → Prop} {A : Set ((i : ι) → X i)} {ε : ℝ} [Finite ↑A] [Nonempty Z] {c : ℕ} :
ecomplexity ε R A ≤ ↑c ↔ ∀ (ν : PMF ((i : ι) → X i)), (∀ x ∈ ν.support, x ∈ A) → Protocol.distributionalComplexity ε R ν ≤ ↑c

Multiparty NOF instantiation of RandomizedCost.ecomplexity_le_iff_forall_distributionalComplexity_le: on a finite promise set A with nonempty output type Z, public-coin NOF complexity on A is at most c iff distributional complexity is at most c under every distribution supported on A.

theorem Cslib.Communication.NOF.PublicCoin.ecomplexity_eq_iSup_distributionalComplexity {ι : Type u} {X : ι → Type v} {Z : Type w} {R : ((i : ι) → X i) → Z → Prop} {A : Set ((i : ι) → X i)} {ε : ℝ} [Finite ↑A] [Nonempty Z] :
ecomplexity ε R A = ⨆ (ν : PMF ((i : ι) → X i)), ⨆ (_ : ∀ x ∈ ν.support, x ∈ A), Protocol.distributionalComplexity ε R ν

Multiparty NOF instantiation of RandomizedCost.ecomplexity_eq_iSup_distributionalComplexity (after Kushilevitz and Nisan, Theorem 3.20 and Chapter 6 and [Yao77]): on a finite promise set A with nonempty output type Z, public-coin NOF complexity equals the supremum of distributional complexities over distributions supported on A.

theorem Cslib.Communication.NOF.PublicCoin.ecomplexityFun_eq_iSup_distributionalComplexity {ι : Type u} {X : ι → Type v} {Z : Type w} {ε : ℝ} [Finite ι] [∀ (i : ι), Finite (X i)] [Nonempty Z] (f : ((i : ι) → X i) → Z) :
ecomplexityFun ε f = ⨆ (ν : PMF ((i : ι) → X i)), Protocol.distributionalComplexity ε (fun (x : (i : ι) → X i) (z : Z) => f x = z) ν

Multiparty NOF instantiation of RandomizedCost.ecomplexityFun_eq_iSup_distributionalComplexity for computing a total function over finitely many players with finite input types.

Majority error amplification for Boolean NOF protocols #

noncomputable def Cslib.Communication.NOF.PublicCoin.amplify {ι : Type u} {X : ι → Type v} (μ : PublicCoin X Bool) (r : ℕ) :

Strict majority of 2 r independent runs of a Boolean public-coin NOF protocol μ.

theorem Cslib.Communication.NOF.PublicCoin.depth_amplify_le {ι : Type u} {X : ι → Type v} {μ : PublicCoin X Bool} {c : ℕ} (hμ : μ.depth ≤ ↑c) (r : ℕ) :
(μ.amplify r).depth ≤ 2 * ↑r * ↑c

The majority of 2 r runs writes at most 2 r times as many bits.

theorem Cslib.Communication.NOF.PublicCoin.Solves.amplify {ι : Type u} {X : ι → Type v} {A : Set ((i : ι) → X i)} {ε : ℝ} {μ : PublicCoin X Bool} {f : ((i : ι) → X i) → Bool} (hμ : μ.Solves ε (fun (x : (i : ι) → X i) (b : Bool) => f x = b) A) (hε : ε ≤ 1 / 2) (r : ℕ) :
(μ.amplify r).Solves ((4 * ε * (1 - ε)) ^ r) (fun (x : (i : ι) → X i) (b : Bool) => f x = b) A

Multiparty NOF instantiation of RandomizedCost.Solves.amplify (after Kushilevitz and Nisan, Chapter 3): if μ computes f on A with error ε ≤ 1 / 2, then the strict majority of 2 r independent runs computes f on A with error (4 ε (1 - ε)) ^ r.

theorem Cslib.Communication.NOF.PublicCoin.ecomplexity_le_two_mul_mul {ι : Type u} {X : ι → Type v} {A : Set ((i : ι) → X i)} {ε : ℝ} {f : ((i : ι) → X i) → Bool} (hε : ε ≤ 1 / 2) (r : ℕ) :
ecomplexity ((4 * ε * (1 - ε)) ^ r) (fun (x : (i : ι) → X i) (b : Bool) => f x = b) A ≤ 2 * ↑r * ecomplexity ε (fun (x : (i : ι) → X i) (b : Bool) => f x = b) A

Multiparty NOF instantiation of RandomizedCost.ecomplexity_le_two_mul_mul on A: reducing error ε ≤ 1 / 2 to (4 ε (1 - ε)) ^ r multiplies complexity by at most 2 r.

theorem Cslib.Communication.NOF.PublicCoin.ecomplexityFun_le_two_mul_mul {ι : Type u} {X : ι → Type v} {ε : ℝ} {f : ((i : ι) → X i) → Bool} (hε : ε ≤ 1 / 2) (r : ℕ) :
ecomplexityFun ((4 * ε * (1 - ε)) ^ r) f ≤ 2 * ↑r * ecomplexityFun ε f

Multiparty NOF instantiation of RandomizedCost.ecomplexityFun_le_two_mul_mul for total Boolean functions.

theorem Cslib.Communication.NOF.PublicCoin.ecomplexityFun_le_two_mul_mul_one_third {ι : Type u} {X : ι → Type v} {f : ((i : ι) → X i) → Bool} (r : ℕ) :
ecomplexityFun ((8 / 9) ^ r) f ≤ 2 * ↑r * ecomplexityFun (1 / 3) f

Specialization of ecomplexityFun_le_two_mul_mul from error 1 / 3: 2 r NOF runs reduce the error to (8 / 9) ^ r.