This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Socially stable matchings in the
Hospitals/Residents problem

Georgios Askalidis1, Nicole Immorlica1,2, Augustine Kwanashie3,
David F. Manlove4 and Emmanouil Pountourakis5

1,2,5Department of Electrical Engineering and Computer Science, Northwestern University, USA
2Microsoft Research New England, USA
3,4School of Computing Science, University of Glasgow, UK
1gask@u.northwestern.edu, 2nicimm@gmail.com, 3a.kwanashie.1@research.gla.ac.uk
4David.Manlove@glasgow.ac.uk, 5manolis@u.northwestern.edu
Abstract

In the Hospitals/Residents (HR) problem, agents are partitioned into hospitals and residents. Each agent wishes to be matched to an agent (or agents) in the other set and has a strict preference over these potential matches. A matching is stable if there are no blocking pairs, i.e., no pair of agents that prefer each other to their assigned matches. Such a situation is undesirable as it could lead to a deviation in which the blocking pair form a private arrangement outside the matching. This however assumes that the blocking pair have social ties or communication channels to facilitate the deviation. Relaxing the stability definition to take account of the potential lack of social ties between agents can yield larger stable matchings.

In this paper, we define the Hospitals/Residents problem under Social Stability (HRSS) which takes into account social ties between agents by introducing a social network graph to the HR problem. Edges in the social network graph correspond to resident-hospital pairs in the HR instance that know one another. Pairs that do not have corresponding edges in the social network graph can belong to a matching MM but they can never block MM. Relative to a relaxed stability definition for HRSS, called social stability, we show that socially stable matchings can have different sizes and the problem of finding a maximum socially stable matching is NP-hard, though approximable within 3/23/2. Furthermore we give polynomial time algorithms for special cases of the problem.

1 Introduction

Matching problems generally involve the assignment of a set (or sets) of agents to one another. Agents may be required to list other agents they find acceptable in order of preference, either explicitly or implicitly through a list of desirable characteristics. Agents may also be subject to capacity constraints, indicating the maximum number of assignments they are allowed to be involved in.

An example of such a matching problem that has received much attention in literature is the Hospitals/Residents problem (HR) [11, 13, 28, 24]. An HR instance consists of a set of residents seeking to be matched to a set of hospitals. Each resident ranks a subset of the hospitals in strict order of preference, and vice versa. Further, each resident forms an acceptable pair with every hospital on his preference list. Finally, each hospital has a capacity, indicating the maximum number of residents that it can be assigned. A matching is a set assignments among acceptable pairs such that no resident is assigned to more than one hospital, and no hospital exceeds its capacity. An acceptable pair forms a blocking pair with respect to a matching, or blocks a matching, if both agents would rather be assigned to each other than remain with their assignees (if any) in the matching. A matching is stable if it admits no blocking pair. HR has a wide range of applications including traditional markets like the assignment of graduating medical students (residents) to hospitals [18, 27] and students to high schools [1, 2], and online markets like oDesk (an online labour market), AirBnB (an online short-term housing rental market), and Match.com/OkCupid/etc. (online dating markets). In applications such as these, it has been convincingly argued that stability is a desirable property of a matching [27].

Although the concept of stability is important in many applications of matching problems, there are classes of matching problems (such as the Stable Roommates problem) for which an instance is not guaranteed to admit a stable matching [11]. Moreover, enforcing the stability requirement tends to reduce the size of matchings discovered [6]. This is an issue particularly in the case of applications where it is desirable to find the largest possible matching. Also, it is generally assumed that a resident-hospital pair that blocks a matching in theory will also block the matching in practice. However this assumption is not always true in some real-life applications, as resident-hospital pairs are more likely to form blocking pairs in practice if social ties exist between them. These factors have motivated studies into alternative, weaker stability definitions that still aim to prevent a given matching from being subverted in practice while increasing the number of agents involved in the matchings.

Arcaute and Vassilvitskii [3] described the Hospitals/Residents problem in the context of assigning job applicants to company positions. They observed that applicants are more likely to be employed by a company if they are recommended by their friends who are already employees of that company. In their model, an applicant-company pair (a,c)(a,c) may block a matching MM if (a,c)(a,c) blocks it in the traditional sense (as described in the analogous HR context) and aa is friends with another applicant aa^{\prime} assigned to cc in MM. Thus their problem incorporates both the traditional HR problem and additionally an underlying social network, represented as an undirected graph consisting of applicants as nodes and edges between nodes where the corresponding applicants have some social ties (e.g., are friends). Matchings that admit no blocking pair in this context are called locally stable due to the addition of the informational constraint on blocking pairs. Cheng and McDermid [8] investigated the problem (which they called HR+SN) further and established various algorithmic properties and complexity results. They showed that locally stable matchings can be of different sizes and the problem of finding a maximum locally stable matching is NP-hard. They identified special cases where the problem is polynomially solvable and gave upper and lower bounds on the approximability of the problem.

While the HR+SN model is quite natural in the job market, it makes an assumption that the employed applicant aa^{\prime} will always be willing to make a recommendation. This however may not be the case as a recommendation may in practice lead to aa^{\prime} being rejected by his assigned company. Ultimately this may lead to a reassignment for aa^{\prime} to a worse company or indeed aa^{\prime} may end up unmatched. While it is true that a scenario may arise where these social ties between applicants may lead to a blocking pair of a matching, it is arguably equally likely that social ties between an applicant and the company itself will exist. That is, an applicant need not know another applicant who was employed by the company in order to block a matching; it is enough for him to know any employee in the company (for example the Head of Human Resources). Such a model could also be natural in many applications both within and beyond the job market context.

Additionally, many matching markets are cleared by a centralised clearinghouse. While more traditional markets require agents to explicitly list potential matches, many online markets ask agents to list desirable characteristics and then use software to infer the preference lists of the agents. In these markets, communication between agents is facilitated by the centralised clearinghouse. Some agent pairs in the market may have social ties outside the clearinghouse. Often these social ties are due to past interactions within the marketplace and so the clearinghouse is aware of them. These pairs can communicate outside the clearinghouse and might block proposed matchings. Most pairs, however, only become aware of each other when the clearinghouse proposes them as a match. Thus even if they prefer each other to their assigned matches, they will not be able to discover each other and deviate from the matching.

Based on these ideas, we present a variant of HR called the Hospitals / Residents problem under Social Stability (HRSS). In this model, which we describe in the context of assigning graduating medical residents to hospital positions, we assume that a resident-hospital pair will only form a blocking pair in practice if there exists some social relationship between them. Two agents that have such a social relationship are called an acquainted pair, and this is represented by an edge in a social network graph. We call a pair of agents that do not have such a social relationship an unacquainted pair. Such a pair may be part of a matching MM (given that MM is typically constructed by a trusted third party, i.e., a centralised clearinghouse) but cannot form a blocking pair with respect to MM. As a consequence, although a resident-hospital pair may form a blocking pair in the classical sense, if they are an unacquainted pair, they will not form a blocking pair in the HRSS context. A matching that admits no blocking pair in this new context is said to be socially stable. We denote the one-to-one restriction of HRSS as the Stable Marriage problem with Incomplete lists under Social Stability (SMISS).

Hoefer and Wagner [15, 16] studied a problem that generalises both HR+SN and HRSS. In their model, the social network graph involves all agents and need not be bipartite. A pair locally blocks a given matching MM if (i) it blocks in the classical sense, and (ii) the agents involved are at most ll edges apart in the social network graph augmented by MM. This scenario can be viewed as a generalisation of the HR+SN (l=2l=2) and HRSS (l=1l=1) models. They studied the convergence time for better-response dynamics that converge to locally stable matchings, and also established a lower bound for the approximabiliy of the problem of finding a maximum locally stable matching (for the case that l2l\leq 2).

Locally stable matchings have also been investigated in the context of the Stable Roommates problem (a non-bipartite generalisation of the Stable Marriage problem) in [7]. Here, the Stable Roommates problem with Free edges (SRF) as introduced was motivated by the observation that, in kidney exchange matching schemes, donors and recipients do not always have full information about others and are more likely to have information only on others in the same transplant centre as them. The problem is defined by the traditional Stable Roommates problem together with a set of free edges. These correspond to pairs of agents in different transplant centres that do not share preference information; such pairs may be involved in stable matchings, but cannot block any matching. It is shown in [7] that the problem of determining whether a stable matching exists, given an SRF instance, is NP-complete.

In this paper, we present some algorithmic results for the HRSS model described above. In Section 2, we present some preliminary definitions and observations. We give a reduction from the HRSS to the HR+SN problem in Section 3. In Section 4 we show that MAX HRSS, the problem of finding a maximum socially stable matching given an HRSS instance II, is NP-hard even under certain restrictions on the lengths of the preference lists. This result holds even if II is an instance of SMISS. Then in Section 5, we consider the approximability of MAX HRSS. We give a 3/23/2-approximation algorithm for the problem, and also show that it is not approximable within 21/19ε21/19-\varepsilon, for any ε>0\varepsilon>0, unless P=NP, and not approximable within 3/2ε3/2-\varepsilon, for any ε>0\varepsilon>0, assuming the Unique Games Conjecture. in Section 6 we present polynomial-time algorithms for three special cases of MAX HRSS, including the cases where (i) each resident’s list is of length at most 2 and each hospital has capacity 1, (ii) the number of unacquainted pairs is constant, and (iii) the number of acquainted pairs is constant. Finally some open problems are given in Section 7.

2 Preliminary definitions and results

An instance II of the Hospitals/Residents problem (HR), as defined in [11], contains a set R={r1,r2,,rn1}R=\{r_{1},r_{2},...,r_{n_{1}}\} of residents, a set H={h1,h2,,hn2}H=\{h_{1},h_{2},...,h_{n_{2}}\} of hospitals. Each resident riRr_{i}\in R ranks a subset of HH in strict order of preference; each hospital hjHh_{j}\in H ranks a subset of RR, consisting of those residents who ranked hjh_{j}, in strict order of preference. Each hospital hjh_{j} also has a capacity cj+c_{j}\in\mathbb{Z}^{+} indicating the maximum number of residents that can be assigned to it. A pair (ri,hj)(r_{i},h_{j}) is called an acceptable pair if hjh_{j} appears in rir_{i}’s preference list. We denote by 𝒜\mathcal{A} the set of all acceptable pairs. A matching MM is a set of acceptable pairs such that each resident is assigned to at most one hospital and the number of residents assigned to each hospital does not exceed its capacity. If rir_{i} is matched in MM, we denote the hospital assigned to resident rir_{i} in MM by M(ri)M(r_{i}). We denote the set of residents assigned to hospital hjh_{j} in MM as M(hj)M(h_{j}). A resident rir_{i} is unmatched in MM if no pair in MM contains rir_{i}. A hospital hjh_{j} is undersubscribed in MM if |M(hj)|<cj|M(h_{j})|<c_{j}. A pair (ri,hj)(r_{i},h_{j}) is said to block a matching MM, or form a blocking pair with respect to MM, in the classical sense, if (i) rir_{i} is unmatched in MM or prefers hjh_{j} to M(ri)M(r_{i}) and (ii) hjh_{j} is undersubscribed in MM or prefers rir_{i} to some resident in M(hj)M(h_{j}). A matching that admits no blocking pair is said to be stable.

We define an instance (I,G)(I,G) of the Hospitals/Residents Problem under Social Stability (HRSS) as consisting of an HR instance II (as defined above) and a bipartite graph G=(RH,A)G=(R\cup H,A), where A𝒜A\subseteq\mathcal{A}. A pair (ri,hj)(r_{i},h_{j}) belongs to AA if and only if rir_{i} has social ties with hjh_{j}. We call (ri,hj)(r_{i},h_{j}) an acquainted pair. We also define the set of unacquainted pairs (which cannot block any matching) to be U=𝒜\AU=\mathcal{A}\backslash A. A pair (ri,hj)(r_{i},h_{j}) socially blocks a matching MM, or forms a social blocking pair with respect to MM, if (ri,hj)(r_{i},h_{j}) blocks MM in the classical sense in the underlying HR instance II and (ri,hj)A(r_{i},h_{j})\in A. A matching MM is said to be socially stable if there exists no social blocking pair with respect to MM. If we restrict the hospitals’ capacities to 1, we obtain the Stable Marriage problem with Incomplete lists under Social Stability (SMISS), and refer to the agents as men 𝒰={m1,,mn1}\mathcal{U}=\{m_{1},\ldots,m_{n_{1}}\} and women 𝒲={w1,,wn2}\mathcal{W}=\{w_{1},\ldots,w_{n_{2}}\}.

Clearly every instance of HRSS admits a socially stable matching. This is because the underlying HR instance is bound to admit a stable matching [11] which is also socially stable. However socially stable matchings could be larger than stable matchings. Consider the SMISS instance (I,G)(I,G) shown in Figure 1. Matchings M1={(m1,w1),(m2,w2)}M_{1}=\{(m_{1},w_{1}),(m_{2},w_{2})\} and M2={(m2,w1)}M_{2}=\{(m_{2},w_{1})\} are both socially stable in (I,G)(I,G) and M2M_{2} is the unique stable matching. Thus an instance of SMISS (and hence HRSS) can admit a socially stable matching that is twice the size of a stable matching. Clearly the instance shown in Figure 1 can be replicated to give an arbitrarily large SMISS instance with a socially stable matching that is twice the size of a stable matching. This, and applications where we seek to match as many agents as possible, motivates MAX HRSS.

men’s preferences women’s preferences
m1:w1\displaystyle m_{1}:w_{1}~~~~~~~ w1:m2m1\displaystyle w_{1}:m_{2}~~~m_{1}
m2:w1w2\displaystyle m_{2}:w_{1}~~~w_{2}~~~~~~~ w2:m2\displaystyle w_{2}:m_{2}

social network graph GG

m2m_{2}w2w_{2}m1m_{1}w1w_{1}
Figure 1: SMISS instance (I,G)(I,G)

3 Reduction from HRSS to HR+SN

As defined in [3, 8], an instance (I,G)(I,G^{\prime}) of the HR+SN problem involves a Hospitals / Residents instance II, defined in [11], containing a set R={r1,r2,,rn1}R=\{r_{1},r_{2},...,r_{n_{1}}\} of residents, a set H={h1,h2,,hn2}H=\{h_{1},h_{2},...,h_{n_{2}}\} of hospitals, and a graph GG describing the social network (SN) of the residents. In the graph G=(V,E)G^{\prime}=(V,E), V=RV=R and an edge {ri,rk}\{r_{i},r_{k}\} belongs to EE if and only if rir_{i} and rkr_{k} have social ties. A pair (ri,hj)(r_{i},h_{j}) is a local blocking pair with respect to a matching MM, or locally blocks MM, if (ri,hj)(r_{i},h_{j}) blocks MM in the classical sense and there is some resident rkr_{k} such that {ri,rk}E\{r_{i},r_{k}\}\in E and rkM(hj)r_{k}\in M(h_{j}). A matching MM is said to be locally stable if there exists no local blocking pair with respect to MM. In the HR+SN (respectively HRSS) context we refer to a resident-complete locally (respectively socially) stable matching as one in which all the residents are matched.

In this section we show the close relationship between the HRSS and HR+SN problems. Consider an instance (I,G)(I,G) of HRSS where II is the underlying HR instance and GG is the social network graph. II involves of a set of residents R0={r1,r2,,rn1}R_{0}=\{r_{1},r_{2},...,r_{n_{1}}\} and a set of hospitals H0={h1,h2,,hn2}H_{0}=\{h_{1},h_{2},...,h_{n_{2}}\}. We construct an instance (I,G)(I^{\prime},G^{\prime}) of HR+SN from (I,G)(I,G) as follows: let II^{\prime} consist of a set of residents R=R0R1R=R_{0}\cup R_{1} where R1={rn1+1,rn1+2,,rn1+n2}R_{1}=\{r_{n_{1}+1},r_{n_{1}+2},...,r_{n_{1}+n_{2}}\}. Every resident rn1+jR1r_{n_{1}+j}\in R_{1} has a single entry hjh_{j} in his preference list. Every resident riR0r_{i}\in R_{0} has an identical preference list in II^{\prime} as in II. Let II^{\prime} also involve a set of hospitals HH, where H=H0H=H_{0} such that every hospital hjHh_{j}\in H has resident rn1+jr_{n_{1}+j} as the first entry in its preference list and has capacity cj=cj+1c_{j}^{\prime}=c_{j}+1. hjh_{j}’s preference list in II is then appended to rni+jr_{n_{i}+j} to yield hjh_{j}’s preference list in II^{\prime}. To construct GG^{\prime}, let the vertices in GG^{\prime} correspond to the residents in RR and add edge {ri,rn1+j}\{r_{i},r_{n_{1}+j}\} to GG^{\prime} if and only if (ri,hj)A(r_{i},h_{j})\in A, where A=E(G)A=E(G) is the set of acquainted pairs in (I,G)(I,G).

Theorem 3.1

If MM is a socially stable matching in (I,G)(I,G), then M=M{(rn1+j,hj):rn1+jR1}M^{\prime}=M\cup\{(r_{n_{1}+j},h_{j}):r_{n_{1}+j}\in R_{1}\} is a locally stable matching in (I,G)(I^{\prime},G^{\prime}). Conversely if MM^{\prime} is a resident-complete locally stable matching in (I,G)(I^{\prime},G^{\prime}) then M=M\{(rn1+j,hj):rn1+jR1}M=M^{\prime}\backslash\{(r_{n_{1}+j},h_{j}):r_{n_{1}+j}\in R_{1}\} is a resident-complete socially stable matching in (I,G)(I,G).

  • Proof

    Suppose MM is socially stable in (I,G)(I,G). Then no (classical) blocking pair with respect to MM in II is contained in GG. Let M=M{(rn1+j,hj):rn1+jR1}M^{\prime}=M\cup\{(r_{n_{1}+j},h_{j}):r_{n_{1}+j}\in R_{1}\}. If some pair (r,hr,h) locally blocks MM^{\prime} in (I,G)(I^{\prime},G^{\prime}) then (i) (r,h)(r,h) must be a blocking pair with respect to MM^{\prime} in II^{\prime}, and (ii) {r,r}E\{r,r^{\prime}\}\in E for some rM(h)r^{\prime}\in M^{\prime}(h). By construction, for every edge in EE, one resident is in R0R_{0} and the other in R1R_{1}. If rR1r\in R_{1} then rr cannot form any blocking pair with respect to MM^{\prime} as he is matched to his only choice. If rR0r\in R_{0} then r=rn1+jR1r^{\prime}=r_{n_{1}+j}\in R_{1} for some jj (1jn21\leq j\leq n_{2}), and h=M(rn1+j)=hjh=M^{\prime}(r_{n_{1}+j})=h_{j}. Thus (r,h)A(r,h)\in A. By the construction of the preference lists in (I,G)(I^{\prime},G^{\prime}), as (r,h)(r,h) is a (classical) blocking pair of MM^{\prime} in II^{\prime}, (r,h)(r,h) is also a (classical) blocking pair of MM in II. Hence (r,h)(r,h) socially blocks MM in (I,G)(I,G), a contradiction.

    Conversely suppose MM^{\prime} is a resident-complete locally stable matching in (I,G)(I^{\prime},G^{\prime}). Then there is no blocking pair (r,h)(r,h) of MM^{\prime} in II^{\prime} such that {r,r}E\{r,r^{\prime}\}\in E for some rRr^{\prime}\in R where rM(h)r^{\prime}\in M^{\prime}(h). Let M=M\{(rn1+j,hj):rn1+jR1}M=M^{\prime}\backslash\{(r_{n_{1}+j},h_{j}):r_{n_{1}+j}\in R_{1}\}. Clearly MM is a resident-complete matching in II. If some pair (r,h)(r,h) socially blocks MM in (I,G)(I,G), (i) (r,h)(r,h) must block MM in II (and thus MM^{\prime} in II^{\prime}) and (ii) (r,h)A(r,h)\in A. By construction, if (r,h)A(r,h)\in A, then {r,r}E\{r,r^{\prime}\}\in E where rR0r\in R_{0}, r=rn1+jR1r^{\prime}=r_{n_{1}+j}\in R_{1} and h=hjh=h_{j}. But as MM^{\prime} is resident-complete, (rn1+j,hj)M(r_{n_{1}+j},h_{j})\in M^{\prime} for each j(1jn2)j~(1\leq j\leq n_{2}). Thus r=rn1+jM(h)r^{\prime}=r_{n_{1}+j}\in M^{\prime}(h), a contradiction to the initial assumption that MM^{\prime} is locally stable in (I,G)(I^{\prime},G^{\prime}). \Box

Although the converse statement in Theorem 3.1 places a severe restriction on MM^{\prime} (it must be a resident-complete locally stable matching in the HR+SN instance (I,G)(I^{\prime},G^{\prime})), it can be relaxed slightly to the case that MM^{\prime} is any locally stable matching in which all the residents rn1+jR1r_{n_{1}+j}\in R_{1} are matched. It remains to be shown that a reduction exists from HRSS to HR+SN that does not place such a restriction on MM^{\prime}.

4 Hardness of HRSS

We now show that MAX SMISS, the problem of finding a maximum socially stable matching given an SMISS instance is NP-hard. Indeed we prove NP-completeness for COM SMISS, the problem of deciding whether there exists a complete socially stable matching (i.e., a socially stable matching in which all men and women are matched) in an instance of SMISS. It is obvious that, given a matching MM of size kk, it can be verified in polynomial time whether MM is socially stable, thus the problem is in NP. Next we define the Stable Marriage problem with Ties and Incomplete Lists (SMTI) as a variant of the classical Stable Marriage problem [11] where men and women are allowed to find each other unacceptable (thus causing incomplete preference lists) and preference lists may include ties, representing indifference. For example two women may be tied in a given man’s preference list. It was shown in [25] that COM SMTI, the problem of deciding whether a complete stable matching exists in an instance of SMTI, is NP-complete even if the ties occur in the men’s lists only and each tie occurs at the tail of some list. An SMTI instance II satisfying these restrictions can be reduced to an SMISS instance (I,G)(I^{\prime},G) in polynomial time such that a matching MM is a complete stable matching in II if and only if MM is a complete socially stable matching in (I,G)(I^{\prime},G). These observations lead to the following result.

Theorem 4.1

COM SMISS is NP-complete.

  • Proof

    Consider an instance II of SMTI where the ties occur only on the mens’ preference lists and each man has one tie which occurs at the end of the list (a tie may be of length 11 for this purpose). We define t(mi)t(m_{i}) as the set of women contained in the tie in man mim_{i}’s preference list. We can construct an instance (I,G)(I^{\prime},G) of SMISS such that II^{\prime} is the Stable Marriage instance with incomplete lists formed by breaking the ties in II in an arbitrary manner. Let G=(𝒰𝒲,A)G=(\mathcal{U}\cup\mathcal{W},A), where 𝒰\mathcal{U} and 𝒲\mathcal{W} are the sets of all men and women in II respectively and A=mi𝒰wjt(mi)(mi,wj)A=\bigcup_{m_{i}\in\mathcal{U}}\bigcup_{w_{j}\notin t(m_{i})}(m_{i},w_{j}). We claim that a matching MM is a complete stable matching in II if and only if MM is a complete socially stable matching in (I,G)(I^{\prime},G).

    Suppose MM is a complete stable matching in II. Suppose also that MM is not socially stable in (I,G)(I^{\prime},G). Then there exists some pair (mi,wj)A(m_{i},w_{j})\in A that socially blocks MM in (I,G)(I^{\prime},G). Since (mi,wj)A(m_{i},w_{j})\in A, wjt(mi)w_{j}\notin t(m_{i}). Thus mim_{i} prefers wjw_{j} to M(mi)M(m_{i}) in II. Also wjw_{j} prefers mim_{i} to M(wj)M(w_{j}) since there are no ties in wjw_{j}’s preference list. Thus (mi,wj)(m_{i},w_{j}) blocks MM in II, a contradiction to our initial assumption.

    Conversely, suppose MM is a complete socially stable matching in (I,G)(I^{\prime},G). Suppose also that MM is not stable in II. Then there exists some pair (mi,wj)(m_{i},w_{j}) that blocks MM in II. If M(mi)t(mi)M(m_{i})\in t(m_{i}) then wjt(mi)w_{j}\notin t(m_{i}) so mim_{i} prefers wjw_{j} to M(mi)M(m_{i}) in (I,G)(I^{\prime},G). If M(mi)t(mi)M(m_{i})\notin t(m_{i}) then mim_{i} prefers wjw_{j} to M(mi)M(m_{i}) in (I,G)(I^{\prime},G). wjw_{j} has the same preference list in II and (I,G)(I^{\prime},G). So (mi,wj)A(m_{i},w_{j})\in A and thus the pair socially blocks MM in (I,G)(I^{\prime},G), a contradiction to our initial assumption. \Box

As discussed in [20], some centralised matching schemes usually require the agents in one or more sets to have preference lists bounded in length by some small integer. For example, until recently, in the Scottish Foundation Allocation Scheme (the centralised clearinghouse for matching medical residents in Scotland) [18], medical graduates were required to rank only 6 hospitals in their preference lists. We denote by (p,q)(p,q)-MAX HRSS the problem of finding a maximum socially stable matching in an HRSS instance where each resident is allowed to rank at most pp hospitals and each hospital at most qq residents. We set p=p=\infty and q=q=\infty to represent instances where the residents and hospitals respectively are allowed to have unbounded-length preference lists. Analogously we may obtain the definition of (p,q)(p,q)-MAX SMISS and (p,q)(p,q)-COM SMISS from MAX SMISS and COM SMISS respectively. It turns out that (p,q)(p,q)-COM SMISS is NP-complete even for small values of pp and qq.

Theorem 4.2

(3,3)-COM SMISS is NP-complete.

  • Proof

    We prove this by inspecting the hardness result described for the (3,3)(3,3)-COM SMTI problem by Irving et al. [20]. They showed that (3,3)(3,3)-COM SMTI, the problem of deciding whether a complete stable matching exists in an instance of SMTI where each preference list is of length at most 33, is NP-complete using a reduction from a variant of the SAT problem.

    By inspecting the instance II of SMTI, constructed in the proof, we observe that all the ties appear on the women’s side of the instance and appear at the ends of the preference list. We have shown in Theorem 4.1 that an instance II of SMTI in this form can be reduced in polynomial time to an instance (I,G)(I^{\prime},G) of SMISS such that a matching MM is a complete stable matching in II if and only if MM is a complete socially stable matching in (I,G)(I^{\prime},G). We conclude that (3,3)(3,3)-COM SMISS is also NP-complete. \Box

5 Approximating MAX HRSS

As shown in Section 4, MAX HRSS is NP-hard. In order to deal with this hardness, polynomial-time approximation algorithms can be developed for MAX HRSS. In this section we present a 3/23/2-approximation algorithm for MAX HRSS. We show this is tight assuming the Unique Games Conjecture (UCG), and also show a 21/19ε21/19-\varepsilon lower bound assuming PNPP\not=NP. The lower bounds hold even for MAX SMISS.

5.1 Approximation

For the upper bound for MAX HRSS, we observe that a technique known as cloning has been described in literature [13, 28], which may be used to convert an HR instance II into an instance II^{\prime} of the Stable Marriage problem with Incomplete lists in polynomial time, such that there is a one-to-one correspondence between the set of stable matchings in II and II^{\prime}. A similar technique can be used to convert an HRSS instance to an SMISS instance in polynomial time.

Let (I,G)(I,G) be an instance of HRSS where R={r1,r2,,rn1}R=\{r_{1},r_{2},...,r_{n_{1}}\} is the set of residents and H={h1,h2,,hn2}H=\{h_{1},h_{2},...,h_{n_{2}}\} is the set of hospitals. Let cjc_{j} be the capacity of hospital hjHh_{j}\in H. We can construct an instance (I,G)(I^{\prime},G^{\prime}) of SMISS as follows. Each resident in (I,G)(I,G) corresponds to a man in (I,G)(I^{\prime},G^{\prime}). Each hospital hjHh_{j}\in H gives rise to cjc_{j} women in (I,G)(I^{\prime},G^{\prime}) denoted by hj,1,hj,2,,hj,cjh_{j,1},h_{j,2},...,h_{j,c_{j}} each of whom has the same preference list as hjh_{j} in (I,G)(I^{\prime},G^{\prime}) but with a capacity of 11. Each man riRr_{i}\in R starts off with the same preference list in (I,G)(I^{\prime},G^{\prime}) as he has in (I,G)(I,G). We then replace each entry on his list by the cjc_{j} women hj,1,hj,2,,hj,cjh_{j,1},h_{j,2},...,h_{j,c_{j}} listed in strict order (increasing on second subscript). GG^{\prime} has vertex set RHR\cup H^{\prime}, where H={hj,k:hjH1kcj}H^{\prime}=\{h_{j,k}:h_{j}\in H\wedge 1\leq k\leq c_{j}\}, and edge set A={(ri,hj,k):(ri,hj)A1kcj}A^{\prime}=\{(r_{i},h_{j,k}):(r_{i},h_{j})\in A\wedge 1\leq k\leq c_{j}\}, with A=E(G)A=E(G) denoting the set of acquainted pairs in (I,G)(I,G).

Theorem 5.1

Given an instance (I,G)(I,G) of HRSS, we may construct in O(n1+cmaxm)O(n_{1}+c_{max}m) time an instance (I,G)(I^{\prime},G^{\prime}) of SMISS such that a socially stable matching MM in (I,G)(I,G) can be transformed in O(cmaxm)O(c_{max}m) time to a socially stable matching MM^{\prime} in (I,G)(I^{\prime},G^{\prime}) with |M|=|M||M^{\prime}|=|M| and conversely, where n1n_{1} is the number of residents, cmaxc_{max} is the maximum hospital capacity and mm is the number of acceptable resident-hospital pairs in II.

  • Proof

    Let (I,G)(I,G) be an instance of HRSS and (I,G)(I^{\prime},G^{\prime}) be an instance of SMISS cloned from (I,G)(I,G). Let MM be a socially stable matching in (I,G)(I,G). We form a matching MM^{\prime} in (I,G)(I^{\prime},G^{\prime}) as follows. For each hjHh_{j}\in H, let rj,1,rj,2,rj,xjr_{j,1},r_{j,2},...r_{j,x_{j}} be the set of residents assigned to hjh_{j} in MM where xjcjx_{j}\leq c_{j}, and k<lk<l implies that hjh_{j} prefers rj,kr_{j,k} to rj,lr_{j,l}. Add (rj,k,hjk)(r_{j,k},h_{j}^{k}) to MM^{\prime} (1kxj)(1\leq k\leq x_{j}). Clearly MM^{\prime} is a matching in (I,G)(I^{\prime},G^{\prime}) such that |M|=|M||M^{\prime}|=|M|, and it is straightforward to verify that MM^{\prime} is socially stable in (I,G)(I^{\prime},G^{\prime}).

    Conversely let MM^{\prime} be a socially stable matching in (I,G)(I^{\prime},G^{\prime}). We form a matching MM in (I,G)(I,G) as follows. For each (ri,hjk)M(r_{i},h_{j}^{k})\in M^{\prime}, add (ri,hj)(r_{i},h_{j}) to MM. Clearly MM is a socially stable matching in (I,G)(I,G) such that |M|=|M||M|=|M^{\prime}|.

    The complexities stated arise from the fact that II^{\prime} has O(n1+C)O(n_{1}+C) agents and O(cmaxm)O(c_{max}m) acceptable man-woman pairs, where CC is the total capacity of the hospitals in II. \Box

Due to Theorem 5.1, an approximation algorithm α\alpha for MAX SMISS with performance guarantee cc (for some constant c>0c>0) can be used to obtain an approximation for MAX HRSS with the same performance guarantee. This can be done by cloning the HRSS instance (I,G)(I,G) to form an SMISS instance (I,G)(I^{\prime},G^{\prime}) using the technique outlined above, applying α\alpha to (I,G)(I^{\prime},G^{\prime}) to obtain a matching MM^{\prime}. This matching can then be transformed to a matching MM in (I,G)(I,G) such that |M|=|M||M|=|M^{\prime}| (again as in the proof of Theorem 5.1). Our first upper bound for MAX HRSS is an immediate consequence of the fact that any stable matching is at least half the size of a maximum socially stable matching.

Proposition 5.2

MAX HRSS is approximable within a factor of 2.

  • Proof

    Let MM be a maximum socially stable matching given an instance (I,G)(I,G) of SMISS and let MM^{\prime} be a stable matching in II. Thus MM^{\prime} is a maximal matching in the underlying bipartite graph GG^{\prime} in II. Hence |M|β+(G)/2|M^{\prime}|\geq\beta^{+}(G^{\prime})/2 where β+(G)\beta^{+}(G^{\prime}) is the size of a maximum matching in GG^{\prime} [23]. Also β+(G)|M|\beta^{+}(G^{\prime})\geq|M| and so |M||M|/2|M^{\prime}|\geq|M|/2. \Box

We now present a 3/23/2-approximation algorithm for MAX SMISS. The algorithm relies on the principles outlined in the 3/23/2-approximation algorithms for the general case of MAX HRT, the problem of finding a maximum cardinality stable matching given an instance of the Hospitals / Residents problem with Ties, as presented by Király [22] and McDermid [26]. Given an instance (I,G)(I,G) of SMISS, the algorithm works by running a modified version of the extended Gale-Shapley algorithm [11] where unmatched men are given a chance to propose again by promoting them on all the preference lists on which they appear. Let AA and UU denote the sets of acquainted and unacquainted pairs in (I,G)(I,G) respectively.

Consider a woman wjw_{j} in (I,G)(I,G). We denote an unacquainted man mim_{i} on wjw_{j}’s preference list as one where (mi,wj)U(m_{i},w_{j})\in U. Similarly we denote an acquainted man mim_{i} on wjw_{j}’s preference list as one where (mi,wj)A(m_{i},w_{j})\in A. For a man mim_{i}, we denote next(mi)next(m_{i}) as the next woman on mim_{i}’s list succeeding the last woman to whom he proposed to or the first woman on mim_{i}’s list if he has been newly promoted or is proposing for the first time. During the execution of the algorithm if a man runs out of women to propose to on his list for the first time, he is promoted, thus allowing him to propose to the remaining women on his list beginning from the first. A man can only be promoted once during the execution of the algorithm. If a promoted man still remains unmatched after proposing to all the women on his preference list, he is removed from the instance and will not be part of the final matching.

In the classical Gale-Shapley algorithm [11] a woman wjw_{j} prefers a man mim_{i} to another mkm_{k} if rank(wj,mi)<rank(wj,mk)rank(w_{j},m_{i})<rank(w_{j},m_{k}). We define a modified version of the extended Gale-Shapley algorithm [13], mod-EXGS, where a woman does not accept or reject proposals from men solely on the basis of their positions on her preference list, but also on the basis of their status as to whether they are acquainted or unacquainted men on her list and whether they have been promoted. Given two men mim_{i} and mkm_{k} on a woman wjw_{j}’s preference list, we define the relations wj\triangleleft_{w_{j}}, wj\triangleleft^{\prime}_{w_{j}} and wj\prec_{w_{j}} in Definition 5.3

Definition 5.3

Let mim_{i} and mkm_{k} be any two men on a woman wjw_{j}’s list. Then

1. miwjmkm_{i}\triangleleft_{w_{j}}m_{k} if either

(i) (mi,wj)U(m_{i},w_{j})\in U, (mk,wj)U(m_{k},w_{j})\in U, mim_{i} is promoted and mkm_{k} is unpromoted or

(ii) (mi,wj)A(m_{i},w_{j})\in A, (mk,wj)U(m_{k},w_{j})\in U and mkm_{k} is unpromoted.

2. miwjmkm_{i}\triangleleft^{\prime}_{w_{j}}m_{k} if mi/wjmk,mk/wjmiandwjm_{i}~{\mathrlap{/}\triangleleft}_{w_{j}}~m_{k}~,~m_{k}~{\mathrlap{/}\triangleleft}_{w_{j}}~m_{i}~and~w_{j} prefers mim_{i} to mkm_{k} in the classical sense.

We define wj=wjwj\prec_{w_{j}}=\triangleleft_{w_{j}}~\cup~\triangleleft^{\prime}_{w_{j}}.

The relation wj\prec_{w_{j}} will be used to determine whether a proposal from a man is accepted or rejected by wjw_{j}.

The main algorithm approx-SMISS (as shown in Algorithm 1) starts by calling mod-EXGS (as shown in Algorithm 2) where a proposal sequence is started by allowing each man to propose to women beginning from the first woman on his preference list. If a man mim_{i} proposes to a woman wjw_{j} on his list and wjw_{j} is matched and miwjM(wj)m_{i}\prec_{w_{j}}M(w_{j}), then wjw_{j} is unmatched from her partner mkm_{k} and mkm_{k} will be allowed to continue proposing to other women on his list. wjw_{j} is then assigned to mim_{i}. On the other hand, if M(wj)wjmiM(w_{j})\prec_{w_{j}}m_{i} then wjw_{j} rejects mim_{i}’s proposal. Also if wjw_{j} is unmatched when mim_{i} proposes, she is assigned to mim_{i}. Irrespective of whether the proposal from mim_{i} is accepted or rejected, if (mi,wj)A(m_{i},w_{j})\in A then all pairs (mk,wj)(m_{k},w_{j}) such that rank(wj,mk)>rank(wj,mi)rank(w_{j},m_{k})>rank(w_{j},m_{i}) are deleted from the instance. However if (mi,wj)U(m_{i},w_{j})\in U no such deletions take place. This proposal sequence continues until every man is either matched or has exhausted his preference list.

After each proposal sequence (where control is returned to the approx-SMISS algorithm), if a promoted man still remains unmatched after proposing to all the women on his preference list, he is removed from the instance. Also if a previously unpromoted man exhausts his preference lists and is still unmatched, he is promoted and a new proposal sequence initiated (by calling mod-EXGS). The algorithm terminates when each man either (i) is assigned a partner, (ii) has no woman on his preference list or (iii) has been promoted and has proposed to all the women on his preference list for a second time.

Algorithm 1 approx-SMISS
1:  initial matching M=;M=\emptyset;
2:  while some unmatched man with a non-empty preference list exists do
3:   call mod-EXGS;
4:   for all mim_{i} such that mim_{i} is unmatched and promoted do
5:    remove mim_{i} from instance;
6:   end for
7:   for all mim_{i} such that mim_{i} is unmatched, unpromoted and has a non-empty preference list do
8:    promote mim_{i};
9:   end for
10:  end while
11:  return the resulting matching MM;
Algorithm 2 mod-EXGS
1:  while some man mim_{i} is unmatched and still has a woman left on his list do
2:   wj=next(mi)w_{j}=next(m_{i});
3:   if wjw_{j} is matched in MM and miwjM(wj)m_{i}\prec_{w_{j}}M(w_{j}) then
4:    M=M\{(M(wj),wj)}M=M~\backslash~\{(M(w_{j}),w_{j})\};
5:   end if
6:   if wjw_{j} is unmatched in MM then
7:    M=M{(miM=M\cup\{(m_{i}, wjw_{j})};
8:   end if
9:   if (mi,wj)A(m_{i},w_{j})\in A then
10:    for each mkm_{k} such that (mk,wj)𝒜(m_{k},w_{j})\in\mathcal{A} and rank(wj,mk)>rank(wj,mi)rank(w_{j},m_{k})~>~rank(w_{j},m_{i}) do
11:     delete (mk,wj)(m_{k},w_{j}) from instance;
12:    end for
13:   end if
14:  end while
Lemma 5.4

If Algorithm 1 is executed on an SMISS instance (I,G)(I,G), it terminates with a socially stable matching MM in (I,G)(I,G).

  • Proof

    Suppose MM is not a socially stable matching and some pair (mi,wj)(m_{i},w_{j}) socially blocks MM in (I,G)(I,G). Hence (mi,wj)A(m_{i},w_{j})\in A. If wjw_{j} is unmatched in MM then she never received a proposal from mim_{i} (as if she did, she will never become unmatched afterwards). This implies that mim_{i} must prefer his partner in MM to wjw_{j} as he never proposed to wjw_{j}. Thus (mi,wj)(m_{i},w_{j}) cannot socially block MM in this case.

    On the other hand, suppose wjw_{j} is matched in MM but prefers mim_{i} to M(wj)=mkM(w_{j})=m_{k}. Also suppose mim_{i} is either unmatched in MM or prefers wjw_{j} to M(mi)M(m_{i}). Then mim_{i} proposed to wjw_{j} during the algorithm’s execution or (mi,wj)(m_{i},w_{j}) was deleted. In either case, all successors of mim_{i} on wjw_{j}’s list will be deleted, so (mk,wj)M(m_{k},w_{j})\notin M, a contradiction \Box

Lemma 5.5

During any execution of the algorithm mod-EXGS, if mim_{i} proposes to wjw_{j} and (mi,wj)A(m_{i},w_{j})\in A then wjw_{j} will never reject mim_{i} if rank(wj,mi)<rank(wj,M(wj))rank(w_{j},m_{i})<rank(w_{j},M(w_{j})).

  • Proof

    This follows from our definition of the wj\prec_{w_{j}} relation. Suppose that wjw_{j} rejects mim_{i} for a some man mkm_{k} and rank(wj,mi)<rank(wj,mk)rank(w_{j},m_{i})<rank(w_{j},m_{k}). Thus mkwjmim_{k}~\prec_{w_{j}}~m_{i}. This implies that mkwmim_{k}~\triangleleft_{w}~m_{i} or mkwmim_{k}~\triangleleft^{\prime}_{w}~m_{i}. Since (mi,wj)A(m_{i},w_{j})\in A then mk/wmim_{k}~{\mathrlap{/}\triangleleft}_{w}~m_{i} so mkwmim_{k}~\triangleleft^{\prime}_{w}~m_{i} which in turn implies that rank(wj,mk)<rank(wj,mi)rank(w_{j},m_{k})<rank(w_{j},m_{i}), a contradiction to our assumption. \Box

The execution of the mod-EXGS algorithm takes O(m)O(m) time where m=|𝒜|m=|\mathcal{A}| is the number of acceptable pairs. These executions can be performed at most 2n12n_{1} times, where n1n_{1} is the number of men, as a man is given at most two chances to propose to the women on his list. Thus the overall time complexity of the algorithm is O(n1m)O(n_{1}m). The above results, together with Theorem 5.1, lead us to state the following theorem concerning the performance guarantee of the approximation algorithm for MAX HRSS.

Theorem 5.6

MAX HRSS is approximable within a factor of 3/2.

  • Proof

    We prove this result by adopting techniques similar to those used by Iwama et al. [21] and subsequently by Király [22]. We consider alternating paths of odd-length in connected components of the union MMoptM\cup M_{opt}. It is easy to see that, for alternating paths of length greater than 3, the number of edges in MoptM_{opt} is at most 3/2 times the number of edges in MM. We now show that alternating paths of length 3 cannot exist in MMoptM\cup M_{opt}.

    Consider an alternating path of length 3 (m,w),(m,w),(m,w)\langle(m,w^{\prime}),(m,w),(m^{\prime},w)\rangle such that (m,w)Mopt(m,w^{\prime})\in M_{opt}, (m,w)M(m,w)\in M and (m,w)Mopt(m^{\prime},w)\in M_{opt}. Since ww^{\prime} is unmatched in MM, she was never proposed to during the entire execution of the algorithm. So ww^{\prime} did not delete any men from her preference list and mm is unpromoted (if he had been promoted, he would have proposed to ww^{\prime}). Thus mm prefers ww to ww^{\prime}. Also since mm^{\prime} is unmatched in MM, either (i) the pair (m,w)(m^{\prime},w) was deleted from the instance at some point during the execution of the algorithm or (ii) ww rejected mm^{\prime} twice during the execution of the algorithm.

    Consider case (i): if (m,w)(m^{\prime},w) was deleted during the execution of the algorithm then ww received a proposal from some man m′′m^{\prime\prime} such that (m′′,w)A(m^{\prime\prime},w)\in A and ww prefers m′′m^{\prime\prime} to mm^{\prime}. Thus all successors of m′′m^{\prime\prime} on ww’s list would also have been deleted and so ww prefers mm to m′′m^{\prime\prime} and hence to mm^{\prime}. Although ww would have accepted the proposal from m′′m^{\prime\prime} temporarily (see Lemma 5.5), she ended up with an unpromoted man mm. It might be that m=m′′m=m^{\prime\prime}. On the other hand, suppose she accepted a series of proposals from men after m′′m^{\prime\prime} proposed to ww m0′′,m1′′,,mk′′\langle m^{\prime\prime}_{0},m^{\prime\prime}_{1},...,m^{\prime\prime}_{k}\rangle for some k0k\geq 0 before finally being assigned to mm. Thus m0′′wm′′m^{\prime\prime}_{0}\prec_{w}m^{\prime\prime}, which implies that m0′′wm′′m^{\prime\prime}_{0}~\triangleleft_{w}~m^{\prime\prime} or m0′′wm′′m^{\prime\prime}_{0}~\triangleleft^{\prime}_{w}~m^{\prime\prime}. Since (m′′,w)A(m^{\prime\prime},w)\in A, m0′′/wm′′m^{\prime\prime}_{0}~{\mathrlap{/}\triangleleft}_{w}~m^{\prime\prime} which means m0′′wm′′m^{\prime\prime}_{0}\triangleleft^{\prime}_{w}m^{\prime\prime}. But for that to be true, m′′/wm0′′m^{\prime\prime}~{\mathrlap{/}\triangleleft}_{w}~m^{\prime\prime}_{0} as well. For that to happen, m0′′m^{\prime\prime}_{0} must not be an unacquainted unpromoted man on ww’s list. This means m0′′m^{\prime\prime}_{0} can be an acquainted man or an unacquainted promoted man on ww’s list. If m=m0′′m=m^{\prime\prime}_{0} (i.e. k=0k=0) then we know that mm is unpromoted and so (m,w)A(m,w)\in A. On the other hand if another man m1′′m_{1}^{\prime\prime} exists in the sequence, then the same argument follows that m1′′wm0′′m^{\prime\prime}_{1}\prec_{w}m^{\prime\prime}_{0} means that m1′′wm0′′m^{\prime\prime}_{1}\triangleleft_{w}m^{\prime\prime}_{0} or m1′′wm0′′m^{\prime\prime}_{1}\triangleleft^{\prime}_{w}m^{\prime\prime}_{0}. As already observed, m0′′m^{\prime\prime}_{0} is either an acquainted man or an unacquainted, promoted man on ww’s list. In both cases, m1′′/wm0′′m^{\prime\prime}_{1}~{\mathrlap{/}\triangleleft}_{w}~m^{\prime\prime}_{0} meaning m1′′wm0′′m^{\prime\prime}_{1}\triangleleft^{\prime}_{w}m^{\prime\prime}_{0}. This implies that m0′′/wm1′′m^{\prime\prime}_{0}~{\mathrlap{/}\triangleleft}_{w}~m^{\prime\prime}_{1}. But for that condition to be satisfied, m1′′m^{\prime\prime}_{1} must not be an unacquainted unpromoted man on ww’s list. Once again this means m1′′m^{\prime\prime}_{1} can be an acquainted man or an unacquainted promoted man on ww’s list. The same sequence can continue for all men in the sequence until mm proposes. Since we already established that mm is unpromoted, it follows that (m,w)A(m,w)\in A.

    Now consider case (ii): ww rejected mm^{\prime} even when he was promoted because of a proposal from some man m′′m^{\prime\prime}. Thus m′′wmm^{\prime\prime}\prec_{w}m^{\prime} means m′′wmm^{\prime\prime}~\triangleleft_{w}~m^{\prime} or m′′wmm^{\prime\prime}~\triangleleft^{\prime}_{w}~m^{\prime}. Since we know that mm^{\prime} was promoted, then m′′/wmm^{\prime\prime}~{\mathrlap{/}\triangleleft}_{w}~m^{\prime} thus m′′wmm^{\prime\prime}~\triangleleft^{\prime}_{w}~m^{\prime}. This means that m/wm′′m^{\prime}~{\mathrlap{/}\triangleleft}_{w}~m^{\prime\prime} and ww prefers m′′m^{\prime\prime} to mm^{\prime}. Since m/wm′′m^{\prime}~{\mathrlap{/}\triangleleft}_{w}~m^{\prime\prime} , m′′m^{\prime\prime} must not be an unacquainted unpromoted man on ww’s list as mm^{\prime} is promoted. Thus m′′m^{\prime\prime} must be promoted or an acquainted man on ww’s list. If m′′m^{\prime\prime} were an acquainted man on ww’s list, the pair (m,wm^{\prime},w) would be deleted and the logic presented in case (i) above would follow through. Now suppose m′′m^{\prime\prime} is promoted and unacquainted on ww’s list. We know that mm′′m\neq m^{\prime\prime} as mm was unpromoted in MM. Then ww may have accepted a series of proposals from men m0′′,m1′′,,mk′′\langle m^{\prime\prime}_{0},m^{\prime\prime}_{1},...,m^{\prime\prime}_{k}\rangle for some k0k\geq 0 before finally being assigned to mm. Thus m0′′wm′′m^{\prime\prime}_{0}\prec_{w}m^{\prime\prime} means m0′′wm′′m^{\prime\prime}_{0}~\triangleleft_{w}~m^{\prime\prime} or m0′′wm′′m^{\prime\prime}_{0}~\triangleleft^{\prime}_{w}~m^{\prime\prime}. Since m′′m^{\prime\prime} is promoted and unacquainted on ww’s list m0′′/wm′′m^{\prime\prime}_{0}~{\mathrlap{/}\triangleleft}_{w}~m^{\prime\prime} meaning m0′′wm′′m^{\prime\prime}_{0}\triangleleft^{\prime}_{w}m^{\prime\prime}. This implies that m′′/wm0′′m^{\prime\prime}~{\mathrlap{/}\triangleleft}_{w}~m^{\prime\prime}_{0}. But for that condition to be satisfied, m0′′m^{\prime\prime}_{0} must not be an unacquainted unpromoted man on ww’s list. A similar argument to the one presented for case (i) above results in the conclusion that (m,w)A(m,w)\in A.

    The following conditions (i) mm prefers ww to ww^{\prime} (ii) ww prefers mm to mm^{\prime} and (iii) (m,w)A(m,w)\in A imply that (m,w)(m,w) will socially block MoptM_{opt}, a contradiction. \Box

The SIMSS instance shown in Figure 2 shows that the 3/23/2 bound for the algorithm is tight. Here Mopt={(m1,w3),(m2,w1),(m3,w2)}M_{opt}=\{(m_{1},w_{3}),(m_{2},w_{1}),(m_{3},w_{2})\} is the unique maximum socially stable matching. Also the approximation algorithm outputs M={(m1,w1),(m2,w2)}M=\{(m_{1},w_{1}),(m_{2},w_{2})\} irrespective of the order in which proposals are made. Clearly this instance can be replicated to obtain an arbitrarily large SMISS instance for which the performance guarantee is tight.

men’s preferences women’s preferences
m1:w1w3\displaystyle m_{1}:w_{1}~~w_{3}~~~~~ w1:m2m1\displaystyle w_{1}:m_{2}~~m_{1}
m2:w1w2\displaystyle m_{2}:w_{1}~~w_{2} w2:m2m3\displaystyle w_{2}:m_{2}~~m_{3}
m3:w2\displaystyle m_{3}:w_{2} w3:m1\displaystyle w_{3}:m_{1}

social network graph GG

m1m_{1}m2m_{2}m3m_{3}w1w_{1}w2w_{2}w3w_{3}
Figure 2: |Mopt|=(3/2).|M||M_{opt}|=(3/2).|M|

We remark that a similar 3/2-approximation algorithm for MAX HRSS was presented independently by Askalidis et al. in [4].

5.2 Inapproximability

We now show lower bounds on the approximability of our problem. We start by giving the inapproximability result assuming P\not=NP.

Theorem 5.7

MAX SMISS is not approximable within 21/19ε21/19-\varepsilon for any ε>0\varepsilon>0, unless P=NP.

  • Proof

    We rely on a proof of the NP-hardness of approximating MAX SMTI given in [14]. It is shown that there is no approximation algorithm for MAX SMTI with performance guarantee of 21/19ε21/19-\varepsilon for any ε>0\varepsilon>0, unless P=NP. This is shown to be true even for instances where ties appear on one side only, each preference list is either strictly ordered or has a single tie of length 2 and ties appear at the end of the preference lists. Thus the same reduction shown in the proof of Theorem 4.1 can be used to construct an SMISS instance (I,G)(I,G) such that a polynomial-time algorithm that approximates MAX SMISS to within a factor of 21/19ε21/19-\varepsilon would do the same for MAX SMTI. \Box

We can get a better lower bound of 3/2ε3/2-\varepsilon, for any ε>0\varepsilon>0, if we strengthen our assumption from PNPP\neq NP to the truth of the UCG. We do that by showing a reduction from the NP-hard problem of Independent Set (IND SET) and then using an inapproximability result for it from [5] . Along with the hardness of approximation, the reduction gives us a second proof of the NP-hardness of MAX HRSS

An instance of IND SET consists of a pair (G,k)(G,k) of a graph and an integer k0k\geq 0 and asks if the graph GG contains a set SV(G)S\subseteq V(G) such that |S|=k|S|=k and for every v1,v2S,(v1,v2)E(G)v_{1},v_{2}\in S,(v_{1},v_{2})\notin E(G), i.e. no two nodes of SS are connected with an edge. It is well-known that this problem is NP-hard.

Our reduction follows very closely the reduction by Hoefer and Wagner [16] from IND SET to the problem of calculating the maximum locally stable matching. Although the basic idea of the construction is the same, we need to adjust the details as well as the proofs to our problem.

Given a graph G=(V,E)G=(V,E) we create an instance (I,G=(𝒰𝒲,A))(I,G^{\prime}=(\mathcal{U}\cup\mathcal{W},A)) of the SMISSSMISS matching problem as follows: First we enumerate (arbitrarily but consistently) all the nodes of G:v1,v2,,vnG:v^{1},v^{2},\ldots,v^{n}, where n=|V(G)|n=|V(G)|. For every viV(G)v^{i}\in V(G) we create four vertices of GG^{\prime}: mv1i,mv2i𝒰m_{v_{1}^{i}},m_{v_{2}^{i}}\in\mathcal{U} and wv1i,wv2i𝒲w_{v_{1}^{i}},w_{v_{2}^{i}}\in\mathcal{W}. For every viV(G)v^{i}\in V(G) we denote by NG(vi)={vj(vi,vj)E(G)}N_{G}(v^{i})=\{v^{j}\mid(v^{i},v^{j})\in E(G)\} the neighborhood of viv^{i} in GG, i.e. the nodes that viv^{i} is connected with in GG.

mv1im_{v^{i}_{1}}mv2im_{v^{i}_{2}}wv2iw_{v^{i}_{2}}wv2iw_{v^{i}_{2}}mv1jm_{v^{j}_{1}}mv2jm_{v^{j}_{2}}wv1jw_{v^{j}_{1}}wv2jw_{v^{j}_{2}}
Figure 3: Reduction from IND SET: The gadget of some edge (vi,vj)v^{i},v^{j})

For every viV(G)v^{i}\in V(G) and every vjNG(vi)v^{j}\in N_{G}(v^{i}) we add the edge {mv1i,wv2j}\{m_{v_{1}^{i}},w_{v_{2}^{j}}\} to A(G)A(G^{\prime}). See Figure 2 for an example of the transformation for an edge (vi,vj)(v^{i},v^{j}). The preferences of the agents are as follows (listed in order of preference with most prefered match first):

Man mv1i:wv2i,{wv2jm_{v_{1}^{i}}:w_{v_{2}^{i}},\{w_{v_{2}^{j}} in increasing order on jvjNG(vi)},wv1ij\mid v^{j}\in N_{G}(v^{i})\},w_{v_{1}^{i}}
Man mv2i:wv2im_{v_{2}^{i}}:w_{v_{2}^{i}}
Woman wv1i:mv1iw_{v_{1}^{i}}:m_{v_{1}^{i}}
Woman wv2i:mv1i,{mv1jw_{v_{2}^{i}}:m_{v_{1}^{i}},\{m_{v_{1}^{j}} in increasing order on jvjNG(vi)},mv2ij\mid v^{j}\in N_{G}(v^{i})\},m_{v_{2}^{i}}

Notice that the enumeration of the vertices of V(G)V(G) that we did in the beginning of our reduction shows up here, in the preferences of mv1im_{v_{1}^{i}} and wv2iw_{v_{2}^{i}}.

The idea behind our construction is as follows. Each man is either of type 1 (mv1im_{v^{i}_{1}}) or of type 2 (mv2im_{v^{i}_{2}}), and similarly each woman is of type 1 or type 2. Type 1 women and type 2 men are both quite picky: wv1iw_{v^{i}_{1}}’s only acceptable partner is mv1im_{v^{i}_{1}} and similarly mv2im_{v^{i}_{2}}’s only acceptable partner is wv2iw_{v^{i}_{2}}, large matchings ought to include (mv1i,wv1i)(m_{v^{i}_{1}},w_{v^{i}_{1}}) and (mv2i,wv2i)(m_{v^{i}_{2}},w_{v^{i}_{2}}). However, the other partners in these pairs, mv1im_{v^{i}_{1}} and wv2iw_{v^{i}_{2}}, like this situation least among all acceptable options. In fact, type 1 men like their own type 2 woman best, and any type 2 woman from a neighboring node better than their own type 1 woman (and analogously for type 2 women). Furthermore, through our construction, type 1 men and type 2 women from neighboring nodes (vi,vj)E(G)(v^{i},v^{j})\in E(G) are connected in the social graph. Thus the “large matching” for agents corresponding to a node viv^{i} and a node vjv^{j} (i.e., {(mv1i,wv1i),(mv2i,wv2i),(mv1j,wv1j),(mv2j,wv2j)}\{(m_{v^{i}_{1}},w_{v^{i}_{1}}),(m_{v^{i}_{2}},w_{v^{i}_{2}}),(m_{v^{j}_{1}},w_{v^{j}_{1}}),(m_{v^{j}_{2}},w_{v^{j}_{2}})\}) can not be simultaneously supported by a socially stable matching.

We prove the following two lemmas for the above construction.

Lemma 5.8

If GG has an independent set SS of size rr then II has a socially stable matching MM of size n+rn+r.

  • Proof

    We take M={(mv1i,wv2i)viV(G)S}{(mv1i,wv1i),(mv2i,wv2i)viS}M=\{(m_{v_{1}^{i}},w_{v_{2}^{i}})\mid v^{i}\in V(G)\setminus S\}\cup\{(m_{v_{1}^{i}},w_{v_{1}^{i}}),(m_{v_{2}^{i}},w_{v_{2}^{i}})\mid v^{i}\in S\}. We obviously have that |M|=n|S|+2|S|=n+r|M|=n-|S|+2\cdot|S|=n+r. The pairs (mv1i,wv2i)(m_{v_{1}^{i}},w_{v_{2}^{i}}) are always socially stable. For the rest of the pairs, the independent set property guarantees that for every vjNG(S)v^{j}\in N_{G}(S), the matching of (mv1j,wv2j)(m_{v_{1}^{j}},w_{v_{2}^{j}}) keeps (mv1i,wv1i)(m_{v_{1}^{i}},w_{v_{1}^{i}}) and (mv2i,wv2i)(m_{v_{2}^{i}},w_{v_{2}^{i}}) socially stable. \Box

The reverse direction is a little more technical.

Lemma 5.9

If II has a socially stable matching of size n+rn+r then GG has an independent set of size rr.

  • Proof

    First of all we can assume that MM is such that all mv1im_{v_{1}^{i}} are matched. If there is an mv1im_{v_{1}^{i}} that is not matched we can just take wv2iw_{v_{2}^{i}} and match her to him. If some other mv1jm_{v_{1}^{j}} gets single by this action we just do it repeatedly until no such mv1im_{v_{1}^{i}} exists. This will not break social stability of the matching nor decrease the size.

    Claim 5.10

    If there exists iji\neq j such that (mv1i,wv2j)M(m_{v_{1}^{i}},w_{v_{2}^{j}})\in M, then (mv1j,wv2i)M(m_{v_{1}^{j}},w_{v_{2}^{i}})\in M as well.

    • Proof

      Notice first, that by our construction and the fact that (mv1i,wv2j)M(m_{v_{1}^{i}},w_{v_{2}^{j}})\in M we get that vjNG(vi)v^{j}\in N_{G}(v^{i}). And hence (mv1j,wv2i)A(G)(m_{v_{1}^{j}},w_{v_{2}^{i}})\in A(G^{\prime}). Suppose now that the statement is not true and take the minimum ii such that (mv1i,wv2j)M(m_{v_{1}^{i}},w_{v_{2}^{j}})\in M for some jij\neq i. We first have that i<ji<j. For suppose that j<ij<i, then if mv1jm_{v_{1}^{j}} is matched to some wv2kw_{v_{2}^{k}}, for some kjk\neq j, that contradicts the minimal choice of ii. Hence it must be that mv1jm_{v_{1}^{j}} is matched to wv1jw_{v_{1}^{j}}. Since (mv1j,wv2i)A(G)(m_{v_{1}^{j}},w_{v_{2}^{i}})\in A(G^{\prime}), and mv1jm_{v_{1}^{j}} prefers wv2iw_{v_{2}^{i}} over wv1jw_{v_{1}^{j}}, in order for MM to be socially stable it must be that wv2iw_{v_{2}^{i}} is matched to someone that she prefers to mv1jm_{v_{1}^{j}} and that can only be some mv1km_{v_{1}^{k}} for some k<j<ik<j<i, which contradicts the minimal choice of ii. So indeed, it must be that i<ji<j.
      Since (mv1j,wv2i)M(m_{v_{1}^{j}},w_{v_{2}^{i}})\notin M and they are connected with an edge in GG^{\prime}, in order for MM to be socially stable it needs to be that at least one of mv1jm_{v_{1}^{j}} and wv2iw_{v_{2}^{i}} gets a match under MM that he/she prefers to the other.

      Suppose that wv2iw_{v_{2}^{i}} is matched to some mv1km_{v_{1}^{k}} for some k<jk<j (these are the only men that wv2iw_{v_{2}^{i}} prefers to mv1jm_{v_{1}^{j}}, since her top choice, mv1im_{v_{1}^{i}}, is matched with someone else). Then (mv1i,wv2k)A(G)(m_{v_{1}}^{i},w_{v_{2}}^{k})\in A(G^{\prime}) by construction and so they can not block MM. But mv1im_{v_{1}^{i}} prefers wv2kw_{v_{2}^{k}} to wv2jw_{v_{2}^{j}} (since k<jk<j), and wv2kw_{v_{2}^{k}} prefers mv1im_{v_{1}^{i}} to her current match unless her current match is a mv1mm_{v_{1}^{m}} for some mkm\neq k and m<im<i. But that would contradict the minimal selection of ii. So it can’t be the case that wv2iw_{v_{2}^{i}} is matched under MM to someone she prefers to mv1jm_{v_{1}^{j}}.

      Suppose now that mv1jm_{v_{1}^{j}} is matched to some wv2kw_{v_{2}^{k}} for some k<ik<i. That would mean that mv1km_{v_{1}^{k}} is not matched to wv2kw_{v_{2}^{k}} and if he is matched to some wv2mw_{v_{2}^{m}} for some mkm\neq k, that would contradict the minimal choice of ii. Hence mv1km_{v_{1}^{k}} must be matched to wv1kw_{v_{1}^{k}}. Since mv1jm_{v_{1}^{j}} is matched to wv2kw_{v_{2}^{k}} and kjk\neq j, by the way we constructed the preferences, that means that (vj,vk)E(G)(v^{j},v^{k})\in E(G) and hence (mv1k,wv2j)A(G)(m_{v_{1}^{k}},w_{v_{2}^{j}})\in A(G^{\prime}). But that contradicts the social stability of MM because wv2jw_{v_{2}^{j}} prefers mv1km_{v_{1}^{k}} to mv2im_{v_{2}^{i}} (since k<ik<i), mv1km_{v_{1}^{k}} prefers wv2jw_{v_{2}^{j}} to wv1kw_{v_{1}^{k}} (since wv1kw_{v_{1}^{k}} is his last choice). Hence, it can’t be the case that mv1jm_{v_{1}^{j}} is matched under MM to someone he prefers to wv2iw_{v_{2}^{i}}.

      So it needs to be that (mv1j,wv2i)M(m_{v_{1}^{j}},w_{v_{2}^{i}})\in M.

    We can now take all dyads of pairs of the form {(mv1i,wv2j),(mv1j,wv2i)}\{(m_{v_{1}^{i}},w_{v_{2}^{j}}),(m_{v_{1}^{j}},w_{v_{2}^{i}})\} for iji\neq j that belong to MM and replace them with {(mv1i,wv2i),(mv1j,wv2j)}\{(m_{v_{1}^{i}},w_{v_{2}^{i}}),(m_{v_{1}^{j}},w_{v_{2}^{j}})\}. This will not break social stability of MM nor decrease it’s size. We take now S={vimv2iM}S=\{v^{i}\mid m_{v_{2}^{i}}\in M\}. Since all nn of mv1im_{v_{1}^{i}} are matched in MM there are rr couples that contain some mv2im_{v_{2}^{i}} and hence |S|=|M|n=r|S|=|M|-n=r. SS is an independent set because mv2im_{v_{2}^{i}} can only be matched to wv2iw_{v_{2}^{i}} and hence mv1im_{v_{1}^{i}} is matched to wv1iw_{v_{1}^{i}}. The latter pairs are only stable if for every vjNG(vi)v^{j}\in N_{G}(v^{i}) it holds that mv1jm_{v_{1}^{j}} is matched to wv2jw_{v_{2}^{j}} and hence mv2jMm_{v_{2}^{j}}\notin M which means that vjSv^{j}\notin S and hence SS is indeed an Independent Set. \Box

Lemmas 5.8 and 5.9 combined give us a second proof of NP-hardness of MAX SMISS.

Austrin et al. in [5] show that assuming the unique games conjecture IND SET is hard to approximate within a factor of O(dlog2d)O\left(\frac{d}{\log^{2}d}\right) for Independent sets of size k=(12Θ(log(logd)logd))nk=\left(\frac{1}{2}-\Theta\left(\frac{\log(\log d)}{\log d}\right)\right)n, where nn is the size of the vertex set and dd is an upper bound on the degree. Combining that result and Lemmas 5.8 and 5.9 we get the following theorem.

Theorem 5.11

Assuming the UGC, MAX SMISS cannot be approximated within a 3/2ε3/2-\varepsilon, for any constant ε>0\varepsilon>0.

  • Proof

    The proof follows from the relationship between SMISS and IND SET shown by Lemmas 5.8 and 5.9 and the result from [5]. It’s exactly the same as the proof of Corollary 4 of [16]. We set d=δnd=\delta n for some constant δ>0\delta>0 and we get that finding the maximum socially stable matching is hard to approximate within a factor of

    n+(12Θ(log(logn)logn))nn+(12Θ(log(logn)logn))nO(lognn)32ε\frac{n+\left(\frac{1}{2}-\Theta\left(\frac{\log(\log n)}{\log n}\right)\right)n}{n+\left(\frac{1}{2}-\Theta\left(\frac{\log(\log n)}{\log n}\right)\right)n\cdot O\left(\frac{\log n}{n}\right)}\geq\frac{3}{2}-\varepsilon (1)

    for sufficiently large nn. \Box

6 Some special cases of HRSS

Given the hardness results obtained for the problem of finding a maximum socially stable matching in a general HRSS instance, the need arises to investigate special cases of the problem that are tractable. This section describes some polynomial-time solvability results for three special cases of HRSS. Subsection 6.1 gives a polynomial-time algorithm for finding a maximum socially stable matching given an instance of (2,)(2,\infty)-MAX SMISS. In Subsection 6.2 we provide a polynomial-time algorithm for MAX HRSS in the case where there is a constant number of unacquainted pairs and in Subsection 6.3 we also consider the case where the number of acquainted pairs is constant, again providing a polynomial time-algorithm for MAX HRSS in that context.

6.1 (2,)(2,\infty)-MAX SMISS

Given an SMISS instance (I,G)(I,G), where the men are allowed to have at most two women in their preference lists and each woman is allowed to have an unbounded-length preference list, we show that a maximum socially stable matching can be found in polynomial time. We make slight modifications to the algorithm used to find a maximum stable matching in a (2,)(2,\infty)-MAX SMTI (the problem of finding a maximum stable matching given an SMTI instance where men are allowed to have at most two women on their preference list) instance described in [20]. The resulting algorithm, which we call (2,)(2,\infty)-MAX-SMISS-alg, is broken down into three phases.

In Phase 1, some pairs that cannot be involved in any socially stable matching in (I,G)(I,G) are deleted from the instance. A pair (mi,wj)(m_{i},w_{j}) is deleted by removing mim_{i} from wjw_{j}’s preference list and vice versa. We call the resulting preference lists the reduced preference lists. For each man mim_{i}, if the first woman wjw_{j} on mim_{i}’s preference list satisfies (mi,wj)A(m_{i},w_{j})\in A, where A=E(G)A=E(G) is the set of acquainted pairs in (I,G)(I,G), we delete all pairs (mk,wj)(m_{k},w_{j}) for all successors mkm_{k} of mim_{i} on wjw_{j}’s preference list. (mk,wj)(m_{k},w_{j}) cannot be involved in any socially stable matching as (mi,wj)(m_{i},w_{j}) will socially block any matching they were involved in.

In Phase 2, we construct a weighted bipartite graph GG^{\prime} from the resulting instance with a reduced preference list. This is done by representing the men and women as nodes on the two sides of the graph and adding an edge between a man mim_{i} on one side and a woman wjw_{j} on the other if wjw_{j} appears on mim_{i}’s preference list. The weight placed on the edge will be the position of mim_{i} on wjw_{j}’s preference list (denoted by rank(wj,mi)rank(w_{j},m_{i})). Algorithm 4 describes the process. A minimum cost maximum cardinality matching MGM_{G^{\prime}} in the the resulting bipartite graph is then generated using the algorithm described in [10].

At this stage it is not guaranteed that the resulting maximum matching MGM_{G^{\prime}} is socially stable. MGM_{G^{\prime}} may admit a social blocking pair (mi,wj)(m_{i},w_{j}), where (mi,wj)A(m_{i},w_{j})\in A, wjw_{j} is the first-choice partner of mim_{i}, mim_{i} is assigned to his second-choice partner wkw_{k} in MGM_{G^{\prime}} and wjw_{j} is unassigned in MGM_{G^{\prime}} (as we will show later, this the only form of social blocking pair that MGM_{G^{\prime}} can admit). To remove such blocking pairs, during Phase 3, we assign mim_{i} to wjw_{j} thus making wkw_{k} unmatched. At this stage, wkw_{k} may herself be the first-choice woman that forms a pair with some other man mlm_{l} in the resulting matching such that (ml,wk)A(m_{l},w_{k})\in A. The process continues until there is no man who is matched to his second-choice woman while forming an edge in GG with his unmatched first-choice woman. Algorithm 3 shows the entire (2,)(2,\infty)-MAX-SMISS-alg algorithm.

Algorithm 3 (2,)(2,\infty)-MAX-SMISS-alg
1:  /* Phase 1 */
2:  while some man mim_{i} has a first-choice woman wjw_{j} such that (mi,wj)A(m_{i},w_{j})\in A do
3:   for each successor mkm_{k} of mim_{i} on wjw_{j}’s list do
4:    delete the pair (mk,wj)(m_{k},w_{j});
5:   end for
6:  end while
7:  /* Phase 2 */
8:  G:=G^{\prime}:= buildGraph();
9:  MGM_{G^{\prime}} := minimum weight maximum matching in GG^{\prime};
10:  /* Phase 3 */
11:  M:=MGM:=M_{G^{\prime}};
12:  while there exists a man mim_{i} who is matched to his second-choice woman wkw_{k} and his first-choice wjw_{j} is an unmatched woman such that (mi,wj)A(m_{i},w_{j})\in A do
13:   M:=M\{(mi,wk)}M:=M\backslash\{(m_{i},w_{k})\};
14:   M:=M{(mi,wj)}M:=M\cup\{(m_{i},w_{j})\};
15:  end while
16:  return MM;
Algorithm 4 buildGraph
1:  V:=𝒰𝒲V:=\mathcal{U}\cup\mathcal{W}; /* 𝒰\mathcal{U} and 𝒲\mathcal{W} are sets of men and women in II */
2:  E:=E^{\prime}:=\emptyset;
3:  for each man mi𝒰m_{i}\in\mathcal{U} do
4:   for each woman wjw_{j} on mim_{i}’s reduced list do
5:    E:=E{(mi,wj)}E^{\prime}:=E^{\prime}\cup\{(m_{i},w_{j})\};
6:    weight(mi,wj):=rank(wj,mi)weight(m_{i},w_{j}):=rank(w_{j},m_{i});
7:   end for
8:  end for
9:  G:=(V,E)G^{\prime}:=(V,E^{\prime});
10:  return GG^{\prime};

We now show that at the end of this phase, for (2,)(2,\infty)-MAX SMISS instances, the matching produced is both socially stable and of maximum size.

Lemma 6.1

(2,)(2,\infty)-MAX-SMISS-alg terminates.

  • Proof

    It is easy to see that Phases 11 and 22 terminate. For every iteration of Phase 33, one man always improves from his second to his first choice while no man obtains a worst partner or becomes unmatched. Since the total number of possible improvements is finite, it is clear the phase is bound to terminate. \Box

Lemma 6.2

Phase 1 of (2,)(2,\infty)-MAX-SMISS-alg never deletes a socially stable pair, which is a man-woman pair that belongs to some socially stable matching in (I,G)(I,G).

  • Proof

    Suppose pair (mi,wj)(m_{i},w_{j}) is deleted during some execution of (2,)(2,\infty)-MAX-SMISS-alg and (mi,wj)M(m_{i},w_{j})\in M where MM is some socially stable matching in (I,G)(I,G). Then mim_{i} was deleted from wjw_{j}’s preference list because wjw_{j} was the first-choice woman of some man mkm_{k} such that (mk,wj)A(m_{k},w_{j})\in A and wjw_{j} prefers mkm_{k} to mim_{i}. Therefore (mk,wj)(m_{k},w_{j}) will socially block MM, a contradiction. \Box

Lemma 6.3

The matching returned by (2,)(2,\infty)-MAX-SMISS-alg is socially stable in (I,G)(I,G).

  • Proof

    Suppose the matching MM produced by (2,)(2,\infty)-MAX-SMISS-alg is not socially stable in (I,G)(I,G). Then some pair (mi,wj)A(m_{i},w_{j})\in A socially blocks MM in II. For this to occur, one of the following cases must arise.

    Case (i): mim_{i} and wjw_{j} are unmatched in MM. Then mim_{i} is unmatched in MGM_{G^{\prime}} and either wjw_{j} was initially unmatched in MGM_{G^{\prime}} or became unmatched due to some operation in Phase 3 of (2,)(2,\infty)-MAX-SMISS-alg. If wjw_{j} was initially unmatched in MGM_{G^{\prime}} then MGM_{G^{\prime}} could have been increased in size by adding (mi,wj)(m_{i},w_{j}) thus contradicting the fact that MGM_{G^{\prime}} is of maximum cardinality. Suppose wjw_{j} became unmatched due to Phase 3. Let mp1m_{p_{1}} denote wjw_{j}’s partner in MGM_{G^{\prime}}. During Phase 3, mp1m_{p_{1}} must have become assigned to his first-choice woman wq1w_{q_{1}}. Suppose wq1w_{q_{1}} was unmatched in MGM_{G^{\prime}}. Then a larger matching can be obtained by augmenting MGM_{G^{\prime}} along the path (mi,wj),(wj,mp1),(mp1,wq1)(m_{i},w_{j}),(w_{j},m_{p_{1}}),(m_{p_{1}},w_{q_{1}}) contradicting to the fact that MGM_{G} is of maximum cardinality. Thus wq1w_{q_{1}} must have been assigned in MGM_{G^{\prime}} and became unmatched during Phase 3 as well. If wq1w_{q_{1}} was assigned to mp2m_{p_{2}} in MGM_{G^{\prime}}, mp2m_{p_{2}} must have become assigned to his first-choice woman wq2w_{q_{2}} during Phase 3. Using a similar argument to that used for wq1w_{q_{1}}, we can argue that wq2w_{q_{2}} must have been assigned in MGM_{G^{\prime}} as well. Thus some man moved from wq2w_{q_{2}} to his first-choice woman. This process may be continued and at each iteration of Phase 3, some man must strictly improve and no man becomes worse off. Since the possible number of such improvements is finite, there are a finite number of women that can be unmatched in this way in Phase 3. Hence at some point, there exists a man mpsm_{p_{s}}, who switches to his first-choice woman wqsw_{q_{s}} and wqsw_{q_{s}} was already unmatched in MGM_{G^{\prime}}. We can then construct an augmenting path in GG^{\prime} of the form (mi,wj),(wj,mp1),(mp1,wq1),(wq1,mp2),(mp2,wq2),,(mps,wqs)(m_{i},w_{j}),(w_{j},m_{p_{1}}),(m_{p_{1}},w_{q_{1}}),(w_{q_{1}},m_{p_{2}}),(m_{p_{2}},w_{q_{2}}),...,(m_{p_{s}},w_{q_{s}}) which contradicts the fact that MGM_{G^{\prime}} is of maximum cardinality.

    Case (ii): mim_{i} is unmatched in MM and wjw_{j} prefers mim_{i} to ml=M(wj)m_{l}=M(w_{j}). Then mim_{i} is unmatched in MGM_{G^{\prime}} as well. Suppose that wjw_{j} was assigned to mlm_{l} in MGM_{G^{\prime}}. Since wjw_{j} prefers mim_{i} to mlm_{l}, a matching of equal size to MGM_{G^{\prime}} but with a lower weight can be obtained by pairing mim_{i} with wjw_{j}, leaving mlm_{l} unmatched, thus contradicting the fact that MGM_{G^{\prime}} is a minimum weight maximum cardinality matching. Thus wjw_{j} is not assigned to mlm_{l} in MGM_{G^{\prime}}. Then wjw_{j} is either unmatched in MGM_{G^{\prime}} or is assigned in MGM_{G^{\prime}} to some man mpm_{p}, where mpmlm_{p}\neq m_{l} and mpmim_{p}\neq m_{i}. If wjw_{j} is unmatched in MGM_{G^{\prime}}, the fact that MGM_{G^{\prime}} is a maximum cardinality matching is contradicted. If wjw_{j} is assigned to mpm_{p} in MGM_{G^{\prime}} then since wjw_{j} is no longer assigned to mpm_{p} in MM, mpm_{p} must have switched to his first-choice woman wqw_{q} during Phase 3. Hence either wqw_{q} was unmatched in MGM_{G^{\prime}} or wqw_{q} became unmatched due to some man being switched to his first-choice woman. Using a similar argument as in case (i), we can construct an augmenting path that contradicts the fact that MGM_{G^{\prime}} is of maximum cardinality.

    Case (iii): mim_{i} is assigned to wkw_{k} in MM and mim_{i} prefers wjw_{j} to wkw_{k} and wjw_{j} is unmatched in MM. Since mim_{i}’s preference list is of length 2, wjw_{j} is mim_{i}’s first-choice and (mi,wj)A(m_{i},w_{j})\in A and so this case satisfies the loop condition in Phase 3 and thus should never arise once Phase 3 has terminated (as it must, by Lemma 6.1).

    Case (iv): mim_{i} is assigned to wkw_{k} in MM and mim_{i} prefers wjw_{j} to wkw_{k} and wjw_{j} is assigned to mlm_{l} in MM and wjw_{j} prefers mim_{i} to mlm_{l}. Once again, since mim_{i}’s list is of length 2, then wjw_{j} must be mim_{i}’s first-choice and (mi,wj)A(m_{i},w_{j})\in A. Therefore the loop condition of Phase 1 would have ensured that man mlm_{l} was deleted from wjw_{j}’s preference list. \Box

Since, by Lemma 6.2, Phase 1 never deletes a socially stable pair, a maximum socially stable matching must consist of pairs that belong to the reduced lists. Since MGM_{G^{\prime}} is a maximum matching and Phase 3 never reduces the size of the matching, it follows that the matching produced by the algorithm is of maximum cardinality. Finally since by Lemma 6.3, the matching produced is a socially stable matching, it follows that the algorithm produces a maximum socially stable matching in (I,G)(I,G).

The complexity of the algorithm is dominated by Phase 2. The complexity of the algorithm for finding the minimum cost maximum matching in G=(V,E)G^{\prime}=(V,E^{\prime}) is O(|V||E|log|V|)O(\sqrt{|V|}|E^{\prime}|\log{|V|}) [10]. Let n=|V|=n1+n2n=|V|=n_{1}+n_{2} be the total number of men and women. Since the set 𝒜\mathcal{A} of acceptable pairs satisfies |𝒜|2n1=O(n)|\mathcal{A}|\leq 2n_{1}=O(n), it follows that (2,)(2,\infty)-MAX SMISS has a time complexity of O(n3/2logn)O(n^{3/2}\log{n}). We have thus proved the following theorem.

Theorem 6.4

Given an instance (I,G)(I,G) of (2,)(2,\infty)-MAX SMISS, Algorithm (2,)(2,\infty)-MAX-SMISS-alg generates a maximum socially stable matching in O(n3/2logn)O(n^{3/2}\log{n}) time, where nn is the total number of residents and hospitals in (I,G)(I,G).

6.2 HRSS with a constant number of unacquainted pairs

It is easy to see that in the special case where the set UU of unacquainted pairs is exactly the set 𝒜\mathcal{A} of acceptable pairs in the underlying HR instance, then the set AA of acquainted pairs satisfies A=A=\emptyset and every matching found is a socially stable matching. Also if the instance contains no unacquainted pairs (i.e., A=𝒜A=\mathcal{A} and U=U=\emptyset), then only stable matchings in the classical sense are socially stable. In both these cases, a maximum socially stable matching can be generated in polynomial time. The case may however arise where the number of unacquainted pairs is constant. In this case, we show that it is also possible to generate a maximum socially stable matching in polynomial time.

Let (I,G)(I,G) be an instance of HRSS and let S𝒜S\subseteq\mathcal{A} be a subset of the acceptable pairs in II. We denote I\SI\backslash S as the instance of HR obtained from II by deleting the pairs in SS from the preference lists in II. The following proposition plays a key role in establishing the correctness of the algorithm.

Proposition 6.5

Let (I,G)(I,G) be an instance of HRSS. Let MM be a socially stable matching in (I,G)(I,G). Then there exists a set of unacquainted pairs UUU^{\prime}\subseteq U such that MM is stable in I=I\UI^{\prime}=I\backslash U^{\prime}. Conversely suppose that MM is a stable matching in I=I\UI^{\prime}=I\backslash U^{\prime} for some UUU^{\prime}\subseteq U. Then MM is socially stable in (I,G)(I,G).

  • Proof

    Suppose MM is socially stable in (I,G)(I,G). Let U=U\(MU)=U\MU^{\prime}=U\backslash(M\cap U)=U\backslash M. We claim that MM is stable in I=I\UI^{\prime}=I\backslash U^{\prime}. Suppose (ri,hj)(r_{i},h_{j}) blocks MM in II^{\prime}. Then (ri,hj)M(r_{i},h_{j})\notin M and edges in II^{\prime} are those in AMUA\cup M\cap U and (ri,hj)MU(r_{i},h_{j})\notin M\cap U. Thus (ri,hj)A(r_{i},h_{j})\in A making MM socially unstable in (I,G)(I,G), a contradiction.

    Conversely, suppose that MM is stable in I=I\UI^{\prime}=I\backslash U^{\prime} for some UUU^{\prime}\subseteq U. We claim that MM is socially stable in (I,G)(I,G). Suppose that (ri,hj)(r_{i},h_{j}) socially blocks MM in (I,G)(I,G), then (ri,hj)A(r_{i},h_{j})\in A so (ri,hj)U(r_{i},h_{j})\notin U. Thus (ri,hj)(r_{i},h_{j}) is a pair in II^{\prime} and so (ri,hj)(r_{i},h_{j}) blocks MM in II^{\prime}, a contradiction. \Box

By considering all subsets UUU^{\prime}\subseteq U, forming II^{\prime}, finding a stable matching in each such II^{\prime} and keeping a record of the maximum stable matching found, we obtain a maximum socially stable matching in (I,G)(I,G). This discussion leads to the following theorem.

Theorem 6.6

Given an instance (I,G)(I,G) of HRSS where the set UU of unacquainted pairs is of constant size, a maximum socially stable matching can be generated in O(m)O(m) time, where m=|𝒜|m=|\mathcal{A}| is the number of acceptable pairs.

  • Proof

    By considering all subsets UUU^{\prime}\subseteq U, forming II^{\prime}, finding stable a matching in each such II^{\prime} and keeping a record of the maximum stable matching found, we obtain a maximum socially stable matching in (I,G)(I,G). Let MM be the largest stable matching found over all I=I\UI^{\prime}=I\backslash U^{\prime} where UUU^{\prime}\subseteq U. Then by Proposition 6.5, MM is socially stable in (I,G)(I,G). Suppose for a contradiction that MM^{\prime} is a socially stable matching in II where |M|>|M||M^{\prime}|>|M|. Then by Proposition 6.5 there exists some U′′UU^{\prime\prime}\subseteq U such that MM^{\prime} is stable in I′′I^{\prime\prime}. But that contradicts MM as the largest stable matching in I\UI\backslash U^{\prime} taken over all UUU^{\prime}\subseteq U.

    Finding all subsets of UU can be done in O(2k)O(2^{k}) time where k=|U|k=|U|. Forming II^{\prime} and finding a stable matching in II^{\prime} can be done in O(|𝒜|)O(|\mathcal{A}|) time where 𝒜\mathcal{A} is the set of acceptable pairs in II. Hence the overall time complexity of the algorithm is O(2k|𝒜|)O(2^{k}|\mathcal{A}|) which is polynomial with respect to the instance size as kk is a constant. \Box

6.3 HRSS with a constant number of acquainted pairs

We now consider the restriction of HRSS in which the set AA of acquainted pairs is of constant size kk. Given an instance (I,G)(I,G) of this problem we show that a maximum socially stable matching can be found in polynomial time. Let A={e1,e2,,ek}A=\{e_{1},e_{2},...,e_{k}\} where eie_{i} represents an acquainted pair (rsi,hti)(r_{s_{i}},h_{t_{i}}) (1ik)(1\leq i\leq k). A tree TT of depth kk is constructed with all nodes at depth ii labelled ei+1e_{i+1} (i0)(i\geq 0). There are left and right branches below eie_{i}. Each branch corresponds to a condition placed on rsir_{s_{i}} or htih_{t_{i}} with respect to a matching MM. The left branch below eie_{i} (i.e., a resident condition branch) corresponds to the condition that rsir_{s_{i}} is matched in MM and prefers his partner to htih_{t_{i}}. The right branch below eie_{i} (i.e., a hospital condition branch) corresponds to the condition that htih_{t_{i}} is fully subscribed in MM and has a partner no worse than rsir_{s_{i}}. Satisfying at least one of these conditions ensures that MM admits no blocking pair involving (rsi,hti)(r_{s_{i}},h_{t_{i}}). The tree is constructed in this manner with the nodes at depth k1k-1, labelled eke_{k}, branching in the same way to dummy leaf nodes ek+1e_{k+1} (not representing acquainted pairs).

A path PP from the root node e1e_{1} to a leaf node ek+1e_{k+1} will visit all pairs in AA exactly once. Every left branch in PP gives a resident condition and every right branch gives a hospital condition. Let RR^{\prime} and HH^{\prime} be the set of residents and hospitals involved in resident and hospital conditions in PP respectively. Given a matching MM, enforcing all the conditions along PP can be achieved by first deleting all pairs from the instance II that could potentially violate these conditions. So if some resident condition along PP states that a resident rsir_{s_{i}} must be matched in MM to a hospital he prefers to htih_{t_{i}} then rsir_{s_{i}}’s preference list is truncated starting with htih_{t_{i}}. If some hospital condition states that a hospital htih_{t_{i}} must be fully subscribed in MM and must not be matched to a resident worse than rsir_{s_{i}} then htih_{t_{i}}’s preference list is truncated starting from the resident immediately following rsir_{s_{i}}. After performing these truncations based on the conditions along PP, a new HR instance II^{\prime} is obtained.

Proposition 6.7

If MM is a matching in II^{\prime} that is computed at the leaf node of a path PP and all residents in RR^{\prime} are matched in MM and all hospitals in HH^{\prime} are fully subscribed in MM then MM is a socially stable matching in (I,G)(I,G).

  • Proof

    Suppose some resident-hospital pair socially blocks MM in (I,G)(I,G). Then this pair belongs to AA so it corresponds to a node ei=(rsi,hti)e_{i}=(r_{s_{i}},h_{t_{i}}) in TT for some ii (1ik)(1\leq i\leq k). So in MM, either (i) rsir_{s_{i}} is unmatched or prefers htih_{t_{i}} to M(rsi)M(r_{s_{i}}) and (ii) either htih_{t_{i}} is undersubscribed or prefers rsir_{s_{i}} to M(hti)M(h_{t_{i}}). Suppose in TT, the left hand branch from eie_{i} was chosen when following a path PP from the root to a leaf node. Then rsiRr_{s_{i}}\in R^{\prime}, rsir_{s_{i}} is matched and by the truncations carried out, rsir_{s_{i}} has a better partner than htih_{t_{i}}, a contradiction. Thus the right hand branch from eie_{i} was chosen when following PP. Then htiHh_{t_{i}}\in H^{\prime}, htih_{t_{i}} is fully subscribed and by the truncations htih_{t_{i}} has no partner worse than rsir_{s_{i}}. But (rsi,hti)M(r_{s_{i}},h_{t_{i}})\notin M, so htih_{t_{i}} has a partner better than rsir_{s_{i}}, a contradiction. \Box

With II^{\prime} obtained due the truncations carried out by satisfying conditions along a path PP from the root node to a leaf node, we then seek to obtain a matching in which all the residents in RR^{\prime} are matched and hospitals in HH^{\prime} are fully subscribed. For each hospital hjh_{j} in II^{\prime}, we define a set of clones of hjh_{j}, {hj,1,hj,2,,hj,cj}\{h_{j,1},h_{j,2},...,h_{j,{c_{j}}}\}, corresponding to the number of posts cjc_{j} available in hjh_{j}. Let H′′={hj,k:hjH1kcj}H^{\prime\prime}=\{h_{j,k}:h_{j}\in H^{\prime}\wedge 1\leq k\leq c_{j}\} denote the set of all clones obtained from hospitals in HH^{\prime}. We define a bipartite graph GG^{\prime} where one set of nodes is represented by the set of residents in II^{\prime} and the other set of nodes is represented by the hospital clones in II^{\prime}. If rir_{i} finds hjh_{j} acceptable in II, we add an edge from rir_{i} to hj,qh_{j,q} in GG^{\prime} for all q(1qcj)q~(1\leq q\leq c_{j}). We define a new graph G′′G^{\prime\prime} containing the same nodes and edges in GG^{\prime} with weights placed on the edges. We mark all the nodes representing the residents in RR^{\prime} and the hospital clones in H′′H^{\prime\prime} as red nodes with the remaining nodes uncoloured. We place weights on the edges as follows: (i) an edge between a red node and an uncoloured node is given a weight of 11; (ii) an edge between two red nodes is given weight of 22; (iii) an edge between two uncoloured nodes is given a weight of 0. We then find a maximum weight matching MM^{\prime} in the resulting weighted bipartite graph G′′G^{\prime\prime}. Let wt(M)wt(M^{\prime}) denote the weight of a matching MM^{\prime} in G′′G^{\prime\prime}. Then

wt(M)=|{(ri,hj,q)M:riR}|+|{(ri,hj,q)M:hj,qH′′}||R|+|H′′|wt(M^{\prime})=|\{(r_{i},h_{j,q})\in M^{\prime}:r_{i}\in R^{\prime}\}|+|\{(r_{i},h_{j,q})\in M^{\prime}:h_{j,q}\in H^{\prime\prime}\}|\leq|R^{\prime}|+|H^{\prime\prime}|.

Moreover wt(M)=|R|+|H′′|wt(M^{\prime})=|R^{\prime}|+|H^{\prime\prime}| if and only if every agent in RH′′R^{\prime}\cup H^{\prime\prime} is matched in MM^{\prime}. For such a matching MM^{\prime} in G′′G^{\prime\prime}, by construction, MM^{\prime} is also a matching in GG^{\prime} and a maximum cardinality matching M′′M^{\prime\prime} can be obtained in GG^{\prime} by continuously augmenting MM^{\prime} until no augmenting path can be found. Since any node already matched in MM^{\prime} will remain matched in M′′M^{\prime\prime} it follows that all the residents and hospital clones in RH′′R^{\prime}\cup H^{\prime\prime} will be matched in M′′M^{\prime\prime} and such a matching, by Proposition 6.7, will be socially stable in (I,G)(I,G). If however, wt(M)<|R|+|H′′|wt(M^{\prime})<|R^{\prime}|+|H^{\prime\prime}| then some resident or hospital clone in RH′′R^{\prime}\cup H^{\prime\prime} remains unmatched in any maximum matching in GG^{\prime} introducing the possibility of a social blocking pair of MM^{\prime} in (I,G)(I,G). In this case, PP is ruled as infeasible and another path is considered, otherwise PP is called feasible.

There are 2k2^{k} paths from the root node to leaf nodes in the tree TT. The following proposition is important to our result.

Proposition 6.8

There must exist at least one feasible path in TT.

  • Proof

    Let MM be a stable matching in II. Then MM is socially stable in (I,G)(I,G). Consider each node ei=(rsi,hti)e_{i}=(r_{s_{i}},h_{t_{i}}) in TT. If (rsi,hti)M(r_{s_{i}},h_{t_{i}})\in M, we branch right at eie_{i}. If (rsi,hti)M(r_{s_{i}},h_{t_{i}})\notin M, and rsir_{s_{i}} is matched and has a partner better than htih_{t_{i}}, we branch left at eie_{i}. If (rsi,hti)M(r_{s_{i}},h_{t_{i}})\notin M, and htih_{t_{i}} is fully subscribed and has no partner worse than rsir_{s_{i}}, we branch right at eie_{i}. Any other condition would mean that (rsi,hti)(r_{s_{i}},h_{t_{i}}) would block MM in II, a contradiction. This process, starting from the root node e1e_{1}, gives a feasible path PP through TT to some leaf node vv where, for the set of residents RR^{\prime} and hospitals HH^{\prime} involved in PP, wt(M)=|R|+|H|wt(M)=|R^{\prime}|+|H^{\prime}|. \Box

To generate a maximum socially stable matching MM in an instance (I,G)(I,G) of HRSS, all 2k2^{k} paths through TT from the root node to leaf nodes are considered with a record kept of the maximum matching M′′M^{\prime\prime} computed at the leaf node of each feasible path. The desired matching MM can then be constructed by letting

M={(ri,hj):(ri,hj,k)M′′ for some k (1kcj)}.M=\{(r_{i},h_{j}):(r_{i},h_{j,k})\in M^{\prime\prime}\mbox{ for some $k$ }(1\leq k\leq c_{j})\}.
Proposition 6.9

If MM is a matching obtained from the process described above, MM is a maximum socially stable matching in (I, G).

  • Proof

    Proposition 6.7 shows that MM is socially stable in (I,G)(I,G). Suppose MM^{\prime} is a socially stable matching in (I,G)(I,G) such that |M|>|M||M^{\prime}|>|M|. Construct a feasible path PP through TT from the root node to a leaf node vv, branching left or right at each node ei=(rsi,hti)e_{i}=(r_{s_{i}},h_{t_{i}}) as follows. If rsir_{s_{i}} is matched in MM^{\prime} to some hospital better than htih_{t_{i}}, branch left. Otherwise as (rsi,hti)(r_{s_{i}},h_{t_{i}}) is not a social blocking pair of MM^{\prime}, htih_{t_{i}} is fully subscribed in MM^{\prime} with no assignee worse than rsir_{s_{i}}, in which case branch right. As before, construct sets RR^{\prime} and HH^{\prime} as follows. For every left branch in PP involving a resident rsir_{s_{i}}, add rsir_{s_{i}} to RR^{\prime} and for every right branch in PP involving a hospital htih_{t_{i}}, add htih_{t_{i}} to HH^{\prime}. Matching MM^{\prime} then satisfies the property that every resident rsiRr_{s_{i}}\in R^{\prime} is matched in MM^{\prime} to a hospital better than htih_{t_{i}} and every hospital htiHh_{t_{i}}\in H^{\prime} is fully subscribed with residents no worse than rsir_{s_{i}}. At the leaf node vv of PP, the algorithm constructs a matching M′′M^{\prime\prime} which is of maximum cardinality with respect to the restrictions that every resident rsiRr_{s_{i}}\in R^{\prime} is matched to a hospital better than htih_{t_{i}} and every hospital htiHh_{t_{i}}\in H^{\prime} is fully subscribed with residents no worse than rsir_{s_{i}}. Hence |M′′||M||M^{\prime\prime}|\geq|M^{\prime}| and since |M|>|M||M^{\prime}|>|M|, it follows that M′′M^{\prime\prime} contradicts the choice of MM as the largest matching taken over all leaf nodes. \Box

The above proposition leads to the following main result of this subsection.

Theorem 6.10

Given an instance (I,G)(I,G) of HRSS where the set AA of acquainted pairs satisfies |A|=k|A|=k for some constant kk, a maximum socially stable matching can be generated in O(cmaxmn1+C)O(c_{max}m\sqrt{n_{1}+C}) time where n1n_{1} is the number of residents, mm is the number of acceptable pairs, cmaxc_{max} is the largest capacity of any hospital and CC is the total capacity of all the hospitals in the problem instance.

  • Proof

    Since |A|=k|A|=k is constant, the number of leaf nodes (and subsequently the number of paths from the root node to a leaf node) is also constant (2k2^{k}). Performing the truncations imposed by the conditions along a path can be done in O(m)O(m) time where mm is the number of acceptable pairs in II. The number of nodes nn^{\prime} and the number of edges mm^{\prime} in GG^{\prime} are given by:

    where n1n_{1} is the number of residents, n2n_{2} is the number of hospitals, pref(hj)pref(h_{j}) is the set of residents in hjh_{j}’s preference list, cmaxc_{max} is the largest capacity of any hospital and CC is the total number of posts in the problem instance. Finding a maximum weight matching in G′′G^{\prime\prime} can be done in O(mn)O(m^{\prime}\sqrt{n^{\prime}}) time [9] (since the edge weights have O(1)O(1) size). Augmenting such a matching to a maximum cardinality matching in GG^{\prime} can be done in O(mn)O(m^{\prime}\sqrt{n^{\prime}}) time [17]. Thus the time complexity of the algorithm is O(cmaxmn1+C)O(c_{max}m\sqrt{n_{1}+C}). \Box

Following the results in Theorems 6.6 and 6.10, we conclude this section with the theorem below showing the existence of FPT algorithms for MAX HRSS under two different parameterisations.

Theorem 6.11

MAX HRSS is in FPT with parameter kk, where either k=|A|k=|A| or k=|U|k=|U|, and AA and UU are the sets of acquainted and unacquainted pairs respectively.

7 Open problems

The study of the Hospitals / Residents problem under Social Stability is still at an early stage, and some interesting open problems remain. Firstly it is worth investigating the complexity of finding socially stable matchings with additional optimality properties (such as egalitarian / minimum regret socially stable matchings [19, 12]). It may also be interesting to determine whether the set of socially stable matchings in an HRSS instance admits any structure similar to that present in the case of stable matchings in HR. Also extending the algorithm for (2,)(2,\infty)-MAX SMISS to the HRSS case remains open. The HRSS model described in this paper does not consider the scenario where ties exist in the preference lists of agents. It remains open to investigate this variant of the problem.

We close by remarking that currently in the HRSS context, if (r,h)(r,h) is a blocking pair of a matching MM where hh is undersubscribed and (r,h)U(r,h)\in U, then (r,h)(r,h) is not a social blocking pair of MM. However it could be argued that information about undersubscribed hospitals would be in the public domain, and hence the social blocking pair definition should not require that rr and hh have a social tie in this case. It would be interesting to investigate algorithmic aspects of this variant of HRSS.

Acknowledgments

The fourth author is supported by grant EP/K010042/1 from the Engineering and Physical Sciences Research Council. We would like to thank Martin Hoefer for making the third and fourth authors aware of [4]; Zoltán Király for ideas that led to Theorem 3.1, for observing Theorem 6.11 and for other valuable comments; and Rob Irving and an anonymous referee for further valuable suggestions concerning this paper.

References

  • [1] A. Abdulkadiroǧlu, P.A. Pathak, and A.E. Roth. The Boston public school match. American Economic Review, 95(2):368–371, 2005.
  • [2] A. Abdulkadiroǧlu, P.A. Pathak, and A.E. Roth. The New York City high school match. American Economic Review, 95(2):364–367, 2005.
  • [3] E. Arcaute and S. Vassilvitskii. Social networks and stable matchings in the job market. In Proceedings of WINE ’09: the 5th International Workshop on Internet and Network Economics, volume 5929 of Lecture Notes in Computer Science, pages 220–231. Springer, 2009.
  • [4] G. Askalidis, N. Immorlica, and E. Pountourakis. Socially stable matchings. Technical Report 1302.3309, Computing Research Repository, Cornell University Library, 2013. Available from http://arxiv.org/abs/1302.3309.
  • [5] P. Austrin, S. Khot, and M. Safra. Inapproximability of vertex cover and independent set in bounded degree graphs. In Computational Complexity, 2009. CCC’09. 24th Annual IEEE Conference on, pages 74–80. IEEE, 2009.
  • [6] P. Biró, D.F. Manlove, and S. Mittal. Size versus stability in the marriage problem. Theoretical Computer Science, 411:1828–1841, 2010.
  • [7] K. Cechlárová and T. Fleiner. Stable roommates with free edges. Technical Report 2009-01, Egerváry Research Group on Combinatorial Optimization, Budapest, 2009.
  • [8] C.T. Cheng and E. McDermid. Maximum locally stable matchings. In Proceedings of MATCH-UP ’12: the 2nd International Workshop on Matching Under Preferences, pages 51–62, 2012.
  • [9] R. Duan and H.-H. Su. A scaling algorithm for maximum weight matching in bipartite graphs. In Proceedings of SODA ’12: the 23rd ACM-SIAM Symposium on Discrete Algorithms, pages 1413–1424. ACM-SIAM, 2012.
  • [10] H.N. Gabow and R.E. Tarjan. Faster scaling algorithms for network problems. SIAM Journal on Computing, 18:1013–1036, 1989.
  • [11] D. Gale and L.S. Shapley. College admissions and the stability of marriage. American Mathematical Monthly, 69:9–15, 1962.
  • [12] D. Gusfield. Three fast algorithms for four problems in stable marriage. SIAM Journal on Computing, 16(1):111–128, 1987.
  • [13] D. Gusfield and R.W. Irving. The Stable Marriage Problem: Structure and Algorithms. MIT Press, 1989.
  • [14] M. Halldórsson, K. Iwama, S. Miyazaki, and H. Yanagisawa. Improved approximation of the stable marriage problem. ACM Transactions on Algorithms, 3(3), 2007. Article number 30.
  • [15] M. Hoefer. Local matching dynamics in social networks. Information and Computation, 222:20–35, 2013.
  • [16] M. Hoefer and L. Wagner. Locally stable marriage with strict preferences. In Proceedings of ICALP 2013: the 40th International Colloquium on Automata, Languages and Programming, Lecture Notes in Computer Science. Springer, 2013. To appear.
  • [17] J.E. Hopcroft and R.M. Karp. A n5/2n^{5/2} algorithm for maximum matchings in bipartite graphs. SIAM Journal on Computing, 2:225–231, 1973.
  • [18] R.W. Irving. Matching medical students to pairs of hospitals: a new variation on a well-known theme. In Proceedings of ESA ’98: the Sixth European Symposium on Algorithms, volume 1461 of Lecture Notes in Computer Science, pages 381–392. Springer, 1998.
  • [19] R.W. Irving, P. Leather, and D. Gusfield. An efficient algorithm for the “optimal” stable marriage. Journal of the ACM, 34(3):532–543, 1987.
  • [20] R.W. Irving, D.F. Manlove, and G. O’Malley. Stable marriage with ties and bounded length preference lists. Journal of Discrete Algorithms, 7(2):213–219, 2009.
  • [21] K. Iwama, S. Miyazaki, and N. Yamauchi. A 1.875–approximation algorithm for the stable marriage problem. In Proceedings of SODA ’07: the Eighteenth ACM/SIAM Symposium on Discrete Algorithms, pages 288–297. ACM-SIAM, 2007.
  • [22] Z. Király. Linear time local approximation algorithm for maximum stable marriage. In Proceedings of MATCH-UP ’12: the 2nd International Workshop on Matching Under Preferences, pages 99–110, 2012.
  • [23] B. Korte and D. Hausmann. An analysis of the greedy heuristic for independence systems. In Annals of Discrete Mathematics, volume 2, pages 65–74. North-Holland, 1978.
  • [24] D.F. Manlove. Algorithmics of Matching Under Preferences. World Scientific, 2013.
  • [25] D.F. Manlove, R.W. Irving, K. Iwama, S. Miyazaki, and Y. Morita. Hard variants of stable marriage. Theoretical Computer Science, 276(1-2):261–279, 2002.
  • [26] E. McDermid. A 3/2 approximation algorithm for general stable marriage. In Proceedings of ICALP ’09: the 36th International Colloquium on Automata, Languages and Programming, volume 5555 of Lecture Notes in Computer Science, pages 689–700. Springer, 2009.
  • [27] A.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.
  • [28] A.E. Roth and M.A.O. Sotomayor. Two-sided matching: a study in game-theoretic modeling and analysis, volume 18 of Econometric Society Monographs. Cambridge University Press, 1990.