Suppose we want to fool a complexity class C. That is, we want to find an explicit function g:{0,1}r{0,1}n that blows up a small r-bit “seed” into a long n-bit string in such a way that the output “fools” any functions in C. That is, the “sample mean” (over the 2r output values of g) should closely match the “true mean”:

Prs{0,1}r[f(g(s))]Prx{0,1}n[f(x)]±ϵ.

How big does r need to be as a function of C?

The gold standard for a pseudorandom generator would be to match the performance of a randomly chosen sample of 2r strings from {0,1}n.

By a Hoeffding bound, for any given fC, the chance that the sample mean for f is off by more than ϵ is 2Ω(2rϵ2). So to make sure that this sample works for all functions in some class C simultaneously, we set (roughly)

22rϵ2=1/|C|failure probability2r=(log|C|)/ϵ2sample sizer=Θ(loglog|C|+log(1/ϵ))seed length.