Polynomial algo for 2-SAT related algorithm

456 Views Asked by At

I read many algorithm for finding the 2-SAT problem, i.e. given expression is satisfiable or not, which can be solved in polynomial time. example(algorithm).
For Krom's procedure(Wikipedia),I construct graph from which I can easily verify its satisfiability in polynomial time.
Now, I want to find solution of this expression to be satisfiable.
I am thinking like that (verify it): first I take any literal of expression that forms strong connected component say x,and assign value as 0. Then according to algo, there exist edge ( x! -> y). therefore y cannot be 0. (since 1 -> 0 is false) and similarly proceeding if possible.
Otherwise take x=0 and then have only choice as y=1 and similarly proceed to get any 1 instance for which it is satisfiable.

Now, Is any feasible solution of finding any one of this in polynomial time

  • give all possible solutions for which expression is satisfiable.
  • Or is this expression is satisfiable for input having total k literals = 1.
  • Or how many minimum number of literals have value 1 for expression to be satisfiable.

I am not getting any polynomial algorithm for this types of questions.

1

There are 1 best solutions below

2
David Eisenstat On BEST ANSWER

give all possible solutions for which expression is satisfiable

No, because there can be exponentially many.

Or is this expression is satisfiable for input having total k literals = 1

No, because if this were easy, then so too would be weighted 2-satisfiability (NP-hard).

Or how many minimum number of literals have value 1 for expression to be satisfiable

This is weighted 2-SAT.