3

The problem I am trying to solve is as follows: Given two lists of equal length containing points, find a mapping that minimizes the sum of distances between pairs. The reason I'm trying to do this is to find the closest points in two polygons for a genetic algorithm I'm building, that would ideally line up two genes based on the output of this computation to maximize the spatial similarity.

Zach Scrivena
  • 29,073
  • 11
  • 63
  • 73
Evan Senter
  • 247
  • 1
  • 10

2 Answers2

4

This is known as the linear assignment problem. The Hungarian algorithm is one way to solve it.

Zach Scrivena
  • 29,073
  • 11
  • 63
  • 73
1

I actually asked basically the same question a few days ago here. There are a bunch of good links to explanations of possible solutions including simulated annealing.

Community
  • 1
  • 1
MahlerFive
  • 5,159
  • 5
  • 30
  • 40