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 #
Cslib.Complexity.acceptCount_listStrictMajority_ne_le: the strict-majority error count for consecutive independent seed blocks.Cslib.Complexity.acceptCount_plurality_ne_le: the same bound for plurality of arbitrary outputs with decidable equality.
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) :
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) :
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.