maximum cardinality bipartite matching with some restriction

22 views Asked by At

I learned that maximum cardinality bipartite matching problem can be solved by max flow algorithm like Ford-Fulkerson.

After that i met a problem with some change/restriction on that.

State of problem is below

N people is sitting in a classroom with M seats (N <= M) Each person has a 'prefer set' which is a set of preferred seats. the seat each person is sitting may or may not be an element of that person's 'prefer set' Now we want to change seats to most people can take a seat he/she prefers. Each person can take a seat he/she wants or can stay the same. So, only possible 'fail' condition for a person is he/she does not prefer the seat he/she is sitting but failed to take a seat he/she prefers. Not take a seat or change to a seat which he/she does not prefer is prohibited.

Can i solve this problem with slight change with Ford-Fulkerson? Or should i use weighted algorithm like Hungarian?

I tried change the order of people in using ford-fulkerson. consider people sitting at low-popular seats later was better but failed to got an answer a lot. next, i added edges from each person to his/her current seat but failed also.

It will be great if i can get some hint or name of algorithm to solve this problem.

0

There are 0 answers