I have several sets of pairs like:
a: ([1, 2], [4,5]) b: ([1, 3]) c: ([4, 7], [1, 8]) d: ([9, 7], [1, 5]) ... Where no two pairs are identical, and the elements of no pair are identical. Each set can contain many pairs. There is a smallish number of elements (around 200).
From each set I take one pair. Now, I want to take pairs in such a way, that the number of elements is the smallest possible.
The problem is too large to try every combination, is there any algorithm or heuristic that might help me find the optimal (or a close guess)?