Documentation

CslibFrontier.Computability.Circuit.Boolean.HardnessAmplification.DirectProduct.Complexity

Circuit size of the direct-product decoder #

The direct-product decoder dpDecode of Impagliazzo, Jaiswal, Kabanets and Wigderson (preprint of 2009-10-19, Algorithm 2; Carmosino, Impagliazzo, Kabanets and Kolokolova cite the decoder as their Theorem 4.1) has small De Morgan circuits relative to the circuit it decodes. Fix a seed (P, b₀, v) and take U = BitString n, V = Bool. A tuple of k blocks is read from a flat input of k * n bits with Cslib.BitString.block, as glAmp reads its first k * n bits. If each output of C' costs at most c gates on the flat input, then the decoder costs at most m (#P + 1) (c + 4) + 3 m + 1 gates (complexity_dpDecode_le).

Each trial reads #P + 1 outputs of C' on the tuple with x at the free position and constants elsewhere, at two extra gates each for the constants. Its acceptance test compares the #P outputs on P with the constants C' b₀ (one gate each, plus the conjunction), and a multiplexer selects the first accepted trial (four gates per trial). The default answer costs one gate. Each step is a combinator of CslibFrontier.Computability.Circuit.Boolean.Combinators. The circuit recomputes C' for each trial and each position read; it shares nothing between trials.

The constants c₀ = 4, c₁ = 3 and the trailing 1 are ours. The bound is on size only; depth is not certified. IJKW state the decoder as an oracle algorithm, and CIKK bound its circuit size by a polynomial; the explicit affine form here is a library formulation.

The trial induction is stated once, with abstract costs for the reads and the comparisons (complexity_dpDecode_le_of). A learner that decodes a hypothesis computed from the answers w to its queries needs C' w to read w as well. Then C' w b₀ is no longer a constant, and each comparison recomputes both sides: the decoder costs at most m (#P + 1) (2 c + 10) + 1 gates as a function of w and x (complexity_dpDecode_answers_le), with constants that are again ours.

Main results #

References #

theorem Cslib.Circuits.Boolean.DirectProduct.complexity_dpDecode_le_of {n N k : ℕ} (C' : BitString N → (Fin k → BitString n) → Fin k → Bool) (X : BitString N → BitString n) (dflt : Bool) (P : Finset (Fin k)) (b₀ : Fin k → BitString n) {m : ℕ} (v : Fin m → Trial (BitString n) k) {cr ce : ℕ} (hread : ∀ (t : Trial (BitString n) k) (j : Fin k), complexity interpretation (single fun (u : Fin N → Bool) => C' u (trialTuple P b₀ (X u) t) j) ≤ cr) (hcmp : ∀ (t : Trial (BitString n) k), ∀ i ∈ P, complexity interpretation (single fun (u : Fin N → Bool) => decide (C' u (trialTuple P b₀ (X u) t) i = C' u b₀ i)) ≤ ce) :
complexity interpretation (single fun (u : Fin N → Bool) => dpDecode (C' u) dflt P b₀ v (X u)) ≤ m * (P.card * (ce + 1) + cr + 5) + 1

The decoder's size from the cost of its reads. Let the decoder use a family of circuits C' u and read its input through X. If each output of C' u on a trial tuple with X u at the free position costs at most cr gates as a function of u, and each comparison of an output on P with the corresponding output on b₀ costs at most ce, the decoder with m trials costs at most m (#P (ce + 1) + cr + 5) + 1 gates. This is the induction behind complexity_dpDecode_le and complexity_dpDecode_answers_le.

theorem Cslib.Circuits.Boolean.DirectProduct.complexity_dpDecode_le {n k : ℕ} (C' : (Fin k → BitString n) → Fin k → Bool) (dflt : Bool) (P : Finset (Fin k)) (b₀ : Fin k → BitString n) {m : ℕ} (v : Fin m → Trial (BitString n) k) {c : ℕ} (hC' : ∀ (j : Fin k), complexity interpretation (single fun (y : BitString (k * n)) => C' (BitString.block y) j) ≤ c) :
complexity interpretation (single (dpDecode C' dflt P b₀ v)) ≤ m * (P.card + 1) * (c + 4) + 3 * m + 1

Circuit size of the direct-product decoder (IJKW, preprint of 2009-10-19, Algorithm 2; CIKK, Theorem 4.1). Read tuples of k blocks of n bits from flat inputs with Cslib.BitString.block. If every output of C' costs at most c gates on the flat input, the decoder with a fixed seed (P, b₀, v) of m trials costs at most m (#P + 1) (c + 4) + 3 m + 1 gates. The circuit recomputes C' for every read and shares nothing between trials. The constants 4, 3 and the trailing 1 (the default answer) are ours. This bounds size only; depth is not certified.

theorem Cslib.Circuits.Boolean.DirectProduct.complexity_dpDecode_answers_le {n q k : ℕ} (C' : BitString q → (Fin k → BitString n) → Fin k → Bool) (dflt : Bool) (P : Finset (Fin k)) (b₀ : Fin k → BitString n) {m : ℕ} (v : Fin m → Trial (BitString n) k) {c : ℕ} (hC' : ∀ (j : Fin k), complexity interpretation (single fun (wy : BitString (q + k * n)) => C' (fun (i : Fin q) => wy (Fin.castAdd (k * n) i)) (BitString.block fun (i : Fin (k * n)) => wy (Fin.natAdd q i)) j) ≤ c) :
complexity interpretation (single fun (wx : BitString (q + n)) => dpDecode (C' fun (i : Fin q) => wx (Fin.castAdd n i)) dflt P b₀ v fun (i : Fin n) => wx (Fin.natAdd q i)) ≤ m * (P.card + 1) * (2 * c + 10) + 1

The decoder with answers as inputs. Let C' w depend on q answer bits w, and let every output of C' cost at most c gates as a function of w and the flat tuple. Then the decoder with a fixed seed (P, b₀, v) of m trials, as a function of w and its input x, costs at most m (#P + 1) (2 c + 10) + 1 gates. Unlike complexity_dpDecode_le, the outputs C' w b₀ are not constants: each comparison recomputes both sides. The constants are ours.