Lorenz
Lorenz

Reputation: 2269

Build groups of two out of a list of people with rating

I got a list of people and a rating of how good this combination is. I need to maximize the rating. I've already looked at the hungarian algorithm, but it solves a slightly different problem. How can you solve such a problem?

Upvotes: 0

Views: 54

Answers (1)

Karoly Horvath
Karoly Horvath

Reputation: 96286

The hungarian algorithm solves a different problem.

You need the maximum weight matching algorithm for general graphs.

If your graph is small, do a simple (combinatorial) exhaustive search, otherwise implement one of the more complicated algorithms.

Upvotes: 1

Related Questions