I recently thought of the following problem:
Given a set $A$ of sets find a minimal set $B$ of pair-wise disjoint sets such that each set in $A$ can be expressed as a union of sets in $B$.
For example, if $A = \{ \{ 1, 2 \}, \{ 1, 2, 3 \}, \{3, 4\}, \{4\} \}$ then $B = \{ \{ 1, 2 \}, \{ 3 \}, \{ 4 \} \}$.
I designed the following algorithm:
- Let $B = \emptyset$ initially.
- Let $S$ be the set of set(s) of lowest of cardinality in $A$.
- Let $I$ be the intersection of the sets in $S$.
If $I = \emptyset$: add the sets in $S$ to $B$, remove the elements in the sets in $S$ from the sets in $A$, and remove $\emptyset$ from $A$.
If $I \neq \emptyset$: add $I$ to $B$, remove the elements in $I$ from the sets in $A$, and remove $\emptyset$ from $A$.
- Repeat from step 2 until $A = \emptyset$.
My questions are:
- Does this problem have a name?
- Is this algorithm correct?
- What is the complexity of this algorithm?
- Is this algorithm optimal, and if not, what would be a better algorithm?