How could I find the optimal paired values for given incidence matrix?

22 Views Asked by At

I'm not a mathematician so it's possible that I'm using incorrect terminology here, but I'll try to explain.

Say I have an arbitrary evenly sized list of variables (for instance, A to H). Each of these variables has a value representing its relationship to each of the other variables individually. A variable cannot have a relationship with itself, so those values are represented as N/A. Below is a matrix showing the relationship between these example variables.

Matrix of values relating to each pair of variables A through H.

Assuming that each variable cannot be paired with itself, and no variable can be paired with another variable twice, how could I find the 'optimal' pairs between each variable that would result in the highest (or lowest) total cumulative score? For instance, according to the above image:

  • AB = 1
  • CD = 1
  • EF = 0
  • GH = 1

Total score = 3

  • AG = 9
  • BF = 6
  • CE = 8
  • DH = 9

Total score = 32

It's possible that this problem is related to Mutual Coherence, but I can't say that for sure since I'm having a bit of trouble comprehending that explanation of the concept.

1

There are 1 best solutions below

1
On

What you are looking for is a maximum (or minimum) weighted matching. There are a number of ways to solve this. The Hungarian algorithm is particularly helpful.