/*! 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 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鈥檚 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鈥檚 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 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

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 EXACT-4SAT problem, the input is a set of clauses, each of which is a disjunction of exactly four literals, and such that each variable occurs at most once in each clause. The goal is to find a satisfying assignment, if one exists. Prove that EXACT-4SAT is NP-complete.

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鈥檛, we鈥檇 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.)

Show that if P=NP then the RSA cryptosystem (Section 1.4.2) can be broken in polynomial time.

In the NODE-DISJOINT PATHS problem, the input is an undirected graph in which some vertices have been specially marked: a certain number of 鈥渟ources鈥 s1,s2,,sk and an equal number of 鈥渄estinations鈥 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?

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.