In the HITTING SET problem, we are given a family of sets {S1,S2K,Sn}and budget , and we wish to find a set H of size b which intersects every Si, if such an exists. In other words, we want HSiϕfor all i.Show that HITTING SET is NP-complete.

Short Answer

Expert verified

As Hitting Set trouble is both in NP and NP-difficult, for this reason, it's far NP-whole.

Step by step solution

01

Introduction

If any problem is NP entire, then it is in each NP hard and NP. Hence, to prove that HITTING Set trouble is NP-complete, show this is NP and NP-complete as good evidence that HITTING hassle is NP-difficult: enter: a hard and fast of elements, series of subsets of , and a fantastic integer okay and a finite set as a certificate.

A hard and fast subset is HITTING Set for the ‘s if it incorporates at least one detail of each , that is, if is a subset of , for every . The input is in language HITTING-SET if there exists a hitting set for ’s size okay.

First, show that HITTING-SET is in NP. The entrance is in HITTING-SET if and best if a hitting set exists, so a certificate may be defined to genuinely be a hitting set, a list of ok elements of .

Accept the certificate if it has length ok and consists of a minimum of one element of each . To check this we take each of the units and check every element to see whether it's far within the listing (until it haselement or runs out of elements).

It takes time, and considering the fact that is approximately equal as , we've got , that is polynomial.

For that reason, HITTING-SET trouble is in NP.

02

Proving HITTING SET is NP-Complete Problem

HITTING SET problem in NP-hard, if the NP-entire trouble Vertex cowl, may be reduced to Hitting Set.

Supplied an undirected graph of nodes and edges and a parameter okay, outline to be the set of nodes in , and to be the set of endpoints of the brink , and let the parameter okay as provided above.

Then, has a vertex cowl of size if and only if has a hitting set of length okay for the ’s, that is due to the fact a set of nodes in is a vertex cover if and handiest if it hits every of the rims.

This reduction is computable in polynomial time as it ought to simply listing the edges of in a specific format and accordingly want only O (m+n) time.

Considering the fact that reduction is feasible here, as a result Hitting hassle is in NP-hard.

As Hitting Set trouble is both in NP and NP-difficult, for this reason, it's far NP-whole.

01

Introduction

If any problem is NP entire, then it is in each NP hard and NP. Hence, to prove that HITTING Set trouble is NP-complete, show this is NP and NP-complete as good evidence that HITTING hassle is NP-difficult: enter: a hard and fast of elements, series of subsets of , and a fantastic integer okay and a finite set as a certificate.

A hard and fast subset is HITTING Set for the ‘s if it incorporates at least one detail of each , that is, if is a subset of , for every . The input is in language HITTING-SET if there exists a hitting set for ’s size okay.

First, show that HITTING-SET is in NP. The entrance is in HITTING-SET if and best if a hitting set exists, so a certificate may be defined to genuinely be a hitting set, a list of ok elements of .

Accept the certificate if it has length ok and consists of a minimum of one element of each . To check this we take each of the units and check every element to see whether it's far within the listing (until it haselement or runs out of elements).

It takes time, and considering the fact that is approximately equal as , we've got , that is polynomial.

For that reason, HITTING-SET trouble is in NP.

02

Proving HITTING SET is NP-Complete Problem

HITTING SET problem in NP-hard, if the NP-entire trouble Vertex cowl, may be reduced to Hitting Set.

Supplied an undirected graph of nodes and edges and a parameter okay, outline to be the set of nodes in , and to be the set of endpoints of the brink , and let the parameter okay as provided above.

Then, has a vertex cowl of size if and only if has a hitting set of length okay for the ’s, that is due to the fact a set of nodes in is a vertex cover if and handiest if it hits every of the rims.

This reduction is computable in polynomial time as it ought to simply listing the edges of in a specific format and accordingly want only O (m+n) time.

Considering the fact that reduction is feasible here, as a result Hitting hassle is in NP-hard.

As Hitting Set trouble is both in NP and NP-difficult, for this reason, it's far NP-whole.

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.

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.

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.

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?

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

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