How to find the minimum cost of linking two sets of points

I got two sets of points S and V, both have size n. I want to connect two sets so that each point in S is associated with one and only one point in V. The cost of linking two points is defined as the Euclidean distance between two points. There must be n! possible ways of communication. So how to find a way of minimum cost? (effective way)

+5
source share
1 answer

This is a problem with the appointment. You can solve it using the Hungarian method . There is an implementation of this in python . You can also solve the problem with any linear programming solver. The LP formula will always give you an integer solution.

+6
source

All Articles