patternMinor
Is 2-SAT over Linear Real Arithmetic in P or NP?
Viewed 0 times
satreallinearoverarithmetic
Problem
The general boolean satisfiability problem (SAT) is NP-complete, and thus can't be solved in polynomial time (assuming $P \neq NP$). But the special case of 2-SAT is in P, and can be solved in linear time. 2-SAT formulas consist of the conjunction of clauses with two elements, e.g.,
$$ (a \lor b) \land (b \lor \lnot c) \land (a \lor c). $$
I am wondering about the case where the literals (e.g., $a$) are replaced with linear predicates (e.g., $Ax \leq b$, $x \in \mathbb{R}^n$). This transforms the SAT problem into an SMT (Satisfiability Modulo Theories) problem over the theory of Linear Real Arithmetic (LRA).
An example of a 2-SAT problem over LRA would be
$$ \text{Find } x \\ \text{such that } (P_1 \lor P_2) \land (P_3 \lor P_4) \land (P_5 \lor P_6), $$
where $P_i = (A_i x \leq b_i)$ are linear predicates.
Are there any polynomial-time algorithms for solving 2-SAT over LRA? Alternatively, is there any proof that 2-SAT over LRA is NP-complete?
$$ (a \lor b) \land (b \lor \lnot c) \land (a \lor c). $$
I am wondering about the case where the literals (e.g., $a$) are replaced with linear predicates (e.g., $Ax \leq b$, $x \in \mathbb{R}^n$). This transforms the SAT problem into an SMT (Satisfiability Modulo Theories) problem over the theory of Linear Real Arithmetic (LRA).
An example of a 2-SAT problem over LRA would be
$$ \text{Find } x \\ \text{such that } (P_1 \lor P_2) \land (P_3 \lor P_4) \land (P_5 \lor P_6), $$
where $P_i = (A_i x \leq b_i)$ are linear predicates.
Are there any polynomial-time algorithms for solving 2-SAT over LRA? Alternatively, is there any proof that 2-SAT over LRA is NP-complete?
Solution
You can express the fact that a variable $x_i$ is Boolean as follows:
$$
(0 \leq x_i \leq 1) \land ((x_i \leq 0) \lor (x_i \geq 1)).
$$
You can express the condition $x_i \lor x_j \lor x_k$ as
$$
x_i + x_j + x_k \geq 1.
$$
If some of the variables are negated, you can also accommodate that, by replacing $x_i$ with $1-x_i$.
In total, we can express SAT as a special case of your problem, and so it is NP-hard.
Conversely, in order to show that a given "2-LRA" is feasible, it suffices to highlight which linear inequality is satisfied for each clause; checking this is linear programming, which is in P. This shows that your problem is NP-complete.
$$
(0 \leq x_i \leq 1) \land ((x_i \leq 0) \lor (x_i \geq 1)).
$$
You can express the condition $x_i \lor x_j \lor x_k$ as
$$
x_i + x_j + x_k \geq 1.
$$
If some of the variables are negated, you can also accommodate that, by replacing $x_i$ with $1-x_i$.
In total, we can express SAT as a special case of your problem, and so it is NP-hard.
Conversely, in order to show that a given "2-LRA" is feasible, it suffices to highlight which linear inequality is satisfied for each clause; checking this is linear programming, which is in P. This shows that your problem is NP-complete.
Context
StackExchange Computer Science Q#146516, answer score: 4
Revisions (0)
No revisions yet.