MAX CNF-SAT
Input: boolean formula (clause lenght not fixed) Goal: find assignment that maximises # of sat clauses
Random assignment algoritm for fixed k
-
set with prob. note: works best with long clauses ( number of literals)
-
divide and conquer, finds at leeast SAT clauses.
LP-relaxation + Randomized Rounding
- variabili:
- funzione obj:
where is a weight, (for max CNFSAT ), we get something for free. 3. creare i vincoli:
where and are the set of variables and negated variables of clause respectivly. 4. rilasso, passo al continuo
We get a linear programming problem, solvable in P time. Since the serch space of the lineare problem is bigger, the solution is better than the discrete one:
- rounding. We do it probabilistically:
expected number of SAT clauese:
where if is SAT or not. (we used linearity and expted of bernoullui random variable).
Pick a clause with literals.
in fact: