Name: Anonymous 2015-02-17 20:46
Marxist feminist game developer Anita Leigh Goldbergstein is given N sets, e. g.:
★ <a, b>
★ <a, d>
★ <c>
★ <d, e>
★ <b, f, c>
She wants to merge them in such way that:
1⟩ resulting list of sets is the smallest possible,
2⟩ operations on sets that have non-null intersection (that is, if an element appears in both) are strictly forbidden.
For the data above, the smallest list will be:
★ <a, b, c, d, e> -- from 1, 3, 4
★ <a, b, c, d, f> -- from 2, 5
What algorithm would you donate to her to solve this problem‽
★ <a, b>
★ <a, d>
★ <c>
★ <d, e>
★ <b, f, c>
She wants to merge them in such way that:
1⟩ resulting list of sets is the smallest possible,
2⟩ operations on sets that have non-null intersection (that is, if an element appears in both) are strictly forbidden.
For the data above, the smallest list will be:
★ <a, b, c, d, e> -- from 1, 3, 4
★ <a, b, c, d, f> -- from 2, 5
What algorithm would you donate to her to solve this problem‽