I am looking for a variant of the Hungarian algorithm (I think) that will unite N people with itself, excluding pairs-pairs and pairs of the return trip, where N is equal.
eg. Given N 0 - N 6 and the cost matrix C for each pair, how can I get a set of 3 pairs with a low cost?
C = [ [ - 5 6 1 9 4 ]
[ 5 - 4 8 6 2 ]
[ 6 4 - 3 7 6 ]
[ 1 8 3 - 8 9 ]
[ 9 6 7 8 - 5 ]
[ 4 2 6 9 5 - ] ]
In this example, the resulting pairs will be:
N 0 , N 3
N 1 , N 4
N 2 , N 5
With this, I’m now wondering if I can simply increase the value in the "lower half" of the matrix ... or even better, delete them.
Is there a Hungarian version that works on a non-square matrix?
, , ?