Envy-Freeness in House Allocation Problems

Jiarui Gan, Warut Suksompong, Alexandros A. Voudouris

Introduction

In the house allocation problem, also known as the assignment problem, a set of mm houses are to be assigned to a set of nn agents with preferences over the houses, under the constraint that each agent is assigned exactly one house (Hylland and Zeckhauser 1979; Zhou 1990; Abdulkadiroglu and Sönmez 2003). Some economic efficiency condition is often desired, for example that the assignment is Pareto optimal. This means that no other assignment makes some agent better off and no agent worse off in comparison to the current assignment (Abraham et al. 2004; Manlove 2013).

In this note, we investigate the issue of fairness in house allocation using the well-established fairness notion of envy-freeness (Foley 1967; Varian 1974). An allocation is said to be envy-free if every agent likes her house at least as much as any other assigned house. Clearly, an envy-free allocation does not always exist, for example when all agents have the same strict ranking over the houses. If the number of agents is equal to the number of houses, then all houses must be assigned. In this case, it is easy to see that determining whether an envy-free assignment exists, and computing one if so, can be done in polynomial time. Indeed, we can simply construct a bipartite graph with the agents on one side and the houses on the other side, and add an edge between an agent and a house whenever the agent likes the house at least as much as any other house. An envy-free assignment exists if and only if the graph admits a perfect matching; it is well-known that the latter condition can be checked in polynomial time.

The purpose of our note is to study envy-freeness in the general house allocation problem where the number of houses can exceed the number of agents. Formally, there are mm houses M={1,2,…,m}M=\{1,2,\dots,m\} and nn agents N={1,2,…,n}N=\{1,2,\dots,n\}, where m≥nm\geq n. Each agent has a ranking over the houses, where ties are permitted. Allowing the number of agents and the number of houses to be different makes the problem more complex, and we can no longer determine the existence of envy-free assignments solely by matching agents to their favorite houses. For example, if there are three houses and two agents with the rankings 1≻2≻31\succ 2\succ 3 and 1≻3≻21\succ 3\succ 2 over the houses, then even though both agents compete for the same top house, there is an envy-free assignment that assigns house 2 to agent 1 and house 3 to agent 2. Nevertheless, we present a polynomial-time algorithm that determines whether an envy-free assignment exists, and computes one if it does. We then show that if the number of houses exceeds the number of agents by a logarithmic factor, an envy-free assignment exists with high probability.

To the best of our knowledge, the only work before ours to have considered envy-freeness in house allocation is that of Beynier et al. 2018. Their work focuses exclusively on the m=nm=n case but contains the extra feature that agents are placed on a network that describes the envy relation, and they showed algorithms and hardness results for different networks. Recently, Segal-Halevi 2019 studied a concept called envy-free matchings on bipartite graphs, and provided conditions under which a non-empty envy-free matching exists along with algorithms to compute such matchings. In contrast to this note, his study is restricted to unweighted bipartite graphs, which correspond to each agent either approving or disapproving each house, and does not require every agent to be assigned to a house.

Our Results

Denote by G=(X,Y,E)G=(X,Y,E) a bipartite graph with bipartite vertex sets X,YX,Y and edge set EE. For any set of vertices VV, denote by S(V)S(V) the set of vertices that are adjacent to at least one vertex in VV. An X-saturating matching is a matching that covers every vertex in XX. A set Z⊆XZ\subseteq X is said to be a Hall violator if ∣Z∣>∣S(Z)∣|Z|>|S(Z)|. It is said to be a minimal Hall violator if no Z′⊂ZZ^{\prime}\subset Z is a Hall violator. Recall that by Hall’s Theorem, an XX-saturating matching exists if and only if ∣Z∣≤∣S(Z)∣|Z|\leq|S(Z)| for all Z⊆XZ\subseteq X. In other words, there is an XX-saturating matching exactly when no Hall violator is present.

As part of our algorithm, we will need to find a minimal Hall violator in the case where no XX-saturating matching exists. In particular, we show that if there is a Hall violator, it is possible to find a minimal one efficiently. Our approach is similar to that in Lemma 4.5 of Amanatidis et al. 2017.

Given a bipartite graph G=(X,Y,E)G=(X,Y,E) without an XX-saturating matching, a minimal Hall violator can be found in polynomial time.

Let BB be a maximum matching of GG, and let XmX_{m} and XuX_{u} be the set of vertices in XX that are matched and unmatched in BB, respectively. Since GG does not admit an XX-saturating matching, ∣Xu∣>0|X_{u}|>0. Let zz be an arbitrary vertex in XuX_{u}. Construct an auxiliary directed graph G′G^{\prime} with the same vertex set as GG as follows. For every edge (x,y)∈E(x,y)\in E with x∈Xx\in X and y∈Yy\in Y, add a directed edge from xx to yy in G′G^{\prime}. In addition, for every edge (x,y)∈B(x,y)\in B with x∈Xx\in X and y∈Yy\in Y, add a directed edge from yy to xx in G′G^{\prime}. Let ZZ be the set of vertices reachable from zz in G′G^{\prime}. We claim that ZZ is a minimal Hall violator. Note that ZZ can be computed efficiently using depth-first search.

First, we show that ZZ is a Hall violator, i.e., ∣Z∣>∣S(Z)∣|Z|>|S(Z)|. Every vertex in S(Z)S(Z) is reachable from zz in G′G^{\prime}. If a vertex v∈S(Z)v\in S(Z) is unmatched in BB, then by construction, a path from zz to vv alternates between edges in BB and edges not in BB, starting and ending with edges not in BB. Since zz and vv are not matched in BB, this path is an augmenting path, contradicting the maximality of BB. So every vertex in S(Z)S(Z) is matched in BB, implying the existence of an injection from S(Z)S(Z) to ZZ. Since z∈Xuz\in X_{u}, this injection is not a surjection. It follows that ∣Z∣>∣S(Z)∣|Z|>|S(Z)|. Observe also that every vertex in ZZ besides zz is matched in BB by construction, so in fact we have ∣Z∣=∣S(Z)∣+1|Z|=|S(Z)|+1.

Next, we show that there is no Z′⊂ZZ^{\prime}\subset Z such that ∣Z′∣>∣S(Z′)∣|Z^{\prime}|>|S(Z^{\prime})|. If z∉Z′z\not\in Z^{\prime}, then since all vertices in Z′Z^{\prime} are matched in BB, we have ∣Z′∣≤∣S(Z′)∣|Z^{\prime}|\leq|S(Z^{\prime})|. Assume now that z∈Z′z\in Z^{\prime}. Let v∈Z\Z′v\in Z\backslash Z^{\prime}. As in the previous paragraph, there is a path from zz to vv that alternates between edges in BB and edges not in BB. Let ww be the first vertex from XX in the path that is not in Z′Z^{\prime}, and let w′w^{\prime} be its match in BB. Since w′w^{\prime} can be reached directly from the vertex preceding it on the path, which belongs to Z′Z^{\prime}, we have w′∈S(Z′)w^{\prime}\in S(Z^{\prime}). This means that S(Z′)S(Z^{\prime}) contains all vertices that are matched to Z′\{z}Z^{\prime}\backslash\{z\} in BB, along with w′w^{\prime}. Hence ∣S(Z′)∣≥(∣Z′∣−1)+1=∣Z′∣|S(Z^{\prime})|\geq(|Z^{\prime}|-1)+1=|Z^{\prime}|. ∎

With the subroutine to compute a minimal Hall violator efficiently, we are now ready to present our main algorithm. Recall that an envy-free assignment does not always exist; our algorithm decides whether such an assignment exists and also computes one in the case that it does.

Algorithm 1 is a polynomial-time algorithm that decides whether an envy-free assignment exists and, if so, computes one such assignment.

Finding a minimal Hall violator can be done in polynomial time using Lemma 2.1, so each iteration of the while loop can be implemented efficiently. Since every iteration either returns an envy-free assignment or reduces the size of M′M^{\prime} by at least 11, Algorithm 1 runs in polynomial time.

If the algorithm returns an assignment, every agent receives one of their most preferred houses among the assigned houses, so the assignment is envy-free. We will show that when the algorithm removes houses from M′M^{\prime}, these houses cannot be part of any envy-free assignment. This will imply that if the algorithm returns null, there is indeed no envy-free assignment.

We proceed by induction on the number of rounds. Consider an arbitrary iteration of the while loop in which at least one house is removed. By the induction hypothesis, all houses removed in previous iterations cannot be part of an envy-free assignment. Let ZZ be the minimal Hall violator that the algorithm selects in the current iteration. Assume for contradiction that a subset of houses ∅≠Y′⊆S(Z)\emptyset\neq Y^{\prime}\subseteq S(Z) is part of an envy-free assignment. Let X′X^{\prime} be the set of agents in ZZ who only have edges to houses in S(Z)\Y′S(Z)\backslash Y^{\prime} in GG. Note that since Y≠∅Y\neq\emptyset, we have X′≠ZX^{\prime}\neq Z. If X′X^{\prime} is nonempty, then since ZZ is a minimal Hall violator, ∣X′∣≤∣S(X′)∣≤∣S(Z)\Y′∣|X^{\prime}|\leq|S(X^{\prime})|\leq|S(Z)\backslash Y^{\prime}|. If X′X^{\prime} is empty, ∣X′∣≤∣S(Z)\Y′∣|X^{\prime}|\leq|S(Z)\backslash Y^{\prime}| holds trivially. Since ∣Z∣>∣S(Z)∣|Z|>|S(Z)|, it follows that ∣Z\X′∣>∣Y′∣|Z\backslash X^{\prime}|>|Y^{\prime}|.

By definition of X′X^{\prime}, every agent in Z\X′Z\backslash X^{\prime} has at least one most preferred house in Y′Y^{\prime}; since the houses in S(Z)\Y′S(Z)\backslash Y^{\prime} are unassigned, such an agent must be assigned to a house in Y′Y^{\prime}. However, there are fewer houses in Y′Y^{\prime} than agents in Z\X′Z\backslash X^{\prime}, a contradiction. ∎

We illustrate how Algorithm 1 works with two examples:

Assume that there are four houses and three agents such that the agents have rankings 1≻4∼3≻21\succ 4\sim 3\succ 2, 1≻4≻2≻31\succ 4\succ 2\succ 3, and 2≻1≻3∼42\succ 1\succ 3\sim 4 over the houses. In the first iteration, there is an edge from agent 1 to house 1, from agent 2 to house 1, and from agent 3 to house 2. There is no NN-saturating matching, and agents 1 and 2 form a minimal Hall violator, so house 1 is removed. In the second iteration, there is an edge from agent 1 to houses 3 and 4, from agent 2 to house 4, and from agent 3 to house 2. There is an NN-saturating matching, namely the matching that assigns agent 1 to house 3, agent 2 to house 4, and agent 3 to house 2, so this assignment is returned.

Assume that there are four houses and three agents such that the agents have rankings 1≻4≻3≻21\succ 4\succ 3\succ 2, 1≻4≻2≻31\succ 4\succ 2\succ 3, and 2≻1≻3∼42\succ 1\succ 3\sim 4 over the houses. In the first iteration, there is an edge from agent 1 to house 1, from agent 2 to house 1, and from agent 3 to house 2. There is no NN-saturating matching, and agents 1 and 2 form a minimal Hall violator, so house 1 is removed. In the second iteration, there is an edge from agent 1 to house 4, from agent 2 to house 4, and from agent 3 to house 2. Again, there is no NN-saturating matching, and agents 1 and 2 form a minimal Hall violator, so house 4 is removed. The number of agents now exceeds the number of remaining houses, so the algorithm terminates without an envy-free assignment.

Note that an assignment returned by Algorithm 1 is Pareto optimal among all envy-free assignments. Indeed, every agent receives one of their most preferred houses in the current iteration of the while loop, and all houses removed in previous iterations cannot be used in any envy-free assignment. However, envy-freeness and Pareto optimality are incompatible in general. To see this, consider an example with three houses and two agents such that the agents have rankings 1≻2≻31\succ 2\succ 3 and 1≻3≻21\succ 3\succ 2 over the houses. The unique envy-free assignment is to assign house 2 to agent 1 and house 3 to agent 2. On the other hand, assigning house 1 to agent 1 instead yields a Pareto improvement.

We remark that even though our Algorithm 1 may appear similar to Algorithm 2 in the paper by Segal-Halevi 2019 at first glance, there are two crucial differences. First, since the agents have ordinal preferences over the houses in our case, our algorithm needs to redefine the bipartite graph in each iteration in order to represent these preferences; in contrast, in the setting considered by Segal-Halevi, the agents only have binary valuations and hence the graph remains unchanged throughout the execution of his algorithm. Second, and more importantly, computing a minimal Hall violator, instead of an arbitrary one as in Segal-Halevi’s case, is necessary for identifying an envy-free assignment that allocates a house to every agent as required in our setting. To see this, consider again the first example execution of our algorithm above. In the first iteration, besides the set consisting of agents 1 and 2, the set consisting of all three agents is also a Hall violator. Removing the preferred houses 1 and 2 of the agents in this non-minimal Hall violator cannot yield an envy-free assignment, since the number of remaining houses would then be smaller than the number of agents. On the other hand, as we have already seen, the example does admit an envy-free assignment.

Next, we consider a random preference model. We assume that the agents have strict preferences over the houses, and the preference of each agent is chosen uniformly at random among all strict rankings over the houses, independently of other agents. This is equivalent to assuming that agents have cardinal utilities over the houses drawn independently from an arbitrary non-atomic distribution. A distribution is said to be non-atomic if it does not put positive probability on any single point. Under this model, it is not hard to see that the probability that an envy-free assignment exists is low in the case m=nm=n; indeed, an envy-free assignment exists in this case only if all agents have distinct favorite houses, a highly unlikely event. However, we show that as soon as the number of houses exceeds the number of agents by a logarithmic factor, an envy-free allocation is likely to exist.

Let cc be a constant strictly greater than the base of the natural logarithm ee. Suppose that the agents’ preferences are drawn randomly as described above, and that m≥cnlog⁡nm\geq cn\log n. Then the probability that an envy-free assignment exists converges to 11 as n→∞n\rightarrow\infty.

Assume without loss of generality that each agent has a cardinal utility for each house, and this utility is drawn uniformly at random from the interval $,independentlyofotherpairsofagentsandhouses.Foreachhouse,ifsomeagentvaluesitatleast, independently of other pairs of agents and houses. For each house, if some agent values it at least1-1/nwhiletheremainingagentsvalueitatmostwhile the remaining agents value it at most1-1/n,weassignittotheformeragentprovidedthattheagenthasnotreceivedahouse.Ifallagentsreceiveahouse,theresultingassignmentisenvy−freesinceallagentsvaluetheirownhouseatleast, we assign it to the former agent provided that the agent has not received a house. If all agents receive a house, the resulting assignment is envy-free since all agents value their own house at least1-1/nandotherassignedhousesatmostand other assigned houses at most1-1/n.Henceitremainstoshowthattheprobabilitythatallagentsreceiveahouseconvergesto. Hence it remains to show that the probability that all agents receive a house converges to1$.

Let d∈(e,c)d\in(e,c), and fix an agent. The probability that a particular house is assigned to the agent is 1n⋅(1−1n)n−1\frac{1}{n}\cdot\left(1-\frac{1}{n}\right)^{n-1}. Since lim⁡n→∞(1−1n)n−1=1e\lim_{n\rightarrow\infty}\left(1-\frac{1}{n}\right)^{n-1}=\frac{1}{e}, we have 1n⋅(1−1n)n−1≥1dn\frac{1}{n}\cdot\left(1-\frac{1}{n}\right)^{n-1}\geq\frac{1}{dn} for large enough nn. Hence the probability that the agent does not receive a house is at most

where the second inequality follows from 1+x≤ex1+x\leq e^{x}, which holds for every real number xx. By union bound, the probability that some agent does not receive a house is at most n⋅n−cd=n1−cdn\cdot n^{-\frac{c}{d}}=n^{1-\frac{c}{d}}, which approaches 00 for large nn, completing the proof. ∎

This work has been supported by the European Research Council (ERC) under grant number 639945 (ACCORD).

References