0

I am trying to find an algorithm to assign "participants" to one of an array of groups. For each participant there are rankings of their preference for the groups. I need an algorithm to assign all of the participants to groups in the best possible way. After some research, it seems like what I am looking for is a version of the Hungarian algorithm but with unequal sets, if that exists. I have also done a lot of reading on the stable marriage problem and the Gale-Shapely algorithm, but I do not know if that is applicable as the groups wouldn't have a preference of the participants. Thank you!

john doe
  • 5
  • 4
  • Does this answer your question? [Hungarian Algorithm for non square matrix](https://stackoverflow.com/questions/51223398/hungarian-algorithm-for-non-square-matrix) – Yay295 Nov 26 '20 at 19:51
  • That certainly helps, thank you. However, when trying to implement the Hungarian algorithm (in python for now just to understand it) I could write functions for step one and two quickly. The problem is of course with steps 3+. Do you know of any good implementation tutorials, ideally in python? – john doe Nov 27 '20 at 00:25
  • I don't know f any tutorials, but you could look at this Python implementation: https://github.com/bmc/munkres – Yay295 Nov 28 '20 at 05:58

0 Answers0