Maximum Locally Stable Matchings

: Motivated by the observation that most companies are more likely to consider job applicants referred by their employees than those who applied on their own, Arcaute and Vassilvitskii modeled a job market that integrates social networks into stable matchings in an interesting way. We call their model HR+SN because an instance of their model is an ordered pair ( I, G ) where I is a typical instance of the Hospital/Residents problem (HR) and G is a graph that describes the social network (SN) of the residents in I . A matching µ of hospitals and residents has a local blocking pair ( h, r ) if ( h, r ) is a blocking pair of µ , and there is a resident r (cid:48) such that r (cid:48) is simultaneously an employee of h in the matching and a neighbor of r in G . Such a pair is likely to compromise the matching because the participants have access to each other through r (cid:48) : r can give her resume to r (cid:48) who can then forward it to h . A locally stable matching is a matching with no local blocking pairs. The cardinality of the locally stable matchings of I can vary. This paper presents a variety of results on computing a locally stable matching with maximum cardinality.


Introduction
Motivated by the observation that most companies are more likely to consider job applicants suggested by their employees than those who apply on their own, Arcaute and Vassilvitskii [1] modeled a job market that integrates social networks into stable matchings.Formally, an instance of their model consists of a set of firms F , a set of workers W , and a social network graph G of the workers.Each member of F ∪ W has a preference list that ranks members of the opposite group that it or she finds acceptable in some linear order.Each firm f has a capacity q f , the maximum number of workers it can employ.A firm-worker pair is acceptable if they appear in each other's preference lists.A (many-to-one) matching µ of F and W is a set of acceptable firm-worker pairs where each firm f is part of at most q f pairs and each worker is part of at most one pair.It has a blocking pair (f, w) if (i) (f, w) is an acceptable pair; (ii)f has an opening or f prefers w to its worst employee under µ; and (iii) w is unemployed or w prefers f to her employer under µ.This blocking pair is local if additionally f and w have access to each other-i.e., f has an employee that is also a neighbor of w in G.In two-sided matching theory, a common goal is to find stable matchings, which are matchings with no blocking pairs.In this model, the matchings of interest are locally stable matchings, which are matchings with no local blocking pairs.
We emphasize that a locally stable matching can contain blocking pairs, but these blocking pairs are unlikely to compromise the matching.This may seem odd-if f still has an opening or prefers w over its worst employee, why f cannot just make a job offer to w?If w is unemployed or prefers f over her current employer, why she cannot just apply to f ?In the job market context, we can think of the preference lists of f and w as being constructed in an online fashion.In particular, w can be included in f 's list only after f has seen w's resume.However, for f to consider w, some employee of f who is also a friend of w must forward w's resume to f .Similarly, f can be included in w's list only after w has gained some reliable information about f .For this to happen, w must have a friend who works at f .This friend of w that is also an employee of f is a point of contact between f and w.The main assumption in this model is that a blocking pair of a matching cannot affect the matching if the firm-worker pair has no points of contact.Note, however, that although a firm-worker pair (f, w) may exist such that w has no social ties with any of f 's other acceptable partners, (f, w) can still be involved in a matching.
The first part of Arcaute and Vassilvitskii's paper [1] explores the combinatorial differences between stable matchings and locally stable matchings.Among others, they show that there are instances whose set of locally stable matchings do not form a distributive lattice under the standard ordering relation used for stable matchings.There are also instances whose locally stable matchings vastly outnumber its stable matchings.The second part of their paper examines the evolution of the job market.They consider a decentralized version of Gale and Shapley's algorithm and show that for a specific case the algorithm converges to a locally stable matching under weak stochastic conditions.They then go on to analyze the goodness of the resulting locally stable matching.The recent work of Hoefer [2] expands on the latter line of inquiry significantly.
Our Contribution.In this paper, we continue the study of locally stable matchings, focusing on those with maximum cardinality.We call them the maximum locally stable matchings.In our opinion, not only are the locally stable matchings inherently interesting but they are also an intriguing alternative to stable matchings.In some applications, requiring a matching to be stable can be too strong a requirement.It can also unnecessarily limit the size of the matching.This has led researchers to suggest other kinds of matchings that still take participants' preferences into consideration.They include popular matchings [3] and its many variants (e.g., [4][5][6], etc.), rank maximal matchings [7], and "almost stable" maximum matchings-which are maximum matchings with few blocking pairs [8].In the job market context, locally stable matchings may not only be larger than stable matchings, they may be just as robust since participants are unlikely to leave their assignments.Here are our main contributions: • First, we present families of instances where the problem of finding a maximum locally stable matchings is computationally easy.For one family of instances, every stable matching of the instance is a maximum locally stable matching.This family includes the case when G, the social network of the workers, is a complete graph.For the other family of instances, every maximum matching of the firms and workers is a maximum locally stable matching.This family includes the case when G is an empty graph.• Next, we show that when Ḡ, the complement of G, has a maximum matching of size r, the size of a maximum locally stable matching of the instance is at most r more than the size of a stable matching of the instance.Thus, when G is almost a complete graph, a stable matching of the instance is a good approximation to its maximum locally stable matching.On the other hand, we show that when G has a constant number of edges-i.e., G is almost an empty graph-finding a maximum locally stable matching can still be done in polynomial time.• Finally, in spite of the results above, we show that finding a maximum locally stable matching is computationally hard in general.In particular, we prove that finding a locally stable matching of a certain size is NP-complete and that approximating the size of a maximum locally stable matching within 21/19 − δ is NP-hard.Recently, Hoefer and Wagner [9] have shown that this problem cannot be approximated within 1.5 − under the Unique Games Conjecture.Hence, our result differs from theirs as we require only the weaker assumption that P = N P .
The rest of the paper is organized as follows.In Section 2, we state facts and preliminary results.We present the first two results in Section 3, and the last result in Section 4. We conclude in Section 5.

Preliminaries
In the stable matchings literature, the problem of finding a stable matching in the Arcaute-Vassilvitskii model sans the social network is often referred to as the Hospital/Residents problem (HR).The firms correspond to the hospitals while the workers correspond to the residents.In their seminal paper on stable matchings [10], Gale and Shapley presented an algorithm that finds a stable matching for every HR instance I.It can be implemented in O(|I|) time where |I| is the number of acceptable pairs in I.In general, I can have many stable matchings.Nonetheless, Gale and Sotomayor [11] showed that every stable matching of I has the same size and matches exactly the same set of residents.Throughout this paper, we shall assume that every HR instance we can consider has the property that a resident r is in a hospital h's preference list if and only if h is also in r's preference list.
For HR instance I, let B[I] denote the bipartite graph where the hospitals are the vertices on one side, and the residents on the other side.A pair (h, r) is an edge if and only if they form an acceptable pair.Thus, every matching of I is a subgraph of B[I].Finding a maximum matching of I can be done by solving a maximum flow problem with B[I] as the "base graph": Create a source s and a directed edge from s to every hospital h, and set its capacity to q h .Direct all edges {h, r} in B[I] from h to r and set its capacity to 1. Finally, create a sink t and a directed edge from every resident r to t, and set its capacity to 1.There is a one-to-one correspondence between the maximum flows of this network and the maximum matchings of B[I].
Let us suppose that all hospitals in I have capacity 1, and we wish to compare two of its matchings µ and σ.In this case, it is useful to consider their symmetric difference µ σ.In B[I], it is made up of what are called alternating paths and cycles-i.e., paths and cycles whose edges alternately belong to µ and σ.In cycles and even-length alternating paths, the number of µ-edges and the number of σ-edges are the same; in odd-length alternating paths, the numbers differ by 1.Additionally, when |σ| > |µ|, there is at least one odd-length alternating path with one more σ-edge than µ-edge.We shall call such a path a σ-alternating path.
When not all hospitals in I have capacity 1, we can transform I to another instance where this is the case.Here is a standard trick [12].Denote by I (1) the instance obtained from I by doing the following: for each hospital h i of I with capacity q h i , replace h i by q h i clones of h i : h i,1 , h i,2 , . . ., h i,q h i .Let their capacities be 1, and let their preference lists be exactly the same as that of h i .Then for each resident r j that has h i in her preference list, replace h i with the linear order (h i,1 , h i,2 , . . ., h i,q h i ).By transforming I to I (1) , the many-to-one matchings of I can now be viewed as one-to-one matchings of I (1) .Let µ be a matching of I. Create the corresponding matching µ (1) of I (1) as follows: when h i is matched to residents r j 1 , r j 2 , . . ., r j k in µ and these residents are arranged according to its preference, let h i,1 , h i,2 , . . ., h i,k be matched to r j 1 , r j 2 , . . ., r j k respectively in µ (1) .Notice that µ and µ (1) have the same size.Moreover, it is easy to verify that this mapping is a bijection from the set of stable matchings of I to the set of stable matchings of I (1) .Now, suppose we want to compare µ with another matching σ of I.The task becomes equivalent to comparing µ (1) and σ (1) in I (1) , and the symmetric difference technique described in the previous paragraph can now be applied.Proposition 1.In the HR instance I, let µ be a stable matching and σ be a maximum matching of I.
The previous example shows that the bound in Proposition 1 is tight.

HR+SN and Max-HR+SN
Following the above terminology, we shall call the problem of finding a locally stable matching and a maximum locally stable matching in the Arcaute-Vassilvitskii's model HR+SN and max-HR+SN respectively, where SN stands for social network.We will, however, revert back to the original context and use firms in place of hospitals and workers in place of residents.An instance of HR+SN is an ordered pair (I, G) where I is an HR instance and G is a social network of the workers.
Example continued.In the previous example, suppose G consists of two cliques, one containing r 1 , r 2 , r 3 , r 4 and another containing r 5 , r 6 , r 7 , r 8 .Then σ is a maximum locally stable matching of (I, G).It has several blocking pairs-(h 1 , r 1 ), (h 1 , r 2 ), (h 2 , r 3 ), (h 2 , r 4 )-but none of the pairs have a point of contact.Proposition 2. If µ is a locally stable matching in the HR+SN instance (I, G), then µ (1) is a locally stable matching in the HR+SN instance (I (1) , G).
Proof.Assume µ (1) is not a locally stable matching of (I (1) , G) so it has a local blocking pair (f ik , w j ).Thus, f ik and w j have a point of contact, say w , who is also the only employee of f ik in µ (1) .If w j is unmatched or is employed by a firm that is not a clone of f i in µ (1) , then (f i , w j ) is a local blocking pair of µ with w as a point of contact-a contradiction.If w j is employed by a clone of f i in µ (1) , say f ik , then the fact that w j prefers f ik over f ik means that k < k .On the other hand, f ik prefers w j over its only employee w means that f i prefers w j over w .However, this contradicts the way µ (1) is constructed because f i should prefer the worker matched to f ik over the worker matched to f ik .Hence, we have shown that all cases lead to a contradiction.Therefore, µ (1) is a locally stable matching of (I (1) , G).
We note though that the converse of Proposition 2 is not always true as shown by this simple instance (I (1) , G) where and G consists of the edge w 1 w 2 .Consider µ (1) = {(f 11 , w 1 }.It has a blocking pair (f 12 , w 2 ) but f 12 and w 2 have no points of contact because f 12 has no employee.Hence, µ (1) is a locally stable matching of (I (1) , G).Now, I (1) corresponds to the instance I where f 1 has a capacity of two, f 1 has the same preference list as f 11 and f 12 and both w 1 and w 2 have a preference list with only f 1 in it.Thus, µ (1)  corresponds to the matching µ = {(f 1 , w 1 )}.The latter though is not a locally stable matching of (I, G) because (f 1 , w 2 ) is a local blocking pair with w 1 as a point of contact.
In the next proposition, we provide a bound similar to Proposition 1.
Proposition 3. In the HR+SN instance (I, G), let µ be a stable matching and μ be a maximum locally stable matching.When we appended our running example with the social network consisting of a clique containing r 1 , r 2 , r 3 , r 4 and another clique containing r 5 , r 6 , r 7 , r 8 , σ is a maximum locally stable matching.Its size is twice that of µ.This shows that the bound of Proposition 3 is tight.The next proposition describes the interaction between the preference lists in I and the edges in G. Proposition 4. Let (I, G) be an HR instance.Suppose two workers w 1 and w 2 do not have a firm in common in their preference list or, equivalently, there is no firm that has w 1 and w 2 in its preference list.Let e = {w 1 , w 2 }.Then (I, G − e) and (I, G + e) have the same set of locally stable matchings as (I, G).
Proof.Without loss of generality, assume e is an edge of G.It is easy to verify that when G is a subgraph of G, every locally stable matching of (I, G) is also a locally stable matching of (I, G ). Thus, to prove the proposition, we simply have to show that every locally stable matching of (I, G − e) is also a locally stable matching of (I, G).
Suppose µ is a locally stable matching of (I, G − e) but has a local blocking pair (f, w) in (I, G).Let f and w's point of contact be w .Hence, both w and w have f in their preference lists; that is, {w, w } = {w 1 , w 2 }.Thus, the edge {w, w } is in G − e so that (f, w) is also a local blocking pair of µ in (I, G − e), a contradiction.It follows that µ has no blocking pairs in (I, G).
We have shown that µ is a locally stable matching of (I, G) if and only if it is also a locally stable matching of (I, G−e).The same argument holds for the locally stable matchings of (I, G) and (I, G+e) when e is not an edge of G.
In Section 4, we shall consider max-HR+SN.Given an HR+SN instance (I, G), let A be an algorithm that outputs a locally stable matching of (I, G), which we denote as A(I, G).Then A is an f (N )-approximation algorithm of max-HR+SN if for all instances (I, G) of size N , |µ * (I, G)|/|A(I, G)| ≤ f (N ) where µ * (I, G) is a maximum locally stable matching of (I, G).Thus, according to Proposition 3, the Gale-Shapley algorithm is a 2-approximation algorithm of max-HR+SN.The problem max-HR+SN is NP-hard to approximate within f (N ) if the existence of an efficient f (N )-approximation algorithm implies P = NP.

The Easy Cases
In this section, we present a family of HR+SN instances where finding a maximum locally stable matching can be solved in polynomial time.
Theorem 1.Let (I, G) be an HR+SN instance.Suppose that whenever two workers have a firm in common in their preference lists, the two workers also share an edge in G. Then every stable matching of I is a maximum locally stable matching of (I, G).Consequently, when G is the complete graph, every stable matching of I is a maximum locally stable matching of (I, G).
Proof.For now, assume that all firms in I have capacity 1. Suppose (I, G) has a locally stable matching σ that is larger than the stable matchings of I. Let µ be one of these stable matchings.Then σ µ has a σ-alternating path of the form f 1 , w 1 , f 2 , w 2 , . . ., f k , w k such that (f i , w i ) ∈ σ for i = 1, . . ., k and (f i+1 , w i ) ∈ µ for i = 1, . . ., k − 1.Since f 1 is unmatched in µ, w 1 must prefer f 2 over f 1 ; otherwise, (f 1 , w 1 ) is a blocking pair of µ.Now w 1 and w 2 both have f 2 in their preference lists so they share an edge in G.It must be the case then that f 2 prefers w 2 over w 1 ; otherwise, (f 2 , w 1 ) is a local blocking pair of σ.Continuing in this fashion, we have that for i = 1, . . ., k − 1, w i prefers f i+1 over f i because µ is a stable matching of I while f i+1 prefers w i+1 over w i because w i and w i+1 are adjacent in G and σ is a locally stable matching of (I, G).Consequently, f k must prefer w k over w k−1 .However, w k is unmatched in µ so this implies that (f k , w k ) is a blocking pair of µ-a contradiction.Hence, σ cannot exist, and µ is a maximum locally stable matching of (I, G).
So suppose some firms in I have capacity greater than 1.Construct the HR+SN instance (I (1) , G) from (I, G).Notice that the property "whenever two workers have a firm in common in their preference lists, the two workers also share an edge in G" is preserved in (I (1) , G).Let σ be a locally stable matching of (I, G), and let µ be a stable matching of I. Consider their corresponding matchings σ (1)  and µ (1) .From Proposition 2, σ (1) is also a locally stable matching of (I (1) , G).We also know that µ (1)  is a stable matching of I (1) .If |σ| > |µ|, |σ (1) | > |µ (1) |.However, all firms in I (1) have capacity 1, and according to the previous paragraph µ (1) is a maximum locally stable matching of (I (1) , G).Hence, |σ| ≤ |µ|, and µ is a maximum locally stable matching of (I, G).It is easy to see that, as a consequence of Proposition 4, if G is extended to a complete graph, the result still holds.
The next theorem provides a bound that is different from the one presented in Proposition 3. It shows that when G is almost a complete graph, a stable matching of I and a maximum locally stable matching of (I, G) will almost have the same size.
Theorem 2. Let (I, G) be an HR+SN instance.Suppose that the size of the largest matching in Ḡ, the complement of G, is r.Let μ be a maximum locally stable matching of (I, G) and µ be a stable matching of I. Then |μ| ≤ |µ| + r.
We now consider the opposite case of Theorem 1.
Theorem 3. Let (I, G) be an HR+SN instance.Suppose that whenever two workers have a firm in common in their preference lists, the two workers do not share an edge in G. Then the matchings of I are exactly the locally stable matchings of (I, G).Hence, every maximum matching of I is a maximum locally stable matching of (I, G).Consequently, when G is the empty graph, the matchings of I are exactly the locally stable matchings of (I, G), and every maximum matching of I is a maximum locally stable matching of (I, G).
Proof.Let µ be an arbitrary matching of I. Suppose µ is not stable and contains a blocking pair (f, w).In order for (f, w) to be a local blocking pair, f and w must have a point of contact w ; i.e., both w and w have f in their preference lists, and both are neighbors in G.However, by our assumption on G, this cannot be the case.Hence, all blocking pairs of µ are not local so µ is a locally stable matching of (I, G).Thus, every matching of I is a locally stable matching of (I, G).Since every locally stable matching of (I, G) is also a matching of I, it follows that the matchings of I are exactly the locally stable matchings of (I, G).The rest of the theorem follows.
In this next theorem, we consider the case when G is almost an empty graph.
Theorem 4. Suppose that in the HR+SN instance (I, G), G has a constant number of edges.Then a maximum locally stable matching of (I, G) can be found in time polynomial in |I|.
Proof.Let W 1 ⊆ W be the smallest set of workers whose induced subgraph G 1 in G contains all the r edges of G. Let W 2 = W − W 1 , and let G 2 be the subgraph induced by W 2 , which in this case is an empty graph.Thus, G = G 1 ∪ G 2 .Furthermore, every matching µ of I can be expressed as µ 1 ∪ µ 2 where each µ i is a matching involving the workers in W i , for i = 1, 2. Let I 1 be the HR instance derived from I by restricting the set of workers to W 1 .With some abuse in notation, let I − µ 1 be the HR instance obtained from I by removing the workers matched in µ 1 and decreasing the capacities of the firms according to the number of matches they received in µ 1 .Thus, µ 1 is a matching of I 1 and µ 2 is a matching of I − µ 1 .Conversely, if µ 1 is a matching of I 1 and µ 2 is a matching of I − µ 1 , putting them together as µ = µ 1 ∪ µ 2 results in a matching of I.
It is also straightforward to verify that when µ is a locally stable matching of (I, G), µ 1 and µ 2 are locally stable matchings of (I 1 , G 1 ) and (I − µ 1 , G 2 ) respectively.Let us now argue the converse.Suppose µ 1 and µ 2 are locally stable matchings of (I 1 , G 1 ) and (I −µ 1 , G 2 ) respectively but µ has a local blocking pair (f, w) whose point of contact is w 1 .Thus, in µ, f has an opening or prefers w over its worst employee w 2 , and that w is either unmatched or prefers f over her current employer.Furthermore, since G 2 is an empty graph, w and w 1 must both be in W 1 and neighbors in G 1 .If f has an opening in µ or w 2 is in W 2 , then f has an opening after the matching µ 1 so (f, w) is a local blocking pair of µ 1 .On the other hand, if w 2 is in W 1 , then f prefers w to its worst employee w 2 in µ 1 so that (f, w) is again a local blocking pair of µ 1 .All cases lead to a contradiction.Thus, µ must be a locally stable matching of (I, G).
To find a maximum locally stable matching of (I, G), we do what is essentially a brute force method.We consider all possible matchings of I 1 .For each such matching µ 1 , we check to see if µ 1 is a locally stable matching of (I 1 , G 1 ).If it is, we construct I − µ 1 and then find a maximum matching µ 2 of the instance.According to Theorem 3, µ 2 is a maximum locally stable matching of (I − µ 1 , G 2 ) since G 2 is an empty graph.If µ = µ 1 ∪ µ 2 is currently the largest locally stable matching of (I, G) we have seen, we store µ; otherwise, we move on to the next matching of I 1 .
There are at most 2r workers in W 1 .Each one is either unmatched or employed by one of the |F | firms.Thus, the number of possible matchings of

Hardness Results
An SMI (Stable Marriage with Incomplete Lists) instance is just like an HR instance, only that all firms have capacity 1.Hence, all of its stable matchings have the same size.An SMTI (Stable Marriage with Ties and Incomplete Lists) instance is an SMI instance except that the participants' preference lists are allowed to contain ties.For this problem, a pair (f, w) is a blocking pair of matching µ if (i) (f, w) is an acceptable pair; (ii) f has an opening or f strictly prefers w to its only employee under µ; and (iii) w is unemployed or w strictly prefers f to her employer under µ.Once again, a matching is (weakly) stable if it has no blocking pairs.Unlike SMI instances, the stable matchings of an SMTI instance can have different sizes.In this section, we will show that certain kinds of SMTI instances can be encoded as HR+SN instances.This will allow us to translate hardness results known for max-SMTI, the problem of computing a maximum (cardinality) stable matching of an SMTI instance, to max-HR+SN.
Let I be an SMTI instance.Suppose the ties in the preference lists of I are broken arbitrarily to create the SMI instance I .Clearly, every stable matching of I is also a stable matching of I.The converse, however, is not true.Let us say that the ties in I are consistent if for every pair of participants q and q , whenever q and q appear in the preference lists of p and p , q and q are in a tie in the preference list of p if and only if they are also in a tie in the preference list of p .In the next theorem, we show that when only the firms' preference lists contain ties and these ties are consistent, then the stable matchings of I can be retrieved from I by considering the locally stable matchings of (I , G), where G is constructed appropriately.
Theorem 5. Let I be an SMTI instance where only the firms' preference lists contain ties, and the ties are consistent.Let I be the SMI instance obtained by breaking the ties in the preference lists of I arbitrarily.Let G be a graph such that whenever two workers w and w appear together in some firm's preference list in I, w and w are adjacent if and only if they are not in a tie.Then the following are true: (i) Every stable matching of I is also a locally stable matching of (I , G). (ii) Every locally stable matching µ of (I , G) can be transformed into a stable matching µ of I such that |µ| ≥ |µ | in time polynomial in the size of I. Consequently, every maximum locally stable matching of (I , G) can be transformed into a maximum stable matching of I of the same size in time polynomial in |I|.
Proof.For (i), let µ be a stable matching of I. Suppose µ is not a locally stable matching of (I , G), and (f, w) is one of its local blocking pairs with w as a point of contact.Since f has capacity 1, w is the only employee of f and f prefers w over w .In order for (f, w) to not to be a blocking pair of µ in I, w and w must be in a tie in f 's preference list in I.However, this cannot be the case-w and w are adjacent in G and ties are consistent in I. Hence, µ cannot have a local blocking pair in (I , G) and must therefore be a locally stable matching of the instance.
For (ii), suppose µ is a locally stable matching of (I , G).Let (f, w) be a blocking pair of µ in I. Without loss of generality, assume that w is the worker that f prefers the most among those that form a blocking pair with f .First, we note that f cannot be matched in µ .Otherwise, if it is matched to some worker w 1 then f must strictly prefer w over w 1 so that w and w 1 are adjacent in G.In (I , G), (f, w) has w 1 as a point of contact, implying that µ cannot be a locally stable matching because (f, w) is a local blocking pair.Since this is a contradiction, f has to be unmatched in µ .Next, if w is unmatched in µ , let µ = µ ∪ {(f, w)}; otherwise, let µ = µ − {(µ (w), w)} ∪ {(f, w)}.If µ has a local blocking pair, it will involve either f or w.By our choice of w, no worker will form a local blocking pair with f .If (f 1 , w) is a local blocking pair of µ , then (f 1 , w) must be a local blocking pair of µ too-a contradiction.Hence, µ is still a locally stable matching of (I , G).
What we have shown is that as long as a locally stable matching of (I , G) has a blocking pair with respect to I, the matching can be modified to a new matching (which no longer admits that blocking pair with respect to I) such that (i) its size stays the same or is larger by 1; and (ii) the modified matching is still a locally stable matching of (I , G) where one worker's employer improved while everyone else's stayed the same.If we keep applying this modification, at some point there will be no more worker whose employer can be improved.The locally stable matching of (I , G) obtained after this process will also be a stable matching of I.
Checking whether µ is a stable matching of I, finding a blocking pair of µ if it is not, and finding a worker that f prefers the most among those that form a blocking pair with f can be done in time polynomial in the size of I. Since the number of modifications cannot be more than |F | × |W |, it follows that starting at a locally stable matching µ of (I , G), we can arrive at a stable matching µ of I such that |µ| ≥ |µ | in time polynomial in the size of I.
Finally, we note from (i) that a maximum locally stable matching of (I , G) is at least as large as a maximum stable matching of I. Hence, if a maximum locally stable matching of (I , G) is also a stable matching of I, it must be a maximum stable matching of I. Our argument in the previous paragraphs shows that the last part of (ii) is true.
In the statement of Theorem 5, we simply described what edges should be in G: whenever two workers w and w appear together in some firm's preference list in I, w and w are adjacent if and only if they are not in a tie.That is, we are ambivalent about edges formed by workers that do not appear together in a firm's preference list in I since according to Proposition 4, the absence or presence of these edges in G have no effect on the set of locally stable matchings of (I, G).
Consistent ties arise naturally when firms and/or workers derive their preference lists from a master list [13].A master list of workers L W is an ordering of all the workers that may or may not contain ties.Each firm's preference list contains all the workers acceptable to it and ranked in accordance with the master list.Thus, when w and w is part of the preference list of a firm f , they are in a tie in f 's list if and only if they are in a tie in L W .A master list of firms L F is defined similarly, and each worker's preference list is obtained in the same way.Let SMTI-2ML denote the SMTI problem where both groups of participants derived their preference lists from a master list.The following result is known about SMTI -2ML.Fact 1. (Irving et al. [13]) Suppose that in the SMTI-2ML instance I, there are n firms and n workers.Determining if (I, G) has a stable matching of size n is NP-complete even if the ties occur in one master list only.The result holds even when (i) there is only one tie in that master list or (ii) all the ties are of length 2.
We now translate this result to HR+SN.Theorem 6. Suppose that in the HR+SN instance (I, G), there are n firms and n workers, and each firm has capacity 1.Let K z denote the complete graph on z vertices.Determining if I has a locally stable matching of size n is NP-complete, even when G ∼ = K n − K n where n < n or G ∼ = K n − F where F is a matching in K n .
Proof.Let I be an SMTI-2ML instance with n firms and n workers, and the ties occur in one master list only.Without loss of generality, assume that it is the firms' master list of workers that contains the ties.Create the HR+SN instance (I , G) according to Theorem 5.If there is an efficient algorithm for determining if (I , G) has a locally stable matching of size n, which is clearly a maximum locally stable matching of (I , G), then there is also an efficient algorithm for determining if I has a stable matching of size n.However, Fact 1 states that the latter is an NP-complete problem.It follows that determining if (I , G) has a locally stable matching of size n is also NP-complete.The form of G is based on Proposition 4, Fact 1 and Theorem 5.
Next, we argue that max-HR+SN is NP-hard to approximate by appealing to the details of the following result of Halldórsson et al. [14] with regards to approximating max-SMTI.Proof.To prove Fact 2, Halldórsson et al. [14] relied on a result of Dinur and Safra [15] about approximating a minimum vertex cover of a graph.Given a graph H = (V, E), we now describe how they constructed the SMTI instance I H .Note that we shall use firms in place of men and workers in place of women.For each vertex v i of H, create three firms v A i , v B i , v C i , and three workers v a i , v a i , v c i .Thus, there are a total of 3|V | firms and 3|V | workers.Suppose v i is adjacent to Here are the preference lists of the firms and workers corresponding to v i : Clearly, I H can be constructed from H in time polynomial in the size of H. Also, notice that the ties in I H are consistent since v a i and v b i appear together in v B i 's preference list only.Using the reduction in Theorem 5, let (I H , G) be the HR+SN instance that corresponds to I H . Let s + (I H ) and s + (I H , G) denote the sizes of a maximum stable matching in I H and a maximum locally stable matching in (I H , G) respectively.According to Theorem 5, s + (I H ) = s + (I H , G).Let β − (H) denote the size of a minimum vertex cover of H.They showed that s + (I H ) = 3|V |− β − (H).Since β − (H) is NP-hard to approximate, it follows that s + (I H ) is also NP-hard to approximate.Since s + (I H ) = s + (I H , G), and HR+SN instance (I H , G) can be constructed from I H in polynomial time, we also have that s + (I H , G) is NP-hard to approximate.We refer readers to [14] for the derivation of the factor 21/19 − δ.

Final Remarks
Theorem 7 provides a lower bound while Proposition 3 provides an upper bound to the factor of the best approximation algorithm for max-HR+SN.Can this gap be narrowed?We suspect that the answer is yes since the source of our hardness results, max-SMTI, has a number of 3/2-approximation algorithms [16][17][18].An important strategy in these algorithms is to come up with a stable matching µ such that if µ * is a maximum stable matching of the instance, there is no length-3 µ * -alternating path in µ * µ.In other words, in all µ * -alternating paths in µ * µ, the ratio of the number of µ * -edges to the number of µ-edges is at most 3 : 2. We end with the theorem below, which shows that for some HR+SN instances, choosing µ to be equal to a stable matching of the instance yields such a result.Theorem 8.In the HR+SN instance (I, G), let W be the set of workers that get matched in every stable matching of I. Suppose that in graph G, whenever w 1 ∈ W and w 2 ∈ W −W have a firm in common in their preference lists, w 1 and w 2 are adjacent in G. Let µ be a stable matching of I and μ be a maximum locally stable matching of (I, G).Then |μ| ≤ 3  2 |µ|.
Proof.Recall the proof of Theorem 1.For now, assume all firms in I have capacity 1.Consider μ µ.
and finding a maximum matching of the instance can all be done in O(poly(|F |, |W |)) time.Hence, finding a maximum locally stable matching of (I, G) takes O((|F | + 1) 2r poly(|F |, |W |)) time, which is polynomial in |F | and |W | when r is a constant.