I have a problem that I have encountered a number of times in practice, and I'm curious if there is a formal name for it so I can look for other people's solutions (I wrote an algorithm to solve it, but maybe it could be faster).
The problem is as follows: I have as input a set of sets $I$, and I want as output a set of sets $O$. This grouping has to be such that:
Every element is only in one of the sets in $O$, i.e. for all $o, o' \in O$ we have $o \cap o' = \emptyset$ unless $o = o'$.
Any element in a set in $I$ is in a set in $O$, i.e. for all $e \in i, i \in I$ there exists a set $o \in O$ s.t. $e \in o$.
If items are in the same set $o \in O$, this means that for all sets $i \in I$, either $o \subseteq i$, or $o \cap i = \emptyset$.
All sets $o \in O$ are maximal, i.e. the cardinality of $O$ is minimal.
As an example:
$I = \{\{1,2,3\},\{3,4,5\},\{1,2\}\}$
Yields:
$O = \{\{1,2\},\{3\},\{4,5\}\}$
This output would violate rule 4, but not 1, 2 or 3:
$O = \{\{1\},\{2\},\{3\},\{4\},\{5\}\}$
I would also be interested in algorithms that solve this problem quickly but not to optimality, i.e. with a small rather than minimal number of output sets.
Thanks.