TITLE: finding the $n$ closest pairs between $2n$ points
QUESTION [9 upvotes]: Given $2n$ points $x_1, x_2 \ldots x_{2n}$ and a distance $d_{i,j}$ defined between them, how can I best find the set $P$ of mutually exclusive pairs $(i,j)$ such that the sum of their distances
$$
\sum_{(i,j) \in P} d_{i,j} 
$$
is minimised? The definition of $d_{i,j}$ is open and the function could be convex. The motivation for this problem is practical. How can I pair of 30 pictures say into most similar pairs?
I apologise in advance for the choice of tags on this post. I have been out of maths proper for a long time.

REPLY [10 votes]: Actually, the OP is on a slightly different problem: the Euclidean minimal matching problem, where the complexity should be a lot better. See
The Open Problems Project, Problem 6
(we will probably hear more from Joseph...).
EDIT I also found this paper
which seems to be much simpler than Edmonds, while not being particularly 2D-oriented.