Skip to main content
Springer logoLink to Springer
. 2019 Nov 14;82(5):1410–1433. doi: 10.1007/s00453-019-00650-0

Stable Matching with Uncertain Linear Preferences

Haris Aziz 1,2, Péter Biró 3,4, Serge Gaspers 1, Ronald de Haan 5, Nicholas Mattei 6, Baharak Rastegari 7,
PMCID: PMC7066306  PMID: 32214575

Abstract

We consider the two-sided stable matching setting in which there may be uncertainty about the agents’ preferences due to limited information or communication. We consider three models of uncertainty: (1) lottery model—for each agent, there is a probability distribution over linear preferences, (2) compact indifference model—for each agent, a weak preference order is specified and each linear order compatible with the weak order is equally likely and (3) joint probability model—there is a lottery over preference profiles. For each of the models, we study the computational complexity of computing the stability probability of a given matching as well as finding a matching with the highest probability of being stable. We also examine more restricted problems such as deciding whether a certainly stable matching exists. We find a rich complexity landscape for these problems, indicating that the form uncertainty takes is significant.

Keywords: Stable matchings, Stable marriage problem, Uncertain preferences, NP-hard problems, Polynomial-time algorithms

Introduction

We consider a Stable Marriage problem (SM) in which there is a set of men and a set of women. Each man has a linear order over the women, and each woman has a linear order over the men. For the purpose of this paper we assume that the preference lists are complete, i.e., each agent finds each member of the opposite side acceptable.1 In the stable marriage problem, the goal is to compute a stable matching; a matching where no two agents prefer to be matched to each other rather than to be matched to their current partners. Unlike most of the literature on stable matching problems [13, 19, 27], we assume that men and women may have uncertainty in their preferences which can be captured by various probabilistic uncertainty models. We focus on linear models in which each possible deterministic preference profile is a set of linear orders.

Uncertainty in preferences could arise for a number of reasons, both practical or epistemological. For example, an agent could express a weak order because the agent did not invest enough time or effort to differentiate between potential matches and therefore one could assume that each linear extension of the weak order is equally likely; this maps to our compact indifference model. In many real applications, the ties are broken randomly with lotteries, e.g., in the school choice programs in New York and Boston as well as in centralized college admissions in Ireland. However, a central planner may also choose a matching that is optimal in some sense, without breaking the ties in the preference list. For instance, in Scotland they used to compute the maximum size (weakly) stable matching to allocate residents to hospitals [19]. Alternatively, there may be a cost associated with eliciting preferences from the agents, so a central planner may want to only obtain and provide a recommendation based on a subset of the complete orders [9, 24]. Another cause of uncertainty could be that agents are certain about preferences over other agents according to specific criteria but there may be a probability distribution corresponding to the weight placed on different criteria. This motivates our lottery and joint probability models. In the lottery model, the agents have independent probabilities over possible linear orders, i.e., each linear order may correspond to a different criterion. In the joint probability model, the probability distribution is over possible preference profiles.

Uncertainty in preferences has already been studied in voting [15] and for cooperative games [18]. Ehlers and Massó [10] considers many-to-one matching markets under a Bayesian setting. Similarly, in auction theory, it is standard to examine Bayesian settings in which there is a probability distribution over the types of agents. In the two-sided matching setting, when preferences are uncertain, a natural solution is finding a matching which has the highest probability of being stable. We consider this fundamental computational problem and its related variants for the three uncertainty models discussed above.

To illustrate the problem, we describe a simple example with four agents. We write bac to say that agent a prefers b to c and assume the lottery model.

Example 1

We have two men m1 and m2 and two women w1 and w2. Each agent assigns a probability to each strict preference ordering as follows. (i) p(w1m1w2)=0.4 and p(w2m1w1)=0.6 (ii) p(w1m2w2)=0.0 and p(w2m2w1)=1.0 (iii) p(m1w1m2)=1.0 and p(m2w1m1)=0.0 (iv) p(m1w2m2)=0.8 and p(m2w2m1)=0.2.

This setting admits two matchings that are stable with positive probability: μ1={(m1,w1),(m2,w2)} and μ2={(m1,w2),(m2,w1)}. Notice that if each agent submits the preference list that s/he finds most likely to be true, then the setting admits a unique stable matching that is μ2. The probability of μ2 being stable, however, is 0.48 whereas the probability of μ1 being stable is 0.52 (Tables 1, 2).

Table 1.

Pairwise probabilities for the agents in Example 1

Men Women
m1p(w1m1w2)=0.4p(w2m1w3)=0.6 w1p(m1w1m2)=1.0p(m2w1m3)=0.0
m2p(w1m2w2)=0.0p(w2m2w3)=1.0 w2p(m1w2m2)=0.8p(m2w2m3)=0.2

Table 2.

Stability probability for each matching in Example 1

Matching Stability probability
μ1 {(m1,w1),(m2,w2)} 0.52
μ2 {(m1,w2),(m2,w1)} 0.48

Uncertainty Models

In this article, we consider three different uncertainty models which assume that agents have linear preferences. In related work we have explored similar computational questions when agents define their uncertainty over pairwise preferences [3].

  • Lottery Model For each agent, we are given a probability distribution over strict preference lists.

  • Compact Indifference Model Each agent reports a single weak preference list that allows for ties. Each complete linear order extension of this weak order is assumed to be equally likely.

  • Joint Probability Model A probability distribution over preference profiles is specified.

Note that for the Lottery Model and the Joint Probability Model the representation of the input preferences can be exponentially large (in the number of agents). However, in settings where similar models of uncertainty are used, including resident matching [9] and voting [15], a limited amount of uncertainty (i.e. small supports) is commonly expected and observed in real-world data [21, 22]. Consequently, we consider special cases when the uncertainty is bounded in certain natural ways, including the existence of only a small number of uncertain preferences and/or uncertainty on only one side of the market.

Observe that the compact indifference model can be represented as a lottery model. This is a special case of the lottery model in which each agent expresses a weak order over the candidates, similar to the SMT setting [13, 19]. However, the lottery model representation can be exponentially larger than the compact indifference model; for an agent that is indifferent among n agents on the other side of the market, there are n! possible linearly ordered preferences. The uncertainty models considered in the paper have further been examined in the context of Pareto optimal assignment of items to agents [46]. In a subsequent paper, Chen et al. [7] consider additional problems related to the joint probability model.

Computational Problems

Given a stable marriage setting where agents have uncertain preferences, various natural computational problems arise. Let stability probability denote the probability that a matching is stable. We then consider the following two natural problems for each of our uncertainty models.

  • StabilityProbability Given a matching and uncertain preferences of the agents, what is the stability probability of the matching?

  • MatchingWithHighestStabilityProbability Given uncertain preferences of the agents, compute a matching with the highest stability probability.

We also consider two specific problems that are simpler than StabilityProbability:

  • IsStabilityProbabilityNon-Zero For a given matching, is its stability probability non-zero?

  • IsStabilityProbabilityOne For a given matching, is its stability probability one?

We additionally consider problems connected to, and more restricted than, MatchingWithHighestStabilityProbability

  • ExistsCertainlyStableMatching Does there exist a matching that has stability probability one?

  • ExistsPossiblyStableMatching Does there exist a matching that has non-zero stability probability?

Note that ExistsPossiblyStableMatching is straightforward to answer for any of the three uncertainty models we consider here, since there exists a stable matching for each deterministic preference profile that is a possible realization of the uncertain preferences.

Results

Table 3 summarizes our main findings. Note that the complexity of each problem is considered with respect to the input size, and that under the lottery and joint probability models the size of the input could be exponential in n, namely O(n!·2n) for the lottery model and O((n!)2n) for the joint probability model, where n is the number of agents on either side of the market.

Table 3.

Summary of results

Problems Lottery model Compact indifference Joint probability
StabilityProbability #P-complete ? in P
in P for all three models if 1 side is certain
IsStabilityProbabilityNon-Zero NP-complete in P in P
IsStabilityProbabilityOne in P in P in P
ExistsPossiblyStableMatching in P in P in P
ExistsCertainlyStableMatching in P in P NP-complete
MatchingWithHighestStabilityProb ? NP-hard NP-hard
in P for all models if 1 side is certain and
there is O(1) number of uncertain agents

We point out that StabilityProbability is #P-complete for the lottery model even when each agent has at most two possible preferences, but in P if one side has certain preferences. Additionally, we show that IsStabilityProbabilityNon-Zero is in P for the lottery model if each agent has at most two possible preferences. Note that StabilityProbability is open for the compact indifference model when both sides may be uncertain, and we also do not know the complexity of MatchingWithHighestStabilityProbility in the lottery model, except when only a constant number of agents are uncertain on the same side of the market.

Preliminaries

In the Stable Marriage problem, there are two sets of agents. Let M denote a set of n men and W a set of n women. We use the term agents when making statements that apply to both men and women, and the term candidates to refer to the agents on the opposite side of the market to that of an agent under consideration. Each agent has a linearly ordered preference over the candidates. An agent may be uncertain about his/her linear preference ordering. Let L denote the uncertain preference profile for all agents.

We say that a given uncertainty model is independent if any uncertain preference profile L under the model can be written as a product of uncertain preferences La for all agents a, where all La’s are independent. Note that the lottery and the compact indifference models are both independent, but the joint probability model is not.

A matchingμ is a pairing of men and women such that each man is paired with at most one woman and vice versa; defining a list of (man, woman) pairs (mw). We use μ(m) to denote the woman w that is matched to m and μ(w) to denote the match for w. Assume that each agent prefers being matched to remaining unmatched. Given linearly ordered preferences, a matching is stable if there is no pair (mw) not in μ where m prefers w to his partner in μ, i.e., wmμ(m), and vice versa. If such a pair exists, it constitutes a blocking pair; as the pair would prefer to defect and match with each other rather than stay with their partner in μ. A matching μ is a complete matching if all agents are matched in μ. A matching is certainly stable if it is stable with probability 1. For an instance I=(M,W,L) and matching μ, let p(μ,I) denote the probability of μ being stable, and let pS(I)=max{p(μ,I):μisamatchinginI}, that is the maximum probability of a matching being stable for I.

The following extensions of SM will come in handy in proving our results. The Stable Marriage Problem with Partially Ordered Lists (SMP) is an extension of SM in which agents’ preferences are partial orders over the candidates. An instance I=(M,W,p) of SMP is given by a set of n men M, a set of n woman W, and the partial preference ordering profile of agents p where pa denotes the partial order that represents the preferences of agent a. If for a given agent a and two candidates b and c we have that neither b is related to c nor c is related to b then a cannot compare b and c. The Stable Marriage problem with Ties (SMT) is a special case of SMP in which incomparability is transitive and is interpreted as indifference. Therefore, in SMT each agent partitions the candidates into different ties (equivalence classes), is indifferent between the candidates in the same tie, and has strict preference ordering over the ties. In some practical settings some agents may find some candidates unacceptable and prefer to remain unmatched than to be matched to the unacceptable ones. SMP with Incomplete Lists (SMPI) and SMT with Incomplete lists (SMTI) captures these scenarios where each agent’s partially ordered list contains only his/her acceptable candidates. Three stability criteria, including the one we have already defined, have been introduced in the literature to capture different degrees of stability for these richer domains. The weakest criterion, that is the one we have already defined, is (weak) stability. A matching is (weakly) stable in an instance of SMPI if there is no pair (m,w)μ where m (strictly) prefers w to his partner in μ and vice versa. The strongest criterion, referred to by super-stability, is closely related to our notion of certain stability. A matching is super-stable in an instance of SMPI if there is no pair (mw) not in μ where m either prefers w to his partner in μ or finds them incomparable, and vice versa. If such a pair exists, it constitutes a very weakly blocking pair. It is easy to observe (see, e.g., [17]) that μ is super-stable if and only if it is stable w.r.t. all linear extensions of the partially ordered lists.

We define the certainly preferred relation acert for agent a. We write bacertc if and only if agent a prefers b over c with probability 1. Based on the certainly preferred relation, we can define a dominance relation D: Dm(w)={w}{w:wmcertw}; Dw(m)={m}{m:mwcertm}. Based on the notion of the dominance relation, we present a useful characterization of certainly stable matchings for independent uncertainty models.

Lemma 1

A matching μ is certainly stable for an independent uncertainty model if and only if for each pair (mw), μ(m)Dm(w) or μ(w)Dw(m).

Proof

Assume that for each pair (mw) we have that μ(m)Dm(w) or μ(w)Dw(m) for a given matching μ. This implies that for each unmatched pair (mw) it is the case that μ(m)mcertw or μ(w)wcertm and hence (mw) has zero probability of forming a blocking pair. It thus follows that μ is certainly stable.

Assume that a matching μ is certainly stable. Then no pair (mw) has non-zero probability of forming a blocking pair. This is only possible if the pair (mw) is part of the matching or one of m and w have zero probability of preferring the partner in (mw) over their current partner in μ. In either case, μ(m)Dm(w) or μ(w)Dw(m).

We point out that the certainly preferred relation can be computed in polynomial time for all three models studied in this paper.

General Results

In this section, we first show that the complexity of all problems that we study is the same for complete and incomplete lists. We then present some general results that apply to multiple uncertainty models. We show that ExistsCertainlyStableMatching can be solved in polynomial time for a class of independent uncertainty models that includes lottery and compact indifference. We then prove that, when the number of uncertain agents is constant and one side of the market is certain, we can solve MatchingWithHighestStabilityProbability efficiently for each of the linear models.

The Case for Incomplete Lists

The claims in this section explain that our efficient algorithms described for the case of complete lists can be extended to incomplete lists. Additionally, our hardness proofs for incomplete lists can be modified to extend to complete lists. In fact, all our hardness reductions, except Theorem 9, are for complete lists and so they trivially extend to the case of incomplete lists.

In the case of complete lists, we assumed that we have an equal number of men and women and everybody finds all candidates acceptable. When we consider the problem with incomplete lists we mean that the sizes of the two sets are not necessarily the same and not all the candidates are acceptable to all agents. However, we assume that in all realization of the preference profiles the same candidates are acceptable, so we only randomize on the preferences over the acceptable partners.

Proposition 1

The computational complexity of StabilityProbability is the same for complete and incomplete lists.

Proof

We show that if I is an instance of a linear probabilistic model with incomplete lists and μ is a given matching for I then we can, in linear time, construct an extended instance I with complete lists and a complete matching μ for I such that the stability probability of μ under I, p(μ,I), is equal to the stability probability of μ under I, p(μ,I).

Assume, without loss of generality, that |M||W|. From I we create an extended instance I with sets M and W in the following way. First we ensure that |M|=|W| by adding enough agents to the woman’s side of the market if necessary. Then we complete the preference lists of each agent by adding the previously unacceptable or nonexistent candidates to the end of her/his list according to a predetermined order, e.g., by the indices of the agents. Suppose now that μ is a matching in I and X is the set of matched men in M, whilst μ(X)=Y. Let E denote the set of acceptable pairs in I. We assume that there is no pair (m,w)(M\X)×(W\Y) belonging to E, since in this case this pair would certainly block μ in I, thus p(μ,I)=0 trivially. Let us now extend μ to another matching μ in I by appending to μ the unique stable matching for the subinstance restricted to the unmatched agents. Namely, let μu be the stable matching that matches M\X to W\Y in such a way that the kth pair contains the kth man and the kth woman from M\X and W\Y, respectively according to their indices, and let μ=μμu.

We claim that p(μ,I)=p(μ,I). This is because there is no blocking pair in (M\X)×(W\Y), and any other pair is blocking for some preference profile in I if and only if it is blocking for the corresponding preference profile in I. To verify the latter statement, first consider a pair (m,w)X×Y. If (m,w)E then the partners of m and w are the same in μ and μ and the ranks of m are the same in the corresponding preference profiles of w, and vice versa. If (m,w)E then this pair cannot block in any preference profile. Similarly, let us consider a pair (mw) when exactly one agent is matched in μ, say, m, i.e., (m,w)M×(W\Y). If (m,w)E then m has the same partner in μ and μ, whilst w is unmatched in μ and has a previously unacceptable partner in μ, namely μ(w). Whenever this pair blocks for I then it also blocks for I, since the rank of w is the same in the corresponding preference profiles of m, and w prefers m to μ(w) in all profiles. Finally, if (m,w)E then this pair cannot block in any preference profile, as before.

The above proof implies the following Corollary.

Corollary 1

The computational complexity of IsStabilityProbabilityNon-Zero is the same for complete and incomplete lists, and the same holds for IsStabilityProbabilityOne.

Proposition 2

The computational complexity of MatchingWithHighestStabilityProbability is the same for complete and incomplete lists.

Proof

Suppose that we are given an instance of a linear probabilistic model with incomplete lists I, and we consider the extended instance I with complete preference lists, as described in the proof of Proposition 1. We show that if μ is one of the most stable complete matchings in I then its restriction to E, μ, is one of the most stable matching for I.

First we note that p(μ,I)p(μ,I), since any pair in E that is blocking for μ under some preference profile in I is also blocking for μ under the corresponding extended preference profile in I. Suppose now for a contradiction that there is another matching ν for I such that p(ν,I)>p(μ,I). But then, for its natural extension ν we have p(ν,I)=p(ν,I) by Proposition 1, contradicting with the maximum stability of μ.

The above proof implies the following Corollary.

Corollary 2

The computational complexity of ExistsPossiblyStableMatching is the same for complete and incomplete lists, and the same holds for ExistsCertainlyStableMatching.

An Efficient Algorithm for the Lottery and Compact Indifference Models

As pointed out earlier, certainly stable matchings are closely related to the notion of super-stable matchings [13, 16]. Deciding whether an instance of SMPI admits a super-stable matching or not can be done in polynomial time using algorithm SUPER-SMP in [25]. We next show that for a class of independent uncertainty models that includes the lottery and compact indifference, we can solve ExistsCertainlyStableMatching in polynomial time by a straightforward reduction to the problem of deciding whether an instance of SMP admits a super-stable matching or not.

Theorem 1

For any independent uncertainty model in which the certainly preferred relation is transitive and can be computed in polynomial time, ExistsCertainlyStableMatching can be solved in polynomial time.

Proof

We prove this by reducing ExistsCertainlyStableMatching to the problem of deciding whether an instance of SMP admits a super-stable matching or not. Let I=(M,W,L) be an instance of ExistsCertainlyStableMatching under an independent uncertainty model in which the certainly preferred relation is transitive and can be computed in polynomial time. We construct in polynomial time an instance I=(M,W,p) of SMP, where p is the agents’ partial preference ordering profile, as follows. The set of men and women are unchanged. To create the partial preference ordering pa for each agent a we do the following. Without loss of generality, assume that a is a man m. For every pair of women w1 and w2 (i) if w1mcertw2 then (w1,w2)pm, denoting that m (strictly) prefers w1 to w2 in I, (ii) if w2mcertw1 then (w2,w1)pm, denoting that m (strictly) prefers w2 to w1 in I. We claim that I admits a super-stable matching if and only if I admits a certainly stable matching. It follows from the definition of super-stability that a matching μ in I is super-stable if and only if there is no unmatched pair (mw) where (μ(m),w)pm and (μ(w),m)pw.

() We first prove that if I admits a super-stable matching μ then μ is certainly stable in I. Assume, for a contradiction, that μ is not certainly stable. It then follows Lemma 1 that μ(m)Dm(w) and μ(w)Dw(m), implying that μ(m)mcertw and μ(w)wcertm, and thus (μ(m),w)pm and (μ(w),m)pw. Therefore μ is not super-stable in I, a contradiction.

() Now we prove that if I admits a certainly stable matching μ then μ is super-stable in I. Assume, for a contradiction, that μ is not super-stable in I. Therefore there exists an unmatched pair (mw) where (μ(m),w)pm and (μ(w),m)pw, implying that μ(m)mcertw and μ(w)wcertm. The latter statement, coupled with the fact that m and w are not matched together, implies that μ(m)Dm(w) and μ(w)Dw(m). Thus, by Lemma 1, μ is not certainly stable in I, a contradiction.

An Efficient Algorithm for the Case with a Constant Number of Uncertain Agents

Theorem 2

When the number of uncertain agents is constant and one side of the market is certain, then MatchingWithHighestStabilityProbability is polynomial-time solvable for each of the linear models.

Proof

Let I=(M,W,L) be an instance of MatchingWithHighestStabilityProbability and assume, without loss of generality, that uncertain agents are all men. Let XM be the set of uncertain agents with |X|=k for a constant k. We consider all the possible matchings between X and W; note that their total number is K=n(n-1)(n-k+1). Let μi, i{1K}, be such a matching. The main idea of the proof is to show that there exists an extension of μi to MW, which we denote by μi, that has stability probability at least as high as any other extension of μi. Furthermore, we can compute μi in polynomial time. Therefore, in order to compute a matching that has the highest stability probability, it is enough to generate μi’s, compute their stability probabilities, compare them and select the one with the highest stability probability. The total number of μi’s and hence μi’s is K and hence polynomial in n, we can compute each μi in polynomial time (as we will see later in this proof) and computing the stability probability of a given μi can be done in polynomial time since all uncertain agents are on one side of the market (see Theorem 3 in Section 4, Theorem 8 in Section 5 and Theorem 10 in Section 6).

Take a matching μi between sets X and W. Let Y=μi(X) (i.e., the partners of X in W) and let M=M\X and W=W\Y. Recall that all agents in MW are certain. First, we compute the man-optimal matching μiM for the sub-instance I on MW, that can be done efficiently by the Gale-Shapley algorithm [11]. Consider the matching μi=μiμiM in I. If μi admits a blocking pair (m,w) involving some (certain) agents mM and wY (that we will refer to as a BP_Type1 blocking pair) then we can conclude that any extension of μi to a matching in I will have zero probability of being stable. This is because any extension of μi that has a positive probability of being stable in I must also be stable for the sub-instance I. If (m,w) is a blocking pair for μi then it also blocks any other extension of μi in I, since in all extensions w has the same partner and m cannot have a better partner than in μiM. Therefore we can exclude the extensions of μi from further consideration in this case.

Suppose now that μi=μiμiM admits no BP_Type1 blocking pair. We truncate the preference lists of men in M in the following way. For each man mM we remove from his preference list all the women wW that m prefers less than some woman wY who prefers m to her partner in μi. That is, we remove w from the list of m if there exists wY such that wmw and mwμi(w). To do this, it is enough to identify the first (i.e. the highest ranked) woman w in the preference list of m such that wY and mwμi(w), and then remove from the preference list of m all women wW that appear after w. Let us denote the sub-instance for MW with the truncated lists as Iir. Now we compute the woman-optimal matching μiW in Iir. Let μi=μiμiW. We claim that μi is a complete matching in I and is stable for the certain agents; that is, no blocking pair (mw) exists where both m and w are certain agents. To see this, first note that since μi admits no BP_Type1 blocking pair hence μiM(m) remains in the truncated preference list of all mM. Therefore, the man-optimal matching for Iir is the same as the man-optimal matching for I, μiM, implying that a complete stable matching exists in Iir and that each mM is either matched to the same woman in both μiM and μiW or prefers μiM(m) to μiW(m). As all stable matchings in Iir are of the same size (by the Rural-Hospital Theorem, see e.g. [26]), hence all agent in Iir are matched in μiW and therefore μi is a complete matching for I. Now assume, for a contradiction, that μi is not stable for the certain agents and hence admits a blocking pair (m,w) where mM and wW. Note that wW as otherwise (m,w) blocks μiW in Iir, a contradiction. Therefore, wY. But then we have that wY prefers mM to μi(w) and also that m prefers w to μiW(m), implying that by the construction of the truncated preference lists of men in M, woman μiW(m) must have been removed from m’s preference list, a contradiction. Therefore μi is a complete matching in I and is stable for certain agents.

Finally, we show that for any matching μi+ that is an extension of μi to I, the stability probability of μi+ is less than, or equal to, the stability probability of μi. If μi+ is not stable for the certain agents then μi+ has zero probability of being stable, thus the statement holds. Otherwise, μi+ is stable for the certain agents and hence for any pair (mw) that has a positive probability of being a blocking pair it must be that mX and wW. Moreover, the projection of μi+ onto Iir must be stable in Iir, and as each woman wW is matched in μi to her optimal stable partner under Iir thus w either prefers her partner in μi to her partner in μi+, or is matched to the same partner under both matchings. Therefore, for each deterministic preference profile that has a positive probability of realization under I, if a pair (mw) blocks μi then it must also block μi+, implying that if μi+ is stable under the given preference profile then so is μi, and thus our statement follows.

Lottery Model

In this section, we turn to the lottery model. Recall that in the lottery model, each agent reports a probability distribution over a set of preference orders. We show that even with small supports, computing StabilityProbability is still a computationally hard problem. However, other questions become more tractable with small supports or one side having certain preferences.

Theorem 3

For the lottery model, if one side has certain preferences, StabilityProbability is polynomial-time solvable.

Proof

Without loss of generality, assume that men have certain preferences so each man m has a deterministic preference relation m. We present a polynomial-time computable formula for the probability of μ being stable. For a woman w, we denote her set of possible preferences lists by Pw={wPw1,,wPwkw} with each preference list wPwi having corresponding probability pwi. Let qw be the probability that woman w will not form a blocking pair. The term qw is by definition as follows.

qw=wPwjPw:mMfor whichwmμ(m)andmwPwjμ(w)pwj

So for each wW, qw can be computed in time O(kwn) by scanning over the kw preference lists of woman w and checking in which of them it is not the case that some m prefers w over μ(m) and w prefers m over μ(w). The probability that μ is stable is equal to the probability that no woman is in a blocking pair:

p(μis stable)=wWqw.

Theorem 4

For the lottery model, IsStabilityProbabilityOne can be solved in polynomial time.

Proof

The problem is equivalent to checking whether the given matching μ has non-zero probability of not being stable, i.e., we need only find a single possible blocking pair. This can be checked as follows: for each pair (mw) of agents that are not matched to each other, we check whether either member of this pair can form a blocking pair with a pair in μ with non-zero probability. To do this, we need to check whether m prefers w in some possible preference over μ(m) and whether w prefers m in some possible preference over μ(w). As this only involves checking n2-n possible pairs, each of which can be checked in linear time, this can be done in polynomial time.

Theorem 5

For the lottery model, IsStabilityProbabilityNon-Zero is polynomial-time solvable when each agent has at most two possible preference orderings.

Proof

The problem is to decide whether there is some preference ordering for each agent (among the ones in their lottery) such that the given matching is stable. If each agent has at most two possible preference orderings in their lottery, we can reduce the problem to an instance φ of 2SAT [12], as follows. 2SAT is the problem of deciding whether a given propositional formula in 2CNF is satisfiable. A propositional formula φ is in 2CNF if it is the conjunction of clauses (l1l2) of size 2, where l1 and l2 are propositional literals (propositional variables x or their negation ¬x).

Let {a1,,an} and {b1,,bn} be the two sets of agents. Moreover, for each agent c and each i{1,2}, let pref(c,i) denote the i-th preference in the lottery for agent c.

We introduce a propositional variable for each preference pref(c,i), which we also call pref(c,i). Intuitively, these variables indicate which preference for the agents we choose to make the matching stable.

For each agent c, we add the following clauses to φ, to ensure that for each agent c there is exactly one preference that is selected: (pref(c,1)pref(c,2))(¬pref(c,1)¬pref(c,2)).

Then, we add clauses to ensure that the selected matching is stable. For each agent c and each i{1,2}, let Bc,i be the set of preferences pref(c,i)—for cc and i{1,2}—such that pref(c,i) and pref(c,i) together lead to the given matching being unstable (with (c,c) being a blocking pair). Then, for each ci, we add the following clauses: (¬pref(c,i)¬pref(c,i))for eachpref(c,i)Bc,i.

The given matching is then stable if and only if φ is satisfiable. Since φ is a 2CNF formula, this can be decided in linear time [1].

Theorem 6

For the lottery model, StabilityProbability is #P-complete, even when each agent has at most two possible preferences.

Proof

We show how to count the number of satisfying assignments for a 2CNF formula using the problem StabilityProbability for the lottery model where each agent has two possible preferences. Since this problem is #P-hard, we get #P-hardness also for StabilityProbability [23].

Let φ be a 2CNF formula over the variables x1,,xn. We firstly transform φ to a 2CNF formula φ over the variables x1,,x2n,y1,,y2n that has exactly the same number of satisfying assignments, and that satisfies the property that each clause contains one variable among x1,,x2n and one variable among y1,,y2n. We do so as follows. Firstly, for each 1in, we add the clauses (¬xiyi)(¬yixn+i),  (¬xn+iyn+i) and (¬yn+ixi), ensuring that in each satisfying assignment the variables xixn+iyi and yn+i get assigned the same truth value. Then, for each clause of φ, we replace one occurrence of a variable among x1,,xn by a corresponding variable among y1,,y2n—that is, we replace xi either by yi or by yn+i—and we add the resulting clause to φ. For example, if φ contains the clause (x1¬x3), we could add the clause (x1¬y3) to φ. It is readily verified that φ has the same number of satisfying assignments as φ.

Without loss of generality, we may assume that for each pair xi,xj of variables among x1,,xn, the original formula φ contains at most two distinct clauses that contain both xi and xj. If φ were to contain three or more distinct clauses that contain both xi and xj, we know that at least one of the literals xi,¬xi,xj,¬xj would be entailed by these clauses, and we could instantiate these entailed literals and simplify φ accordingly. For example, if φ contains the clauses (x1x2), (x1¬x2) and (¬x1¬x2), we can simplify φ by instantiating the entailed literals x1 and ¬x2. As a result, we know that we can construct φ in such a way that for any two variables of φ, there is at most one clause of φ that contains both of these variables. For instance, if φ contains the clauses (x1x2) and (¬x1¬x2), we can construct φ in such a way that it contains the clauses (x1y2) and (¬y1¬x2).

We now construct an instance of StabilityProbability. The sets of agents that we consider are {x1,,x2n,a1,,a2n} and {y1,,y2n,b1,,b2n}. The matching that we consider matches xi to bi and matches yi to ai, for each 1i2n as shown below.graphic file with name 453_2019_650_Figa_HTML.jpg

Each agent bi has only a single possible preference, namely one where they prefer xi over all other agents. Similarly, each agent ai has a single possible preference where they prefer yi over all other agents. In other words, the agents ai and bi are perfectly happy with the given matching.

The agents xi and yi each have two possible preferences, that are each chosen with probability 12. These two possible preferences are associated with setting these variables to true or false, respectively. We describe how these preferences are constructed for the agents xi. The construction for the preferences of the agents yi is then entirely analogous.

Take an arbitrary agent xi. We show how to construct the two possible preferences for agent xi, which we denote by pxi and p¬xi. Both of these possible preferences are based on the following partial ranking: b1>b2>>b2n, and we add some of the agents among y1,,y2n to the top of this partial ranking, and the remaining agents to the bottom of this partial ranking.

To the ranking pxi we add exactly those agents yj to the top where φ contains a clause (¬xiyj) or a clause (¬xi¬yj). All remaining agents we add to the bottom. Similarly, to the ranking p¬xi we add exactly those agents yj to the top where φ contains a clause (xiyj) or a clause (xi¬yj). The rankings pyj and p¬yj, for the agents yj, are constructed entirely similarly.

Consider a truth assignment α:{x1,,x2n,y1,,y2n}{0,1}, and consider the corresponding choice of preferences for the agents x1,,x2n,y1,,y2n, where for each agent xi the preference pxi is chosen if and only if α(xi)=1, and for each agent yj the preference pyj is chosen if and only if α(yj)=1. We show that α satisfies φ if and only if the corresponding choice of preferences leads to the matching being stable. The only blocking pairs that can arise are between an agent xi and an agent yj. Take an arbitrary such pair (xi,yj). We show that this is a blocking pair if and only if α falsifies at least one clause containing both variables xi and yj. We know that φ contains exactly one clause containing xi and yj. We deal with the case where φ contains the clause (xiyj)—the other possibilities are entirely analogous. By construction of pxi,p¬xi,pyj, and p¬yj, we get that (xi,yj) is a blocking pair if and only if both p¬xi and p¬yj are chosen. This is exactly the case where the clause (xiyj) is falsified. Thus, we can conclude that α falsifies φ if and only if there is a blocking pair, and thus that α satisfies φ if and only if the corresponding choice of preferences leads to the matching being stable

Since each combination of preferences is equally likely to occur, and there are 24n many combinations of preferences, the probability that the given matching is stable is exactly q=s24n, where s is the number of satisfying truth assignments for φ. Therefore, given qs can be obtained by computing s=q24n.

If the agents are allowed to have more than two possible preferences as we have assumed in the last two Theorems, then even the following problem is NP-complete. The statement can be proved via a reduction from Exact Cover by 3-Sets (X3C).

Theorem 7

For the lottery model, IsStabilityProbabilityNon-Zero is NP-complete.

Proof

The problem is in NP, since we only need to provide one profile that occurs with non-zero probability for which the given matching is stable. We show NP-hardness by giving a reduction from Exact Cover by 3-Sets (X3C). Let (XC) be an instance of X3C, where |X|=3n for some n, and C={c1,,cm} is a collection of sets ciX, each of size 3. Moreover, let ci={xi,1,xi,2,xi,3}, for each 1im. The problem is to decide whether there is a subset CC of size exactly n such that C=X.

We construct an instance of our problem as follows. We let {a1,,an,a1,,a3n} and {b1,,bn,b1,,b3n} be the two sets of agents, we match ai to bi—for each 1in— and we match aj to bj—for each 1j3n. This is depicted graphically below.graphic file with name 453_2019_650_Figb_HTML.jpg

Each agent ai prefers their matching to bi over any other possible match, i.e., agent ai has one preference, where bi is ranked first, and the rest of the agents appear in some fixed order after bi.

Similarly, each agent bj prefers their matching to aj over any other possible match. That is, agent bj has one preference ordering in which aj is ranked first and the rest of the agents appear in some fixed order after aj.

Then, for each agent bi, we add the following |C| possible preferences to the lottery:

Pi,1:a1,1>a1,2>a1,3>ai>Pi,2:a2,1>a2,2>a2,3>ai>Pi,m:am,1>am,2>am,3>ai>

where in each preference the remaining agents appear in any (fixed) order after ai. In other words, bi prefers three agents aj to their current match, and these three form some set cC.

Finally, for each agent aj, we add the following n possible preferences to the lottery:

Pj,1:b2>>bn>bj>b1>b1>>bj-1>bj+1>>b3nPj,2:b1>b3>>bn>bj>b2>b1>>bj-1>bj+1>>b3nPj,3:b1>b2>b4>>bn>bj>b3>b1>>bj-1>bj+1>>b3nPj,n:b1>>bn-1>bj>bn>b1>>bj-1>bj+1>>b3n

That is, each agent aj prefers each of the agents b1,,bn, except one, to their current match (and they never prefer any of the agents bj for jj over their current match).

We can show that there is a choice of preferences for the agents that makes this matching stable if and only if (X,C)X3C.

() Firstly, suppose that there is a choice of preferences for the agents that makes this matching stable. That is, for each agent bi there is some preference ordering Pi,i, and for each agent aj there is some preference ordering Pj,kj, such that these orderings (together with the fixed preference orderings for the agents ai and bj) make this matching stable. Now, consider the set C={c:i[n],=i}. We show that C=X. To derive a contradiction, suppose that this is not the case, that is, suppose that CX. Then, since |C|=n|X|=3n and for each cC it holds that |c|=3, we know that there must be some c,cC such that cc. Say that xjcc. Therefore, there must be some i,i[n] such that both bi and bi prefer aj over their current match. On the other hand, aj will prefer either bi or bi over their current match. Therefore, either bi and aj or bi and aj will form a blocking pair. Thus, the matching is not stable. From this we can conclude that C=X.

() Conversely, suppose that there exists some CC of size exactly n such that C=X. Let C={c1,,cn}. Now, for each agent bi we pick some preference ordering, and for each agent aj we pick some preference ordering, such that these orderings (together with the fixed preference orderings for the agents ai and bj) make the matching stable. For each agent bi, we pick the preference ordering Pi,i, and for each agent aj we pick the preference ordering Pj,kj, where kj[n] is the unique value such that xjckj. It is straightforward to verify that these preferences make the matching stable.

Given that StabilityProbability is computationally hard even in restricted settings, one may immediately wonder about approximation algorithms. However, we can state the following two corollaries, the first from Theorem 7 and the second from [29, Proposition 8] and Theorem 7, which show that even approximation remains intractable.

Corollary 3

For the lottery model, unless P=NP, there exists no polynomial-time constant-factor approximation algorithm StabilityProbability of a given matching.

Corollary 4

For the lottery model, unless NP=RP, there is no FPRAS for StabilityProbability.

Compact Indifference Model

In the compact indifference model we are given an instance of SMT and each linear order over candidates (each possible preference ordering) is achieved by breaking ties independently at random with uniform probabilities. It is easy to show that IsStabilityProbablityNonZero, IsStabilityProbablityOne, and ExistsCertainlyStableMatching are all in P.

Proposition 3

For the compact indifference model, IsStabilityProbabilityNonZero is in P.

Proof

This is equivalent to checking whether a given matching μ is weakly stable in the given SMTI instance, which is polynomial-time solvable. To check this we only have to look for a blocking pair, which can be done in polynomial time: take every possible pair (mw) who are not matched together and check whether they both (strictly) prefer each other to their current partner.

Proposition 4

For the compact indifference model, IsStabilityProbabilityOne is in P.

Proof

This is equivalent to checking whether a given matching μ is super stable in the given SMTI instance, which is polynomial-time solvable. To check this we only have to look for a very weakly blocking pair, which can be done in polynomial time: take every possible pair (mw) who are not matched together and check whether they each either prefers the other to his or her current partner or finds them incomparable.

Proposition 5

For the compact indifference model, ExistsCertainlyStableMatching is in P.

Proof

Deciding whether there is a matching that is stable with probability one is equivalent to deciding whether there is a matching that is stable w.r.t. all refinements, i.e., a super-stable matching. Given an instance of SMTI one can decide in polynomial time whether it admits a super-stable matching [20].

The complexity of computing the stability probability of a given matching remains open under the compact indifference model, but this problem can be shown to be in P if one side has certain preferences.

Theorem 8

In the compact indifference model, if one side has certain preferences, StabilityProbability is polynomial-time solvable.

Proof

Assume, without loss of generality, that men have certain preferences. The following procedure gives us the stability probability of any given matching μ. (1) For each uncertain woman w identify those men with whom she can potentially form a blocking pair. That is, those m such that wmμ(m) and w is indifferent between m and her partner in μ. Assume there are k such men. The probability of w not forming a blocking pair with any men is then the probability that her current match ranks first among these k+1 men, which is 1k+1. (2) Multiply the probabilities from step 1.

We next show that MatchingWithHighestStabilityProbability is NP-hard. For an instance I of SMT and matching μ, let p(μ,I) denote the probability of μ being stable, and let pS(I)=max{p(μ,I)|μisamatchinginI}, that is the maximum probability of a matching being stable. A matching μ is said to be weakly stable if there exists a tie-breaking rule where μ is stable. Therefore a matching μ has positive probability of being stable if and only if it is weakly stable. Furthermore, if the number of possible tie-breaking is N then any weakly stable matching has a probability of being stable at least 1N.

An extreme case occurs if we have one woman only with n men, where the woman is indifferent between all men. In this case any matching (pair) has a 1n probability of being stable. An even more unfortunate scenario is when we have n men and n women, each women is indifferent between all men, and each man ranks the women in a strict order in the same way, e.g., in the order of their indices. In this case, the probability that the first woman picks her best partner, and thus does not block any matching is 1n. Suppose that the first woman picked her best partner, the probability that the second woman also picks her best partner from the remaining n-1 men is 1n-1, and so on. Therefore, the probability that an arbitrary complete matching is stable is 1n·(n-1)··2=1n!.

Theorem 9

For the compact indifference model, MatchingWithHighestStabilityProbability is NP-hard, even if only one side of the market has uncertain agents.

Proof

For an instance I of SMTI, let opt(I) denote the maximum size of a weakly stable matching in I. [14] showed (in the proof of Corollary 3.4) that given an instance I of SMTI of size n, where only one side of the market has agents with indifferences and each of these agents has a single tie of size two, and any arbitrary small positive ϵ, it is NP-hard to distinguish between the following two cases: (1) opt(I)21-ϵ27n and (2) opt(I)<19+ϵ27n.

When choosing ϵ so that 0<ϵ<12 we can simplify the above cases to (1) opt(I)>4154n, since opt(I)21-ϵ27n>4154n and (2) opt(I)<3954n, since opt(I)<19+ϵ27n<3954n.

Therefore, the number of agents left unmatched on either side of the market is less than 1354n in the first case and more than 1554n in the second case. Let us now extend instance I to a larger instance of SMTI I as follows. Besides the n men M={m1,,mn} and n women W={w1,,wn}, we introduce 1354n men X={x1,xk} and another n27 men Y={y1,yl} and n27 women Z={z1,zl}. Furthermore, for each yjY, we introduce n men Yj={y1j,,ynj}. We create the preferences of I as follows. The preferences of men M remain the same. For each woman wW we append the men X and then Y at the end of her list in the order of their indices. Each man xiX has only all the women W in his list in the order of their indices. Furthermore, each yjY has all the women W first in his preference list in the order or their indices and then zj. Let each zjZ has yj as first choice and then all the men Yj in one tie of size n. Each man in Yj has only zj in his list. We will show that in case one pS(I)12n, whilst in case two pS(1n)n27. Therefore, for n>227, it is NP-hard to decide which of the two separate intervals contains the value pS(I).

To show the above statement, suppose first that we have the first case, so opt(I)>4154n and therefore less than 1354n women are left unmatched in a maximum size weakly stable matching μ for I, denoted by WuW. We extend μ to μ for I as follows. We assign all the women in Wu to men in X in the unique stable way, namely we pair them in a mutually increasing order of their indices. Since |X|>|Wu|, we now matched all women in W, and left some men in X unmatched in μ. We complete the matching by assigning yj to zj for each j=1,,n and leaving all of the men in Yj for all j unmatched. We shall see that no matter how we break the ties in I, blocking pair can appear between the original I agents only, and therefore the probability of μ being stable in I is the same as the probability of μ being stable in I. Since we have at most n ties in I, each of length two, the number of different tie-breakings is at most 2n, out of which at least one is stable. Therefore p(μ,I)=p(μ,I)12n.

In the second case, opt(I)<3954n and therefore more than 1554n women are left unmatched in any weakly stable matching μ for I. Let μ be one of the most stable matchings in I. First we have to note that the restriction of μ to I must be weakly stable in I, since otherwise p(μ,I)=0. Let Wu denote the set of women that are not matched to any man from M in μ. According to our assumption |Wu|>1554n, whilst |X|+|Y|=1554n, therefore in order to avoid a certain blocking pair between Wu and XY we shall match all the men in XY to women in Wu in the only stable way (in the order of indices, where men in X are coming before men in Y), leaving some women in Wu unmatched in μ. However, in this case no agent zjZ can be matched to yj, and therefore, even if there was no potential blocking pair between agents of I, the probability that zj is matched the best partner from Yj is 1n independently for each zjZ. Therefore the probability of μ being stable is at most (1n)n27, which completes the proof of the first statement.

Regarding the NP-hardness of finding one of the most stable matchings, we shall prove that we can decide between the two cases according to the number of unmatched women in W in the restriction of μ to I, where μ is one of the most stable matchings in I. To see this, let Wu denote again the set of women that are not matched to any man in M under μ. In the first case, when opt(I)>4154n, it must be the case that |Wu|<1554n, since otherwise p(μ,I) would be less than (1n)n27 and could not achieve 12n, that is the minimum value for pS(I), as shown in the above argument. Whilst, in the second case |Wu|>1554n must hold, since opt(I)<3954n was assumed.

Joint Probability Model

In this section, we examine problems concerning the joint probability model. Recall that the input now consists of a set of preference profiles, and a probability distribution over these preference profiles. Our first result is that the stability probability of a matching can be computed in polynomial time in the size of the input.

Theorem 10

For the joint probability model, StabilityProbability can be solved in polynomial time.

Proof

The probability that a given matching is stable is equivalent to the sum of the probability weights of the preference profiles for which the matching is stable. This can be checked as follows. We check for which preference profiles the given matching is stable. For one profile, this can be checked in O(n2) time by checking for each (man, woman) pair, whether it is a blocking pair. Then we add up the probabilities of those profiles for which the matching is stable. The sum of the probabilities is the probability that the matching is stable.

Corollary 5

For the joint probability model, IsStabilityProbabilityNon-Zero and IsStabilityProbabilityOne can be solved in polynomial time.

For the joint probability model, the problem ExistsCertainlyStableMatching is equivalent to checking whether the intersection of the sets of stable matchings of the different preference profiles is empty.

Theorem 11

For the joint probability model, ExistsCertainlyStableMatching is NP-complete.

Proof

The problem is in NP, since computing StabilityProbability can be done in polynomial time by Theorem 10 , and so a matching that is stable with probability 1 is a certificate. The NP-hardness proof is by reduction from the NP-complete 3-Coloring problem. The input for 3-Coloring is a graph G=(V,E), and the question is whether there exists a coloring of the vertex set with 3 colors, χ:V{1,2,3}, such that no two adjacent vertices receive the same color. Such a coloring is called a proper coloring. Let G=(V,E) be a graph specifying an instance of 3-Coloring, where V={v1,,vn}. We construct an instance I of ExistsCertainlyStableMatching in the joint probability model.

For each vertex viV, we introduce three men mi,1,mi,2,mi,3 and three women wi,1,wi,2,wi,3. We will add a sequence of preference profiles that have non-zero probability. The exact probability of the preference profiles is unimportant, so we may assume that there is a uniform probability associated with the preference profiles. The first preference profile P0 will ensure that every certainly stable matching matches each mi,j to some wi,j and each wi,j to some  mi,j, where j,j,j{1,2,3}. Moreover, it ensures that for each  i{1,,n}, exactly one of three matchings between the men mi,j and the women wi,j must be used:

(1)mi,1is matched towi,1,mi,2is matched towi,2, andmi,3is matched towi,3;(2)mi,1is matched towi,2,mi,2is matched towi,3, andmi,3is matched towi,1; or(3)mi,1is matched towi,3,mi,2is matched towi,1, andmi,3is matched towi,2.

Intuitively, choosing one of the matchings (1)–(3) for the agents mi,j,wi,j corresponds to coloring vertex vi with one of the three colors in {1,2,3}.

Then, for each edge e={vi1,vi2}E, and for each color c{1,2,3}, we will introduce a preference profile Pe,c that ensures that in each certainly stable matching, it cannot be the case that both the agents mi1,j,wi1,j and the agents mi2,j,wi2,j are matched to each other according to matching (c). As a result, any certainly stable matching directly corresponds to a proper 3-coloring of G.

A detailed description of the preference profiles P0 and Pe,c and a proof of correctness for this reduction follows.

In P0, for each  i[n], the preferences for mi,j,wi,j are as follows:

mi,1:wi,1,wi,2,wi,3,---wi,1:mi,2,mi,3,mi,1,---mi,2:wi,2,wi,3,wi,1,---wi,2:mi,3,mi,1,mi,2,---mi,3:wi,3,wi,1,wi,2,---wi,3:mi,1,mi,2,mi,3,---

Observe that the matchings (1)–(3) are the only stable matchings restricted to the agents {mi,1,mi,2,mi,3,wi,1,wi,2,wi,3}.

Next, we continue with the preference profiles Pe,c. Take an arbitrary e={vi1,vi2}E and an arbitrary c{1,2,3}. In Pe,c, the preferences for mi,j,wi,j for each i[n]\{i1,i2} are exactly the same as in P0. Only the preferences for mi1,j,wi1,j and mi2,j,wi2,j differ from P0; namely, we construct these preferences as follows.

For mi1,j,wi1,j, we start with preferences that (i) for all mi1,j have  {wi1,1,wi1,2,wi1,3} as top three choices, (ii) for all wi1,j have  {mi1,1,mi1,2,mi1,3} as top three choices, (iii) admit only matchings (1), (2), and (3) as stable matchings between the agents mi1,j,wi1,j, and (iv) for the men mi1,j the matching (c) is the worst option among the matchings (1), (2), and (3). Similarly, for mi2,j,wi2,j, we start with preferences that satisfy conditions (i), (ii) and (iii), and additionally satisfy the condition (iv) that for the women wi2,j the matching (c) is the worst option among the matchings (1), (2), and (3). Then, we modify the preferences for mi1,1 and wi2,1 slightly. For mi1,1, we insert wi2,1 between his second and third preferred woman. Similarly, for wi2,1, we insert mi1,1 between her second and third preferred man. As a result, mi1,1 and wi2,1 form a blocking pair in this preference profile if both the agents mi1,j,wi1,j and the agents mi2,j,wi2,j are matched to each other using matching (c)— and not if either set of agents is matched to each other using some other matching (c).

For example, consider e={vi1,vi2} and c=2. The preferences for the agents mi1,j,wi1,j and mi2,j,wi2,j in the preference profile Pe,c are as follows:

mi1,1:wi1,1,wi1,3,wi2,1,wi1,2,---mi2,1:wi2,2,wi2,3,wi2,1,---mi1,2:wi1,2,wi1,1,wi1,3,---mi2,2:wi2,3,wi2,1,wi2,2,---mi1,3:wi1,3,wi1,2,wi1,1,---mi2,3:wi2,1,wi2,2,wi2,3,---wi1,1:mi1,3,mi1,2,mi1,1,---wi2,1:mi2,1,mi2,2,mi1,1,mi2,3,---wi1,2:mi1,1,mi1,3,mi1,2,---wi2,2:mi2,2,mi2,3,mi2,1,---wi1,3:mi1,2,mi1,1,mi1,3,---wi2,3:mi2,3,mi2,1,mi2,2,---

We argue that G has a proper 3-coloring if and only if there is a certainly stable matching for the probability distribution over preference profiles that we constructed.

() Firstly, suppose that G has a proper 3-coloring, say χ:V{1,2,3}. We can then construct a certainly stable matching as follows. For each  i{1,,n}, we match the agents mi,j,wi,j to each other using matching  (χ(vi)). Clearly, this matching is stable for P0. Moreover, because χ is a proper 3-coloring of G, it is straightforward to verify that this matching is also stable for each Pe,c.

() Conversely, suppose that there is a certainly stable matching. We know that in this matching, each man mi,j must be matched to some woman wi,j, and vice versa, each woman wi,j must be matched to some man mi,j. If this were not the case, the matching would not be stable for P0, and thus not certainly stable. Moreover, by a similar argument, we know that for each  i{1,,n}, the matching between the men mi,j and the women wi,j must be one of the matchings (1), (2), or (3). We can then construct a 3-coloring χ:V{1,2,3} as follows. For each  i{1,,n}, we set χ(vi) in such a way that (χ(vi)) is the matching used in the certainly stable matching to match the men mi,j and the women wi,j to each other.

We argue that χ is a proper 3-coloring of G. Suppose that this is not the case, that is, that there is some e={vi1,vi2} such that χ(vi1)=χ(vi2)=c. Now consider the preference profile Pe,c. By construction of χ, we know that in the certainly stable matching, agent mi1,j is matched to agent wi1,j and agent mi2,j is matched to agent wi2,j, both times according to matching (c). However, by construction of Pe,c we will have that  mi1,1 and wi2,1 form a blocking pair in Pe,c. This is a contradiction with our assumption that the matching we considered is certainly stable. From this, we can conclude that χ is a proper 3-coloring of G.

By reducing from 3-Coloring on 4-regular graphs and using Vizing’s theorem to combine preference profiles, we can strengthen Theorem 11 and show that the result holds even when the input contains only a constant number of preference profiles.

Corollary 6

For the joint probability model, ExistsCertainlyStableMatching is NP-complete, even when there are only 16 preference profiles in the lottery.

Proof

We show this by modifying the proof of Theorem 11. We know that 3-Coloring is NP-complete even when restricted to 4-regular graphs [8]. We use the reduction in the proof of Theorem 11, and we assume that in the given graph G, each vertex has degree 4. Then, by Vizing’s Theorem [28], we know that we can give a proper edge coloring of G that uses at most 5 colors. Moreover, we can find such an edge coloring in polynomial time. Then, since in the proof of Theorem 11, in each preference profile Pe,c with e={vi1,vi2}, only the preferences for the agents mi1,j,wi1,j,mi2,j,wi2,j differ from P0, we can, for each color c{1,2,3}, combine the preference profiles Pe,c for all edges e that are colored with the same color. This results in only 16 preference profiles: P0, and a preference profile for each of the 5 edge colors and each of the 3 vertex colors.

Future work

First we note that we left open two outstanding questions, as described in Table 3. In this paper we focused on the problem of computing a matching with the highest stability probability. However, a similarly reasonable goal could be to minimize the expected number of blocking pairs. It would also be interesting to investigate some further realistic probability models, such as the situation when the candidates are ranked according to some noisy scores (like the SAT scores in the US college admissions). This would be a special case of the joint probability model that may turn out to be easier to solve.

One may also consider the questions we asked in this paper for two natural generalizations on the one-to-one matching problem: many-to-one and the many-to-many two-sided problems, where the agents on one or both sides of a two-sided market have capacities. These are reasonable extensions with regard to many applications, e.g., college admissions, and course allocation, respectively. One issue when considering capacities larger than one is that there are many ways of extending the preferences over candidates to preferences over sets of candidates. Another possible generalization of the one-to-one marriage model is the non-bipartite stable roommates problem. We conjecture that most of our polynomial tractability results can be extended to these more general models, but we leave this work for future research.

Acknowledgements

The authors gratefully acknowledge the support from European Cooperation in Science and Technology (COST) action IC1205. Aziz is supported by a UNSW Scientia Fellowship. Biró acknowledges the support of the Hungarian Academy of Sciences under its Momentum Programme (LP2016-3/2018) and Cooperation of Excellences Grant (KEP-6/2018), and the Hungarian Scientific Research Fund, OTKA, Grant No. K128611. Gaspers is the recipient of an Australian Research Council (ARC) Future Fellowship (FT140100048) and acknowledges support under the ARC’s Discovery Projects funding scheme (DP150101134). De Haan is supported by the Austrian Science Fund (FWF), Project J4047. Rastegari was supported by EPSRC Grant EP/K010042/1 at the time of the submission of the conference version of this manuscript.

Footnotes

1

We note that the complexity of all problems that we study is the same for complete and incomplete lists, where non-listed agents are deemed unacceptable—see Proposition 1 in Sect. 3.1.

A preliminary version of this paper has appeared in the proceedings of the 9th International Symposium on Algorithmic Game Theory (SAGT 2016) [2]. The majority of the claims appear without a proof or with only a short proof sketch in Aziz et al. [2].

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Contributor Information

Haris Aziz, Email: haris.aziz@unsw.edu.au.

Péter Biró, Email: peter.biro@krtk.mta.hu.

Serge Gaspers, Email: sergeg@cse.unsw.edu.au.

Ronald de Haan, Email: me@ronalddehaan.eu.

Nicholas Mattei, Email: nsmattei@tulane.edu.

Baharak Rastegari, Email: b.rastegari@soton.ac.uk.

References

  • 1.Aspvall B, Plass MF, Tarjan RE. A linear-time algorithm for testing the truth of certain quantified boolean formulas. Inf. Process. Lett. 1979;8:121–123. doi: 10.1016/0020-0190(79)90002-4. [DOI] [Google Scholar]
  • 2.Aziz Haris, Biró Péter, Gaspers Serge, de Haan Ronald, Mattei Nicholas, Rastegari Baharak. Algorithmic Game Theory. Berlin, Heidelberg: Springer Berlin Heidelberg; 2016. Stable Matching with Uncertain Linear Preferences; pp. 195–206. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Aziz, H., Biró, P., Fleiner, T., Gaspers, S., de Haan, R., Mattei, N., Rastegari, B.: Stable matching with uncertain pairwise preferences. In: Proceedings of the 16th International Joint Conference on Autonomous Agents and Multiagent Systems (AAMAS), pp. 344–352 (2017a)
  • 4.Aziz, H., de Haan, R., Rastegari, B.: Pareto optimal allocation under uncertain preferences. In: Proceedings of the 26th International Joint Conference on Artificial Intelligence (IJCAI), pp. 1472–1474 (2017b)
  • 5.Aziz H, Biró P, de Haan R, Rastegari B. Pareto optimal allocation under uncertain preferences: uncertainty models, algorithms, and complexity. Artif. Intell. 2019;276:57–78. doi: 10.1016/j.artint.2019.08.002. [DOI] [Google Scholar]
  • 6.Aziz Haris, Biro Peter, De Haan Ronald, Rastegari Baharak. Pareto Optimal Allocation under Compact Uncertain Preferences. Proceedings of the AAAI Conference on Artificial Intelligence. 2019;33:1740–1747. doi: 10.1609/aaai.v33i01.33011740. [DOI] [Google Scholar]
  • 7.Chen, J., Niedermeier, R., Skowron, P.: Stable marriage with multi-modal preferences. In: Proceedings of the 19th ACM Conference on Electronic Commerce (ACM-EC), pp. 269–286 (2018)
  • 8.Dailey DP. Uniqueness of colorability and colorability of planar 4-regular graphs are NP-complete. Discrete Math. 1980;30(3):289–293. doi: 10.1016/0012-365X(80)90236-8. [DOI] [Google Scholar]
  • 9.Drummond, J., Boutilier, C.: Preference elicitation and interview minimization in stable matchings. In: Proceedings of the 28th AAAI Conference on Artificial Intelligence (AAAI), pp. 645–653 (2014)
  • 10.Ehlers L, Massó J. Matching markets under (in)complete information. J. Econ. Theory. 2015;157:295–314. doi: 10.1016/j.jet.2015.01.008. [DOI] [Google Scholar]
  • 11.Gale D, Shapley LS. College admissions and the stability of marriage. Am. Math. Mon. 1962;69(1):9–15. doi: 10.1080/00029890.1962.11989827. [DOI] [Google Scholar]
  • 12.Garey MR, Johnson DS. Computers and Intractability: A Guide to the Theory of NP-Completeness. New York: W. H. Freeman; 1979. [Google Scholar]
  • 13.Gusfield D, Irving RW. The Stable Marriage Problem: Structure and Algorithms. Cambridge: MIT Press; 1989. [Google Scholar]
  • 14.Halldórsson Magnús M., Iwama Kazuo, Miyazaki Shuichi, Yanagisawa Hiroki. Improved approximation results for the stable marriage problem. ACM Transactions on Algorithms. 2007;3(3):30–es. doi: 10.1145/1273340.1273346. [DOI] [Google Scholar]
  • 15.Hazon N, Aumann Y, Kraus S, Wooldridge M. On the evaluation of election outcomes under uncertainty. Artif. Intell. 2012;189:1–18. doi: 10.1016/j.artint.2012.04.009. [DOI] [Google Scholar]
  • 16.Irving RW. Stable marriage and indifference. Discrete Appl. Math. 1994;48:261–272. doi: 10.1016/0166-218X(92)00179-P. [DOI] [Google Scholar]
  • 17.Irving, R.W., Manlove, D.F., Scott, S.: The hospitals/residents problem with ties. In: Proceedings the 7th Scandinavian Workshop on Algorithm Theory (SWAT), Volume 1851 of Lecture Notes in Computer Science, pp. 259–271. Springer (2000)
  • 18.Li, Y., Conitzer, V.: Cooperative game solution concepts that maximize stability under noise. In: Proceedings of the 29th AAAI Conference on Artificial Intelligence (AAAI), pp. 979–985 (2015)
  • 19.Manlove D. Algorithmics of Matching Under Preferences. Singapore: World Scientific Publishing Company; 2013. [Google Scholar]
  • 20.Manlove, D.F.: Stable marriage with ties and unacceptable partners. Technical Report TR-1999-29, University of Glasgow, Department of Computing Science (1999)
  • 21.Mattei, N., Walsh, T.: PrefLib: A library for preferences, http://www.preflib.org. In: Proceedings of the 3rd International Conference on Algorithmic Decision Theory (ADT) (2013)
  • 22.Mattei, N., Walsh, T.: A PrefLib.Org Retrospective: lessons learned and new directions. In: Endriss, U. (ed.), Trends in Computational Social Choice, chapter 15, pp. 289–309. AI Access Foundation (2017)
  • 23.Papadimitriou CH. Computational Complexity. New York: Wiley; 2003. [Google Scholar]
  • 24.Rastegari, B., Condon, A., Immorlica, N., Leyton-Brown, K.: Two-sided matching with partial information. In: Proceedings of the 14th ACM Conference on Electronic Commerce (ACM-EC), pp. 733–750. ACM (2013)
  • 25.Rastegari, B., Condon, A., Immorlica, N., Irving, R., Leyton-Brown, K.: Reasoning about optimal stable matching under partial information. In: Proceedings of the 15th ACM Conference on Electronic Commerce (ACM-EC), pp. 431–448. ACM (2014)
  • 26.Roth AE. The evolution of the labor market for medical interns and residents: a case study in game theory. J. Polit. Econ. 1984;92(6):991–1016. doi: 10.1086/261272. [DOI] [Google Scholar]
  • 27.Roth AE, Sotomayor MAO. Two-Sided Matching: A Study in Game Theoretic Modelling and Analysis. Cambridge: Cambridge University Press; 1990. [Google Scholar]
  • 28.Vizing VG. On an estimate of the chromatic class of a p-graph. Diskretnyi Analiz. 1964;3(7):25–30. [Google Scholar]
  • 29.Welsh DJA, Merino C. The Potts model and the Tutte polynomial. J. Math. Phys. 2000;41(3):1127–1152. doi: 10.1063/1.533181. [DOI] [Google Scholar]

Articles from Algorithmica are provided here courtesy of Springer

RESOURCES