Docsity

Reductions - Computability and Complexity - Solved Homework, Exercises of Advanced Computational Complexity

Toggle sidebar
bg1
CSE 200 HW 3 Solutions
Russell Impagliazzo
June 7, 2012
1 Reductions
Show that NP =co โˆ’N P if and only if NP is closed under polynomial time
Turing reductions.
Assume that NP were closed under polytime Turing reductions. Since every
problem in co โˆ’NP is reducible to its complement with one query, we would
have co โˆ’NP โŠ‚N P . Symetrically, NP โŠ‚co โˆ’N P . Thus, NP =co โˆ’N P .
Assume that NP =co โˆ’NP . Then for any problem in LโˆˆN P ,LโˆˆN P .
So there are polynomial-size and polynomial time verifiable certificates both
that element of Lis in Land any element in Lis not in L. Let AโˆˆPLfor
any LโˆˆNP , with a reduction that makes at most a polynomially bounded
function T(n) queries. Then to certify that Aaccepts on input x, we use the
following certificate format: a certificate is of the form (q1,a1, c1), ...(qT, aT, cT)
where Tโ‰คT(|x|), and each ciis of the form of a certificate for being in Lif
ai= 1 and for not being in Lif ai= 0 . Then the verification process is :
Simulate the reduction for i= 1..T . If the iโ€™th query of the reduction is not
qi, reject. Otherwise, simulate the reduction with response aito determine the
next query. If after Tqueries, the reduction do es not accept, reject. Then for
each certificate cj, if aj= 1, verify that cjis a certificate that qjโˆˆL. If aj= 0,
verify that cjis a certificate that qj6โˆˆ L. If any of these verifications fail, reject.
If we havenโ€™t rejected by the end, accept.
If xโˆˆA, the reduction actually makes some queries q1, ..qTand accepts.
Let ai= 1 if and only if qiโˆˆLbe the actual responses to the oracle. For each
qi, there is a certificate cithat either qiโˆˆLor qiโˆˆL. Then our verification
procedure will accept certificate (q1, a1, c1)...(qT, aT, cT).
If our verification procedure accepts (q1, a1, c1)....(qT, aT, cT), each aimust
really be the answer to whether qiโˆˆL. Also, as we simulate the reduction,
the reduction asks each qito the oracle, getting correct response ai, and finally
accepts. So the reduction accepts xwith the actual oracle for L, and so xโˆˆA.
Thus, xโˆˆAif and only if there is a valid certificate. Thus, we have a non-
determinstic procedure for deciding membership in A. Since all the queries the
reduction makes are polynomial size, and the ceritificates are polynomial size in
these queries, all certificates are polynomial size in the input length, and there
are polynomially many of them. So the entire certificate is polynomial length,
and our verification procedure takes polynomial time. Thus, AโˆˆNP .
1
pf3

Partial preview of the text

Download Reductions - Computability and Complexity - Solved Homework and more Exercises Advanced Computational Complexity in PDF only on Docsity!

CSE 200 HW 3 Solutions

Russell Impagliazzo

June 7, 2012

1 Reductions

Show that N P = co โˆ’ N P if and only if N P is closed under polynomial time Turing reductions. Assume that N P were closed under polytime Turing reductions. Since every problem in co โˆ’ N P is reducible to its complement with one query, we would have co โˆ’ N P โŠ‚ N P. Symetrically, N P โŠ‚ co โˆ’ N P. Thus, N P = co โˆ’ N P. Assume that N P = co โˆ’ N P. Then for any problem in L โˆˆ N P , L โˆˆ N P. So there are polynomial-size and polynomial time verifiable certificates both that element of L is in L and any element in L is not in L. Let A โˆˆ P L^ for any L โˆˆ N P , with a reduction that makes at most a polynomially bounded function T (n) queries. Then to certify that A accepts on input x , we use the following certificate format: a certificate is of the form (q 1 , a 1 , c 1 ), ...(qT , aT , cT ) where T โ‰ค T (|x|), and each ci is of the form of a certificate for being in L if ai = 1 and for not being in L if ai = 0. Then the verification process is : Simulate the reduction for i = 1..T. If the iโ€™th query of the reduction is not qi, reject. Otherwise, simulate the reduction with response ai to determine the next query. If after T queries, the reduction does not accept, reject. Then for each certificate cj , if aj = 1, verify that cj is a certificate that qj โˆˆ L. If aj = 0, verify that cj is a certificate that qj 6 โˆˆ L. If any of these verifications fail, reject. If we havenโ€™t rejected by the end, accept. If x โˆˆ A, the reduction actually makes some queries q 1 , ..qT and accepts. Let ai = 1 if and only if qi โˆˆ L be the actual responses to the oracle. For each qi, there is a certificate ci that either qi โˆˆ L or qi โˆˆ L. Then our verification procedure will accept certificate (q 1 , a 1 , c 1 )...(qT , aT , cT ). If our verification procedure accepts (q 1 , a 1 , c 1 )....(qT , aT , cT ), each ai must really be the answer to whether qi โˆˆ L. Also, as we simulate the reduction, the reduction asks each qi to the oracle, getting correct response ai, and finally accepts. So the reduction accepts x with the actual oracle for L, and so x โˆˆ A. Thus, x โˆˆ A if and only if there is a valid certificate. Thus, we have a non- determinstic procedure for deciding membership in A. Since all the queries the reduction makes are polynomial size, and the ceritificates are polynomial size in these queries, all certificates are polynomial size in the input length, and there are polynomially many of them. So the entire certificate is polynomial length, and our verification procedure takes polynomial time. Thus, A โˆˆ N P.

Since A was an arbitrary language in P N P^ , P N P^ โŠ‚ N P , i.e, N P is closed under polynomial time Turing reductions.

2 Probabilistic polynomial time

Show that if N P โŠ‚ BP P , then N P = RP. Without any assumptions, it is easy to see that RP โІ N P , since any ac- cepting run of the probabilistic algorithm is a witness that x โˆˆ L. If N P โІ BP P , then there is a probabilistic algorithm A that errs at most 1 /3 of the time deciding membership in an N P -complete problem, say SAT. As seen in class, by running A 2 m + 1 times and outputting the majority, we can make the error probability exponentially small in m. Call this algorithm Am. Let L be any language in N P. Let SearchL be the corresponding search problem. We can solve SearchL in P SAT^ , making a series of queries q 1 , qT to SAT. Picking m > clogT for sufficiently large constant c, we can make the error probability for Am at most 1/(3m). Then running the reduction but simulating the oracle with Am, the probability that we ever receive an incorrect answer is at most T times the probability that a particular query is erroneous, 1/(3T ), so at most 1/3. We can then verify that the solution produced is indeed a withness that x โˆˆ L. If it is, we accept, if not we reject. If x 6 โˆˆ L, there are no witnesses, so our algorithm can never find one. Thus, we always reject. If x โˆˆ L, with probability 2/3 all answers are simulated correctly, and the algorithm produces a witness that x โˆˆ L. Thus, our algorithm accepts with probability at least 2/3. Thus, L โˆˆ RP. So N P โІ RP โІ N P , and N P = RP.

3 Foundations of cryptography

Remember that a one-way function is a function F โˆˆ F P so that for any polyno- mial time probabilistic algorithm A and any polynomial p, for sufficiently large n, the probability over input x of length n and Aโ€™s random coins that A inverts F (x), i.e., that F (A(F (x))) = F (x), is at most 1/p(n). Let R(x, y) be a relation in P , with |y| = poly(|x|). A solved instance sampler S for R is a probabilistic time procedure that given 1n, S(1n) generates a distribution on pairs (xn, yn) so that |xn| = n and R(xn, yn). The sampler produces hard instances if for any probabilistic polynomial-time algorithm A and any polynomial p, for sufficiently large n, the probability that R(xn, A(xn)) is less than 1/p(n). Prove that there is a one-way function F if and only if there is a relation R โˆˆ P and a solved instance sampler S for R producing hard instances. Let F be a one-way function. Let RF ((1n, xโ€ฒ), yโ€ฒ) if and only if |yโ€ฒ| = n and F (yโ€ฒ) = xโ€ฒ. Consider the sampler S that on input 1n^ picks a random yโ€ฒ of length n, and lets xโ€ฒ^ = F (yโ€ฒ), outputing instance (1n, xโ€ฒ) and solution yโ€ฒ. By construction S is a sampler for R, since xโ€ฒ^ = F (yโ€ฒ) and |yโ€ฒ| = n. If any