Prove That Dense Subgraph Is NP-Complete By Generalisation


Even with limitless time, algorithms are unable to resolve all computer problems. The answer to NP-complete problems remains unknown. It's worth noting that when single NP-complete issue is able to be answered in polynomial time, then all others may be resolved as well.

Dense Subgraph

A dense subgraph is one that has numerous edges for each vertex in the theory of graphs and computer science.

Clique

A clique constitutes a subsection of a graph in which every vertex is linked to every other vertex, making the "subgraph" a full graph. 

"Maximal Clique Problem" aims for locating the largest clique in a particular graph G, i.e., a subsection of G and has the most nodes. This is primarily an issue of "optimization."

Similarly, the "Clique Decision Problem" seeks to determine whether or not a K-sized clique can be found within the graph in question.

NP-Complete Problems

The most difficult issues in the NP set are NP-complete problems.  A decision issue L is NP-complete if and only if the following conditions are met −

  • L is in NP (Any provided answer for NP-complete issues may be verified rapidly, yet there isn't an effective known solution). 

  • Within polynomial duration, all NP issues may be reduced to L.

Prove That Dense Subgraph Is NP Complete By Generalisation

We'll demonstrate that the Dense Subgraph issue is a generalisation of the well-known NP-complete problem to establish the Dense Subgraph problem's NP-completeness. In this instance, we'll use the well-known problem Clique to serve as the NP-complete benchmark, as demonstrated below in Proof that Clique Is an NP-Complete, and we'll need to demonstrate the reduction from Clique to Dense Subgraph.

To demonstrate that an issue is NP-Complete, we must demonstrate that the problem falls under both the NP along with NP-Hard Classes. (Because NP-Complete issues are NP-Hard problems, which are also NP-Complete problems)

The "Clique Decision issue" comes under NP

If an issue comes under the "NP class", it has to possess "polynomial time" verification, which implies if one provides a "certificate", one needs to be enabled to check if it's an answer to that issue in polynomial time.

Proof

Certificate - Assume the certificate is a clique node set S, and S represents a "subgraph" of G.

Verifying the solution entails determining whether or not the graph has a clique of size k. As a result, determining if the total value of vertices in S satisfies k requires "O(1) time". O(k2) time is required to determine if each of the vertices possesses an out-degree of (k-1). Due to the fact that every vertex in a full graph is linked to all of the others via an edge. As a result, the total count of edges in an entire network is "kC2 = k*(k-1)/2)". As a result, defining whether the graph generated via the k vertices in S is full or not necessitates "O(k2) = O(n2)" time (especially as "k<=n", wherein n equals the count of nodes in the graph).

Hence, "Clique Decision Problem" is verifiable in "polynomial time". Thus, it falls within "NP Class".

>

"Clique Decision Problem" is an "NP-Hard" issue

If all NP issues are reduced to L in a polynomial amount of time, then the problem L is NP-Hard. Now consider Q's Clique Decision Problem. To demonstrate that Q falls under NP-Hard, one should pick an existing NP-Hard issue, for example P, and reduce the problem to Q for a specific case. If this reduction takes polynomial time, Q is likewise an NP-Hard issue. According to Cook's theorem, "the Boolean Satisfiability Problem" (S) is an NP-Complete issue. As a result, all NP issues are reducible to S in polynomial time. "All NP issues are reducible to P within polynomial time if S is reducible to P in polynomial time", demonstrating the polynomial time reducibility of Q.

A demonstration that the Boolean Satisfiability issue may be reduced to the Clique Decision issue

Let "E = (y1 v y2) ^ (y1' v y2') ^ (y1 v y3)" be the Boolean expression wherein y1, y2, and y3 represent variables, "^ represents logical "and," "v" represents logical "or," and y' represents the "complement of y". Let every parenthetical statement be a sentence. As a result, we have three clauses: P1, P2, and P3. Assume the nodes to be –" <y1, 1>; <y2, 1>; <y1', 2>; <y2', 2>; <y1, 3>; <y3, 3>", wherein the second term for each node specifies the clause's number they fall under. One must join the nodes so that -

  • There are no connections between vertices that belong to an identical phrase.

  • There is no link between any variables and their complements.

Therefore, "graph G (V, E)" is assembled according to a way that - {"<a, i> | a Ci} and E = {(<a, i>, <b, j>) | i j; b a' "}.  Take into account the G subgraph having nodes <y2, 1>; <y1', 2>; <y3, 3> It creates a clique of dimension 3. As a result, the assignment – "<y1, y2, y3> = <0, 1, 1>" E resolves to correct. As a result, if there are k clauses within the satisfiability expression, one must obtain a k-sized "maximum clique", as well as the satisfiability expression passes to true about the associated assignment of values. As a result, for a certain case, the satisfiability issue is simplified to the clique choice issue.

Input Conversion

One must convert the Clique input into a Dense Subgraph input.

Input for a clique is an integer k and a graph that is undirected G(V, E).

Input for a dense subgraph is an undirected graph G'(V, E) as well as a pair of integers p and q.

We will convert the input data from Clique to Dense Subgraph in such a way that

p = k b = (k * (k - 1))/2 G' = G(V, E) p = k q = (k * (k - 1))/2

This conversion will require O(1) time, making it polynomial.

Output Conversion

The Dense Graph problem's solution has to be converted to the Clique problem's answer.

As k = a, the result of the Dense Graph yields a seta, which is a Clique having dimension k. Clique may therefore use the straight output from Dense Graph. Because no conversion is necessary, it is polynomial.

Correctness

The range of the input value b has been constrained to a value of (k2) equal to (k * (k - 1))/2. 

Now we're searching for a subgraph with k nodes along with a minimum of (k * (k - 1))/2 edges. 

Because n vertices in a complete graph are capable of having a maximum of (n * (n - 1))/2 edges within them, we are able to state that our task is to discover a subgraph of k nodes with precisely (k * (k - 1))/2 edges, implying that the resulting graph must include an edge across each pair of vertices, resulting in nothing more than a Clique of k vertices.

Similar to this, a Clique on the graph G(V, E) with k vertices needs to include (k * (k - 1))/2 edges, meaning it's nothing more than the dense subgraph of graph G(V, E).

Consequently, this proves that Clique and Dense-Subgraph both have solutions.

A dense Subgraph is likewise NP-complete because the entire reduction requires polynomial time. Also, the Clique is NP-complete.

Conclusion

The concept of NP-completeness relates to decision issues.  It was designed in this manner because comparing the complexity of choice issues is easier than comparing the difficulty of optimization problems. However, having the ability to resolve a decision problem in polynomial time frequently allows us to solve the related optimization issue in polynomial time.

Updated on: 09-Oct-2023

186 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements