The greedy algorithm for set cover is the following: |
The greedy algorithm for weighted set cover is the following: |
Exercises1. The partial set cover problem is, given a collection of sets and an integer K, to find a minimum number of sets covering all but some K of the elements. Prove that this problem has a (1+ln(n))-approximation algorithm, where n is the number of elements. 2. Given a set of vertices V and a collection of sets of edges E1, E2, …, Em, find a minimum-size collection of the edge sets so that the union of the chosen sets contains a spanning tree. Given a (1+ln(n))-approximation algorithm, where n is the number of vertices. 3. Extend your analyses above to the weighted versions of the problems. |
The Set Cover problem is, given a collection of sets, to choose a minimum number of those sets so that every element is in at least one of the chosen sets.
The greedy algorithm for set cover is the following:
1. Repeat until all elements are covered by chosen sets: 2. Choose a set containing a maximum number of not-yet-covered elements. 3. Return the chosen sets.
thm:The greedy algorithm is a (1+ln(n))-approximation algorithm, where n is the number of elements.
proof: Let OPT denote the size of the minimum cover.
This analysis differs from those in Approximation Algorithms by Vazirani.
The weighted set cover problem is, given a collection of sets each with a non-negative weight, to choose a set cover minimizing the total weight of the chosen sets.
The greedy algorithm for weighted set cover is the following:
1. Repeat until all elements are covered by chosen sets: 2. Choose a set S maximizing (number of not-yet-covered elements in S)/weight(S). 3. Return the chosen sets.
thm:The greedy algorithm is a (1+ln(n))-approximation algorithm, where n is the number of elements.
proof: Let OPT denote the total weight of the sets in the minimum-weight cover.
1. The partial set cover problem is, given a collection of sets and an integer K, to find a minimum number of sets covering all but some K of the elements. Prove that this problem has a (1+ln(n))-approximation algorithm, where n is the number of elements.
2. Given a set of vertices V and a collection of sets of edges E1, E2, …, Em, find a minimum-size collection of the edge sets so that the union of the chosen sets contains a spanning tree. Given a (1+ln(n))-approximation algorithm, where n is the number of vertices.
3. Extend your analyses above to the weighted versions of the problems.