Documentation

CslibFrontier.Computability.Complexity.Classes.BPP.Derandomization.GeneralTime

Derandomizing BPTIME(t) with generators running in time exponential in the seed #

Arora and Barak's Lemma 16.4 Arora and Barak, Lemma 16.4 (draft of 2007-01-08, printed page 284, PDF page 300) and Goldreich's Proposition 8.15 Goldreich, Proposition 8.15 (draft r4, printed page 339, PDF page 75) derandomize BPTIME(t) for general t by enumerating the seeds of a generator. Under this library's conventions their printed proofs leave a constant-factor gap. A machine in Cslib.Complexity.BPTIME, which is up to constant factors, may toss c t(n) coins for a constant c of its own, while the proofs stretch the seeds to exactly t(n) bits. The circuit with the instance hardwired has O((n + t(n)) ^ 2) gates with a machine-dependent constant, while the proofs take it to have at most t(n) ^ 2 (Goldreich) or O(t(n)) ^ 2 (Arora and Barak) gates. This does not show the cited results false: under the sources' own conventions (exact time bounds, an explicit coin budget) the gap may not arise, and that question is open. Neither cited result is proved here.

This file proves the general step and conditional results. Seeds longer by a constant factor close the gap when the stretch grows by at least any constant factor on seeds longer by a constant factor (true for polynomial, 2 ^ (ℓ ^ ε) and 2 ^ (ε ℓ) stretch) and the time bound is at least the input length.

Main results #

References #

theorem Cslib.Complexity.CanonicalDerandomizer.exists_mem_DTIME_of_mem_BPTIME {α : Type} {enc : α ↪ List Bool} {G : List Bool → List Bool} {ℓ : ℕ → ℕ} (hG : CanonicalDerandomizer G ℓ) {t : ℕ → ℕ} {A : Set α} (hA : A ∈ BPTIME enc t) :
∃ (c : ℕ), ∀ (k : ℕ → ℕ), Turing.MultiTapeTM.ComputableInPolyTime k Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary → (∀ (n : ℕ), c * (t n + n + 1) ≤ ℓ (k n)) → ∃ (D : ℕ), A ∈ DTIME enc fun (n : ℕ) => 2 ^ (D * k n) * (n + 1) ^ D

Seeds of k(n) bits derandomize BPTIME(t) once ℓ(k(n)) ≥ c (t(n) + n + 1). This is the step of Goldreich, Proposition 8.15 and Arora and Barak, Lemma 16.4 with the constant factors made explicit; it is not either cited result, which use seeds with ℓ(k(n)) ≥ t(n). For a canonical derandomizer G of stretch ℓ and a problem A ∈ BPTIME(t), there is a constant c such that for every seed length k, computable from n in unary in polynomial time, with c (t(n) + n + 1) ≤ ℓ(k(n)), the problem is in DTIME(2 ^ (D k(n)) (n + 1) ^ D) for some D.

The decider enumerates the seeds of k(n) bits and runs the verifier replaying the machine's coins on the first ⌊ℓ(k(n)) / E⌋ bits of each generated string, for a constant E. These are at least the O(t(n)) coins the machine tosses, and the verifier with the instance hardwired has O((n + ℓ(k) / E) ^ 2) ≤ ℓ(k) ^ 2 gates, so the generator fools it within 1 / 6 (Eq. 8.11). The generator's time poly(2 ^ k ℓ(k)) is 2 ^ O(k) by Cslib.Complexity.CanonicalDerandomizer.le_two_pow.

theorem Cslib.Complexity.BPTIME_subset_DTIME_of_canonicalDerandomizer_of_growth {G : List Bool → List Bool} {ℓ : ℕ → ℕ} (hG : CanonicalDerandomizer G ℓ) (hgrowth : ∀ (c : ℕ), ∃ (d : ℕ), ∀ (j : ℕ), c * ℓ j ≤ ℓ (d * (j + 1))) {t k : ℕ → ℕ} (ht : ∀ (n : ℕ), n ≤ t n) (hk : Turing.MultiTapeTM.ComputableInPolyTime k Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) (hkt : ∀ (n : ℕ), t n ≤ ℓ (k n)) {α : Type} (enc : α ↪ List Bool) :
BPTIME enc t ⊆ ⋃ (D : ℕ), DTIME enc fun (n : ℕ) => (2 ^ k n * (t n + 1)) ^ D

Not Goldreich's Proposition 8.15: a conditional result under a growth hypothesis and a polynomial-time seed schedule. Goldreich, Proposition 8.15 (draft r4, printed page 339, PDF page 75) states: let G be a canonical derandomizer of stretch ℓ; then for every time-constructible t, BPtime(t) ⊆ Dtime(T) with T(n) = poly(2 ^ ℓ⁻¹(t(n)) t(n)), where ℓ⁻¹(t(n)) is the least k with ℓ(k) ≥ t(n). This theorem proves BPTIME(t) ⊆ ⋃ D, DTIME((2 ^ k(n) (t(n) + 1)) ^ D) for every seed length k with t(n) ≤ ℓ(k(n)), in particular ℓ⁻¹ ∘ t, under three hypotheses the source does not make:

  • growth: for every c there is d with c ℓ(j) ≤ ℓ(d (j + 1)) for all j, so that ℓ⁻¹(c t) ≤ d (ℓ⁻¹(t) + 1); it holds for polynomial and 2 ^ (ε k) stretch;
  • n ≤ t(n);
  • the seed length k is computable from n in unary in polynomial time, in place of t being time-constructible.

They let longer seeds absorb the constant factors of Cslib.Complexity.BPTIME, which the printed proof sketch fixes at one (|C_x| ≤ |r| ^ 2). Whether the proposition holds as printed under the source's own conventions is open; the cited objective is tracked on #5452.

theorem Cslib.Complexity.BPTIME_subset_DTIME_of_exponentialTimePRG_of_growth {G : List Bool → List Bool} {S : ℕ → ℕ} (hG : ExponentialTimePRG G S) (hgrowth : ∀ (c : ℕ), ∃ (d : ℕ), ∀ (m : ℕ), c * S m ≤ S (d * (m + 1))) {ℓ : ℕ → ℕ} (hℓ : Turing.MultiTapeTM.ComputableInPolyTime ℓ Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) (hS : ∀ (n : ℕ), n ≤ S (ℓ n)) {α : Type} (enc : α ↪ List Bool) :
(BPTIME enc fun (n : ℕ) => S (ℓ n)) ⊆ ⋃ (c : ℕ), DTIME enc fun (n : ℕ) => 2 ^ (c * ℓ n)

Not Arora and Barak's Lemma 16.4: a conditional result under a growth hypothesis. Arora and Barak, Lemma 16.4 (draft of 2007-01-08, printed page 284, PDF page 300) states: if there exists an S(ℓ)-pseudorandom generator, then for every polynomial-time computable ℓ : ℕ → ℕ, BPTIME(S(ℓ(n))) ⊆ DTIME(2 ^ (c ℓ(n))) for some constant c. This theorem proves BPTIME(S(ℓ(n))) ⊆ ⋃ c, DTIME(2 ^ (c ℓ(n))), for every encoding of instances, under two hypotheses the source does not make:

  • growth, S(O(ℓ)) ≥ c S(ℓ): for every c there is d with c S(m) ≤ S(d (m + 1)) for all m; it holds for polynomial, 2 ^ (ℓ ^ ε) and 2 ^ (ε ℓ) stretch, and is implied by S(ℓ + O(1)) ≥ c S(ℓ), which fails for polynomial S;
  • n ≤ S(ℓ(n)).

They let longer seeds absorb the constant factors of Cslib.Complexity.BPTIME: a machine of time c' S(ℓ(n)) may toss more coins than the generator outputs, which the printed proof does not allow for. The constant c depends on the problem. The seed schedule ℓ is computed from n in unary to unary, so ℓ(n) ≤ poly(n). Whether the lemma holds as printed under the source's own conventions is open; the cited objective is tracked on #5452.

Arora and Barak's Corollary 16.6 #

theorem Cslib.Complexity.BPP_subset_quasiPoly_of_exponentialTimePRG {G : List Bool → List Bool} {S : ℕ → ℕ} (hG : ExponentialTimePRG G S) (hS : ∃ (ε : ℝ), 0 < ε ∧ ∀ᶠ (m : ℕ) in Filter.atTop, 2 ^ ↑m ^ ε ≤ ↑(S m)) {α : Type} (enc : α ↪ List Bool) :
BPP enc ⊆ ⋃ (c : ℕ), DTIME enc fun (n : ℕ) => 2 ^ Nat.log 2 n ^ c

Arora and Barak, Corollary 16.6 (2) Arora and Barak, Corollary 16.6 (draft of 2007-01-08, printed page 285, PDF page 301): if there exists a 2 ^ (ℓ ^ ε)-pseudorandom generator for some constant ε > 0, then BPP ⊆ QuasiP = DTIME(2 ^ polylog(n)), for every encoding enc of instances. QuasiP is written as ⋃ c, DTIME(2 ^ (log₂ n) ^ c). The output length S(ℓ) need only be at least 2 ^ (ℓ ^ ε) for all large ℓ, which covers any rounding.

The draft derives the corollary from its Lemma 16.4 (Exercise 16.1). Here it follows from the seed-length step Cslib.Complexity.CanonicalDerandomizer.exists_mem_DTIME_of_mem_BPTIME, with seeds of polylogarithmic length (b * (log₂ n + 1)) ^ e + M, for an integer e with 1 / e < ε, which needs no growth condition on S: the time bound of a BPP problem is a polynomial n ^ a, and the seeds are chosen with polynomial slack.

theorem Cslib.Complexity.BPP_subset_DTIME_two_pow_rpow_of_exponentialTimePRG {G : List Bool → List Bool} {S : ℕ → ℕ} (hG : ExponentialTimePRG G S) (hS : ∀ (a : ℕ), ∀ᶠ (m : ℕ) in Filter.atTop, m ^ a ≤ S m) {α : Type} (enc : α ↪ List Bool) :
BPP enc ⊆ ⋂ (ε : ℝ), ⋂ (_ : 0 < ε), DTIME enc fun (n : ℕ) => 2 ^ ⌈↑n ^ ε⌉₊

Arora and Barak, Corollary 16.6 (3) Arora and Barak, Corollary 16.6 (draft of 2007-01-08, printed page 285, PDF page 301): if there exists an S(ℓ)-pseudorandom generator for some super-polynomial S (S(ℓ) = ℓ ^ ω(1)), then BPP ⊆ SUBEXP = ⋂ ε > 0, DTIME(2 ^ (n ^ ε)), for every encoding enc of instances. Super-polynomial means that for every a, ℓ ^ a ≤ S(ℓ) for all large ℓ; the bound 2 ^ ⌈n ^ ε⌉ is 2 ^ (n ^ ε) rounded up to a natural exponent.

The draft derives the corollary from its Lemma 16.4 (Exercise 16.1). Here it follows from the seed-length step Cslib.Complexity.CanonicalDerandomizer.exists_mem_DTIME_of_mem_BPTIME, with seeds of ⌊n ^ (1 / d)⌋ + K bits, which needs no growth condition on S: the time bound of a BPP problem is a polynomial, and the seeds are chosen with polynomial slack.