MaxSATByRandomizedRounding

Top | recent changes | Preferences

Showing revision 4
MAX K-SAT: Given a boolean formula in CNF form, where each clause has K distinct literals, find an assignment to the variables that maximizes the number of clauses satisfied.

Example: (X1 or X2 or -X3) and (-X1 or -X2 or X4) and (X2 or -X4 or X3) and ...

Max k-sat (1-1/2k)-approximation algorithm

Algorithm:

  1. Randomly assign each variable TRUE or FALSE.

thm: This is a (1-1/2k)-approximation algorithm (in expectation).

proof: Each clause is satisfied with probability 1-1/2k. By linearity of expectation, expected number of the C clauses satisfied is (1-1/2k)*C. Since OPT <= C, this is a (1-1/2k)-approximation algorithm (in expectation). QED

Note: the "method of conditional expectations" can be used to convert the randomized algorithm into a deterministic algorithm. In this case, the resulting algorithm is: Consider the variables in sequence. Assign each variable TRUE or FALSE to maximize the expected number of clauses that would be satisfied at the end if the rest of the assignments were to be made randomly.

Max-sat (1-1/e)-approximation algorithm

Integer linear program:

maximize i yi subject to

yi ≥ 0, yi ≤ 1 for each clause i
x1 + x2 + (1-x3) ≥ y1 for clause 1: (X1 or X2 or -X3)
(1-x1) + (1-x2) + x4 ≥ y2 for clause 2: (-X1 or -X2 or X4)
... etc. (a constraint for each clause)

0 ≤ xi ≤ 1 for each variable i.
xi integer for each variable i.

Relaxation (linear program):

maximize i yi subject to
yi ≥ 0, yi ≤ 1 for each clause i

x1 + x2 + (1-x3) ≥ y1 for clause 1: (X1 or X2 or -X3)
(1-x1) + (1-x2) + x4) ≥ y2 for clause 2: (-X1 or -X2 or X4)
...etc. (a constraint for each clause)
0 ≤ xi ≤ 1 for each variable i.

Algorithm, given MAX-SAT instance:

  1. Formulate and solve the linear program above for the instance.
  2. Let (x,y) be the optimal fractional solution.
  3. For each variable Xi independently, set the variable TRUE with probability xi.

THM: For instances with at most K literals, the above is a (1-(1-1/k)k)-approximation algorithm (in expectation).

Note: 1-(1-1/k)k ≥ (1-1/e).

Proof sketch:

Consider, for example, a clause with 3 literals. WLOG assume the clause is "X_1 or X_2 or X_3".

The probability that the clause is NOT satisfied is (1-x1)*(1-x2)*(1-x3) where x1+x2+x3 ≥ y1.

claim: 1-(1-x1)*(1-x2)*(1-x3) ≥ 1-(1-y1/3)3 ≥ y1(1-(1-1/3)3). (prove using calculus)

Therefore, the ith clause is satisfied with probability at least yi*[1-(1-1/k)k].
Therefore, by linearity of expectation, the expected number of satisfied clauses is at least i yi*[1-(1-1/k)k] ≥ OPT * [1-(1-1/k)k].

3/4-approximation algorithm for MAX-SAT:

  1. Use one of the two previous algorithms, chosen at random.

THM: The above algorithm is a 3/4-approximation algorithm, in expectation.

Proof sketch:

For a clause i with k literals, the probability that it is satisfied is

(1/2)*[1-1/2k] + (1/2)*yi[1-(1-1/k)k] ≥ yi*{ [1-1/2k] +[1-(1-1/k)k] } / 2 ≥ (3/4)yi.

Therefore, the expected number of satisfied clauses is ≥ i (3/4)yi ≥ 3/4 OPT.

 
References:

Top | recent changes | Preferences
This page is read-only | View other revisions | View current revision
Edited October 4, 2004 12:02 pm by Neal (diff)
Search: