Prove That A Problem Consisting Of Clique And Independent Set Is Np-Complete


There is no solution to "NP-complete" problems. So far, there hasn't been a polynomial time method developed for any NP-complete problem, nor has anyone shown that there isn't one. There is an intriguing fact about NP-complete problems: if one manages to be resolved under polynomial time, all are within reach.

In this post, we'll prove that a problem comprising an independent set and clique is NP-Complete.

Clique

A clique refers to a "subgraph" of a graph in which every node is connected to one another, implying that the subsection is a complete graph.

NP-Class

The NP in the NP class signifies Non-deterministic Polynomial Time. The problems falling under the NP class can be challenging to find because they can be resolved using a "non-deterministic machine", but their verification is simple.

Independent Set

An independent vertex set defines a subset of a graph's vertices where no two vertices together create an edge.

NP-Completeness

There are two phases needed in proving an issue NP-Complete −

  • Demonstrate that the following problem belongs to the NP Class.

  • Every other issue within the NP class is reducible to that one within polynomial time. (This is proof of NP-Hardness.)

Now, it is not always easy to show the NP-completeness of an issue by reducing it to another NP problem. For this reason, we demonstrate that every known NP-complete issue can be reduced to it in polynomial time.

Clique-IS comes under NP Class

An issue is considered to fall part of the NP Class when its solution is able to be checked in polynomial time.

Provided a set size of K along with an input graph G = (V, E), the response is a pair of sets: C (Clique Set) and I(Independent Set). Three distinct phases exist for verifying the answer to this challenge −

Independent Set Verification − For each couple of nodes (u, v) such that u, v  I aa well as (u, v) $\mathrm{\notin}$ E. Given that "| I | = K and K <= n", wherein n refers to the count of nodes, this would need O(n2) time.

Clique Set Verification − For every couple of nodes (u, v) that equals u, v C and (u, v) E, this would call for $\mathrm{O(n^{2})}$ time because "|C| = K" as well as "K<= n", in which n refers to the vertex count.

Verifying size of I and C − It takes O(1) time to check that |I| = |C| = k.

As a result, checking an answer with an independent set and clique consumes a maximum of O(n2), indicating that it is polynomial, and so the independent set and clique fall within the "NP Class".

Clique-IS comes under "NP-Hard" problems

We must demonstrate that Clique + IS is NP-Hard as a recognised NP-Complete Problem using a reduction strategy.

We will demonstrate a reduction to Clique+IS from Clique.

The Clique Decision issue falls under the NP category. 

If an issue falls under this category, it should be verifiable in "polynomial time", which ensures using a certificate, we should be able to determine whether it is an answer to the issue in that period .

Proof

Certificate − Assume that the certificate is a clique node set S, wherein S represents a "subgraph" of G.

Checking of the given certificate entails determining whether or not the graph has a k-sized clique. As a result, determining if the total count of vertices in S matches k requires O(1) time. It takes a time of O(k2) for verifying the out-degree of each vertex to see if it is (k-1). An edge links every node to one another in a complete graph. As a result, the final edge count in an entire graph is kC2 = k*(k-1)/2). Since k<=n, where n represents the vertex count in the graph, defining if the graph generated through 'k' vertices in S is whole or not necessitates "O(k2) = O(n2) time", this is true.

Hence, the "Clique Decision Problem" is verifiable under "polynomial time" and thus falls in the NP Class.

Clique Decision Problem falls within "NP-Hard" issue.

If reduction is possible for an NP issue in polynomial time, the problem L is NP-Hard.

Proof

Now consider M's "Clique Decision Problem". To demonstrate that M is NP-Hard, one should pick an existing NP-Hard issue (O), and conduct a reduction to M for a specific case. If the reduction takes polynomial time, M likewise presents an NP-Hard issue. According to Cook's theorem, the "Boolean Satisfiability issue" (O) is an "NP-Complete" issue. Hence, any NP issue is reducible to O in polynomial time. As a result, "if O can be reduced to M in polynomial time, then all NP problems could be reduced to M in polynomial time, evidencing that M is NP-Hard."

Input Conversion

We must convert the input data to Clique+IS from Clique.

Clique accepts a given graph G = (V, E) and a specified size variable K. From Clique to Clique+IS, transform the input in a way that −

A graph like G'(V', E') is made that serves as a replica of the supplied graph G = (V, E).

The nodes from "Independent Set (I)" will be added to graph G' in a way −

"| I | = K and K<= n."

Therefore, the graph that comprises of every edge and vertex present in Graph G along with nodes of the independent set I will be called Graph G'.

It will occupy O(|n| + |m|) time to create a fresh graph. Introducing additional nodes will require O(n). Because "|I| = K and K<=n", wherein n represents the node count & m denotes the edge count. As a result, the input conversion takes "polynomial time".

Output Conversion

One must transform the Clique + IS answer into the Clique issue answer.

Set C, a K-size Clique, and Set I, a K-size Independent-Set, are produced by the Clique-IS solution. 

By establishing C as a K-size clique for graph G, this answer may be converted into a Clique problem solution. 

One must take the vertices of the "Independent-Set (I)" out of graph G'(V, E'), which will leave us with graph G(V, E), along with the "G-clique" being identical to the G'-clique since there exists no difference between in the edges of G and G'.

Because "| I | = K and K<= n", where n is the vertex count, the nodes should be eliminated in "O(n) time", and the output conversion is able to be carried out in "polynomial time."

Correctness

One must now demonstrate the accuracy of the assertion −

"Solution to Clique + IS exists if there is a resolution for the Clique issue."

In order to solve the Clique problem, we generated a replica G'= (V', E') of graph G that includes all of graph G's edges and vertices in addition to those within the independent set I. 

G' has no new edges when compared to graph G.

The only vertices that make up independent set I, aren't linked through any edges and are thus not a part of Clique set C. This is the sole difference between graphs G and G'. Thus, "if a Clique C is present in graph G'(V', E'), it shall likewise be found in graph G(V, E)." 

This illustrates the fact that if Clique-IS finds the answer, so does Clique, i.e., "Clique-ISClique."

Furthermore, because the two graphs contain identical edges, "if no clique exists in graph G'(V', E'), no clique can exist in graph G(V, E)". However, there are no connections linking the additional vertices within independent set I that are present in G'. This demonstrated that in case Clique-IS fails to provide a solution, then Clique does not either, i.e.,"! Clique-IS →! Clique (¬Clique-IS → ¬Clique)". This shows that, in the case of a Clique issue solution, Clique + IS exits.

Conclusion

Even with infinite time, there are some computing issues that algorithms are unable to resolve. NP-Complete issues are unquestionably among them. If a polynomial-time solution is possible, it addresses a significant issue in computer science that many people have worked on for years.

Updated on: 09-Oct-2023

305 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements