- #1
mathmari
Gold Member
MHB
- 5,049
- 7
Hey!
The proof that $3-$satisfiability is NP-complete, is the following:
We shall show that satisfiability for CNF (conjunctive normal form) expressions is polynomially transformable to $3-$satisfiability. Given a product of sums, replace each sum $(x_1+x_2+ \dots +x_k), k \geq 4$, with $$(x_1+x_2+y_1)(x_3+\overline{y}_1, y_2)(x_4+\overline{y}_2+y_3) \dots (x_{k-2}+\overline{y}_{k-4}+y_{k-3})(x_{k-1}+x_k+\overline{y}_{y-3}) \ \ \ \ \ (*)$$
for new variables $y_1, y_2, \dots, y_{k-3}$.
For example, for $k=4$, expression $(*)$ is $(x_1+x_2+y_1)(x_3+x_4 \overline{y}_1)$.
There is some assignment to the new variables which makes the replacing expression have value $1$ if and only if one of the literals $x_1, x_2, \dots , x_k$ has value $1$, that is, if and only if the original expression has value $1$. Assume $x_j=1$. Then set $y_j$ to $1$ for $j \leq i-2$ and set $y_j$ to $0$ for $j>i-2$. The replacing expression has value $1$. Conversely, assume that some assignment for the $y_i$'s makes the resulting expression have value $1$, If $y_1=0$, then either $x_1$ or$x_2$ must have value $1$. If $y_{k-3}=1$ then either $x_{k-1}$ or $x_{k}$ must have value $1$. If $y_1=1$ and $y_{k-3}=0$, then for some $i$, $1 \leq i \leq k-4$, $y_i=1$ and $y_{i+1}=0$, implying $x_{i+2}$ must have value $1$. In any event some $x_i$ must have value $1$.
The length of each replacing expression is bounded by a constant multiple of the length of the eplaced expression. In fact, given any CNF expression $E$, we can find, by applying the above transformations to each sum, a $3-$CNF expression $E'$ which is satisfiable if and only if the original expressiom is satisfiable. Moreover, we can find $E'$ in time proportional to the length of $E$, since the treansformations are straightforward to apply. Could you explain me this proof?? (Wondering)
The proof that $3-$satisfiability is NP-complete, is the following:
We shall show that satisfiability for CNF (conjunctive normal form) expressions is polynomially transformable to $3-$satisfiability. Given a product of sums, replace each sum $(x_1+x_2+ \dots +x_k), k \geq 4$, with $$(x_1+x_2+y_1)(x_3+\overline{y}_1, y_2)(x_4+\overline{y}_2+y_3) \dots (x_{k-2}+\overline{y}_{k-4}+y_{k-3})(x_{k-1}+x_k+\overline{y}_{y-3}) \ \ \ \ \ (*)$$
for new variables $y_1, y_2, \dots, y_{k-3}$.
For example, for $k=4$, expression $(*)$ is $(x_1+x_2+y_1)(x_3+x_4 \overline{y}_1)$.
There is some assignment to the new variables which makes the replacing expression have value $1$ if and only if one of the literals $x_1, x_2, \dots , x_k$ has value $1$, that is, if and only if the original expression has value $1$. Assume $x_j=1$. Then set $y_j$ to $1$ for $j \leq i-2$ and set $y_j$ to $0$ for $j>i-2$. The replacing expression has value $1$. Conversely, assume that some assignment for the $y_i$'s makes the resulting expression have value $1$, If $y_1=0$, then either $x_1$ or$x_2$ must have value $1$. If $y_{k-3}=1$ then either $x_{k-1}$ or $x_{k}$ must have value $1$. If $y_1=1$ and $y_{k-3}=0$, then for some $i$, $1 \leq i \leq k-4$, $y_i=1$ and $y_{i+1}=0$, implying $x_{i+2}$ must have value $1$. In any event some $x_i$ must have value $1$.
The length of each replacing expression is bounded by a constant multiple of the length of the eplaced expression. In fact, given any CNF expression $E$, we can find, by applying the above transformations to each sum, a $3-$CNF expression $E'$ which is satisfiable if and only if the original expressiom is satisfiable. Moreover, we can find $E'$ in time proportional to the length of $E$, since the treansformations are straightforward to apply. Could you explain me this proof?? (Wondering)