






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







CS225: Pseudorandomness Prof. Salil Vadhan
April 10, 2007
Based on scribe notes by Alexandr Andoni, Saurabh Sanghvi, David Woodruff, Yan-Cheng Chang, and Kevin Matulef. Lecture given by Dan Gutfreund..
Our accomplishments in derandomization in the class so far include the following:
However, all of these still fall short of answering our original motivating question, of whether every randomized algorithm can be efficiently derandomized. That is, does BPP = P?
As we have seen, one way to resolve this question in the positive is to use the following two-step process: First show that the number of random bits for any BPP algorithm can be reduced from nc^ to O(log n), and then eliminate the randomness entirely by enumeration.
Thus, we would like to have a function G : { 0 , 1 }O(log^ n)^ → { 0 , 1 }n c that stretches a seed of O(log n) truly random bits into nc^ bits that ‘look random’. Such a function is called a pseudorandom generator. The question is how we can formalize the requirement that the output should ‘look random’ in such a way that (a) the output can be used in place of the truly random bits in any BPP algorithm, and (b) such a generator exists.
Some candidate definitions for “looks random” include the following:
n). However, if the function G is computable (which we certainly want!) then all of its out- puts have Kolmogorov complexity O(log n) (just hardwire the seed into the TM computing G), and hence are very compressible.
|P r[X ∈ T ] − P r[Y ∈ T ]|. With computational indistinguishability, we simply restrict the max to be taken only over “efficient” statistical tests T (T ’s for which membership can be efficiently tested).
Definition 1 (computational indistinguishability) Random variables X and Y taking values in { 0 , 1 }n^ are (t, ε) indistinguishable if for every nonuniform algorithm running in time t, we have
|Pr[T (X) = 1] − Pr[T (Y ) = 1]| ≤ ε.
The left-hand side above is called also the advantage of T.
Recall that a nonuniform algorithm is an algorithm that may have some nonuniform advice hard- wired in. If the algorithm runs in time t we require that the advice string is of length at most t. Typically, to make sense of complexity measures like running time, it is necessary to use asymp- totic notions (e.g. because a Turing machine can encode a huge lookup table in its transition function). However, for nonuniform algorithms, we can avoid doing so by using Boolean circuits as our nonuniform model of computation. As mentioned earlier in the course, every nonuniform Turing machine algorithm running in time t(n) can be simulated by a sequence of Boolean circuit Cn of size O˜(t(n)) and conversely every sequence of Boolean circuits of size s(n) can be simulated by a nonuniform Turing machine running in time O˜(s(n)). Thus, to make our notation cleaner, by ‘nonuniform algorithm running in time t’, we mean ‘Boolean circuit of size t’ (where the size is measured by the number of AND and OR gates in the circuit).
That said, it is of interest to study computational indistinguishability and pseudorandomness against uniform algorithms.
Definition 2 (uniform computational indistinguishability) Let Xn, Yn be some sequences of random variables on { 0 , 1 }n^ (or { 0 , 1 }poly(n)). For functions t : N → N and ε : N → [0, 1], we say that {Xn} and {Yn} are (t(n), ε(n)) indistinguishable for uniform algorithms if for all probabilistic algorithms T running in time t(n), we have that
|Pr[T (Xn) = 1] − Pr[T (Yn) = 1]| ≤ ε(n)
for all sufficiently large n, where the probabilities are taken over Xn, Yn and the random coin tosses of T.
We will focus on the nonuniform definition, but will mention results about the uniform definition as well.
Claim 6 For every x of length n, A(x; Gnc^ (U`(nc))) errs with probability smaller than 1 / 2.
Proof of claim: Suppose not. Then T (·) = A(x, ·) is a nonuniform algorithm running in time nc^ that distinguishes Gnc (U`(nc)) from Unc with advantage at least 1 / 2 − 1 / 3 > 1 /8. Notice that we are using x here as nonuniform advice; this is why we need the PRG to be robust against nonuniform tests. §
Now, enumerate over all seeds of length (nc) and take a majority vote. There are 2(nc)^ of them, and for each we have to run both G and A.
Notice that we can afford for the generator Gn have running time t(n) = poly(n) or even t(n) = 2 O(`(n))^ without affecting the time of the derandomization polynomially. In particular, for this application, it is OK if the generator runs in more time than the tests it fools (which are time n in this theorem).
The theorem provides a mechanism to produce various different theorems, relating the existence of PRGs for certain seed lengths with the ability to derandomize. Let’s look at some typical settings of parameters to see what we might imagine proving with this theorem. Assuming throughout that t(n) = poly(n) or t(n) = 2O(`(n)), we have:
n≤ )def = SUBEXP. Since we know that SUBEXP is a proper subset of EXP, this would be a nontrivial im- provement on the current inclusion BPP ⊆ EXP.
c DTIME( logc^ n) def = P˜. ( P˜ is known as “quasi-polynomial” time).
Of course, the previous section makes it incumbent on us to determine if PRGs exist. As usual in this course, the answer is yes but the proof is not very helpful—it is nonconstructive and thus does not provide for an efficient PRG.
Proposition 7 For all t ∈ N and ε > 0 , there exists a (t, ε) PRG G : { 0 , 1 }`^ → { 0 , 1 }t^ with seed length O(log t + log(1/ε)).
Proof: The proof is by the probabilistic method. Choose G : { 0 , 1 }`^ → { 0 , 1 }n^ at random. Now, fix a time t algorithm, T.
The probability (over choice of G) that T distinguishes G(U) from Un with advantage ≤ is at most 2 −Ω(≤ (^2) ) , by a Chernoff bound argument.
There are 2poly(t)^ nonuniform algorithms running in time t (i.e. circuits of size t). Thus, union- bounding over all possible T , and setting ≤ = 1/t, we get that the probability that there exists a T breaking G is at most 2poly(t) 2 −Ω( ε (^2) ) , which is less than 1 for being O(log t + log(1/ε)).
Note that putting together Proposition 7 and Theorem 5 gives us another way to prove that BPP ⊆ P/poly. Just let the advice string be the truth table of the PRG for the proper length, and then one can use that PRG and the proof of Theorem 5 to derandomize BPP. However, if you unfold both this proof and our previous proof (where we do error reduction and then fix the coin tosses), you will see that both proofs amount to exactly the same ‘construction’.
The theory of computational pseudorandomness developed in this lecture emerged from cryptogra- phy, where researchers sought a definition that would ensure that using pseudorandom bits instead of truly random bits (e.g. when encrypting a message) would retain security against all computa- tionally feasible attacks. In this setting, the generator G is used by the honest parties and thus should be very efficient to compute. On the other hand, the distinguisher T corresponds to an attack carried about by an adversary, and we want to protect against adversaries that invest a lot of computational resources into trying to break the system. Thus, one is led to require that the pseudorandom generators be secure even against adversaries with greater running time. The most common setting of parameters in the theoretical literature is that the generator should run in a fixed polynomial time, but the adversary can run in an arbitrary polynomial time.
Definition 8 A generator Gn : { 0 , 1 }`(n)^ → { 0 , 1 }n^ is a cryptographic pseudorandom generator if
Due to time constraints and the fact that such generators are covered in cryptography courses here and at MIT, we will not do an in-depth study of cryptographic generators, but just survey what is known about them.
The first question to ask is whether such generators exist at all. It is not hard to show that cryptographic pseudorandom generators cannot exist unless P 6 = NP, indeed unless NP 6 ⊆ BPP. Thus, we do not expect to establish the existence of such generators unconditionally, and instead need to make some complexity assumption. While it would be wonderful to show that NP 6 ⊆ BPP implies that existence of cryptographic pseudorandom generators, that too seems out of reach. However, we can base them on the very plausible assumption that there are functions that are easy to evaluate but hard to invert.
Definition 9 fn : { 0 , 1 }n^ → { 0 , 1 }n^ is a one-way function if:
Pr[A(f (Un)) ∈ f −^1 (f (Un))] ≤
nd for all sufficiently large n.
It is known how to do this from any one-way permutation f : { 0 , 1 }^ → { 0 , 1 }. In fact, the construction of pseudorandom generators from one-way permutations has a particularly simple description:
Gm(x, r) = (〈x, r〉, 〈f (x), r〉, 〈f (f (x)), r〉,... , f (m−1)(x), r〉),
where |r| = |x| = ` and 〈·, ·〉 denotes inner product modulo 2. One intuition for this construction is the following. Consider the sequence (f (m−1)(Un), f (m−2)(Un),... , f (Un), Un). By the fact that f is hard to invert (but easy to evaluate) it can be argued that the i + 1’st component of this sequence is infeasible to predict from the first i components except with negligible probability. Thus, it is the computational analogue of a block source. The pseudorandom generator then is obtained by a computational analogue of block-source extraction, using the strong extractor Ext(x, r) = 〈x, r〉. The fact that the extraction works in the computational setting, however, is much more delicate and complex to prove than in the setting of extractors.
Pseudorandom Functions. It turns out that a cryptographic pseudorandom generator can be used to build an even more powerful object — a family of pseudorandom functions. This is a family of functions {fs : { 0 , 1 }^ → { 0 , 1 }}s∈{ 0 , 1 } such that (a) given the seed s, the function fs can be evaluated in polynomial time, but (b) without the seed, it is infeasible to distinguish an oracle for fs from an oracle to a truly random function. Thus in some sense, the -bit truly random seed s is stretched to 2^ pseudorandom bits (namely the truth table of fs)!
Pseudorandom functions have applications in several domains:
^ → { 0 , 1 } (by definition, the function they share is indistinguishable from random by any poly-time 3rd party). Thus, in order for one party to send an encrypted message m to the other, they could simply choose a random r ∈ { 0 , 1 }, and send (r, fs(r) ⊕ m). It is easy to see how someone with knowledge of s could decrypt- simply calculate fs(r) and add it to the second part of the received message. However, the value fs(r) ⊕ m would look essentially random to anyone without knowledge of s. This is just one example; pseudorandom functions have vast applicability in cryptography.In this section we will prove a useful property of computational indistinguishability, and along the way start getting used to working with this notion. The following lemma illustrates that com- putational indistinguishability behaves like statistical difference when taking many independent repetitions; the distance ε multiplies by the number of copies. Proving it will introduce useful tech- niques for reasoning about computational indistinguishability, and will also illustrate how working with such computational notions can be more subtle than working with statistical notions.
Proposition 13 If X and Y are (t, ε) indistinguishable, then for every k, Xk^ and Y k^ are (t, kε) indistinguishable (where Xk^ represents k independent copies of X).
Proof: We will prove the contrapositive: if there is an efficient algorithm T distinguishing Xk^ and Y k^ with advantage greater than kε, then there is an efficient algorithm T ′^ distinguishing X and Y with advantage greater than ε. The algorithm T ′^ will naturally use the algorithm T as a subroutine. Thus this is a reduction in the same spirit as reductions used elsewhere in complexity theory (NP- completeness). The difference in this proof from the corresponding result about statistical difference is that we need be sure to preserve efficiency when going from T ′^ to T.
Suppose that there exists a nonuniform algorithm T such that
∣ ∣∣Pr[T (Xk) = 1] − Pr[T (Y k) = 1]
∣∣ > kε (1)
We can drop the absolute value in the above expression without loss of generality. (Otherwise we can replace T with its negation; recall that negations are free in our measure of circuit size.)
Now we will use a “hybrid argument.” Consider the hybrid distributions Hi = Xk−iY i, for i = 0 ,... , k. Note that H 0 = Xk^ and Hk = Y k.
Then Inequality 1 is equivalent to
∑^ k
i=
Pr[T (Hi− 1 ) = 1] − Pr[T (Hi) = 1] > kε,
Therefore,
Pr[T ′(Xn) = 1] − Pr[T ′(Yn) = 1] =
k
(Pr[T (H 0 ) = 1] − Pr[T (Hk) = 1]) > ε.
Note that time(T ′) = time(T ) + O(k(n) · s(n)). §
This illustrates that computational indistinguishability is more subtle than statistical difference, and obtaining reductions for uniform algorithms is more difficult than obtaining reductions for nonuniform algorithms.