Bipartite graph matching with Gale-Shapley

587 Views Asked by At

I have a graph with 7 different people and 7 "jobs" on either side, however each persons preferences for their ideal job vary, each persons has between 2-5 different job preferences of the 7 different jobs.

I tried using the Gale-Shapley algorithm to match person to job however I don't think thats quite appropriate in this case.

Is there a method for proving that (in this particular case) it is impossible to have a perfect matching between.

1

There are 1 best solutions below

2
On

The Stable Marriage Problem requires that each member of a given set has (strict) preferences regarding members of the other set. In this model, it does not appear that the employers have preferences regarding the employees. Thus, the model in question is closer to the House Allocation Problem.

The Top-Trading Cycle Procedure (TTCP) solves the House Allocation Problem in $O(n^{2})$ time, producing a perfect matching, assuming that each player has complete, strict, and transitive preferences. When the strictness assumption is relaxed, the House Allocation Problem is NP-Hard.

Losing the completeness assumption is arguably the same as relaxing the strictness assumption for the following reason. If I don't want either of the houses A or B, then I am indifferent to A and B. So we have a subset of the NP-Hard variant of the House Allocation Problem. I do not know if this subset is also NP-Hard.

For an introduction to the House Allocation Problem, see this link: https://michaellevet.wordpress.com/2015/06/01/algorithmic-game-theory-house-allocation-problem/

Edit: Based on your comment, algorithms and game theory are not the right approaches. Are you familiar with Hall's Theorem? Suppose you have a bipartite graph $G(X \dot \cup Y, E)$; and suppose (WLOG) that $|X| \leq |Y|$. Hall's Theorem states that a matching that saturates $X$ exists if and only if for every $S \subset X$, $|N(S)| \geq |S|$. So to show no perfect matching exists, pick a set of people where there are fewer jobs than people.