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

Search versus decision. Suppose you have a procedure which runs in polynomial time and tells you whether or not a graph has a Rudrata path. Show that you can use it to develop a polynomial-time algorithm for RUDRATA PATH (which returns the actual path, if it exists).

Optimization versus search.Recall the traveling salesman problem:

TSP

Input: A matrix of distances; a budget b

Output: A tour which passes through all the cities and has lengthb, if such a tour exists.

The optimization version of this problem asks directly for the shortest tour.

TSP-OPT

Input:A matrix of distances

Output:The shortest tour which passes through all the cities.

Show that if TSP can be solved in polynomial time, then so can TSP-OPT.

In the NODE-DISJOINT PATHS problem, the input is an undirected graph in which some vertices have been specially marked: a certain number of “sources” s1,s2,,sk and an equal number of “destinations” t1,t2,,tk. The goal is to find k node-disjoint paths (that is, paths which have no nodes in common) where the ith path goes from si to ti. Show that this problem is NP-complete.Here is a sequence of progressively stronger hints.

  1. Reduce from 3SAT .
  2. For a 3SAT formula with m clauses and n variables, use k=m+n sources and destinations. Introduce one source/destination pair (sx,tx)for each variable x , and one source/destination pair (sc,tc) for each clause c .
  3. For each 3SAT clause, introducenew intermediate vertices, one for each literal occurring in that clause and one for its complement.

Notice that if the path from sc to tc goes through some intermediate vertex representing, say, an occurrence of variable x, then no other path can go through that vertex. What vertex would you like the other path to be forced to go through instead?

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.

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.

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