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:
- 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?
- 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?
This problem is NP-Hard as well.
One can show an east reduction from Hitting Set:
Hitting Set problem: Given sets
S1,S2,...,Snand a numberk: chose setSof sizek, such that for everySithere is an elementsinSsuch thatsis inSi. [alternative definition: the intersection between eachSiandSis 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)whereS'iis all elements inSi, 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,
Sthen by assigning all ofS's elements with true, the formula is satisfied withkelements, since for everyS'ithere is some variablevwhich is inSandSiand thus also inS'i.This problem -> Hitting set: build
Swith 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