I am looking for a way to solve an assignment problem, but I am having some problems finding the correct algorithm to use.
I have 2 list of nodes A and B, and in my problem may the length of A not be equal to B.
In addition, the node a in A may not be a potential match with all nodes in B. The preference is given by a double where 0 is not interested to 1 that is very interested and then remove all matches with an edge of 0 after (As there might be matches that is impossible).
If a have a preference of x to b, will b have the same preference to a.
Example graph:
I am interested in creating the most optimal matching, meaning that to sum of the edges are the largest possible. In the example above would I be interested in the matching (1,1) and (3,2) leaving 2 in the left row unmatched, with a total edge weight of 1.9.
I have been looking at the stable marriage and the Hungarian algorithm but both these algorithm requires there to be an equal amount of nodes on each side, and they do not find the greatest total edge weight.
(Greatest or lowest is fines as I can just invert the edge weight)
Can any of you point me towards an algorithm that will solve this problem for me?