Chapter 9: 8 E (page 308)
In the MAX SAT problem, we are given a set of clauses, and we want to find an assignment that satisfies as many of them as possible.
(a) Show that if this problem can be solved in polynomial time, then so can SAT.
(b) Here’s a very naive algorithm.
for each variable:
set its value to either by flipping a coin
Suppose the input has m clauses, of which the has literals. Show that the expected number of clauses satisfied by this simple algorithm is
In other words, this is a 2-approximation in expectation! And if the clauses all contain literals, then this approximation factor improves to
(c) Can you make this algorithm deterministic? (Hint: Instead of flipping a coin for each variable, select the value that satisfies the most of the as of yet unsatisfied clauses. What fraction of the clauses is satisfied in the end?)
Short Answer
This problem can be solved in polynomial time is shown below.
b). Thenaive algorithm is proved.
c). Yes, this algorithm is deterministic.