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

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 nodesLV , and you must find a spanning tree such that its set of leaves includes the set L.

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

(c)A set of nodesLV , 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 thatLV. 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 thatLV . 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) betweenvV andwWif 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 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

Show that the following problem is NP-complete.

MAXIMUM COMMON SUBGRAPHInput: Two graphs G1=(V1,E1)and G2=(V2,E2); a budget b.Output: Two set of nodes V1'V1and V2'V2whose deletion leaves at leastb nodes in each graph, and makes the two graphs identical.

We are feeling experimental and want to create a new dish. There are various ingredients we can choose from and we’d like to use as many of them as possible, but some ingredients don’t go well with others. If there arepossible ingredients (numbered 1to n), we write down an matrix giving thediscordbetween any pair of ingredients. Thisdiscordis a real number between 0.0and 1.0, where means “they go together perfectly” and 1.0 means “they really don’t go together.” Here’s an example matrix when there are five possible ingredients.

In this case, ingredients 2and 3go together pretty well whereas1and5clash badly. Notice that this matrix is necessarily symmetric; and that the diagonal entries are always . 0.0Any set of ingredients incurs apenaltywhich isthe sum of all discord values between pairs of ingredients.For instance, the set of ingredients{1,3,5}incurs a penalty of 0.2+1.0+0.5=1.7

.We want this penalty to be small.

EXPERIMENTAL CUISINE

Input:, nthe number of ingredients to choose from D;,the n×n“ discord” matrix; some numberp0

OUTPUT:The maximum number of ingredients we can choose with penalty p.

Show that ifEXPERIMENTAL CUISINEis solvable in polynomial time, then so is 3SAT.

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.

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).

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.)
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