Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Prove that the following problem is NP-complete: given an undirected graph

G=V,Eand an integer k, return a clique of size kas well as an independent set of size k, provided both exist.

Short Answer

Expert verified

Given problem is in NP and NP-Hard. Thus, it is NP-Complete.

Step by step solution

01

Define the problem

Input: A graphGV,E .

Here,V is the set of vertices and E is the set of edges.

Output: A clique and independent set, both of size K , if exist.

To prove: The given problem in NP- complete.

02

Prove the given problem is NP Complete

To prove that the given problem is in NP, verifier takes the graph G, K and set S and checks that if size of subset S is greater than or equal to and not in. It also checks if every edge of belongs to set E of the graph G.

This is verified in polynomial time. Thus, this problem is in NP.

3-SAT is an NP-complete problem, it is reduced to clique and thus to independent set problem as well.

03

Step 3:

Consider the example:

x¯yz¯xy¯zxyz

In these clauses, see them as the vertices of the graph. Choose one literal from each clause and store that to a set S . The set is the independent set of a graph. Compare if S is equal to K or not. This is done in polynomial time.

Similarly, independent set G¯of which is the clique of G is also calculated in polynomial time. Thus, the problem is reducible from 3-SAT, it is proved that it is at least hard as 3-SAT and hence it is in NP-Hard.

Since, given problem is in NP and NP-Hard, it is NP-Complete.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

STINGY SAT is the following problem: given a set of clauses (each a disjunction of literals) and an integer K , find a satisfying assignment in which at most K variables are true, if such an assignment exists. Prove that isNP -complete.

Show that for any problem in NP, there is an algorithm which solves n in time O 2pnwhere is the size of the input instance and p(n)is a polynomial (which may depend on ).

In task scheduling, it is common to use a graph representation with a node for each task and a directed edge from task i to j task if i is a precondition for j. This directed graph depicts the precedence constraints in the scheduling problem. Clearly, a schedule is possibe if and only if the graph is acyclic; if it isn’t, we’d like to identify the smallest number of constraints that must be dropped so as to make it acyclic.

Given a directed graph G=(V,E), a subset E'Eis called a feedback arc set if the removal of edges E' renders G acyclic.

FEEDBACK ARC SET (FAS): Given a directed graph G=(V,E)and a budget , find a feedback arc set of role="math" localid="1658907144825" bedges, if one exists.

(a)Show that FAS is in NP.

FAS can be shown to be NP-complete by a reduction from VERTEX COVER. Given an instance (G,b)of VERTEX COVER, where G is an undirected graph and we want a vertex cover of size b, we construct a instance (G',b)of FAS as follows. If G=(V,E)has vertices v1,K,vnthen make G'=(V',E')a directed graph with 2n verticesw1,w1',k,wn,wn',andn+2|E|(directed) edges:

  • (wi,wi')foralli=1,2,k,n
  • (wi',wj)and(wj',wi)forevery(vi,vj)E.
  • Show that if G contains a vertex cover of size b, then G' contains a feedback arc set of size b .
  • Show that if G' contains a feedback arc set of size b, then G contains a vertex cover of size (at most) b. (Hint: Given a feedback arc set of size b in G', you may need to first modify it slightly to obtain another one which is of a more convenient form, but is of the same size or smaller. Then, argue that G must contain a vertex cover of the same size as the modified feedback arc set.)

Akiteis a graph on an even number of vertices, say 2n, in which of the vertices form a clique and the remaining vertices are connected in a “tail” that consists of a path joined to one of the vertices of the clique. Given a graph and a goal , the KITE problem asks for a subgraph which is a kite and which contains 2g nodes. Prove that KITE is NP-complete.

Proving NP-completeness by generalization. For each of the problems below, prove that it is NP-complete by showing that it is a generalization of some NP-complete problem we have seen in this chapter.

  1. SUBGRAPH ISOMORPHISM: Given as input two undirected graphsG and H, determine whetherG is a subgraph of H (that is, whether by deleting certain vertices and edges ofH we obtain a graph that is, up to renaming of vertices, identical toG ), and if so, return the corresponding mapping ofV(G) intoV(H) .
  2. LONGEST PATH: Given a graph role="math" localid="1658141805147" Gand an integerg find inG a simple path of lengthg .
  3. MAX SAT: Given a CNF formula and an integer g, find a truth assignment that satisfies at least gclauses.
  4. DENSE SUBGRAPH: Given a graph and two integersa and b, find a set of a vertices ofG such that there are at leastb edges between them.
  5. SPARSE SUBGRAPH: Given a graph and two integersa andb , find a set of a vertices ofG such that there are at most bedges between them.
  6. SET COVER. (This problem generalizes two knownNP-complete problems.)
  7. RELIABLE NETWORK: We are given twon×n matrices, a distance matrixdij and a connectivity requirement matrixrij , as well as a budgetb ; we must find a graph G=({1,2,.....,n},E)such that (1) the total cost of all edges isb or less and (2) between any two distinct verticesi andj there arerij vertex-disjoint paths.
See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free