/*! 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} Q16E We are feeling experimental and ... [FREE SOLUTION] | 91影视

91影视

We are feeling experimental and want to create a new dish. There are various ingredients we can choose from and we鈥檇 like to use as many of them as possible, but some ingredients don鈥檛 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 鈥渢hey go together perfectly鈥 and 1.0 means 鈥渢hey really don鈥檛 go together.鈥 Here鈥檚 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 nn鈥 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.

Short Answer

Expert verified

If EXPERIMENTAL CUISINE can be solved in polynomial time, then INDEPENDENT SET can also be solved in polynomial time. It is already known that INDEPENDENT SET is NP-complete.

Step by step solution

01

Statement

Remember the data:

For some high-quality regular languages, aset of rules have polynomial-timeif its strolling time is higher constrained by means of a polynomial expression within the length of the technique鈥檚 input.

The Boolean satisfiability problem, additionally known as the propositional satisfiability hassle that is abbreviated as SATISFIABILITY, SAT, or B-SAT. It is the task of finding if there may be a proof that fulfills a provided Boolean formula.

02

Step 2:Show that if EXPERIMENTAL CUISINE is solvable in polynomial time, then so is 3SAT

Consider that the EXPERIMENTAL CUISINE is a generalization of INDEPENDENT SET.

To identify an independent set whose sizeisin a graph G=(V,E),construct the following example of the EXPERIMENTAL CUISINE problem with n=|V|ingredients.

Consider penalty p=0and let the discord between ingredient iandjbe 1 if (i,j)Eand assume that it is zero otherwise.

ingredients can be selected with a total penaltyp=0 if there is an independent set of size s.

Hence, if EXPERIMENTAL CUISINE can be solved in polynomial time, then INDEPENDENT SET can also be solved in polynomial time. It is already known that INDEPENDENT SET is NP-complete.

Therefore, if INDEPENDENT SET can be solved in polynomial time, then every problem in NP can be solved in polynomial time including 3SAT.

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

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.

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 鈥渢ail鈥 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).

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 CVis 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 sizebif 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 .

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.

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.