Question

8. The problem SET COVER gives two numbers n, k, and a family of n subsets of (,.. n It asks whether it is possible to selec

Algorithms

0 0
Add a comment Improve this question Transcribed image text
Answer #1

8.1 SET COVER problem is in class NP because this problem belongs to the class of decision problem with "yes" or "no" answer and if the answer is "yes" on some input instance, then the solution proposed can be verified in polynomial time to the size of the input and size of the solution. Below is the polynomial time verifier, which given the number n and k and the set of subsets S1, S2,...,Sk , check whether union of all these subset is the set S = {1,2,...,n}.

Verify_SET_COVER(S , Solution_Set , n , k) //when S = {1,2,..,n} and Solution_Set = {S1,S2,...,Sk}

1. If |Solution_Set| != k then return FALSE //since there are not k subsets in the solution

2. Union = EMPTY //This set will take union of all the subsets in the solution

3. For every subset Si in Solution_Set :-

4........Union = Union U { Si } //Union will cover all the elements of Si

5. If Union == S then return TRUE //Since this means union of all subsets is equal to set S = {1,2,...,n}

6. else Return FALSE  

Since polynomial time verifier exist for the above problem, hence SET COVER problem belongs to kclass NP.

8.2 Since total number of ways of selecting k subsets output of n subsets is \binom{n}{k} = \frac{n!}{k!(n-k)!}

And then to test whether the union of k subsets is equal to set S will take O(kn) time, so total time complexity will be O \left (nk\binom{n}{k} \right ) .

Please comment for any clarification.

Add a comment
Know the answer?
Add Answer to:
8. The problem 'SET COVER gives two numbers n, k, and a family of n subsets of (,.. n It asks whe...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Let X be a finite set and F a family of subsets of X such that...

    Let X be a finite set and F a family of subsets of X such that every element of X appears in at least one subset in F. We say that a subset C of F is a set cover for X if X =U SEC S (that is, the union of the sets in C is X). The cardinality of a set cover C is the number of elements in C. (Note that an element of C is a...

  • 6. The Course Offering Problem is: Given an integer K and a set of n courses...

    6. The Course Offering Problem is: Given an integer K and a set of n courses and a set of m students and, for each student si, a set of courses that she is required to take, is it possible to offer K courses such that each student can take at least one required course? For instance, assume the courses are {C1,C2, C3, C4, C5, C6, C7, C8} and student sų is required to take {C1,C2,C4, C8}, and student s2...

  • Please write full justification for (a) and (b). Will uprate/vote! 4. K-means The goal of K-means clustering is to divide a set of n points into k< n subgroups of points that are "close" t...

    Please write full justification for (a) and (b). Will uprate/vote! 4. K-means The goal of K-means clustering is to divide a set of n points into k< n subgroups of points that are "close" to each other. Each subgroup (or cluster) is identified by the center of the cluster, the centroid (μι, μ2' ··· ,14k) In class, we have seen a brute force approach to solve this problem exactly. Each of the k clusters is represented by a color, e.g.,...

  • Major Homework #2 Implement a C program major_hw2.c to solve the 15-puzzle problem using the A*...

    Major Homework #2 Implement a C program major_hw2.c to solve the 15-puzzle problem using the A* search algorithm. 1. Objectives • To gain more experience on using pointers and linked lists in C programs. • To learn how to solve problems using state space search and A* search algorithm. 2. Background A* search and 15-puzzle problem have been introduced in the class. For more information, please read the wiki page of 15-puzzle problem at https://en.wikipedia.org/wiki/15_puzzle, and the wiki page of...

  • Major Homework #2 Implement a C program major_hw2.c to solve the 15-puzzle problem using the A* s...

    Major Homework #2 Implement a C program major_hw2.c to solve the 15-puzzle problem using the A* search algorithm. Please include pictures that the code runs and shows the different states as it reaches goal state please. 1. Objectives • To gain more experience on using pointers and linked lists in C programs. • To learn how to solve problems using state space search and A* search algorithm. 2. Background A* search and 15-puzzle problem have been introduced in the class....

  • could you please help me with this problem, also I need a little text so I...

    could you please help me with this problem, also I need a little text so I can understand how you solved the problem? import java.io.File; import java.util.Scanner; /** * This program lists the files in a directory specified by * the user. The user is asked to type in a directory name. * If the name entered by the user is not a directory, a * message is printed and the program ends. */ public class DirectoryList { public static...

  • PLEASE SOLVE THESE PROBLEMS! URGENT 8/16/2019 How to Recognize Plagiarism -- Undergraduate Certification Tests : School...

    PLEASE SOLVE THESE PROBLEMS! URGENT 8/16/2019 How to Recognize Plagiarism -- Undergraduate Certification Tests : School of Education, Indiana University Bloomington In the case below, the original source material is given along with a View Site sample of student work. Determine the type of plagiarism by clicking Map the appropriate radio button. Original Source Material Student Version Acknowledge Site Suppose you study a group of successful companies and you find that they emphasize customer focus, or quality improvement, or empowerment;...

  • Budgeting for an Academic Department at a State University: Can You Believe the Numbers? INTRODUCTION You...

    Budgeting for an Academic Department at a State University: Can You Believe the Numbers? INTRODUCTION You are the senior accounting faculty member in the business school and your dean, Dean Weller, is asking for help. She is very discouraged after a midyear budget meeting with the Vice President of Finance. The college's Department of Social Work has a large budget deficit, and because of this the VP is inclined towards closing the department entirely or closing its bachelor's program. The...

  • Please read the article and answer about questions. You and the Law Business and law are...

    Please read the article and answer about questions. You and the Law Business and law are inseparable. For B-Money, the two predictably merged when he was negotiat- ing a deal for his tracks. At other times, the merger is unpredictable, like when your business faces an unexpected auto accident, product recall, or government regulation change. In either type of situation, when business owners know the law, they can better protect themselves and sometimes even avoid the problems completely. This chapter...

  • Read “Instituionalizing our Demise: America vs Multiculturalism” by Roger Kimball on pg 268 and “Reinventing America”...

    Read “Instituionalizing our Demise: America vs Multiculturalism” by Roger Kimball on pg 268 and “Reinventing America” Call for a new national indentity” by Elizabeth Martinez on pg 275. Create a double entry notebook for each reading selection It should be atleast five observation and responses. wric 268 PART 2 essay pro. exactly how and why their authors disagree. Instead of with parties in conflict as mediators do, you will nt of view designed to appeal to both sides, mediatn posing...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT