# Algorithms for Optimization of Integer Subset Linking

Consider having two sets of integer values that are divided in multiple subsets. The two sets exist of the same set of values but the order and the division into subsets differ. The idea is to link the subsets from the first set with these from the second set in such way that every individual value in each subset of the first set is linked to a same individual value of a subset of the second set. No value can be linked with two others. In one linking step multiple values can be linked between only one subset of the first set with only one subset of the second set. The goal is to reduce the amount of linking steps as much as possible.

The question is: are there algorithms around for doing this kind of linking as optimal as possible?

I have done some research in several fields of mathematical optimization, such as Linear Programming, Integer Programming, Combinatorial optimization and Operations Research but none of the algorithms seem to cover this problem. Do you guys have any ideas, fields or algorithms to optimize these kinds of problems and make me head in the right direction?

For example:

Two sets of integers with two subsets:

[[1, 2, 2] [2, 3, 3]]

and

[[1, 2, 3] [2, 2, 3]].

Now the first linking set could be to link the first subset of the first set 1[1] with the first subset of the second set 2[1].

This is one step and leads to a link between: 1 – 1 – 1 and 2 – 1 – 1 and a link between 1 – 1 – 2 and 2 – 1 – 2. Now the sets will look like this:

[[1, 2, 2] [2, 3, 3]]

and

[[1, 2, 3] [2, 2, 3]].

The next step could be linking 1[1] with 2[2], leading to a link between 1 – 1 – 3 and 2 – 2 – 1 and the sets will look like this:

[[1, 2, 2] [2, 3, 3]]

and

[[1, 2, 3] [2, 2, 3]].

The third step could be linking 1[2] with 2[1]. Resulting in:

[[1, 2, 2] [2, 3, 3]]

and

[[1, 2, 3] [2, 2, 3]].

And the fourth step could then be linking 1[2] to 2[2]. Resulting in:

[[1, 2, 2] [2, 3, 3]]

and

[[1, 2, 3] [2, 2, 3]], which means every value is linked. This solution costs four steps.

When having larger sets, all subsets can be linked to all other subsets of the other set, but that will result in many steps. Is there a algorithm around that optimizes the number of steps?

Algorithms for Optimization of Integer Subset Linking