Envy-Freeness in House Allocation Problems
Jiarui Gan, Warut Suksompong, Alexandros A. Voudouris

TL;DR
This paper introduces a polynomial-time algorithm to determine the existence of envy-free house allocations and shows such allocations are likely when houses slightly outnumber agents.
Contribution
The paper provides the first efficient method for checking envy-freeness in house allocation and probabilistic guarantees for existence under certain conditions.
Findings
Polynomial-time algorithm for envy-free assignment existence
High probability of envy-free solutions when houses exceed agents by a logarithmic factor
Envy-freeness can be efficiently verified and computed
Abstract
We consider the house allocation problem, where houses are to be assigned to agents so that each agent gets exactly one house. We present a polynomial-time algorithm that determines whether an envy-free assignment exists, and if so, computes one such assignment. We also show that an envy-free assignment exists with high probability if the number of houses exceeds the number of agents by a logarithmic factor.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Envy-Freeness in House Allocation Problems
Jiarui Gan
Department of Computer Science, University of Oxford
Warut Suksompong
Department of Computer Science, University of Oxford
Alexandros A. Voudouris
Department of Computer Science, University of Oxford
Abstract
We consider the house allocation problem, where houses are to be assigned to agents so that each agent gets exactly one house. We present a polynomial-time algorithm that determines whether an envy-free assignment exists, and if so, computes one such assignment. We also show that an envy-free assignment exists with high probability if the number of houses exceeds the number of agents by a logarithmic factor.
1 Introduction
In the house allocation problem, also known as the assignment problem, a set of houses are to be assigned to a set of 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 houses and agents , where . 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 and 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 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.
2 Our Results
Denote by a bipartite graph with bipartite vertex sets and edge set . For any set of vertices , denote by the set of vertices that are adjacent to at least one vertex in . An X-saturating matching is a matching that covers every vertex in . A set is said to be a Hall violator if . It is said to be a minimal Hall violator if no is a Hall violator. Recall that by Hall’s Theorem, an -saturating matching exists if and only if for all . In other words, there is an -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 -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).
Lemma 2.1**.**
Given a bipartite graph without an -saturating matching, a minimal Hall violator can be found in polynomial time.
Proof.
Let be a maximum matching of , and let and be the set of vertices in that are matched and unmatched in , respectively. Since does not admit an -saturating matching, . Let be an arbitrary vertex in . Construct an auxiliary directed graph with the same vertex set as as follows. For every edge with and , add a directed edge from to in . In addition, for every edge with and , add a directed edge from to in . Let be the set of vertices reachable from in . We claim that is a minimal Hall violator. Note that can be computed efficiently using depth-first search.
First, we show that is a Hall violator, i.e., . Every vertex in is reachable from in . If a vertex is unmatched in , then by construction, a path from to alternates between edges in and edges not in , starting and ending with edges not in . Since and are not matched in , this path is an augmenting path, contradicting the maximality of . So every vertex in is matched in , implying the existence of an injection from to . Since , this injection is not a surjection. It follows that . Observe also that every vertex in besides is matched in by construction, so in fact we have .
Next, we show that there is no such that . If , then since all vertices in are matched in , we have . Assume now that . Let . As in the previous paragraph, there is a path from to that alternates between edges in and edges not in . Let be the first vertex from in the path that is not in , and let be its match in . Since can be reached directly from the vertex preceding it on the path, which belongs to , we have . This means that contains all vertices that are matched to in , along with . Hence . ∎
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.
Theorem 2.2**.**
Algorithm 1 is a polynomial-time algorithm that decides whether an envy-free assignment exists and, if so, computes one such assignment.
Proof.
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 by at least , 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 , 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 be the minimal Hall violator that the algorithm selects in the current iteration. Assume for contradiction that a subset of houses is part of an envy-free assignment. Let be the set of agents in who only have edges to houses in in . Note that since , we have . If is nonempty, then since is a minimal Hall violator, . If is empty, holds trivially. Since , it follows that .
By definition of , every agent in has at least one most preferred house in ; since the houses in are unassigned, such an agent must be assigned to a house in . However, there are fewer houses in than agents in , 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 , , and 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 -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 -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 , , and 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 -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 -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 and 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.111A 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 ; 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.
Theorem 2.3**.**
Let be a constant strictly greater than the base of the natural logarithm . Suppose that the agents’ preferences are drawn randomly as described above, and that . Then the probability that an envy-free assignment exists converges to as .
Proof.
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 , independently of other pairs of agents and houses. For each house, if some agent values it at least while the remaining agents value it at most , 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 least and other assigned houses at most . Hence it remains to show that the probability that all agents receive a house converges to .
Let , and fix an agent. The probability that a particular house is assigned to the agent is . Since , we have for large enough . Hence the probability that the agent does not receive a house is at most
[TABLE]
where the second inequality follows from , which holds for every real number . By union bound, the probability that some agent does not receive a house is at most , which approaches [math] for large , completing the proof. ∎
Acknowledgments
This work has been supported by the European Research Council (ERC) under grant number 639945 (ACCORD).
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Abdulkadiroglu and Sönmez [2003] Atila Abdulkadiroglu and Tayfun Sönmez. Random serial dictatorship and the core from random endowments in house allocation problems. Econometrica , 66(3):689–701, 2003.
- 2Abraham et al. [2004] David J. Abraham, Katarína Cechlárová, David Manlove, and Kurt Mehlhorn. Pareto optimality in house allocation problems. In Proceedings of the 15th International Symposium on Algorithms and Computations , pages 3–15, 2004.
- 3Amanatidis et al. [2017] Georgios Amanatidis, Evangelos Markakis, Afshin Nikzad, and Amin Saberi. Approximation algorithms for computing maximin share allocations. ACM Transactions on Algorithms , 13(4):52, 2017.
- 4Beynier et al. [2018] Aurélie Beynier, Yann Chevaleyre, Laurent Gourvès, Julien Lesca, Nicolas Maudet, and Anaëlle Wilczynski. Local envy-freeness in house allocation problems. In Proceedings of the 17th International Conference on Autonomous Agents and Multi Agent Systems , pages 292–300, 2018.
- 5Foley [1967] Duncan K. Foley. Resource allocation and the public sector. Yale Economics Essays , 7(1):45–98, 1967.
- 6Hylland and Zeckhauser [1979] Aanund Hylland and Richard Zeckhauser. The efficient allocation of individuals to positions. Journal of Political Economy , 87(2):293–314, 1979.
- 7Manlove [2013] David Manlove. Algorithmics of Matching Under Preferences . World Scientific, 2013.
- 8Segal-Halevi [2019] Erel Segal-Halevi. Bipartite envy-free matching. Co RR , abs/1901.09527, 2019.
