0

I'm facing a deadend. Already searched trough stack forum, hope the question has not Already been asked..

I have a univers called U ( with Many elements). I have N sets containing several elements from U. We can find same element in different set. Each set has a weight ( not related to the number of elements it contains).

I must find à algorithm that find the combinaison of sets, with a minimum weight, that contains at least all the elements from the univers.

I think its common issue ( Maybe a well known np complet problem) but I can't tell myself that it's impossible. I'm looking for some ways to optimize but don't know where to begin with.

Any advices ?

Kind regards,

Yann

Choco52
  • 11
  • 3

1 Answers1

1

This is the Weighted set cover problem. It is NP-Complete.

deinst
  • 18,402
  • 3
  • 47
  • 45
  • Thx, so I'm stuck =) – Choco52 Feb 26 '16 at 11:07
  • Sort of. The greedy algorithm (choose the set with the lowest cost per new covered element) often works well in practice, although it is only guaranteed to come within a factor of log(n) of the optimal solution. – deinst Feb 26 '16 at 16:51
  • Ok thank you. I'll to understand this greedy algo =) – Choco52 Feb 27 '16 at 20:33