Question

I have a problem which is an extension of 2-SAT problem. In standard 2-SAT problem, we can find any of the truth assignments which depends on the ordering of vertices we choose. I want to check whether there exists one and only one truth assignment(i.e only one combination) for which the expression is satisfiable. The number of literals can be 100000. One way is to find all the possible truth assignments, then compare them if they are distinct. But the problem is for each comparison, I will have to compare 100000 values(no of literals). Is there any efficient way?

Was it helpful?

Solution

Feder (1994) describes an algorithm for efficiently listing all solutions to a given 2-satisfiability instance. There are also citations in the article for algorithms to count the number of assignments, but you only need to try listing two assignments, which may be more efficient.

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