Solves the Set Cover problem as an integer linear program.
setcover(Sets, weights)
Arguments
Sets: matrix of 0s and 1s, each line defining a subset.
weights: numerical weights for each subset.
Details
The Set Cover problems attempts to find in subsets (of a 'universe') a minimal set of subsets that still covers the whole set.
Each line of the matrix Sets defines a characteristic function of a subset. It is required that each element of the universe is contained in at least one of these subsets.
The problem is treated as an Integer Linear Program (ILP) and solved with the lp solver in lpSolve.
Returns
Returns a list with components sets, giving the indices of subsets, and objective, the sum of weights of subsets present in the solution.
References
See the Wikipedia article on the "set cover problem".