Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SAT/CNF optimization

Problem

I'm looking at a special subset of SAT optimization problem. For those not familiar with SAT and related topics, here's the related Wikipedia article.

TRUE=(a OR b OR c OR d) AND (a OR f) AND ...

There are no NOTs and it's in conjunctive normal form. This is easily solvable. However I'm trying to minimize the number of true assignments to make the whole statement true. I couldn't find a way to solve that problem.

Possible solutions

I came up with the following ways to solve it:

  1. Convert to a directed graph and search the minimum spanning tree, spanning only a subset of vertices. There's Edmond's algorithm but that gives a MST for the complete graph instead of a subset of the vertices.
    • Maybe there's a version of Edmond's algorithm that solves the problem for a subset of the vertices?
    • Maybe there's a way to construct a graph out of the original problem that's solvable with other algorithms?
  2. Use a SAT solver, a LIP solver or exhaustive search. I'm not interested in those solutions as I'm trying to use this problem as lecture material.

Question

Do you have any ideas/comments? Can you come up with other approaches that might work?

like image 667
Simon Avatar asked Jan 17 '12 14:01

Simon


1 Answers

This problem is NP-Hard as well.

One can show an east reduction from Hitting Set:

Hitting Set problem: Given sets S1,S2,...,Sn and a number k: chose set S of size k, such that for every Si there is an element s in S such that s is in Si. [alternative definition: the intersection between each Si and S is not empty].

Reduction:
for an instance (S1,...,Sn,k) of hitting set, construct the instance of your problem: (S'1 AND S'2 And ... S'n,k) where S'i is all elements in Si, with OR. These elements in S'i are variables in the formula.

proof:
Hitting Set -> This problem: If there is an instance of hittins set, S then by assigning all of S's elements with true, the formula is satisfied with k elements, since for every S'i there is some variable v which is in S and Si and thus also in S'i.
This problem -> Hitting set: build S with all elements whom assigment is true [same idea as Hitting Set->This problem].

Since you are looking for the optimization problem for this, it is also NP-Hard, and if you are looking for an exact solution - you should try an exponential algorithm

like image 136
amit Avatar answered Oct 15 '22 03:10

amit