






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!







Notes for CMSC 652 On the Number of Satisfying Assignments William Gasarch
The work in this section is due to Valiant and Vazarani [3]. Our presentation is largely taken from Kobler, Schoning, Toran [1]. Given a Boolean Formula we usually wonder if it has a satisfying assign- ment. We look at questions about the NUMBER of satisfying assignments.
Notation 1.1 If φ is a Boolean formula then #(φ) is the number of satis- fying assignments for φ.
We will concentrate on the following set:
PARITYSAT = {φ : #(φ) ≡ 1 (mod 2)}. Is PARITYSAT easy? hard? Our goal is as follows: If PARITYSAT ∈ P, then SAT can be solved with a randomized poly time algorithm. Since we do not think SAT can be solved with a randomized poly time algorithm, we think PARITYSAT ∈/ P.
Def 2.1 A set A is in R (Randomized Polynomial Time) if there exists a polynomial p, and a polynomial predicate B so that for all n, and for all x with |x| = n, we have
x ∈ A ⇒ Pr|r|=p(n)(B(x, r)) ≥ (^34) x /∈ A ⇒ Pr|r|=p(n)(¬B(x, r)) = 1
(Think of r as being a random string.)
Exercise 1
Note 2.2 We have defined R with 1-sided error. This is because most ran- domized algorithms that are actually out there have 1-sided error. Classes with 2-sided error have also been defined.
Note 2.3 If a problem is in R, then we think of it as feasible to solve in the real world. This is because there are good (though not provably good) random number generators. There are also theoretical reasons to think that P = R (see [2]).
Example 2.4 Let DETPOLYZERO be the set of all square matrices of poly- nomials in one variable over the integers M (x) such that the DET (M (x)) ≡ 0 (that is, for any real a, DET (M (a) = 0)).
M 1 (x) =
( x x − 1 x + 1 x^2 − 1
)
is NOT in DETPOLYZERO since DET (M 1 (x)) = x(x^2 − 1) − (x − 1)(x + 1) = x^3 − x − (x^2 − 1) = x^3 − x^2 − x + 1 6 ≡ 0.
M 2 (x) =
( 1 x − 1 x + 1 x^2 − 1
)
is IN DETPOLYZERO since the determinant is DET (M 2 (x)) = x^2 − 1 − (x − 1)(x + 1) = x^2 − 1 − (x^2 − 1) = 0.
Here is a randomized algorithm for DETPOLYZERO.
Proof: Assume A ≤p r B via the function f and polynomials p, q.
If x /∈ A then, for all i, f (x, ri) ∈/ B hence the algorithm will (correctly) say NO. If x ∈ A then, for each i, Pr(f (x, ri) ∈/ B) ≤ (1 − (^) q(^1 n) ). Hence
[Pr((∀i)[f (x, ri) ∈/ B])] ≤ (1 − (^) q(^1 n) )^2 q(n) ≤ (e−^1 /q(n))^2 q(n) ≤ (e−^1 )^2 ≤ (^) e^12 ≤ 14.
Hence Pr((∃i)[f (x, ri) ∈ B]) ≥ 1 − 14 = 34. This establishes the desired result.
Exercise 3 Show that if A ≤p r B and B ∈ R then A ∈ R.
Given a formula φ we want to produce a formula φ′^ such that
φ ∈ SAT ⇒ #(φ′) = 1 with high probability; φ /∈ SAT ⇒ #(φ) = 0.
We view a formula as a set of satisfying assignments. Hence we want to map this set to a much smaller set. How do computer scientists map large sets to small sets? By using Hash Functions! The next section has all we will need.
If a set is ‘large’ then a randomly chosen hash function (which we assume is fairly uniform) is quite likely to map some element to some fixed element. If a set is ‘small’ then this is unlikely. In particular, if a random string r is interpreted as a random hash function and A is large, then it is quite likely that some element of A maps to 0k.
Def 4.
Lemma 4.2 Let X ⊆ { 0 , 1 }N^. Assume 0 N^ ∈/ X. Consider the following random variable: Pick a random k × N matrix (k rows, N columns) of 0’s and 1’s. The matrix computes a function h : { 0 , 1 }N^ → { 0 , 1 }k. Let
S = |{x ∈ X : h(x) = 0k}|.
Output |S|. Then E(S) = 2−k|X| and V ar(S) ≤ 2 −k|X|. (Note that neither E(S) nor V ar(S) depends on N , just on k and |X|.)
Proof: Before looking at E(S) and V ar(S) we will need to look at E of some easier random variabless Let x, y ∈ X. Let Rx be the random variable Rx =
{ 1 if h(x) = 0k; 0 if h(x) 6 = 0k. Let Ry be similar. Let hi(x) be the ith element of the vector h(x).
Def 5.1 Let ∈ N. Then SAT is
{φ : 1 ≤ #(φ) ≤ `}.
We will first show SAT ≤p r SAT 12 and then use this in our reduction SAT ≤p r PARITYSAT. The reason we use SAT 12 (as opposed to SAT 17 or something else) will become evident later. We use the following lemma which is Chebyshev’s inequality. We do not present a proof.
Lemma 5.2 If S is any random variable and a > 0 then Pr(|S − E(S)| ≥ a) < V ar a 2 ( S).
Intuitively this is saying that the probability that S is far away from E(S) is small, and how small depends on V ar(S).
Lemma 5.3 SAT ≤p r SAT 12.
Proof: Here is the randomized reduction.
Clearly if φ /∈ SAT then φ′^ ∈/ SAT 12. Assume φ ∈ SAT. We show that the Pr(φ′^ ∈ SAT 12 ) ≥ (^21) n. There are two cases.
Case 1: #(φ) ≤ 12. If k is assigned to 0 at random then φ = φ′^ ∈ SAT 12. The probability that k = 0 is (^1) n ≥ (^21) n. Case 2: #(φ) ≥ 13. Let m be such that 2m^ < #(φ) ≤ 2 m+1. We look at what happens if k = m − 2. Let X be the set of satisfying assignments of φ. We have 2 m^ < |X| ≤ 2 m+1.
We are picking a random hash function h : { 0 , 1 }n^ → { 0 , 1 }k. Let
S = |{x ∈ { 0 , 1 }n^ : h(x) = 0k}|.
By Lemma 4.2 we know that
E(S) = 2−k|X| = 2−(m−2)|X|
and V ar(S) ≤ 2 −(m−2)|X|.
Hence 2 −(m−2)+m^ < E(S) ≤ 2 −(m−2)+m+1,
so 4 < E(S) ≤ 8
and V ar(S) < 8.
We want Pr(S ∈ { 1 ,... , 12 }). This is 1 − Pr(S /∈ { 1 ,... , 12 }). So what is Pr(S /∈ { 1 ,... , 12 })? Note that S /∈ { 1 ,... , 12 } ⇒ (S = 0) ∨ (S ≥ 13) Since E(S) ≥ 4, S = 0 ⇒ |S − E(S)| ≥ 4. Since E(S) ≤ 8, S ≥ 13 ⇒ |S − E(S)| ≥ 5. Hence S /∈ { 1 ,... , 12 } ⇒ (S = 0) ∨ (S ≥ 13) ⇒ |S − E(S)| ≥ 4. Hence
Pr(S /∈ { 1 ,... , 12 }) ≤ Pr(|S − E(S)| ≥ 4). By Chebyshev’s inequality
Note that ψ(B 1 ,... , Bm) is true, and is the only satisfying assignment for ψ. Hence #(ψ) = 1 ≡ 1 (mod 2). Hence if m = i then ψ ∈ PARITYSAT. The probability that m = i is 121. The probability that φ′^ ∈ SAT 12 is ≥ (^21) n. Hence the probability that ψ ∈ PARITYSAT is ≥ (^241) n.
Corollary 5.
Proof: We obtain a by combining Theorem 2.7 and 5.4. We obtain b by combining Exercise 3 and 5.4.
The reduction from Theorem 5.4, SAT ≤p r PARITYSAT, actually showed SAT ≤p r SAT 1. This result is not that interesting becuase of the following easy exercise.
Exercise 4 Show that if SAT 1 ∈ P then SAT ∈ P.
Let us look at the reduction SAT ≤p r SAT 1 more carefully. We actually have φ ∈ SAT ⇒ φ′^ ∈ SAT 1 probability ≥ (^21) n φ /∈ SAT ⇒ φ′^ ∈/ SAT. So if φ′^ is the output then, with probability ≥ (^21) n , #(φ′) ∈ { 0 , 1 }. This motivates the following definition.
Def 6.1 A promise problem is a pair (A, P R) where both A and P R are subsets of Σ∗. P R is refereed to as the promise. The promise problem (A, P R) is in P if there exists a poly time algorithm M such that P R(x) = 1 ⇒ M (x) = A(x). Note that we do not care what M (x) does if P R(x) = 0. By using Theorem 5.4 and the fact that the output φ′^ of the reduction satisfies (with high probability) the promise #(φ) ∈ { 0 , 1 }, we can obtain the following.
Theorem 6.2 Let P R(φ) be the promise that #(φ) ∈ { 0 , 1 }. If the promise problem (SAT 1 , P R) can be solved in P then NP = R.
[1] J. K¨obler, U. Sch¨oning, and J. Tor´an. The Graph Isomorphism Problem: Its Structural Complexity. Progress in Theoretical Computer Science. Birkhauser, Boston, 1993.
[2] N. Nisan and A. Wigderson. Hardness vs randomness. Journal of Com- puter and System Sciences, 49, 1994. Prior version in FOCS88.
[3] L. G. Valiant and V. V. Vazirani. NP is as easy as detecting unique solutions. Theoretical Computer Science, 47:85–93, 1986. Earlier version in STOC85.