The question is completely contained in the title. I have a set B of sets {B1 .. Bn} and I need to obtain the smaller possible subset of B which sums up to a given set A (repetitions allowed).
I have thought of this approach:
1) index sets by the contained elements
eg. set B1 contains element a,b; set B2 contains b,c, the indexing will be something like
a => B1
b => B1, B2
c => B2
Thus the aim changes to find the lesser number of columns which cover all elements.
2) get all the combinations of two elements. If one or more combinations have all the elements (if there is no element contained in a set that is not in the chosen columns) I'm done. Else collapse those combinations to a new set, keep track and keep iterating.
The problem is that I have to create a new data structure to collapse the sets in B. I need to understand if this is a correct approach in respect to time complexity, moreover I need to understand if there is a simpler way of implementing this approach.