No-justified-envy matching

In economics and social choice theory, a no-justified-envy matching is a matching in a two-sided market, in which no agent prefers the assignment of another agent and is simultaneously preferred by that assignment.

The goal is to match doctors to hospitals, without monetary transfers.

In such cases it is natural to check whether an NJE matching exists.

A necessary condition is that the sum of all lower quotas is at most the number of doctors (otherwise, no feasible matching exist at all).

In this case, if all doctor-hospital pairs are acceptable (every doctor prefers any hospital to unemployment, and any hospital prefers any doctor to a vacant position), then an NJE matching always exists.

In the new problem, a stable matching always exists and can be found efficiently.

[5] The algorithm can be improved to find a maximal NJE matching.