HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Are SAT problems with at most one false clause NP-complete?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
satarewithfalseonecompleteproblemsclausemost

Problem

Is the problem of deciding whether a SAT instance, where at most one clause is false (that is, any given variable assignment will either lead to all clauses being true, or all but one), is satisfiable solvable in polynomial time?

Solution

Given a CNF with $n$ variables and $m$ clauses, we denote by $A_i$ the set of truth assignments that do not satisfy clause $i$. Then the number of satisfiable assignments is
$$2^n-\left|\bigcup_{i=1}^m A_i\right|.$$
Since each assignment makes at most one clause false, $A_i$ and $A_j$ are disjoint for $i\neq j$. Also note $|A_i|=2^{n-n_i}$ where $n_i$ is the number of variables in clause $i$. Hence, the number of satisfiable assignments is exactly $2^n-\sum_{i=1}^m 2^{n-n_i}$ (this result is also given as lemma 2 in [1]).

So we can decide whether the CNF is satisfiable by checking whether $2^n-\sum_{i=1}^m 2^{n-n_i}>0$, which can be done in polynomial time.

[1] Nishimura, N., Ragde, P., & Szeider, S. (2007). Solving #SAT using vertex covers. Acta Informatica, 44(7-8), 509-523.

Context

StackExchange Computer Science Q#115846, answer score: 3

Revisions (0)

No revisions yet.