Question

I know that applying Strongly connected components in a Digraph we can check 2-SAT boolean satisfiability if the problem is solvable in polynomial time.

Let's assume the problem is satisfiable.

The question: is there a general algorithm to calculate that solution relying on 2-SAT?

No correct solution

OTHER TIPS

Assuming I understand your question correctly, yes, there is a general algorithm to find a solution (i.e. a satisfying assignment) by using the algorithm for the satisfiability problem.

Suppose I assign a variable xi the value "true" (so that the literal xi is true and ~xi is false) to make a new 2-CNF from the original. If I were to run satisfiability on it (i.e. use the thing with SCCs to find if the new CNF is satisfiable):

  1. What does it tell you about the satisfying assignments in the original CNF if the resulting CNF is now not satisfiable?
  2. What does it tell you about the satisfying assignments in the original CNF if the resulting CNF is still satisfiable?

The idea behind the algorithm is to make the variable "false" if you hit case 1, and "true" if you hit case 2, and loop through every variable (keeping the assignments that you made to variables you've already looked at). Once you can answer the questions I've posed, you'll understand the concept behind it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top