Hello,
The problem is this:
Suppose we have two sets of points (each size N) and we want to find the minimum total sum among all combinations of pairwise matchings.
for example:
If A={a1,a2,a3,a4} and B={b1,b2,b3,b4}
the combinations are:
(a1,b1),(a2,b2),(a3,b3),(a4,b4)
(a1,b2),(a2,b1),(a3,b3),(a4,b4)
(a1,b2),(a2,b3),(a3,b2),(a4,b4)
...etc
I want to find the one with minimum sum of pairwise distances.
Can anybody suggest an efficient algorithm? (O(NlogN or N^2))?
Maybe it's simple but I can't think of a solution right now.
It's part of a problem I am trying to solve, not the whole problem.
Thanks.