Statement
Lemma
Proof
As Independent set of a given size is in NP all we need to show is that Independent set of a given size is NP-hard.
To show this we are going to find a many-one reduction of the 3-SAT problem to Independent set of a given size problem. (We know 3-SAT is NP-complete so this gives us that Independent set of a given size is also NP-complete.) This will involve:
- Taking an instance of the 3-SAT problem and converting it to a Independent set of a given size problem in polynomial time,
- Showing how to transform a solution to the Independent set of a given size problem back to a solution to the 3-SAT problem in polynomial time, and
- Showing that a solution exists to the 3-SAT problem if and only if a solution exists to the Independent set of a given size problem.
Suppose we are given a 3-SAT problem
To make
When we have a solution to the Independent set of a given size problem we all the literals in the independent set to true. (This is valid as we know no 2 literals in this independent set can be the negation of one another from the negation edges.) Then for any left over variables we just set them to be true.
This process takes
Suppose
For each clause at least one literal must be correct, define this set
The set
Suppose we have an independent set
As this is an independent set the negation edges
As each clause is a clique in
As we have at least one literal in each clause being true, the assignment
This gives the reduction of 3-SAT to the Independent set of a given size problem and makes it NP-complete.