The Nisan–Wigderson generator and its reconstruction #
An (ℓ, n, a)-design with m blocks is a family of m subsets of Fin ℓ, each with n elements,
any two of which share at most a elements. Given such a design and a Boolean function f on n
bits, the Nisan–Wigderson generator stretches a seed z of ℓ bits to the m bits
f (z|S₀) … f (z|Sₘ₋₁), where z|S lists the bits of z in S in increasing order of position
[NW94], Arora and Barak, Chapter 20.
Its analysis is a reconstruction. Suppose that a test accepts generated outputs with probability
at least ε more than uniform ones. By the next-bit theorem
(Cslib.Crypto.PRG.Generator.exists_half_add_div_le_predictionExperiment), the predictor built
from the test guesses some bit i from the bits before it with probability at least
1 / 2 + ε / m. This probability is an average over seeds, and a seed consists of the input
x = z|Sᵢ of bit i together with the bits outside Sᵢ, so for some choice of the bits outside
Sᵢ the predictor still guesses f x from the earlier bits with probability at least
1 / 2 + ε / m. Once the bits outside Sᵢ are fixed, each earlier bit j < i depends on x
only through the at most a positions of Sᵢ ∩ Sⱼ, so as a function of x it is given by a
table of at most 2 ^ a values of f. For a deterministic test, fixing the random choices of the
predictor as well yields a function that agrees with f on at least a 1 / 2 + ε / m fraction
of the inputs and is computed by the test from i functions of at most a input bits each. A
lower bound on the size of circuits approximating f thus becomes a lower bound on the size of
circuits distinguishing the generator; this file is the finite core of that argument, without a
model of computation.
Designs with good parameters exist (Cslib.Crypto.PRG.NisanWigderson.Design.nonempty_four_mul_sq).
Main definitions #
Cslib.Crypto.PRG.NisanWigderson.Design: an(ℓ, n, a)-design withmblocks.Cslib.Crypto.PRG.NisanWigderson.Design.restrict,Cslib.Crypto.PRG.NisanWigderson.Design.extend: reading a block of a string, and overwriting it.Cslib.Crypto.PRG.NisanWigderson.Design.overlap: the positions of one block lying in another.Cslib.Crypto.PRG.NisanWigderson.generator: the Nisan–Wigderson generator.Cslib.Crypto.PRG.NisanWigderson.hardwiredExperiment: the prediction experiment for bitiwith the seed bits outside thei-th block fixed.
Main results #
Cslib.Crypto.PRG.NisanWigderson.predictionExperiment_generator: the prediction experiment is the average of the hardwired experiments, soCslib.Crypto.PRG.NisanWigderson.exists_predictionExperiment_le_hardwiredExperimentsome hardwiring does at least as well.Cslib.Crypto.PRG.NisanWigderson.dependsOn_generator_extend,Cslib.Crypto.PRG.NisanWigderson.Design.card_overlap_le: with the bits outside blockifixed, output bitj ≠ idepends on at mostabits of the input of biti.Cslib.Crypto.PRG.NisanWigderson.exists_half_add_div_le_hardwiredExperiment: the reconstruction for randomized tests, in the language of the next-bit test.Cslib.Crypto.PRG.NisanWigderson.exists_half_add_div_le_card_nextBitGuess_eq,Cslib.Crypto.PRG.NisanWigderson.exists_dependsOn_half_add_div_le_card_nextBitGuess_eq: the reconstruction for deterministic tests, as a statement about functions:fagrees on a1 / 2 + ε / mfraction of inputs with a function computed by the test fromifunctions of at mostainput bits each.
References #
An (ℓ, n, a)-design with m blocks Arora and Barak, Chapter 20: m subsets
of Fin ℓ, each with n elements, any two distinct ones sharing at most a elements.
The
i-th block of the design.Every block has
nelements.Two distinct blocks share at most
aelements.
Instances For
With the bits outside the i-th block fixed to those of w, the bits in the j-th block
depend on the bits x in the i-th block only through the positions in D.overlap i j.
The Nisan–Wigderson generator of a design D and a function f on n bits
Arora and Barak, Chapter 20: bit i of the output on a seed z is f applied to
the bits of z in the i-th block.
Instances For
With the bits outside the i-th block fixed to those of w, output bit j of the
generator depends on the bits x in the i-th block only through the positions in
D.overlap i j. For j ≠ i there are at most a of them (Design.card_overlap_le).
The prediction experiment for bit i of the generator with the seed bits outside the i-th
block fixed to those of w: the input x of bit i is uniform, the predictor receives the
first i bits of the output on the seed D.extend i x w, and the experiment outputs true
exactly when the predictor's guess is f x.
Instances For
The prediction experiment for bit i of the generator is the average, over a uniform w,
of the experiments with the seed bits outside the i-th block fixed to those of w.
Hardwiring. Some choice of the seed bits outside the i-th block keeps the probability
that a predictor guesses bit i of the generator correctly.
The Nisan–Wigderson reconstruction Arora and Barak, Chapter 20. If 0 < m
and a test accepts outputs of the generator with probability at least ε more than uniform strings,
then for some position i and some choice w of the seed bits outside the i-th block, the
predictor built from the test guesses f x from the first i bits of the output on
D.extend i x w with probability at least 1 / 2 + ε / m, for a uniform x. By
dependsOn_generator_extend and Design.card_overlap_le, each of these i bits depends on at most
a bits of x.
The hardwired experiment against the predictor built from a deterministic test, with the random choices of the predictor drawn first.
The Nisan–Wigderson reconstruction for deterministic tests, with explicit hardwiring. If
0 < m and a deterministic test accepts outputs of the generator with probability at least ε
more than uniform strings, then for some position i, seed w, bit r and string u, the
guess nextBitGuess test i r u on the first i bits of the output on D.extend i x w equals
f x for at least a 1 / 2 + ε / m fraction of the inputs x.
The Nisan–Wigderson reconstruction for deterministic tests, as a statement about
functions. If 0 < m and a deterministic test accepts outputs of the generator with probability
at least ε more than uniform strings, then for some position i there are a bit r, a string
u, and i functions bit j on n bits, each depending only on a set s j of at most a
positions, such that nextBitGuess test i r u (fun j => bit j x) = f x for at least a
1 / 2 + ε / m fraction of the inputs x.