CS254
Chris Pollett
Mar 8, 2017
Theorem. `S` is either one of the six cases we've considered and SAT(S) is in P, or SAT(S) is NP-complete.
Proof Idea. We've already established last day, if `S` is one of the six cases then SAT(S) does have a p-time algorithm. Suppose `S` does not correspond to one of the six cases. We can prove (but don't in my slides) the following lemmas:
Let C[] be an array of m clauses each element initially containing no variables Let x[i] indicate the ith variable and ~x[i] the negation of it for (i = 1; i <= m; i++) { for (j = 1; j <= 3; i++) { Pick at random k in {1, 2, ... n} Pick at random v in {+1, -1}. if (v == 1) { C[i][j] = x[k]; } else { C[i][j] = ~x[k]; } } }
Theorem (CS88) Suppose instances of 3-SAT are chosen according to the process of the previous slide. Then if the clause to variable ratio exceeds 5.19 then as `n` the number of variables in the instances gets larger, the odds the instance is satisfiable goes to 0.
Proof. A given clause chosen by the process of the last slide will have at most a 7/8 chance of being satisfied by any given assignment. As we chose clauses independently of each other the odds an `m` clause formula will be satisfied by a particular assignment is `(7/8)^m`. The odds that some assignment on `n` variable would make an `m` clause formula 1 is less than `2^n(7/8)^m`. This will converge to 0 as `n -> infty` if `(2^n(7/8)^m)^{1/n} < 1`. We note
`(2^n(7/8)^m)^{1/n} = 2 cdot (7/8)^{m/n}`
and solving the equation `2 cdot (7/8)^{m/n} = 1` implies a value `m/n` of
`- (ln2)/ln (7/8) approx 5.19`.
Input F a CNF formula Let F[0] = F for (t = 1; t <= n ; t++) { if (clauses of size 1 exist in F[t-1]) { L = Pick an unset literal from a uniformly randomly chosen clause in F[t-1] of size 1. } else if (clauses of size 2 exist in F[t-1]) { L = Pick an set literal from a uniformly randomly chosen clause in F[t-1] of size 2. } else { L = Pick a unset literal uniformly at random from F[t-1]. } Set L = 1; F[t] = F[t-1] with the value for L substituted in; }
Generate a random 3SAT formula using our procedure above with 3 variables and 6 clauses. We would expect such a formula to be satisfiable.
Now apply the procedure of the previous slide to choose an assignment for the three variables. Did it satisfy your formula?
Take pictures of your work and post them to the Mar 8 Class Thread.