I have $n$ non-empty possibly non-disjoint sets $S_i$, each having a cost $c_i$, and the union $\Omega=\bigcup_{i=1}^{n}S_i$. How can I find a selection of $S_i$ such that the union is also $\Omega$ and the total cost of this selection is minimized?
This is called the unweighted budgeted maximum cover problem.
For example, I have these sets:
(* {set, cost} *)
sets = {
{{1, 2, 6}, 24},
{{3, 5}, 18},
{{1, 5, 6}, 7},
{{4, 5, 6}, 14},
{{2, 3}, 12},
{{1}, 5}
};
The union is Union@@sets[[All,1]]
which is {1,2,3,4,5,6}
. One could choose the last three sets for a total cost of $14 + 12 + 5 = 31$ . Mathematica has FindVertexCover
and FindEdgeCover
which are graph problems related to the set cover problem. Is there a way to solve set cover problems?