A predicting collection is a collection of boolean circuits, such that each circuit has less than gates and exactly inputs. Let be the probability that, on input the first bits of , a string randomly selected in with probability , the circuit correctly predicts , i.e. :
Now, we say that passes the next-bit test if for any predicting collection , any polynomial :
We can also define the next-bit test in terms of probabilistic Turing machines, although this definition is somewhat stronger (see Adleman's theorem). Let be a probabilistic Turing machine, working in polynomial time. Let be the probability that predicts the st bit correctly, i.e.
We say that collection passes the next-bit test if for all polynomial , for all but finitely many , for all :
We prove it now in the case of probabilistic Turing machine, since Adleman has already done the work of replacing randomization with non-uniformity in his theorem. The case of boolean circuits cannot be derived from this case (since it involves deciding potentially undecidable problems), but the proof of Adleman's theorem can be easily adapted to the case of non-uniform boolean circuits families.
Let a distringuer for the probabilistic version of Yao's test, i.e. a probabilistic Turing machine, running in polynomial time, such that there is a polynomial such that for infinitely many
Let . We have : and . Then, we notice that . Therefore, at least one of the should be no smaller than .
Next, we consider probability distributions and on . Distribution is the probability distribution of choosing the first bits in with probability given by , and the remaining bits uniformly at random. We have thus :
We thus have (a simple calculus trick shows this), thus distributions and can be distinguished by . Without loss of generality, we can assume that , with a polynomial.
This gives us a possible construction of a Turing machine solving the next-bit test : upon receiving the first bits of a sequence, pads this input with a guess of bit and then random bits, chosen with uniform probability. Then it runs , and outputs if the result is , and else.