Open In App

Prove that a problem consisting of Clique and Independent Set is NP Complete

Prerequisite: NP-Completeness, NP Class, Clique, Independent Set

Problem: Given an undirected graph G = (V, E) and an integer K, determine if a clique of size K as well as an independent set (IS) of size K, exists. Demonstrate that it is an NP Complete.



Explanation:

A Clique is a subgraph of a graph in which all of the vertices are connected, forming a complete graph. The Clique Decision Problem involves determining whether or not a clique of size K exists in the given graph.



An Independent Set S of graph G = (V, E) is a collection of vertices in the graph G = (V, E) where no two vertices are adjacent.

Given Clique+IS problem is a combination of both Clique and Independent set can be described as follows:

To prove a problem NP Complete, there are two steps involved:

  1. Prove given problem belong to NP Class
  2. All other problems in the NP class can be polynomial time reducible to that problem. (This is the prove of being NP-Hard)

Now it is not possible to reduce every NP problem to another NP problem to prove it’s NP completeness all the time. That’s why we show that any known NP complete problem is reducible to that problem in polynomial time.

Proof:

1.Clique+IS belongs to NP Class:

A problem is said to be in NP Class if the solution for the problem can be verified in polynomial time.

Given an input G = (V, E) and a set size of K, the answer is two sets: I (Independent Set) and C (Clique Set). There are three steps to verify the solution for this problem:

So, verification of a solution for Clique+IS takes at most O(n2) which is polynomial in nature so Clique+IS belongs to NP Class.

2. Clique + IS is an NP-Hard problem:

Now we need to show Clique + IS is at least as hard as a known NP-Complete Problem by reduction technique. 

Here the known problem is going to be the Clique problem which is already known to be NP-complete which is explained in Proof of Clique being the NP-Complete

We are going to show the reduction from Clique -> Clique+IS. 

However, it is also possible to show reduction as Independent Set -> Clique + IS where it is known that  Independent Set is NP-Complete Problem.

Input Conversion: We need to convert the input from Clique to input to Clique+IS.

Clique takes an input graph G = (V, E) and parameter K for set size. To convert the input from Clique to Clique+IS:

So, Graph G’ is going to be the graph that will have all the vertices and edges from Graph G and vertices from the independent set I.

The creation of a new graph is going to take O(|n| + |m|) time. Adding new vertices is going to take O(n). Since |I| = K and K ≤ n where n is the number of vertices and m are the edges. Thus the input conversion can be done in polynomial time.

Output Conversion: We need to convert the solution from Clique + IS to the solution for the Clique problem.

The vertices can be dropped in O(n) since | I | = K and K ≤ n where n is the number of vertices, thus the output conversion can be done in polynomial time.

Correctness: Now we need to prove the correctness of the claim which says that the “Solution of Clique + IS exits if a solution to the Clique problem exists”.

Also, as both graphs have the same edges, if there is no clique in graph G'(V’, E’), no clique in graph G(V, E) can exist. G’ has extra vertices from the independent set I, but there are no edges connecting them. This proved that if Clique+IS does not have a solution then Clique also has no solution i.e., ! Clique-IS → ! Clique (¬Clique-IS → ¬Clique). This proved Clique + IS exits if a solution to the Clique problem exists.

Conclusion:

Hence, we can conclude that Clique+IS is an NP-complete problem.  

For more details, please refer: Design and Analysis of Algorithms.

Article Tags :