u/Glad-Trip832

I have N people that I want to sort into M groups. Each person has a list of preferences for which group they would like to enter. There are two major differences from the traditional hospital/resident problem.

  1. It is possible for preferences to be tied (e.g. person A doesn't care whether they are sorted into group X or Y).
  2. The groups don't have preferences for specific people, but 'want' certain numbers of total people.

Given those changes, I'm not sure how to go about this. The concept of 'stability' doesn't really make sense anymore.

I've previously created a hill-climbing program to run through this, but it isn't very fast and (more importantly) doesn't give especially good answers. Any ideas about how to approach this problem would be appreciated.

reddit.com
u/Glad-Trip832 — 17 days ago