What algorithm assigns people their most preferred value based on a list of their best choices?

Let's say users enter their top three (or N) preferred baseball positions:

// first element of each list being most preferred
userA = ["backcatcher", "center field", "short stop"];
userB = ["pitcher", "backcatcher", "center field"];
userC = ["pitcher", "center field", "short stop"];
userD = ["short stop", "backcatcher", "pitcher"];
...

users = [userA, userB, userC, userD ...];

      

What algorithm should assign each user the most preferred position as possible?

I know there must be some name for this problem and solution, but I looked online a bunch and couldn't find one.

It is similar to Borda count and Condorcet Method but it takes a list of users' preferences and determines how much each choice is preferred over each user.

The closest I've found is a stable marriage problem that is similar but requires two sets of preferred lists, i.e. the stop position would also indicate which users it would most like to reproduce.

Does anyone know what this problem is called? Thanks in advance.

+3


source to share


1 answer


This is the assignment task . You could use the Hungarian algorithm for example .



You just need to come up with a way to turn user / player settings into costs. Perhaps when a person gets their first choice, the cost is -3, the second choice is -2, the third choice is -1, etc. How you do this depends on the nature of your problem. The way you view the various tradeoffs ends up coding the costs you give the algorithm.

+2


source







All Articles