/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Q13E Determine which of the following... [FREE SOLUTION] | 91Ó°ÊÓ

91Ó°ÊÓ

Determine which of the following problems are NP-complete and which are solvable in polynomial time. In each problem you are given an undirected graph G=(V,E), along with:

(a)A set of nodesL⊆V , and you must find a spanning tree such that its set of leaves includes the set L.

(b)A set of nodes L⊆V, and you must find a spanning tree such that its set of leaves is precisely the set L.

(c)A set of nodesL⊆V , and you must find a spanning tree such that its set of leaves is included in the set L.

(d)An integer k, and you must find a spanning tree withk or fewer leaves.

(e)An integer k, and you must find a spanning tree withk or more leaves.

(f)An integer k, and you must find a spanning tree with exactlyk leaves.

Short Answer

Expert verified
  1. It is solved in polynomial-time.
  2. The given problem is NP-complete.
  3. The given problem is NP-complete.
  4. The given problem is NP-complete.
  5. It is related to NP-complete.
  6. It is related to NP-complete.

Step by step solution

01

Define NP Complete Problem

A problem that is solved in polynomial time is called an NP Complete Problem. Examples of NP Complete problems are Set Cover problem, Vertex Cover Problem and so on.In order to show that a problem is NP complete, the main task is to show if the problem is solved in polynomial time. If it can be solved then the problem is said to be an NP Complete Problem.

02

Determine the problem type of (a)

a.

Consider a spanning treeT such that it’s set of leaves is L. It remains connected even after deleting the vertices L. Therefore, the graph remains connected after deleting Land all its incident edges from G. The following algorithm identifies a spanning treeT such that it’s set of leaves includesL if such a tree exists:

1. DeleteL and all its incident edges from G. Consider it asG .

2. Find a spanning treeT' inG' .

3. For each vertexv inL , add an edge that connectsv toT' ’.

As a result, it is possible to solve it in polynomial-time.

03

Check if the problem is NP Complete

(b)

Consider a set of nodes such thatL⊆V. It is related to the generalization of RUDRATA(s,t) PATH. Now identify a Rudrata path froms tot. Assume thatL={s,t}. Then there is a spanning tree with a set of leaves exactlyL if and only if there is a Rudrata path froms tot .

Thus, the given problem is NP-complete.

04

Determine the NP Completeness of (c)

(c)

Consider a set of nodes such thatL⊆V . It is related to the generalization of RUDRATA(s,t)path. Identify a Rudrata path fromstot .Let L={s,t}. Then there is a spanning tree with a set of leaves included inL if and only if there is a Rudrata path froms tot .

Thus, it is said that the given problem is NP-complete.

05

Determine the NP Completeness of (d)

(d)

It is related to the generalization of RUDRATA(s,t) -PATH. Assume k=2.Then there is a spanning tree with at most k leaves if and only if there is a Rudrata path.

Hence, the given problem is NP-complete.

06

Determine the NP Completeness of (e)

(e)

This problem is a generalization of 3D-MATCHING. Assume an instance of 3D-matching in the form of a setW ofm elements and a setV of triples ofW are given. Without loss of generality, each element ofW appears in at least one triple. The bipartite graph is constructed here. Define a vertex for each element inW andV. There is an edge(v,w) betweenv∈V andw∈Wif wis in triple v. Further, there is an edge between any two vertices of V.

k=n+m-m3=n+2m3 …..(1)

Consider a spanning tree withk leaves. Each vertex inV is a neighbor of at most three vertices in W.If xis the number of leaves inW then there are at mostn-x3 leaves inV .Therefore k=n+2x3.From (1), x=m. All vertices inW must be leaves andm3 non-leaves inV define a 3D matching.

Hence, it is related to NP-complete.

07

Determine the NP Completeness of (f)

(f)

It is related to the generalization of RUDRATA(s,t) -PATH. Assumek=2 . Then there is a spanning tree with exactlyk leaves if and only if there is a Rudrata path. Rudratha path is NP Complete.

Hence, the problem 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 91Ó°ÊÓ!

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

Consider the CLIQUE problem restricted to graphs in which every vertex has degree at most v. Call this problem CLIQUE-3 .

(a) Prove that CLIQUE-3 is in NP .

(b) What is wrong with the following proof of NP-completeness for CLIQUE-3 ? We know that the CLIQUE problem in general graphs is NP-complete, so it is enough to present a reduction from CLIQUE-3 to CLIQUE . Given a graph G with vertices of degree ≤3, and a parameter g, the reduction leaves the graph and the parameter unchanged: clearly the output of the reduction is a possible input for the CLIQUE problem. Furthermore, the answer to both problems is identical. This proves the correctness of the reduction and, therefore, the NP-completeness of CLIQUE-3 .

(c) It is true that the VERTEX COVER problem remains NP-complete even when restricted to graphs in which every vertex has degree at most 3 . Call this problem VC-3 . What is wrong with the following proof of NP-completeness for CLIQUE ? We present a reduction from VC-3 to CLIQUE-3 . Given a graph G=(V,E) with node degrees bounded by 3 , and a parameter b , we create an instance of CLIQUE-3 by leaving the graph unchanged and switching the parameter to |V|-b. Now, a subset C⊆Vis a vertex cover in G if and only if the complementary set V-C is a clique in G. Therefore G has a vertex cover of size≤bif and only if it has a clique of size ≥|V|-b. This proves the correctness of the reduction and, consequently, the NP-completeness of CLIQUE-3 .

(4)Describe an O(V)algorithm for CLIQUE-3 .

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.

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 length≤b, 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.

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.

On page 266we saw that 3SATremainsNP-complete even when restricted to formulas in which each literal appears at most twice.

(a)Show that if each literal appears at mostonce,then the problem is solvable in polynomial time.

(b)Show that INDEPENDENT SET remains NP-complete even in the special case when all the nodes in the graph have degree at most 4.

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.