I'm looking for an algorithm to solve the following problem. I have a number of subsets (1-n) of a given set (a-h). I want to find the smallest collection of subsets that will allow me to construct, by combination, all of the given subsets. This collection can contain subsets that do not exist in 1-n yet.
a b c d e f g h
1 1
2 1 1
3 1 1 1
4 1 1
5 1 1
6 1 1 1 1
7 1 1 1 1
8 1 1 1
9 1 1 1
Below are two possible collections, the smallest of which contains seven subsets. I have denoted new subsets with an x.
1 1
x 1
x 1
x 1
x 1
x 1
x 1
x 1
1 1
x 1
x 1
x 1
x 1
x 1 1
x 1
I believe this must be a known problem, but I'm not very familiar with algorithms. Any help is very much appreciated, as is a suggestion for a better topic title.
Thanks!
Update
Graph coloring gets me a long way, thanks. However, in my case subsets are allowed to overlap. For example:
a b c d
1 1 1 1
2 1 1 1
3 1 1 1
4 1 1
5 1 1 1 1
Graph coloring gives me this solution:
x 1 1
x 1
x 1
But this one is valid as well, and is smaller:
1 1 1 1
4 1 1