Documentation

CslibFrontier.Computability.Complexity.AcceptCount.Majority

Error counts for majority and plurality of independent seeded answers #

The bound is pointwise in the input, the seed length, the expected answer, and the number of repetitions. Clients can choose the repetition count separately for each input.

Main results #

theorem Cslib.Complexity.acceptCount_listStrictMajority_ne_le {α : Type} (V : α × List Bool → Bool) (a : α) (n r : ℕ) (truth : Bool) {ε : ℝ} (hε0 : 0 ≤ ε) (hε1 : ε < 1 / 2) (herr : ↑(acceptCount (fun (p : α × List Bool) => V p != truth) a n) ≤ ε * 2 ^ n) :
↑(acceptCount (fun (p : α × List Bool) => BitString.listStrictMajority (List.map (fun (w : List Bool) => V (p.1, w)) (BitString.listRows (2 * r) n p.2)) != truth) a (2 * r * n)) ≤ (4 * ε * (1 - ε)) ^ r * 2 ^ (2 * r * n)

If one seeded answer disagrees with truth on at most an ε < 1 / 2 fraction of seeds, strict majority of 2 * r independent blocks disagrees on at most a (4 * ε * (1 - ε)) ^ r fraction. Ties are counted as potential errors for either answer.

theorem Cslib.Complexity.acceptCount_plurality_ne_le {α β : Type} [DecidableEq β] (V : α × List Bool → β) (a : α) (n r : ℕ) (fallback truth : β) {ε : ℝ} (hε0 : 0 ≤ ε) (hε1 : ε < 1 / 2) (herr : ↑(acceptCount (fun (p : α × List Bool) => V p != truth) a n) ≤ ε * 2 ^ n) :
↑(acceptCount (fun (p : α × List Bool) => ProbComp.plurality fallback (List.map (fun (w : List Bool) => V (p.1, w)) (BitString.listRows (2 * r) n p.2)) != truth) a (2 * r * n)) ≤ (4 * ε * (1 - ε)) ^ r * 2 ^ (2 * r * n)

If a seeded computation returns truth with error at most ε < 1 / 2, taking the plurality of 2 * r independent seed blocks has error at most (4 * ε * (1 - ε)) ^ r. The bound holds for any fallback and counts ties as potential errors.