3

I am trying to implement a solution for a set coverage problem using a greedy algorithm.

The classic greedy approximation algorithm for it is

input: collection C  of sets over universe U  , costs: C→R ≥0    
output: set cover S   
1. Let S←∅.  
2. Repeat until S covers all elements:  
3.   Add a set s to S, where s∈C maximizes the number of elements in s not yet covered by set s in S, divided by the cost c(s). 
4. Return S.  

I have a question in 2 parts:

a. Will doing the algorithm in reverse be a valid algorithm i.e.

input: collection C  of sets over universe U  , costs: C→R ≥0    
output: set cover S   
1. Let S←C  .  
2. Repeat until there are no s∈S such that S-s=S (i.e. all elements in s are redundant):  
3.   Remove a set s from S, where s∈S minimises the number of elements in s, divided by the cost c(s). 
4. Return S.  

b. The nature of the problem is such that it easy to get C and there will be a limited number (<5) of redundant sets - in this case will this removal algorithmm would perform better?

Matt
  • 74,352
  • 26
  • 153
  • 180
Dale M
  • 2,453
  • 1
  • 13
  • 21
  • You might be interested in the paper [Reverse greedy algorithm for the metric k-medians problem](http://scholar.google.com/scholar?cluster=676138983996507167&hl=en&as_sdt=0,5). – Neal Young Mar 04 '13 at 02:17

1 Answers1

1

The algorithm will surely return a valid set cover as at every step it checks if all elements of s are redundant. Intuitively I feel that part b is true though I am unable to write a formal proof for it. Read chapter 2 of Vijay Vazirani as it might help do the analysis part.

Aditya
  • 5,509
  • 4
  • 31
  • 51
  • 3
    Thanks for your answer. Intuitively, it seems that if there are less sets to be removed than the total that remain at the end it will be faster. – Dale M May 18 '13 at 23:21