DeepAI
Log In Sign Up

Minimal Envy Matchings in the Hospitals/Residents Problem with Lower Quotas

In the Hospitals/Residents problem, every hospital has an upper quota that limits the number of residents assigned to it. While, in some applications, each hospital also has a lower quota for the number of residents it receives. In this setting, a stable matching may not exist. Envy-freeness is introduced as a relaxation of stability that allows blocking pairs involving a resident and an empty position of a hospital. While, envy-free matching might not exist either when lower quotas are introduced. We consider the problem of finding a feasible matching that satisfies lower quotas and upper quotas and minimizes envy in terms of envy-pairs and envy-residents in the Hospitals/Resident problem with Lower Quota. We show that the problem is NP-hard with both envy measurement. We also give a simple exponential-time algorithm for the Minimum-Envy-Pair HRLQ problem.

READ FULL TEXT VIEW PDF

page 1

page 2

page 3

page 4

04/28/2018

How good are Popular Matchings?

In this paper, we consider the Hospital Residents problem (HR) and the H...
09/29/2020

A Fine-Grained View on Stable Many-To-One Matching Problems with Lower and Upper Quotas

In the Hospital Residents problem with lower and upper quotas (HR-Q^U_L)...
10/16/2019

Maximum-Size Envy-free Matchings

We consider the problem of assigning residents to hospitals when hospita...
04/21/2022

Adapting Stable Matchings to Forced and Forbidden Pairs

We introduce the problem of adapting a stable matching to forced and for...
07/13/2017

How hard is it to satisfy (almost) all roommates?

The classical Stable Roommates problem (which is a non-bipartite general...
11/17/2017

Approximately Stable Matchings with Budget Constraints

This paper considers two-sided matching with budget constraints where on...
05/07/2021

Maximally Satisfying Lower Quotas in the Hospitals/Residents Problem with Ties

Motivated by a serious issue that hospitals in rural areas suffer from s...

1 Introduction

In the Hospitals/Residents problem, every hospital has an upper quota that limits the number of residents assigned to it. While, in some applications, each hospital also has a lower quota for the number of residents it receives. This extension of the HR problem is referred to as the Hospitals/Residents problem with Lower Quotas (HRLQ, for short) in the literature. However, the existence of a stable matching is not always true for a given HRLQ instance. This can be easily observed by the well-known Rural Hospitals theorem [2, 6, 7] stating that each hospital is assigned the same number of residents in any stable matching for a given HR instance.

Since there might be no stable matching given a HRLQ instance, one natural approach is to weaken the requirement of stability. Envy-freeness is a relaxation of stability that allows blocking pairs involving a resident and an empty position of a hospital. Structural results of envy-free matchings were investigated in [8] showing that the set of envy-free matchings forms a lattice. Envy-free matchings with lower quotas has recently been studied in [9]. Fragiadalis et al. [1] studies envy-free matchings (called fairness in their papar) when the preference lists are complete and the sum of lower quotas of all hospitals does not exceed the number of residents. In this restricted setting, envy-free matching always exists and they gave a linear-time algorithm called extended-seat deferred acceptance (ESDA) to find an envy-free matching. However, if the preference lists are not complete, envy-free matching may not exist. Yokoi [9] provided a characterization of envy-free matchings in HRLQ, connecting them to stable matchings in a modified HR instance so that the existence of envy-free matching can be decided by running DA on this modified HR instance.

Given a HRLQ instance, we know that stable matchings or envy-free matchings might not exist. Hamada et al. [3] considered the problem of minimizing the number of blocking pairs among all feasible matchings (feasible matching means a matching satisfies both lower and upper quotas of each hospital). They showed hardness of approximation of the problem and provided an exponential-time exact algorithm.

In this paper, we consider the problem of minimizing envy (defined later) among all feasible matchings given a HRLQ instance. Given a feasible matching, the envy among all residents can be measured by the number of envy-pairs or the number of residents involved in some envy-pairs.

We show that for both measurements, the problem is NP-hard. We also provide an exponential-time algorithm to find a feasible matching minimizing the number of envy-pairs.

1.1 Related Works

Popular matching is another relaxation of stability which preserves “global” stability in the sense that no majority of residents wish to alter into another feasible matching. Popular matching always exists. Nasre and Nimbhorkar [5] proposed an efficient algorithm to compute a maximum cardinality matching that is popular amongst all the feasible matchings in an HRLQ instance. When there exists a stable matching given a HRLQ instance, it is known that every stable matching is popular.

2 Preliminaries

An instance of the Hospitals/Residents Problem with Lower Quotas (HRLQ for short) consists of a bipartite graph , where is a set of residents and is a set of hospitals, and an edge denotes that and are mutually acceptable, and a preference system such that every vertex (resident and hospital) in ranks its neighbors in a strict order, referred as the preference list of the vertex. If a vertex prefers its neighbor over , we denote it by . Each hospital has a lower quota and an upper quota (). Sometimes we write to denote the lower and upper quota for some hospital .

A matching in is an assignment of residents to hospitals such that each resident is matched to at most one hospital, and every hospital is matched to at most residents. Let denote the hospital that is matched in . If is unmatched in , we let . For any neighbor of , we have since we assume that any resident prefers to be matched over to be unmatched. We say that a hospital is under-subscribed in if , is fully-subscribed if , is over-subscribed if and is deficient if . A matching is feasible in a HRLQ instance if no hospital is deficient or over-subscribed in . The HRLQ problem is to match residents to hospitals under some optimality condition such that the matching is feasible. Envy-freeness is defined as follows.

Definition 1.

Given a matching , a resident-hospital pair is an envy-pair if and for some .

Definition 2.

Given a matching , a resident has justified envy toward who is matched to hospital if and .

Definition 3.

A matching is envy-free if there is no envy-pair in . Equivalently, a matching is envy-free if no resident has justified envy toward other residents in .

In case that envy-free matchings may not exist in a given HRLQ instance. We define two other problems that minimizes envy in terms of envy-pairs and envy-residents.

Minimum-Envy-Pair Hospitals/Residents Problem with Lower Quotas (Min-EP HRLQ for short) is the problem of finding a feasible matching with the minimum number of envy-pairs. 0-1 Min-EP HRLQ is the restriction of Min-EP HRLQ where a quota of each hospital is either or .

Definition 4.

Given a matching , a resident is an envy-resident if there exists such that is an envy-pair in .

Minimum-Envy-Resident Hospitals/Residents Problem with Lower Quotas (Min-ER HRLQ for short) is the problem of finding a feasible matching with minimum number of envy-residents. 0-1 Min-ER HRLQ is defined similarly.

We assume without loss of generality that the number of residents is at least the sum of the lower quotas of all hospitals, since otherwise there is no feasible matching. In other papers, they impose the Complete List restriction (CL-restriction for short). There always exists envy-free matchings in CL-restriction instances, and a maximum-size one can be found in polynomial time [1, 4].

3 Minimum-Envy-Pair HRLQ

In this section, we consider the problem of minimizing the number of envy-pairs in HRLQ. We prove a NP-hardness result for 0-1 Min-EP HRLQ in the following theorem.

Theorem 5.

0-1 Min-EP HRLQ is NP-hard.

Proof.

We give a polynomial-time reduction from the well-known NP-complete problem Vertex Cover. Below is the definition of the decision version of the Vertex Cover problem. Given a graph and a positive integer , we are asked if there is a subset such that , which contains at least one endpoint of each edge of .

Reduction: Given a graph and a positive integer , which is an instance of the Vertex Cover problem, we construct an instance of 0-1 Min-EP HRLQ. Define , and . The set of residents is and the set of hospitals is . Each set is defined as follows:

Each hospital in has a quota . Note that and . Thus , which is polynomial in and .

Next, we construct the preference lists of . The preference lists of residents is shown as follows:

, where denotes a fixed order of elements in in an increasing order of indices.

The preference lists of hospitals is shown as follows:

, where and are as before a fixed order of all the residents in and , respectively, in an increasing order of indices, is an arbitrary order of all the residents in that is acceptable to as determined by the preference lists of residents.

Since each hospital in has a quota , any feasible matching must be a perfect matching in . Further, the subgraph between and is a complete graph and there is no edge between and in . Thus, any feasible matching must include a perfect matching between and .

For each edge , there are the set of residents and the set of hospitals . We call this pair of sets a -gadget, and write it as . For each gadget , let us define two perfect matchings between and as follows:

Figure 1 shows and on preference lists of .

Figure 1: Matchings (left) and (right)
Lemma 6.

For a gadget , and are the only perfect matchings between and . Furthermore, each and contains an unique envy-pair such that and .

Proof.

Consider the induced subgraph that contains only and . One can see that is a cycle of length . Hence there are only two perfect matchings between and , and they are actually and . Moreover, it is easy to check that contains only one envy-pair and contains only one envy-pair . ∎

We now ready to show the NP-hardness of 0-1 Min-EP HRLQ.

Lemma 7.

If is a “yes” instance of the Vertex Cover problem, then has a solution with at most envy-pairs.

Proof.

If is a “yes” instance of the Vertex Cover problem, then has a vertex cover of size exactly . Let this vertex cover be and let . We construct a matching of according to . We match each hospital in to each resident in and each hospital in to each resident in in an arbitrary way. Since , there are at most envy-pairs between and .

Since is a vertex cover of , for each edge , either or is included in . Thus for each gadget corresponding to the edge , if , we use as part of our matching , otherwise, use . By constructing in this way, it is easy to see that neither nor can be involved in an envy-pair. Also, by Lemma 6, there is only one envy-pair between and . Thus, the total number of envy-pairs is at most w.r.t . ∎

Lemma 8.

If is a “no” instance of the Vertex Cover problem, then any solution of has at least envy-pairs.

Proof.

It is equivalent to prove that if admits a feasible matching with less than envy-pairs, then has a vertex cover of size at most . must be a perfect matching and must be a one-to-one correspondence between and in order to be a feasible matching. Since all are matched to , for each gadget , by Lemma 6, there are only two possibilities, and and either matching admits one envy-pair within each . Totally we have envy-pairs between and .

Suppose we choose for . If is matched with a resident in , there are envy-pairs between and . Then we have envy-pairs, contradicting the assumption. Thus, must be matched with a resident in . By the same argument, if is chosen, must be matched with a resident in . Hence, for each edge , either or is matched with a resident in . It is obvious that the set of vertices matched with residents in is a vertex cover of size . This completes the proof. ∎

Thus a polynomial-time algorithm for 0-1 Min-EP HRLQ would solve the Vertex Cover problem, implying P=NP. ∎

Note that the reduction above also implies NP-hardness of 0-1 Min-BP HRLQ because all envy-pairs are blocking pairs and the construction in Lemma 7 does not generate any wasteful pairs (non-envy blocking pairs). [3] gives stronger results showing 0-1 Min-BP HRLQ is hard to approximate within the ratio of for any positive constant even if all preference lists are complete. While, the reduction can not be used for 0-1 Min-EP HRLQ because there exists envy-free matchings when all preference lists are complete [1] (or a weaker requirement such that all hospitals with positive lower quotas has complete preference lists over all residents [4]) and a maximum-size envy-free matching can be found in linear time.

3.1 A Simple Exponential-Time Algorithm

Let be a given instance. Starting from , we guess a set of envy-pairs. There are at most choices of . For each choice of , we delete each . Let be the modified instance. We apply Yokoi’s algorithm to find an envy-free matching in . If the algorithm outputs an envy-free matching , then it is the desired solution, otherwise, we proceed to the next guess. If we run out of all guess of for a fixed , we increment by 1 and proceed as before until we find a desired solution.

Theorem 9.

There is an -time exact algorithm for Min-EP HRLQ where is the number of envy-pairs in an optimal solution of a given instance.

Proof.

If the algorithm ends when , then the output matching is an envy-free matching in and the set can only introduce at most envy-pairs, contradicting that is minimum number of envy-pairs in any feasible matching of instance . Consider the execution of the algorithm for and any optimal solution and let our current guess contains exactly the envy-pairs of . Then it is easy to see that is envy-free in and satisfies all the lower quotas. Hence if we apply Yokoi’s algorithm, we find a matching is envy-free and satisfies all the lower quotas. Thus has at most envy-pairs in the original instance and it is our desired solution.

For the time complexity, Yokoi’s algorithm runs in time and for each , we apply Yokoi’s algorithm at most times. Therefore, the total time is at most . ∎

4 Minimum-Envy-Resident HRLQ

In this section, we consider the problem of minimizing the number of envy-residents in HRLQ. We prove a NP-hardness result for Min-ER HRLQ in the following theorem.

Theorem 10.

Min-ER HRLQ is NP-hard.

Proof.

We give a polynomial-time reduction from the NP-complete problem CLIQUE. In CLIQUE, we are given a graph and a positive integer , and asked if contains a complete graph with vertices as a subgraph.

Reduction: Given a graph , and a positive integer , which is an instance of the CLIQUE problem, we construct in instance of Min-ER HRLQ. Define , and . The set of residents is and the set of hospital is . Each set is defined as follows:

Each hospital in has a quota and the hospital has a quota .

The preference lists of residents and hospitals is shown as follows:

, where are a fixed order of all hospitals in in an increasing order of indices, and are a fixed order of all the residents in and , respectively, in an increasing order of indices, is an arbitrary order of all the residents in that is acceptable to as determined by the preference lists of residents. are a fixed order of all residents in in an increasing order of indices.

Lemma 11.

If is a “yes” instance of CLIQUE, then there is a feasible matching of having at most envy-residents.

Proof.

Suppose that has a clique of size . We will construct a matching of from . We assign all the residents in to the hospitals in in an arbitrary way and all the residents in to the hospitals in in an arbitrary way. Further, we match all the residents in to . Clearly, is feasible. Since is a clique, for any pair . There are residents associated with the edge . Each of these residents are assigned to the hospital in , which is the worst in ’s preference list and the hospitals and are assigned to residents in , better than . Hence all these residents are not envy-residents. There are such residents and total number of residents is . Hence there are at most envy-residents. ∎

Lemma 12.

If is a “no” instance of CLIQUE, then any feasible matching of contains at least envy-residents.

Proof.

Suppose that there is a feasible matching of that contains less than envy-residents. We show that contains a clique of size . Note that must match all the resident in to because has a quota and is only acceptable to . Thus the hospitals must only match to the residents in and there is one-to-one correspondence between and in order for to be feasible. Define be the set of hospitals matched with . Clearly . We claim that is a clique.

The total number of residents is . Since we assume that there are less than envy-residents, there are more than non-envy-residents (obviously an non-envy-resident is a resident that is not an envy-resident). Since , there are more than non-envy-residents in . Consider the following partition of into subsets: for each . There must exists a such that contains at least non-envy-residents by Pigeonhole principle. In order for to be a non-envy-resident, we note that both and must match to some resident in because if or is matched to , we have an envy-pair contains . Thus any pair of vertices in causes such a non-envy-resident, implying that is a clique. ∎

Because , we have . Hence by Lemma 11 and Lemma 12, Min-ER HRLQ is NP-hard. ∎

5 Conclusion and Open Problems

In this paper, we give NP hardness results of minimizing envy in terms of envy-pairs and envy-residents in the Hospitals/Resident problem with Lower Quota. Hamada et al. [3] showed hardness of approximation for the problem of minimizing the number of blocking pairs among all feasible matchings. It would be interesting to show hardness of approximation for minimizing envy in the HRLQ problem.

References

  • [1] Daniel Fragiadakis, Atsushi Iwasaki, Peter Troyan, Suguru Ueda, and Makoto Yokoo. Strategyproof matching with minimum quotas. ACM Transactions on Economics and Computation (TEAC), 4(1):1–40, 2016.
  • [2] David Gale and Marilda Sotomayor. Some remarks on the stable matching problem. Discrete Applied Mathematics, 11(3):223–232, 1985.
  • [3] Koki Hamada, Kazuo Iwama, and Shuichi Miyazaki. The hospitals/residents problem with lower quotas. Algorithmica, 74(1):440–465, 2016.
  • [4] Prem Krishnaa, Girija Limaye, Meghana Nasre, and Prajakta Nimbhorkar. Envy-freeness and relaxed stability: Hardness and approximation algorithms. In

    International Symposium on Algorithmic Game Theory

    , pages 193–208. Springer, 2020.
  • [5] Meghana Nasre and Prajakta Nimbhorkar. Popular matching with lower quotas. arXiv preprint arXiv:1704.07546, 2017.
  • [6] Alvin E Roth. The evolution of the labor market for medical interns and residents: a case study in game theory. Journal of political Economy, 92(6):991–1016, 1984.
  • [7] Alvin E Roth. On the allocation of residents to rural hospitals: a general property of two-sided matching markets. Econometrica: Journal of the Econometric Society, pages 425–427, 1986.
  • [8] Qingyun Wu and Alvin E Roth. The lattice of envy-free matchings. Games and Economic Behavior, 109:201–211, 2018.
  • [9] Yu Yokoi. Envy-free matchings with lower quotas. Algorithmica, 82(2):188–211, 2020.