Question: he set cover problem is the following: Input: U = { 1 , . . . , m } and S a set of n
he set cover problem is the following:
Input: U m and S a set of n subsets of U such that
s in S s U the
union of the subsets in S is U
Output: A set T s sk S of minimum size ie minimum k such that
s in T s U
We will look at two greedy algorithms that attempt to solve the set cover problem.
At each step, pick the set s in S T ie a set that has not been chosen yet
of largest size to add to T breaking ties arbitrarily. Stopping when the union
of the sets in T is U
At each step i maintain Ti s si and Ci
s in Ti s Pick si as the
set in S Ti that contains the maximum number of uncovered ie U Ci
elements, breaking ties arbitrarily. Update Ti Ci as appropriate. Stopping
when Ci U for some i
As set cover is a NPHard problem, the above algorithms are incorrect since they
take polynomial time. Therefore, for each of the algorithms, give a counterexample
to show that the algorithm is incorrect. Give the input, the steps the algorithm
will take to obtain its output, and why this output is not optimal by providing a
better solution.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
