Prerequisite: NPCompleteness, Independent set.
An Independent Set S of graph G = (V, E) is a set of vertices such that no two vertices in S are adjacent to each other. It consists of non adjacent vertices.
Problem: Given a graph G(V, E) and an integer k, the problem is to determine if the graph contains an independent set of vertices of size >=k.
Explanation:
An instance of the problem is an input specified to the problem. An instance of the Independent Set problem is a graph G (V, E) and a positive integer k, and the problem is to check whether an independent set of size k exists in G. Since an NPComplete problem, by definition, is a problem which is both in NP and NPhard, the proof for the statement that a problem is NPComplete consists of two parts:
 The problem itself is in NP class.
 All other problems in NP class can be polynomialtime reducible to that.
(B is polynomialtime reducible to C is denoted as)
If the 2nd condition is only satisfied then the problem is called NPHard.
But it is not possible to reduce every NP problem into another NP problem to show its NPCompleteness all the time. That is why if we want to show a problem is NPComplete we just show that the problem is in NP and any NPComplete problem is reducible to that then we are done, i.e. if B is NPComplete and

Independent Set is NP
If any problem is in NP, then, given a ‘certificate’, which is a solution to the problem and an instance of the problem (a graph G and a positive integer k, in this case), we will be able to verify (check whether the solution given is correct or not) the certificate in polynomial time.
The certificate is a subset V’ of the vertices, which comprises the vertices belonging to the independent set. We can validate this solution by checking that each pair of vertices belonging to the solution are nonadjacent, by simply verifying that they don’t share an edge with each other. This can be done in polynomial time, that is O(V +E) using the following strategy of graph G(V, E):flag=true For every pair {u, v} in the subset V’: Check that these two don’t have an edge between them If there is an edge, set flag to false and break If flag is true: Solution is correct Else: Solution is incorrect

Independent Set is NPHard.
In order to prove that the Independent Set problem is NPHard, we will perform a reduction from a known NPHard problem to this problem. We will carry out a reduction from which the Clique Problem can be reduced to the Independent Set problem.
Every instance of the clique problem consisting of the graph G (V, E) and an integer k can be converted to the required graph G’ (V’, E’) and k’ of the Independent Set problem. We will construct the graph G’ in the following way:V’ = V i.e. all the vertices of graph G are a part of the graph G’
E’ = complement of the edges E, i.e. the edges not present in the original graph G.The graph G’ is the complementary graph of G. The time required to compute the complementary graph G’ requires a traversal over all the vertices and edges. The time complexity of this is O (V+E).
We will now prove that the problem of computing the independent set indeed boils down to the computation of the clique. The reduction can be proved by the following two propositions: Let us assume that the graph G contains a clique of size k. The presence of clique implies that there are k vertices in G, where each of the vertices is connected by an edge with the remaining vertices. This further shows that since these edges are contained in G, therefore they can’t be present in G’. As a result, these k vertices are not adjacent to each other in G’ and hence form an Independent Set of size k.
 We assume that the complementary graph G’ has an independent set of vertices of size k’. None of these vertices shares an edge with any other vertices. When we complement the graph to obtain G, these k vertices will share an edge and hence, become adjacent to each other. Therefore, the graph G will have a clique of size k.
Thus, we can say that there is an independent set of size k in graph G if there is a clique of size k in G’ (complement graph). Therefore, any instance of the independent set problem can be reduced to an instance of the clique problem. Thus, the independent set is NPHard.
Conclusion:
Since the Independent Set problem is both NP and NPHard, therefore it is an NPComplete problem.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a studentfriendly price and become industry ready.
Recommended Posts:
 Proof that Dominant Set of a Graph is NPComplete
 Maximal independent set from a given Graph using Backtracking
 Maximal Independent Set in an Undirected Graph
 Find if an undirected graph contains an independent set of a given size
 Proof that Clique Decision problem is NPComplete  Set 2
 Proof that Hamiltonian Path is NPComplete
 Proof that vertex cover is NP complete
 Proof that Hamiltonian Cycle is NPComplete
 Proof that Subgraph Isomorphism problem is NPComplete
 Proof that Clique Decision problem is NPComplete
 Proof that 4 SAT is NP complete
 Proof that SAT is NP Complete
 Proof that Collinearity Problem is NP Complete
 Clustering Coefficient in Graph Theory
 Mathematics  Graph theory practice questions
 Proof that traveling salesman problem is NP Hard
 Maximum Possible Edge Disjoint Spanning Tree From a Complete Graph
 Program to find total number of edges in a Complete Graph
 Minimum operations of the given type required to make a complete graph
 Ways to Remove Edges from a Complete Graph to make Odd Edges
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.