MHB NP-complete Proof: 3-SAT is Polynomially Transformable

  • Thread starter Thread starter mathmari
  • Start date Start date
AI Thread Summary
The discussion centers on the proof that 3-satisfiability (3-SAT) is NP-complete by demonstrating a polynomial transformation from satisfiability for CNF (conjunctive normal form) expressions to 3-SAT. The key transformation involves replacing sums of four or more literals with a product of sums that includes new variables, ensuring that the new expression is satisfiable if and only if the original expression is satisfiable. The new variables, denoted as y_i, represent combinations of the original literals, facilitating the reduction to 3-SAT. The transformation maintains a length that is a constant multiple of the original expression's length, allowing for efficient computation. The discussion also touches on the complexity of explaining such proofs, emphasizing the need for clarity in understanding each component of the transformation.
mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :o

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)
 
Technology news on Phys.org
mathmari said:
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}$.
The comma in the second factor should be a plus.

mathmari said:
For example, for $k=4$, expression $(*)$ is $(x_1+x_2+y_1)(x_3+x_4 \overline{y}_1)$.
The expression should be $(x_1+x_2+y_1)(x_3+x_4 + \overline{y}_1)$.

mathmari said:
Could you explain me this proof?
Explaining a proof is NP-hard. (Smile) For a single sentence or claim there is only a limited number of difficulties or ways it can be misunderstood, and all of them can be addressed in a short explanation. In a long proof, each claim has its potential difficulties, and difficulties from different parts of the proof may combine to create new once. Therefore, the number of potential things to explain is exponential in the size of the proof. So you'll have to point out individual sentences and describe what you don't understand about them if you want help...
 
Evgeny.Makarov said:
The comma in the second factor should be a plus.

The expression should be $(x_1+x_2+y_1)(x_3+x_4 + \overline{y}_1)$.

Yes, you're right! (Blush)
Evgeny.Makarov said:
Explaining a proof is NP-hard. (Smile)

(Smile)
Evgeny.Makarov said:
So you'll have to point out sentences and describe what you don't understand about them if you want help...

My questions are the following:
mathmari said:
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}$.

Why do we replace each sum with this expression?? (Wondering)

What do the new variables $y_i$ stand for?? (Wondering)
mathmari said:
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$.

Does this stand because it stands that $$\text{ TRUE OR FALSE = TRUE }$$ ?? (Wondering)
mathmari said:
Assume $x_i=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$.

Why do we set these values for $y_j$ ?? (Wondering)
mathmari said:
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$.

Could you explain to me why this stand?? (Wondering)
mathmari said:
The length of each replacing expression is bounded by a constant multiple of the length of the replaced expression.

Why does this stand?? (Wondering)
mathmari said:
Moreover, we can find $E'$ in time proportional to the length of $E$, since the transformations are straightforward to apply.

What does this mean?? (Wondering)
 
First of all, let's say it explicitly that $+$ here denotes disjunction (not "exclusive or") and juxtaposition (writing formulas next to each other with no operation in between) denotes conjunction.

mathmari said:
Why do we replace each sum with this expression?
We want to reduce the SATISFIABILITY problem to 3-SATISFIABILITY, which is its special case. The reduction in the other direction is trivial precisely because it is a special case. The required direction means that we have to reduce a more general problem to a more specific one. It's like trying to get an answer to a general question by asking questions that can be answered only with "Yes" and "No". So in the end we have to have an instance of 3-SAT, i.e., all clauses must have 3 literals.

mathmari said:
What do the new variables $y_i$ stand for?
Intuitively, $y_i=x_{i+2}+\dots+x_k$. Note that $\bar{y}_i+x_{i+1}+y_{i+1}=y_i\to(x_{i+1}+y_{i+1})$.

mathmari said:
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$.

mathmari said:
Does this stand because it stands that $$\text{ TRUE OR FALSE = TRUE }$$ ?
This is the claim that is only stated here. It is proved in the remainder of the argument.

If you still have questions, I'll try to answer them tomorrow.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top