Envy-free Matchings in Bipartite Graphs and their Applications to Fair Division

Elad Aigner-Horev, Erel Segal-Halevi

Introduction

Let G:=(X∪˙Y,E)G:=(X\dot{\cup}Y,E) be a bipartite graph. A matching M⊆EM\subseteq E is called perfect if every vertex of X∪˙YX\dot{\cup}Y is adjacent to exactly one edge of MM; it is called XX-saturating if every vertex of XX is adjacent to exactly one edge of MM. This paper studies the following relaxation of XX-saturating matching (where XMX_{M} and YMY_{M} denote the vertices of XX and YY, respectively, that are incident to edges of MM).

Let G:=(X∪˙Y,E)G:=(X\dot{\cup}Y,E) be a bipartite graph. A matching M⊆EM\subseteq E is said to be envy-free w.r.t. XX if no vertex in X∖XMX\setminus X_{M} is adjacent to any vertex in YMY_{M}.

One may view XX as a set of people and YY as a set of houses, where a person in XX is adjacent to all houses in YY which he or she likes. A matching M⊆EM\subseteq E denotes an assignment of houses to people who like them. Throughout the paper, all envy-free matchings are taken w.r.t. XX. In such a matching, an unmatched person x∈X∖XMx\in X\setminus X_{M} does not envy any matched person x′∈XMx^{\prime}\in X_{M}, because xx does not like any matched house y′∈YMy^{\prime}\in Y_{M} anyway.

If a matching MM is XX-saturating, then XM=XX_{M}=X, and MM is clearly envy-free. A graph admitting an XX-saturating matching is called XX-saturated; see Figure 1(a). Many graphs are not XX-saturated, but still admit a non-empty envy-free matching; see Figure 1(b).

In contrast, in some graphs the only envy-free matching is the empty matching ∅\emptyset (which is vacuously envy-free). A natural example is an odd path — a path with 2k+12k+1 vertices, for some k≥1k\geq 1 — where XX is identified with the larger class in the bipartition; see Figure 1(c). Consider any non-empty matching in such an odd path. Traverse the path from one of its ends towards the other end, until you encounter the first matched vertex. If this vertex is in YY, then the previous vertex is in XX and it is envious. If the first matched vertex is in XX, then it is matched to the vertex after it in YY, and from that point onwards, every vertex in XX must be matched to the vertex after it in YY in order not to envy. But the last vertex of the path is in XX and has no vertex after it, so it is envious.

The examples above invoke the following questions.

What characterises the graphs that contain a non-empty envy-free matching?

Given a graph GG, can an envy-free matching of maximum cardinality in GG be found efficiently?

We answer these questions by proving a structural theorem for bipartite graphs. We prove that in every bipartite graph, there is a unique partition of the vertices into two subsets — “good” and “bad”: the “good” subset is XX-saturated (and thus contains the largest possible envy-free matching), while the “bad” subset has a structure similar to an odd path (and thus contains only an empty envy-free matching). The structure of this “bad” subset is defined formally below.

A bipartite graph G:=(X∪˙Y,E)G:=(X\dot{\cup}Y,E) is called YY-path-saturated if, for some k≥1k\geq 1, there exist partitions X=X0∪˙⋯∪˙XkX=X_{0}\dot{\cup}\cdots\dot{\cup}X_{k} and Y=Y1∪˙⋯∪˙YkY=Y_{1}\dot{\cup}\cdots\dot{\cup}Y_{k} where for all i≥1i\geq 1:

There is a perfect matching between vertices of XiX_{i} and vertices of YiY_{i};

Every vertex in YiY_{i} is adjacent to some vertex in Xi−1X_{i-1}.

Every odd path with ∣X∣>∣Y∣|X|>|Y|, as in Figure 1(c), is YY-path-saturated. Figure 1(d) shows another example of a YY-path-saturated graph; it can be seen that the structure of such a graph resembles that of an odd path. Every YY-path-saturated graph is YY-saturated, but the opposite is not true, as shown by Figures 1(a,b). Note that the empty graph is YY-path-saturated (where Xi=Yj=∅X_{i}=Y_{j}=\emptyset for all i≥0,j≥1i\geq 0,j\geq 1). Also note that a YY-path-saturated graph may have isolated vertices (vertices with degree 0) in XX — such vertices are contained in X0X_{0}. In any YY-path-saturated graph, the only envy-free matching is ∅\emptyset. The proof is similar to the one for odd paths above; we omit it since it is implied by Theorem 1.3(e) below. Thus the XX-saturated graphs and the YY-path-saturated graphs are two extreme cases: the former contain the largest possible envy-free matching, while the latter contain only an empty envy-free matching. Our first result is that these two extremes are the building-blocks of all bipartite graphs. Below, G[X′,Y′]G[X^{\prime},Y^{\prime}] denotes the subgraph of GG induced by the vertices X′∪˙Y′X^{\prime}\dot{\cup}Y^{\prime}.

Every bipartite graph G=(X∪˙Y,E)G=(X\dot{\cup}Y,E) admits a unique partition X=XS∪˙XLX=X_{S}\dot{\cup}X_{L} and Y=YS∪˙YLY=Y_{S}\dot{\cup}Y_{L} satisfying the following three conditions:

(a) There are no edges between XSX_{S} and YLY_{L};

(b) The subgraph G[XS,YS]G[X_{S},Y_{S}] is YY-path-saturated;

(c) The subgraph G[XL,YL]G[X_{L},Y_{L}] is XX-saturated.

Moreover, this unique partition has the following additional properties:

(d) Every XLX_{L}-saturating matching in G[XL,YL]G[X_{L},Y_{L}] is an envy-free matching in GG.

(e) Every envy-free matching in GG is contained in G[XL,YL]G[X_{L},Y_{L}].

For example, in Figure 1(a), the entire graph is G[XL,YL]G[X_{L},Y_{L}], while G[XS,YS]G[X_{S},Y_{S}] is empty. In Figure 1(b), G[XS,YS]G[X_{S},Y_{S}] contains the two leftmost edges and G[XL,YL]G[X_{L},Y_{L}] contains the rightmost (bold) edge, and there is one more edge between XLX_{L} and YSY_{S} (but no edges between XSX_{S} and YLY_{L}). In Figures 1(c,d), the entire graph is G[XS,YS]G[X_{S},Y_{S}], while G[XL,YL]G[X_{L},Y_{L}] is empty.

We call the unique partition of GG, whose existence is guaranteed by Theorem 1.3, the EFM partition of GG.

As a corollary of Theorem 1.3, one gets several useful conditions on a graph GG admitting a non-empty envy-free matching. Two conditions are necessary and sufficient; the other is only sufficient. Below, NG(X′)N_{G}(X^{\prime}) denotes the neighborhood of a subset X′⊆XX^{\prime}\subseteq X in GG, i.e.: NG(X′):={y′∈Y:∃x′∈X′ such that (x′,y′)∈E}N_{G}(X^{\prime}):=\{y^{\prime}\in Y:\exists x^{\prime}\in X^{\prime}\text{~such that~}(x^{\prime},y^{\prime})\in E\}.

A bipartite graph G:=(X∪˙Y,E)G:=(X\dot{\cup}Y,E) admits a non-empty envy-free matching —

(a) if and only if the bipartite graph (X∪˙NG(X),E)(X\dot{\cup}N_{G}(X),E) is not YY-path-saturated;

(c) if and only if there is a subset Y′⊆NG(X)Y^{\prime}\subseteq N_{G}(X) with ∣NG(Y′)∣≤∣Y′∣|N_{G}(Y^{\prime})|\leq|Y^{\prime}|.

Part (a) shows that all the “bad” graphs (graphs with only an empty envy-free matching) are similar to the odd-path example — they are all YY-path-saturated.

Parts (b) and (c) are similar to the condition in Hall’s marriage theorem . Hall’s theorem says that if (and only if) ∣NG(X′)∣≥∣X′∣|N_{G}(X^{\prime})|\geq|X^{\prime}| for any subset X′⊆XX^{\prime}\subseteq X, then GG admits an XX-saturating matching. The strong condition of Hall is sufficient for the strong property of having an XX-saturating matching; the weaker condition (b) is sufficient for the weaker property of having a non-empty envy-free matching. We note that part (b) was first proved by Luria 2013; we present an alternative proof.

Corollary 1.4(b) can be slightly generalised to provide a lower bound on the cardinality of an envy-free matching.

Let G:=(X∪˙Y,E)G:=(X\dot{\cup}Y,E) be a bipartite graph with ∣NG(X)∣≥∣X∣≥1|N_{G}(X)|\geq|X|\geq 1. If, for some integer k≥1k\geq 1, every vertex in NG(X)N_{G}(X) has at least kk neighbors in XX, then GG admits an envy-free matching of cardinality at least kk.

The structural theorem and its corollaries are proved in Section 2.

Once all envy-free matchings are “captured” within a specific subgraph G[XL,YL]G[X_{L},Y_{L}], it is easy to develop optimisation algorithms for them. Below, the number of vertices in the smaller part of GG is denoted by n‾:=min⁡(∣X∣,∣Y∣)\underline{n}:=\min(|X|,|Y|), and the number of edges by m:=∣E∣m:=|E|.

Given a bipartite graph G=(X∪˙Y,E)G=(X\dot{\cup}Y,E),

(a) An envy-free matching of maximum cardinality in GG can be found in O(mn‾)O(m\sqrt{\underline{n}}) time.

The algorithms are presented in Section 3.

Envy-free matching in fair division

A fair division problem is a problem of allocating resources among people with different preferences, such that each person conceives his or her share as “fair” according to a given fairness criterion.

The algorithms of Theorem 1.6 directly solve two variants of a problem known as fair house assignment. In this problem, the resources are indivisible, each agent must get at most a single resource, and the fairness criterion is envy-freeness. Part (a) solves a variant in which the goal is to maximise the number of agents assigned to a house that they like, subject to envy-freeness. Part (b) solves a variant in which each assignment of an agent to a house has a certain cost for society (e.g. the cost of building the house or of moving the agent to the house), and the goal is to minimise the total cost of the assignment, subject to envy-freeness and maximising the number of assigned agents. Both parts solve variants in which it is allowed to leave some houses unallocated.

Interestingly, the same algorithms, combined with Corollary 1.4, can be used as subroutines in algorithms for various other fair division problems, both of divisible and of indivisible resources, in which all resources must be allocated. Each of these problems requires its own notation and definitions, which are presented formally in Sections 4 and 5. Our results are presented informally below.

For a divisible resource (“cake”), we focus on a fairness criterion called proportionality, which means that each agent must get a piece that he/she values at least a fraction 1/n1/n of the total cake value . There are various algorithms for proportional cake division, but most of them are not symmetric — the same agent might get a different value when playing first vs. playing second. This may lead to quarrels regarding who should play first. Chèze 2018 presented a deterministic symmetric algorithm for proportional cake division, with an exponential run-time. He asked whether a polynomial-time algorithm exists. The following theorem answers his question; it is proved in Section 4.

There is a deterministic, symmetric and polynomial-time algorithm that entirely allocates a divisible resource (“cake”) among nn agents such that the value of each agent is at least 1/n1/n of the total cake value.

For indivisible objects, we focus on a fairness criterion called 1-out-of-kk maximin-share, which means that each agent weakly prefers his or her allocated bundle over the outcome of partitioning the objects into kk subsets and getting the worst subset. Procaccia and Wang 2014 proved that, when the objects are goods (i.e., each agent values each object at least 0), a 1-out-of-nn maximin-share allocation may not exist for n≥3n\geq 3 agents. They asked whether a 1-out-of-(n+1)(n+1) maximin-share allocation exists. The following theorem makes a step towards an answer; it is proved in Section 5.

Given a set of indivisible goods, and nn agents with additive valuations, there is a protocol that partitions all the goods among the agents, such that the value of each agent is at least the agent’s 1-out-of-(2n−2)(2n-2) maximin-share.

The same algorithm can be used when the objects are bads (i.e., each agent values each object at most 0; such objects are also known as chores).

Given a set of indivisible bads, and nn agents with additive valuations, there is a protocol that partitions all the bads among the agents, such that the value of each agent is at least the agent’s 1-out-of-⌊2n/3⌋\lfloor 2n/3\rfloor maximin-share.

Some extensions of the basic model and some open questions are presented in Section 6.

Concepts similar to envy-free matching appeared in previous papers related to fair division, but they were hidden inside proofs of more specific algorithms . Appendix B presents a detailed comparison. Presenting envy-free matching as a stand-alone graph-theoretic concept allows us to both simplify old algorithms and design new ones.

Bipartite graph structure and envy-free matchings

This section proves Theorem 1.3 and its corollaries. The main technical tool used is the alternating sequence.

Let MM be a matching in a bipartite graph G:=(X∪˙Y,E)G:=(X\dot{\cup}Y,E). Let X0⊂XX_{0}\subset X be the subset of vertices unmatched by MM. An MM-alternating sequence starting at X0X_{0} is a sequence of pairwise-disjoint subsets of vertices X0−Y1−X1−Y2−X2−⋯X_{0}-Y_{1}-X_{1}-Y_{2}-X_{2}-\cdots where for all i≥1i\geq 1: The MM-alternating sequence is closely related to the MM-alternating path — a sequence of vertices x0−y1−x1−...x_{0}-y_{1}-x_{1}-... where each even edge is in MM and each odd edge is not in MM (or vice versa). The difference is that the elements in an MM-alternating sequence are subsets of vertices rather than single vertices.

Yi=NG∖M(Xi−1) ∖ (∪j<iYj)Y_{i}=N_{G\setminus M}(X_{i-1})~\setminus~(\cup_{j<i}Y_{j}); Here G∖MG\setminus M denotes the graph GG with the edges of MM removed.

Given MM and X0X_{0}, it is simple to construct an MM-alternating sequence starting at X0X_{0}. Since the graph is finite, this construction eventually yields an empty subset — either XiX_{i} or YiY_{i} for some ii. Denote by S(M,X0)\mathcal{S}(M,X_{0}) the maximal MM-alternating sequence starting at X0X_{0} and ending before the first ∅\emptyset. This S(M,X0)\mathcal{S}(M,X_{0}) induces a partition of the graph as follows (See Figure 2):

X=XS∪˙XLX=X_{S}\dot{\cup}X_{L}, where XS:=∪i≥0XiX_{S}:=\cup_{i\geq 0}X_{i} = the vertices of XX participating in the sequence, and XL:=X∖XSX_{L}:=X\setminus X_{S} = the Leftover vertices.

Y=YS∪˙YLY=Y_{S}\dot{\cup}Y_{L}, where YS:=∪i≥1YiY_{S}:=\cup_{i\geq 1}Y_{i} and YL:=Y∖YSY_{L}:=Y\setminus Y_{S}.

Alternating sequences and maximum-cardinality matchings

When MM has maximum cardinality, its alternating sequences have useful properties. The vertices of XLX_{L} are exactly the vertices of XX that are unreachable from X0X_{0} in MM-alternating paths. Thus XLX_{L} is reminiscent of the “unreachable” set in the Dulmage-Mendelsohn decomposition . However, the reachability in the Dulmage-Mendelsohn decomposition is from the set of all unsaturated vertices, while the reachability in our case is only from X0X_{0} — the set of unsaturated vertices in XX.

Let MM be a maximum-cardinality matching in G=(X∪˙Y,E)G=(X\dot{\cup}Y,E) and X0:=X∖XM=X_{0}:=X\setminus X_{M}= the subset of XX unsaturated by MM. Consider the partitions X=XS∪˙XLX=X_{S}\dot{\cup}X_{L} and Y=YS∪˙YLY=Y_{S}\dot{\cup}Y_{L} induced by the maximal alternating sequence S(M,X0)\mathcal{S}(M,X_{0}). Then:

(a) There are no edges between XSX_{S} and YLY_{L};

(b) The subgraph G[XS,YS]G[X_{S},Y_{S}] is YY-path-saturated;

(c) The subgraph G[XL,YL]G[X_{L},Y_{L}] is XX-saturated.

Part (a). By construction, the set YSY_{S} is exactly the set of neighbors of XSX_{S} in GG.

Part (b). We first prove that M[XS,YS]M[X_{S},Y_{S}] — the subset of MM contained in G[XS,YS]G[X_{S},Y_{S}] — saturates YSY_{S}. Indeed, if, for some i≥1i\geq 1, some vertex yi∈Yiy_{i}\in Y_{i} were unmatched by MM, then an MM-alternating path could be traced along the edges used in the construction of S(M,X0)\mathcal{S}(M,X_{0}), namely: yi−Xi−1−Yi−1−⋯−X0y_{i}-X_{i-1}-Y_{i-1}-\cdots-X_{0}, where both end vertices are unmatched. By “inverting” the path, one could increase the size of the matching by one, but this contradicts the maximality of MM. Hence, all vertices of ∪i≥1Yi=YS\cup_{i\geq 1}Y_{i}=Y_{S} are matched by MM. By construction, the set of their matches in MM is ∪i≥1Xi⊆XS\cup_{i\geq 1}X_{i}\subseteq X_{S}.

This implies that the construction of S(M,X0)\mathcal{S}(M,X_{0}) ends at the XX side, i.e., it ends at XkX_{k} for some k≥0k\geq 0. Now, the partitions XS=X0∪˙⋯∪˙XkX_{S}=X_{0}\dot{\cup}\cdots\dot{\cup}X_{k} and YS=Y1∪˙⋯∪˙YkY_{S}=Y_{1}\dot{\cup}\cdots\dot{\cup}Y_{k} satisfy the definition of a YY-path-saturated graph (Definition 1.2): for every i≥1i\geq 1, every vertex in YiY_{i} is adjacent to some vertex in Xi−1X_{i-1}, and there is a perfect matching between XiX_{i} and YiY_{i} (along edges of MM).

Part (c). We prove that M[XL,YL]M[X_{L},Y_{L}] — the subset of MM contained in G[XL,YL]G[X_{L},Y_{L}] — saturates XLX_{L}. Indeed, by the lemma assumption, all vertices of XX unmatched by MM are contained in X0⊆XSX_{0}\subseteq X_{S}, so all vertices of XLX_{L} are matched by MM. By construction, they must be matched to vertices not in any YiY_{i}, so their matches must all lie inside YLY_{L}. ∎

Note that, in the special case in which GG is XX-saturated, the maximum matching MM saturates XX, so X0X_{0} is empty and the MM-alternating sequence is empty. In this case, XL=XX_{L}=X and YL=YY_{L}=Y. In the other extreme case, in which GG is an odd path, X0X_{0} always contains a single vertex which is one of the two endpoints, and the MM-alternating sequence spans the entire graph, so XS=XX_{S}=X and YS=YY_{S}=Y.

Alternating sequences and envy-free matchings

The following lemma relates the three properties (a),(b),(c) above to envy-free matchings.

Let G=(X∪˙Y,E)G=(X\dot{\cup}Y,E), and consider any partitions X=XS∪˙XLX=X_{S}\dot{\cup}X_{L} and Y=YS∪˙YLY=Y_{S}\dot{\cup}Y_{L} satisfying properties (a), (b) and (c) of Lemma 2.2. Then:

(d) Every XLX_{L}-saturating matching in G[XL,YL]G[X_{L},Y_{L}] is an envy-free matching in GG.

(e) Every envy-free matching in GG is contained in G[XL,YL]G[X_{L},Y_{L}].

Note that Lemma 2.3 does not refer to a particular maximum matching — it holds for any partitions of XX and YY that satisfy the properties (a),(b),(c) above.

Part (d). Let WW be an XLX_{L}-saturating matching in G[XL,YL]G[X_{L},Y_{L}]. Since WW saturates XLX_{L}, no vertex of XLX_{L} is envious. By property (a), there are no edges between XSX_{S} and YLY_{L}. Since only vertices of YLY_{L} are saturated by WW, no vertex of XSX_{S} is envious. Hence, no vertex of XX is envious, so WW is an envy-free matching in GG.

Part (e). Let WW be any envy-free matching in GG. Let XSW:=X_{SW}:= the subset of XSX_{S} saturated by WW and YSW:=Y_{SW}:= the subset of YSY_{S} saturated by WW. We have to prove that both XSWX_{SW} and YSWY_{SW} are empty. By property (a), vertices of XSWX_{SW} can only be matched to vertices of YSWY_{SW}, so it is sufficient to prove that YSWY_{SW} is empty. The proof is by a counting argument. Let kSW:=∣YSW∣k_{SW}:=|Y_{SW}| and assume by contradiction that kSW>0k_{SW}>0.

By property (b), the graph G[XS,YS]G[X_{S},Y_{S}] is YY-path-saturated; denote the partitions appearing in Definition 1.2 by XS=X0∪˙⋯∪˙XkX_{S}=X_{0}\dot{\cup}\cdots\dot{\cup}X_{k} and YS=Y1∪˙⋯∪˙YkY_{S}=Y_{1}\dot{\cup}\cdots\dot{\cup}Y_{k}. Let i≥1i\geq 1 be the smallest index such that a vertex of YiY_{i} is matched by WW, so that YSW⊆∪j≥iYjY_{SW}\subseteq\cup_{j\geq i}Y_{j}. By Definition 1.2, all vertices of YSWY_{SW} are perfectly matched to vertices of ∪j≥iXj\cup_{j\geq i}X_{j}; denote their matches by XSW′X_{SW}^{\prime}. Note that ∣XSW′∣=kSW|X_{SW}^{\prime}|=k_{SW}. Every vertex x∈XSW′x\in X_{SW}^{\prime} is adjacent (along an edge of the perfect matching) to a vertex of YSWY_{SW}, which is saturated by WW. To ensure that xx is not envious, xx must be saturated by WW too.

Let y′y^{\prime} be a vertex in Yi∩YSWY_{i}\cap Y_{SW}. By Definition 1.2, it is adjacent to some vertex x′∈Xi−1x^{\prime}\in X_{i-1}. To ensure that x′x^{\prime} is not envious, x′x^{\prime} must be saturated by WW too. But x′∉XSW′x^{\prime}\not\in X_{SW}^{\prime} since XSW′⊆∪j≥iXjX_{SW}^{\prime}\subseteq\cup_{j\geq i}X_{j}. Hence, there must be at least kSW+1k_{SW}+1 vertices of XSX_{S} that are saturated by WW: the kSWk_{SW} vertices of XSW′X_{SW}^{\prime}, plus the vertex x′x^{\prime} which is not in XSW′X_{SW}^{\prime}. But this is a contradiction, since vertices of XSX_{S} can be matched only to vertices of YSY_{S}, and only kSWk_{SW} vertices of YSY_{S} are matched by WW. ∎

We now have all the ingredients required to prove Theorem 1.3, which we restate below.

The EFM partition

Every bipartite graph G=(X∪˙Y,E)G=(X\dot{\cup}Y,E) admits a unique partition X=XS∪˙XLX=X_{S}\dot{\cup}X_{L} and Y=YS∪˙YLY=Y_{S}\dot{\cup}Y_{L} satisfying the following three conditions:

(a) There are no edges between XSX_{S} and YLY_{L};

(b) The subgraph G[XS,YS]G[X_{S},Y_{S}] is YY-path-saturated;

(c) The subgraph G[XL,YL]G[X_{L},Y_{L}] is XX-saturated.

Moreover, this unique partition has the following additional properties:

(d) Every XLX_{L}-saturating matching in G[XL,YL]G[X_{L},Y_{L}] is an envy-free matching in GG.

(e) Every envy-free matching in GG is contained in G[XL,YL]G[X_{L},Y_{L}].

Let G=(X∪˙Y,E)G=(X\dot{\cup}Y,E) be a bipartite graph, MM an arbitrary maximum matching in GG, and XS∪˙XLX_{S}\dot{\cup}X_{L} and Y=YS∪˙YLY=Y_{S}\dot{\cup}Y_{L} the partitions induced by its maximal alternating sequence.

Lemma 2.2 shows that these partitions satisfy properties (a), (b) and (c). Lemma 2.3 then shows that parts (d) and (e) are satisfied too.

It remains to prove that the partitions are unique, that is, do not depend on the selection of the maximum matching MM.

Consider alternative partitions X=XS′∪˙XL′X=X_{S}^{\prime}\dot{\cup}X_{L}^{\prime} and Y=YS′∪˙YL′Y=Y_{S}^{\prime}\dot{\cup}Y_{L}^{\prime} satisfying properties (a), (b) and (c). Applying Lemma 2.3(d) to the partitions XS∪˙XLX_{S}\dot{\cup}X_{L}, YS∪˙YLY_{S}\dot{\cup}Y_{L} implies that there is an envy-free matching in GG saturating XLX_{L}. Applying Lemma 2.3(e) to the partition XS′∪˙XL′X_{S}^{\prime}\dot{\cup}X_{L}^{\prime}, YS′∪˙YL′Y_{S}^{\prime}\dot{\cup}Y_{L}^{\prime} implies that this matching must be contained in G[XL′,YL′]G[X_{L}^{\prime},Y_{L}^{\prime}]; in particular, XL⊆XL′X_{L}\subseteq X_{L}^{\prime}. Analogous arguments imply that XL′⊆XLX_{L}^{\prime}\subseteq X_{L}. Hence XL′=XLX_{L}^{\prime}=X_{L}. Hence also XS′=XSX_{S}^{\prime}=X_{S}. Since YS=NG(XS)Y_{S}=N_{G}(X_{S}) and YS′=NG(XS′)Y_{S}^{\prime}=N_{G}(X_{S}^{\prime}), we also have YS′=YSY_{S}^{\prime}=Y_{S}. Hence also YL′=YLY_{L}^{\prime}=Y_{L}. ∎

Note how the concept of envy-free matching helped us prove the uniqueness of the partition, which is a general fact about bipartite graphs.

Conditions for existence of envy-free matchings

We now prove Corollary 1.4. It is simpler to prove in the following “reverse” formulation.

A bipartite graph G:=(X∪˙Y,E)G:=(X\dot{\cup}Y,E) admits only an empty envy-free matching —

(a) if and only if the bipartite graph (X∪˙NG(X),E)(X\dot{\cup}N_{G}(X),E) is YY-path-saturated;

(c) if and only if ∣NG(Y′)∣>∣Y′∣|N_{G}(Y^{\prime})|>|Y^{\prime}| for all non-empty subsets Y′⊆NG(X)Y^{\prime}\subseteq N_{G}(X).

Part (a). Consider the unique partitions X=XS∪˙XLX=X_{S}\dot{\cup}X_{L} and Y=YS∪˙YLY=Y_{S}\dot{\cup}Y_{L} that exist by Theorem 1.3. Parts (d,e) of this theorem imply that GG admits only an empty envy-free matching iff XLX_{L} is empty. Hence it is sufficient to show that the graph (X∪˙NG(X),E)(X\dot{\cup}N_{G}(X),E) is YY-path-saturated iff XLX_{L} is empty.

If XLX_{L} is empty, then X=XSX=X_{S} and NG(X)=YSN_{G}(X)=Y_{S}, so the graph (X∪˙NG(X),E)(X\dot{\cup}N_{G}(X),E) is YY-path-saturated.

Conversely, suppose (X∪˙NG(X),E)(X\dot{\cup}N_{G}(X),E) is YY-path-saturated, and define XS′:=XX_{S}^{\prime}:=X and XL′:=∅X_{L}^{\prime}:=\emptyset and YS′:=NG(X)Y_{S}^{\prime}:=N_{G}(X) and YL′:=Y∖NG(X)Y_{L}^{\prime}:=Y\setminus N_{G}(X). Then, the partitions X=XS′∪˙XL′X=X_{S}^{\prime}\dot{\cup}X_{L}^{\prime} and Y=YS′∪˙YL′Y=Y_{S}^{\prime}\dot{\cup}Y_{L}^{\prime} satisfy all three properties (a,b,c) of Theorem 1.3: there are no edges between XS′X_{S}^{\prime} and YL′Y_{L}^{\prime}; the subgraph G[XS′,YS′]G[X_{S}^{\prime},Y_{S}^{\prime}] is YY-path-saturated by assumption; and the subgraph G[XL′,YL′]G[X_{L}^{\prime},Y_{L}^{\prime}] is vacuously XX-saturated. Now, the uniqueness of the partition implies that XL=XL′=∅X_{L}=X_{L}^{\prime}=\emptyset.

Part (b). Every YY-path-saturated graph is either empty, or its YY side is smaller than its XX side.

Part (c). In every YY-path-saturated graph, every non-empty subset in the YY side is contained in ∪j≥iYj\cup_{j\geq i}Y_{j} for some i≥1i\geq 1. It is perfectly matched to some subset of ∪j≥iXj\cup_{j\geq i}X_{j}, and moreover, the vertices of YiY_{i} are adjacent to some vertices of Xi−1X_{i-1}; therefore ∣NG(Y′)∣>∣Y′∣|N_{G}(Y^{\prime})|>|Y^{\prime}|.

Conversely, if ∣NG(Y′)∣>∣Y′∣|N_{G}(Y^{\prime})|>|Y^{\prime}| for all non-empty Y′⊆NG(X)Y^{\prime}\subseteq N_{G}(X), then every non-empty Y′Y^{\prime} that is perfectly matched to some subset X′⊆XX^{\prime}\subseteq X, must be adjacent to some vertices in X∖X′X\setminus X^{\prime}. This implies that, in the unique EFM partition, YLY_{L} must be empty — since otherwise it would have to be adjacent to some vertices in XSX_{S}, in contradiction to property (a). ∎

Let G:=(X∪˙Y,E)G:=(X\dot{\cup}Y,E) be a bipartite graph with ∣NG(X)∣≥∣X∣≥1|N_{G}(X)|\geq|X|\geq 1. If, for some integer k≥1k\geq 1, every vertex in NG(X)N_{G}(X) has at least kk neighbors, then GG admits an envy-free matching of cardinality at least kk.

Corollary 1.4(b) implies that GG admits a non-empty envy-free matching. Any matched vertex in YY has at least kk neighbors. By envy-freeness, all these neighbors must be matched. ∎

Algorithms for finding envy-free matchings

This section applies the structural results of the previous section to prove Theorem 1.6.

The proof uses a simple algorithm (Algorithm 1) for finding the unique EFM partition of a bipartite graph GG. The algorithm first finds an arbitrary maximum-cardinality matching in GG; this can be done using the classic algorithm of Hopcroft and Karp 1973. Ramshaw and Tarjan 2012 show that this algorithm runs within O(mn‾)O(m\sqrt{\underline{n}}) time.

Then, the algorithm finds the set X0X_{0} of unmatched vertices and the maximal alternating sequence S(M,X0)\mathcal{S}(M,X_{0}). The sets XS,YSX_{S},Y_{S} are just the union of the subsets of X,YX,Y participating in the sequence, and the sets XL,YLX_{L},Y_{L} are the remaining vertices in X,YX,Y. These can all be found in time linear in n+mn+m, since the algorithm entails to examine every vertex and scan its adjacent edges a constant number of times. Therefore, the total run-time of Algorithm 1 is O(mn‾)O(m\sqrt{\underline{n}}).

The theorem claims that, given a bipartite graph GG, an envy-free matching of maximum cardinality can be found within O(mn‾)O(m\sqrt{\underline{n}}) time.

This can be done simply by the following algorithm:

Find the EFM partition of GG using Algorithm 1.

Return an arbitrary maximum-cardinality matching in G[XL,YL]G[X_{L},Y_{L}].

By Theorem 1.3(a), the returned matching saturates XLX_{L}; by Theorem 1.3(d), it is envy-free; by Theorem 1.3(e), no other envy-free matching can saturate any vertex of XSX_{S}. Therefore, the returned matching is indeed a maximum-cardinality envy-free matching. ∎

To save time, instead of returning an arbitrary maximum-cardinality matching in G[XL,YL]G[X_{L},Y_{L}], we can re-use the maximum-cardinality matching MM which is needed for computing the EFM partition, and return its subset M[XL,YL]M[X_{L},Y_{L}] — the set of edges of the matching MM that link vertices of XLX_{L} to vertices of YLY_{L}; see Algorithm 2. By Lemmas 2.2 and 2.3, this subset is an envy-free matching and it saturates XLX_{L}.

Consider the bipartite graph in Figure 2. Algorithm 1 finds the EFM partition X=XS∪˙XLX=X_{S}\dot{\cup}X_{L} and Y=YS∪˙YLY=Y_{S}\dot{\cup}Y_{L} as indicated in the figure. Assuming the matching MM is denoted by bold vertical edges, Algorithm 2 returns the set of two rightmost vertical edges, which is an envy-free matching of size 22.

Minimum cost envy-free matching

The proof uses Algorithm 3. Just like Algorithm 2, it starts by finding the unique EFM partition of GG. The difference is in the last step: instead of returning M[XL,YL]M[X_{L},Y_{L}], which is an arbitrary XLX_{L}-saturating matching, it returns an XLX_{L}-saturating matching of minimum cost.

Finding a minimum-cost maximum-cardinality matching is known as the assignment problem. Since XLX_{L} and YLY_{L} may be of different sizes, it is an unbalanced assignment problem. Ramshaw and Tarjan 2012 provide a comprehensive survey of algorithms for the unbalanced assignment problem. In particular, they show that the famous Hungarian method can be generalised to unbalanced bipartite graphs, and its run-time is O(m⋅n‾+n‾2log⁡n‾)O(m\cdot\underline{n}+{\underline{n}}^{2}\log{\underline{n}}).

By Theorem 1.3, all envy-free matchings in GG are contained in the subgraph G[XL,YL]G[X_{L},Y_{L}], and all maximum-cardinality matchings in G[XL,YL]G[X_{L},Y_{L}] saturate XLX_{L} and are therefore envy-free. Hence, the Hungarian method on G[XL,YL]G[X_{L},Y_{L}] yields a maximum-cardinality envy-free matching of minimum cost in GG. Since ∣XL∣≤∣YL∣|X_{L}|\leq|Y_{L}|, the run-time of the Hungarian method is O(m⋅∣XL∣+∣XL∣2log⁡∣XL∣)O(m\cdot|X_{L}|+{|X_{L}|}^{2}\log{|X_{L}|}) which is in O(m⋅n‾+n‾2log⁡n‾)O(m\cdot\underline{n}+{\underline{n}}^{2}\log{\underline{n}}). ∎

Consider again Figure 2. The subgraph G[XL,YL]G[X_{L},Y_{L}] contains three edges; denote them from left to right by e1,e2,e3e_{1},e_{2},e_{3}. This subgraph contains two maximum-cardinality matchings: {e1,e2}\{e_{1},e_{2}\} and {e1,e3}\{e_{1},e_{3}\}. Both are envy-free matchings in GG. Algorithm 3 returns one of them, depending on whether w(e1)+w(e2)w(e_{1})+w(e_{2}) or w(e1)+w(e3)w(e_{1})+w(e_{3}) is smaller.

Application to fair division

We consider first the following generic fair division problem.

There is a set CC, representing a resource that has to be divided among nn agents.

A tt-fair division of CC is a partition of CC into nn subsets, C=Z1∪˙⋯∪˙ZnC=Z_{1}\dot{\cup}\cdots\dot{\cup}Z_{n}, such that

The existence of a tt-fair division depends on the threshold values tit_{i} and on the nature of the resource CC. For example, if ti>Vi(C)/nt_{i}>V_{i}(C)/n for all i∈[n]i\in[n], then a tt-fair division obviously might not exist (e.g. when the agents’ valuations are identical). Similarly, if CC contains a single (indivisible) object, and the threshold values are positive, then a tt-fair division does not exist. We prove that a tt-fair division exists whenever the threshold values are ”reasonable”, in the sense defined below.

(1) There exists a partition of CC into C1∪˙⋯∪˙CnC_{1}\dot{\cup}\cdots\dot{\cup}C_{n}, such that

(Informally, ii can partition CC into nn subsets that are acceptable by ii’s own standards).

(2) For every k∈{1,…,n−1}k\in\{1,\ldots,n-1\}, and every kk disjoint subsets U1,…,Uk⊆CU_{1},\ldots,U_{k}\subseteq C, if

then there exists a partition of C∖∪j∈[k]UjC\setminus\cup_{j\in[k]}U_{j} into C1∪˙⋯∪˙Cn−kC_{1}\dot{\cup}\cdots\dot{\cup}C_{n-k}, such that

(Informally, if any kk Unacceptable subsets are given away, then ii can partition the remainder into n−kn-k acceptable subsets). Condition (1) is the special case of condition (2) for k=0k=0; it is presented as a different condition for the sake of clarity.

Consider a resource CC and value measures V1,…,VnV_{1},\ldots,V_{n} on CC. If tit_{i} is a reasonable threshold for ViV_{i} for all i∈[n]i\in[n], then a tt-fair division exists.

The proof is constructive and uses Algorithm 4, which generalises an algorithm of Kuhn 1967. It is described in detail below.

Step 1 asks some arbitrary agent aa to partition the resource into ∣X∣|X| pieces that are acceptable by her own standards. In the first iteration, this is possible thanks to condition (1) in the definition of a reasonable threshold; below, we will show that this is possible in the following iterations too.

Step 2 constructs a bipartite graph where each agent is adjacent to all the pieces that are acceptable for him.

Step 3 finds a maximum-cardinality envy-free matching in this graph. Since aa is adjacent to all ∣X∣|X| pieces, ∣NG(X)∣≥∣X∣|N_{G}(X)|\geq|X|, so by Corollary 1.4, a non-empty envy-free matching is found. Each matched agent i∈XMi\in X_{M} receives a piece with a value of at least tit_{i}, so the fairness condition is satisfied for these agents.

Step 4 removes the matched agents and pieces, and goes back to step 1 to handle the remaining agents. Let kk be the total number of pieces allocated in all previous iterations, so that ∣X∖XM∣=n−k|X\setminus X_{M}|=n-k. By the definition of envy-free matching, for each unmatched agent i∈X∖XMi\in X\setminus X_{M}, the value of each allocated piece is less than tit_{i}. Therefore, by condition (2) in the definition of a reasonable threshold, each remaining agent can partition the remaining resource as required in step 1.

The size of XX decreases by at least 1 in each iteration. Therefore, after at most nn iterations the algorithm ends with a tt-fair division. ∎

At each iteration, the partition in step 1 requires to ask agent aa at most nn queries. Constructing the graph in step 2 requires to ask each of the other agents at most nn queries (one query for each piece). There are at most nn iterations, so each agent is asked O(n2)O(n^{2}) queries, and the total number of required queries is O(n3)O(n^{3}).

The Lone Divider algorithm is not strategyproof — agent ii might gain from reporting a false value measure ViV_{i}. This holds even when n=2n=2, when Lone Divider is equivalent to cut-and-choose. See e.g. Brams and Taylor 1996 for a discussion of this issue. In this paper, we ignore these strategic issues and assume that the agents report their valuations truthfully.

Below we apply Theorem 4.2 to some specific fair division problems.

Proportional cake-cutting

A proportional cake-cutting problem is a special case of the generic fair division problem, in which —

The resource CC is continuous; it is usually called “cake” and represented by the real interval $$.

The value measures (Vi)i∈[n](V_{i})_{i\in[n]} are nonatomic.

For each agent ii, the threshold value is ti=Vi(C)/nt_{i}=V_{i}(C)/n.

These threshold values are reasonable (see Definition 4.1):

holds thanks to the assumption that the value measures are nonatomic. For each measure ViV_{i}, the cake can be partitioned into nn subsets of equal measure, which is exactly Vi(C)/nV_{i}(C)/n.

holds since, if we remove from CC any kk subsets with a value smaller than Vi(C)/nV_{i}(C)/n, then the value of the remainder is at least Vi(C)−knVi(C)=(n−k)⋅Vi(C)/nV_{i}(C)-\frac{k}{n}V_{i}(C)=(n-k)\cdot V_{i}(C)/n; hence it can be partitioned into n−kn-k subsets of value at least Vi(C)/nV_{i}(C)/n.

Hence, by Theorem 4.2, the Lone Divider algorithm can be used to find a proportional cake-cutting. In fact, the Lone Divider algorithm was originally stated specifically for the proportional cake-cutting problem. Steinhaus presented it for 33 agents. Kuhn extended it to an arbitrary number of agents. The cases n=3n=3 and n=4n=4 are described in detail by Brams and Taylor 1996[pages 31-35], and the general case is described in detail by Robertson and Webb 1998[pages 83-87]. Note how the use of envy-free matchings lets us present this algorithm in a much shorter way.

The Lone Divider algorithm requires O(n3)O(n^{3}) queries. Another cake-cutting algorithm, by Even and Paz 1984, requires only O(nlog⁡n)O(n\log{n}) queries. However, Lone Divider has other advantages. One advantage is that it does not assume that all valuations are positive, or even that all valuations have the same sign: it is applicable to a “mixed manna” setting, in which each part of the cake may be positive to some agents and negative to others . A second advantage of Lone Divider is that can be modified to be not only fair but also symmetric. This is explained in the following subsection.

Symmetric algorithm for proportional cake-cutting

This subsection proves Theorem 1.7 regarding a symmetric proportional cake-cutting algorithm. A fair division algorithm is called symmetric if the value each agent receives depends only on the valuations of the agents, and not on the order in which the algorithm processes them. In other words, if we run the algorithm, permute the agents, and run the algorithm again, every agent has the same value in both runs. Most cake-cutting algorithms are not symmetric. For example, in Algorithm 4, the cutter in step 1 (agent aa) always receives exactly 1/n1/n of the total value, while other agents may get more than 1/n1/n. It is assumed here that the agents answer the queries truthfully, based on their real value measure. This might make the agents quarrel over who the cutter will be. One solution is to select the cutter uniformly at random. But is there a symmetric deterministic algorithm?

Manabe and Okamoto 2010 presented deterministic symmetric algorithms for two and three agents. The case n≥4n\geq 4 remained open until Chèze 2018 presented a deterministic symmetric algorithm for any number of agents. Chèze mentions that the number of arithmetic operations required by his algorithm may be exponential in nn, and asks whether there exists a deterministic symmetric algorithm in which the number of arithmetic operations required is polynomial in nn. We answer his question in the affirmative by combining his algorithm with our Algorithm 3 for minimum-cost envy-free matching. The combined algorithm is shown as Algorithm 5. The general scheme is similar to the Lone Divider method, but there are several important changes, which are explained below.

The first change from Lone Divider is that the initial partition should be decided in a way that depends only on the valuations. This is done in step 2 using lexicographic ordering.

For example, if Alice cuts the cake at 0.3,0.70.3,0.7, Bob cuts at 0.4,0.60.4,0.6 and Carl at 0.2,0.60.2,0.6, then the algorithm selects Carl partition, since the cut-pair (0.2,0.6)(0.2,0.6) is lexicographically smaller than the other two cut-pairs. Hence, in the initial partition, the cake is cut at 0.20.2 and 0.60.6, so C1=[0,0.2]C_{1}=[0,0.2] and C2=[0.2,0.6]C_{2}=[0.2,0.6] and C3=[0.6,1]C_{3}=[0.6,1].

The second change is in steps 4–6. Since there may be many different envy-free matchings, one of them must be selected in a way that depends only on the valuations. One way to select a unique envy-free matching is to assign to each edge, a cost that is a unique power of two. This guarantees that each subset of edges has a unique cost, so there is a unique minimum-cost maximum-cardinality envy-free matching. However, symmetry requires that the edge costs themselves should depend only on the valuations. Therefore, edges may have different costs only if they are adjacent to different pieces (since the pieces depend only on the valuations), or to agents with different valuations. This motivates the weighting scheme in steps 4–6. An example of a graph with some edge costs is shown in Figure 3. Note that the length of the costs in binary is polynomial in the graph size.

In the special case that each agent has a unique set of neighbors, the agent weights are unique, the edge costs are unique powers of two, each matching has a unique cost, and thus the minimum-cost envy-free matching MM found in step 6 is uniquely determined by the valuations. In this special case, the algorithm can just proceed as in Algorithm 4: give each piece in YMY_{M} to the agent matched to it in XMX_{M}, and recursively divide the remaining cake — the union of pieces in Y∖YMY\setminus Y_{M} — among the remaining agents in X∖XMX\setminus X_{M}.

In the general case, there may be several different minimum-cost envy-free matchings, and step 6 returns one of them, in a way that may depend on the agents’ order. Therefore, to preserve symmetry, care must be taken to ensure that the agents’ values are not sensitive to the minimum-cost matching selected. Note that all these minimum-cost matchings have the same set XMX_{M} of matched agents — it is exactly the set XLX_{L} defined by the unique partition of Theorem 1.3. Moreover, by the determination of edge costs, all these matchings have the same set YMY_{M} of matched pieces. So the sets XMX_{M} and YMY_{M} are uniquely determined by the valuations; only the pairing of agents in XMX_{M} with pieces in YMY_{M} is not uniquely determined and must be handled in the following steps.

Consider first the set XYX_{Y} defined in step 7. Note that it contains at least one agent — the agent responsible to the lexicographically-smallest partition selected in step 2 (in Figure 3, the set XYX_{Y} contains the two agents with weight 1). By envy-freeness of MM, all agents in XYX_{Y} are matched by MM. By the determination of edge costs, all minimum-cost envy-free matchings M′M^{\prime} in GG have the same set NM′(XY)N_{M^{\prime}}(X_{Y}), i.e., in all these matchings, the same pieces are allocated to the agents in XYX_{Y}. Since all agents in XYX_{Y} value all pieces in YY at exactly 11, it is possible to give each agent in XYX_{Y} an arbitrary piece in NM(XY)N_{M}(X_{Y}), for example, based on the agents’ indices. This arbitrary choice does not affect the value of any agent; all agents in XYX_{Y} are treated symmetrically.

Consider now the sets X1,…,XkX_{1},\ldots,X_{k} defined in step 8 (in Figure 3 there are two such sets: the set X1X_{1} contains the two leftmost agents whose weight is 00, and the set X2X_{2} contains the rightmost agent whose weight is 22). For each j∈[k]j\in[k], all agents in XjX_{j} have the same weight, so they have the same set of neighbors. Hence, by envy-freeness of MM, if one agent in a set XjX_{j} is matched by MM, then all agents in XjX_{j} must be matched by MM too. By the determination of edge costs, all minimum-cost envy-free matchings M′M^{\prime} in GG have the same set NM′(Xj)N_{M^{\prime}}(X_{j}), i.e., in all these matchings, the same pieces are allocated to the agents in XjX_{j}. Here, it is not possible to give each agent in XjX_{j} an arbitrary piece in NM(Xj)N_{M}(X_{j}), since each agent in XjX_{j} may value the pieces in NM(Xj)N_{M}(X_{j}) differently. However, by definition of the graph GG, all agents in XjX_{j} value each piece in NM(Xj)N_{M}(X_{j}) at least 11, so they value the union of NM(Xj)N_{M}(X_{j}) at least ∣Xj∣|X_{j}|. Therefore, by recursively dividing the union of NM(Xj)N_{M}(X_{j}) among the agents in XjX_{j}, each agent in XjX_{j} is guaranteed a value of at least 11. All agents in XjX_{j} are treated symmetrically.

Finally, step 10 of Algorithm 5 is analogous to step 4 of Algorithm 4: by envy-freeness of MM, the agents in X∖XMX\setminus X_{M} value each piece given away at less than 11, so they value the remaining cake at more than ∣X∖XM∣|X\setminus X_{M}|, so the recursive call gives each of them a value of at least 11.

From the above discussion, it follows that Algorithm 5 is symmetric, it runs in polynomial time, and it finds a proportional cake-allocation, as claimed in Theorem 1.7.

Other applications

Another application of envy-free matching is found in a generalisation of cake-cutting called multi-cake cutting. In this problem, the cake is made of mm pairwise-disjoint sub-cakes (“islands”), and each agent should be given a piece that overlaps at most kk islands, for some fixed integer k≥1k\geq 1. When k<mk<m, it may be impossible to guarantee to each agent 1/n1/n of the total value. A natural question is what fraction can be guaranteed, as a function of k,m,nk,m,n. Recently, Segal-Halevi 2021 proved that the fraction is min⁡(1n,km+n−1)\min({1\over n},{k\over m+n-1}). The proof is constructive and uses envy-free matching in a different way than the Lone Divider algorithm. Envy-free matchings were also applied for cutting a cake in the form of a general graph, representing e.g. a road network .

Fair allocation of discrete objects

A fair object allocation problem is a special case of the generic fair division problem, in which —

The resource CC is a finite set; its elements are called objects or items.

Objects with a positive value to all agents are usually called goods; objects with a negative value are called bads or chores.

In this setting, a proportional allocation might not exist, i.e., it may be impossible to find a tt-fair division with threshold values ti=Vi(C)/nt_{i}=V_{i}(C)/n; consider for example the case in which CC contains a single object. Hence, proportionality is often relaxed to the maximin share, which is defined below.

The maximin-share is well-defined both for goods and for bads. For example, suppose CC contains three goods o1,o2,o3o_{1},o_{2},o_{3}, and some agent ii values them at 2,3,42,3,4 respectively. Then \textscMMSi1-out-of-2(C)=4\textsc{MMS}^{1\text{-out-of-}2}_{i}\left(C\right)=4, by the partition {o1,o2},{o3}\{o_{1},o_{2}\},\{o_{3}\}. If the objects are bads and their values are −2,−3,−4-2,-3,-4, then \textscMMSi1-out-of-2(C)=−5\textsc{MMS}^{1\text{-out-of-}2}_{i}\left(C\right)=-5 by the same partition.

Note that for goods \textscMMSi1-out-of-k(C)\textsc{MMS}^{1\text{-out-of-}k}_{i}\left(C\right) is a weakly-decreasing function of kk, while for bads the opposite is true — it is a weakly-increasing function of kk.

The values ti=\textscMMSi1-out-of-n(C)t_{i}=\textsc{MMS}^{1\text{-out-of-}n}_{i}\left(C\right) are particularly interesting, since they are the largest values that satisfy condition (1) for reasonable thresholds. When n=2n=2, these values satisfy condition (2) too (note that we only have to check the case k=1k=1): if one subset with value less than \textscMMSi1-out-of-2(C)≤Vi(C)/2\textsc{MMS}^{1\text{-out-of-}2}_{i}\left(C\right)\leq V_{i}(C)/2 is removed, then the value of the remaining objects is more than Vi(C)/2≥\textscMMSi1-out-of-2(C)V_{i}(C)/2\geq\textsc{MMS}^{1\text{-out-of-}2}_{i}\left(C\right). Therefore, a tt-fair allocation exists.

Procaccia and Wang 2014 prove that, for any n≥3n\geq 3, there might not exist a tt-fair division with ti=\textscMMSi1-out-of-n(C)t_{i}=\textsc{MMS}^{1\text{-out-of-}n}_{i}\left(C\right). They present a multiplicative approximation to the threshold values, ti=γ⋅\textscMMSi1-out-of-n(C)t_{i}=\gamma\cdot\textsc{MMS}^{1\text{-out-of-}n}_{i}\left(C\right), for some fraction γ∈(0,1)\gamma\in(0,1). They present an algorithm attaining a tt-fair division for a fraction γ\gamma that equals 3/43/4 for n∈{3,4}n\in\{3,4\}, and approaches 2/32/3 as n→∞n\to\infty.

An alternative approximation, suggested by Budish 2011, is ti=t_{i}= \textscMMSi1-out-of-n+1(C)\textsc{MMS}^{1\text{-out-of-}n+1}_{i}\left(C\right). In contrast to the multiplicative approximation, the existence of a tt-fair allocation with these thresholds depends only on the agents’ rankings of the bundles, and not on the specific values assigned to them. In other words, an allocation that is tt-fair with the 1-out-of-(n+1)(n+1) MMS thresholds remains fair even if the agents’ value functions are modified, as long as the order between the bundles’ values remains the same for every agent. Therefore, we call this kind of approximation an ordinal approximation. Regarding the 1-out-of-(n+1)(n+1) MMS, Procaccia and Wang 2014 say that

“We have designed an algorithm that achieves this guarantee for the case of three players (it is already nontrivial). Proving or disproving the existence of such allocations for a general number of players remains an open problem.”

They do not present the algorithm for n=3n=3. Perhaps they wanted to write it in the margin but the margin was too narrow ☺ Below we prove that the Lone Divider algorithm can be used to attain a tt-fair division with ti=\textscMMSi1-out-of-2n−2(C)t_{i}=\textsc{MMS}^{1\text{-out-of-}2n-2}_{i}\left(C\right), which for n=3n=3 coincides with \textscMMSi1-out-of-n+1(C)\textsc{MMS}^{1\text{-out-of-}n+1}_{i}\left(C\right).

Maximin-share allocation of goods

The proof of Theorem 1.8 uses the following combinatorial lemmas. We are grateful to user bof of MathOverflow.com for the proof idea: https://mathoverflow.net/a/334754/34461

Let (aj)j=1N(a_{j})_{j=1}^{N} be real numbers such that for all j∈[N]j\in[N]: aj∈a_{j}\in. If ∑jaj≥A\sum_{j}a_{j}\geq A for some integer AA, then the aja_{j} can be partitioned into ⌈A/2⌉\lceil A/2\rceil subsets such that the sum of each subset is at least 11.

Collect the aja_{j} sequentially into subsets, starting with a1a_{1}, until the sum of the current subset is at least one. Continue constructing subsets in this way until all the aja_{j}-s are arranged in subsets. Let s+1s+1 be the number of constructed subsets, where the sum of the first ss subsets is at least 11 and the sum of the last subset (which may be empty) is less than 11. Since aj≤1a_{j}\leq 1, the sum of each of the first ss subsets is less than 22. Therefore, the sum of all subsets is less than 2s+12s+1. Hence, 2s+1>A2s+1>A so 2s≥A2s\geq A so s≥⌈A/2⌉s\geq\lceil A/2\rceil, since ss and AA are integers. ∎

Let (bj)j=1N(b_{j})_{j=1}^{N}, (cj)j=1N(c_{j})_{j=1}^{N} be real numbers such that for all j∈[N]j\in[N]: bj∈[0,cj]b_{j}\in[0,c_{j}] and cj≥1c_{j}\geq 1. If ∑jbj≥(∑jcj)−k\sum_{j}b_{j}\geq(\sum_{j}c_{j})-k for some integer k≥0k\geq 0, then the bjb_{j} can be partitioned into ⌈(N−k)/2⌉\lceil(N-k)/2\rceil subsets such that the sum of each subset is at least 11.

Figuratively, the lemma says the following. There are NN bottles of water, each of which contains at least 11 litre. Some water is spilled out of some of the bottles, such that the total amount spilled out is at most kk litres. Then, the bottles can be grouped into ⌈(N−k)/2⌉\lceil(N-k)/2\rceil subsets, such that the bottles in each subset together contain at least 11 litre of water.

Let aj:=bj/cja_{j}:=b_{j}/c_{j} for all j∈[N]j\in[N]. Then aj∈a_{j}\in, and

By Lemma 5.1, the aja_{j} can be partitioned into ⌈(N−k)/2⌉\lceil(N-k)/2\rceil subsets with a sum of at least 11. Since bj=cj⋅aj≥ajb_{j}=c_{j}\cdot a_{j}\geq a_{j}, the sum of bjb_{j} corresponding to the aja_{j} in each subset is at least 11. ∎

We now prove Theorem 1.8, which says that there always exists an allocation of goods among nn agents giving each agent ii a value of at least \textscMMSi1-out-of-2n−2(C)\textsc{MMS}^{1\text{-out-of-}2n-2}_{i}\left(C\right).

We prove that the threshold values ti=\textscMMSi1-out-of-2n−2(C)t_{i}=\textsc{MMS}^{1\text{-out-of-}2n-2}_{i}\left(C\right) are reasonable, as defined in Definition 4.1. Condition (1) is obviously satisfied: by definition of MMS, each agent ii can partition CC into nn subsets worth at least \textscMMSi1-out-of-n(C)\textsc{MMS}^{1\text{-out-of-}n}_{i}\left(C\right), which is at least as large as \textscMMSi1-out-of-2n−2(C)\textsc{MMS}^{1\text{-out-of-}2n-2}_{i}\left(C\right).

For Condition (2), let N:=2n−2N:=2n-2, and let (Cj)j∈[N](C_{j})_{j\in[N]} be a 1-out-of-NN MMS partition of agent ii. Let cj:=Vi(Cj)/tic_{j}:=V_{i}(C_{j})/t_{i}. By definition of the MMS, cj≥1c_{j}\geq 1 for all j∈[N]j\in[N].

Suppose we remove some objects whose total value is at most k⋅tik\cdot t_{i}. Let bj:=b_{j}:= the total value remaining in CjC_{j} after the removal, divided by tit_{i}. So bj∈[0,cj]b_{j}\in[0,c_{j}], and ∑jbj≥(∑jcj)−k\sum_{j}b_{j}\geq(\sum_{j}c_{j})-k. By Lemma 5.2, the bjb_{j} can be partitioned into ⌈(N−k)/2⌉\lceil(N-k)/2\rceil subsets with a sum of at least 11. This corresponds to a partition of the remaining objects into ⌈(N−k)/2⌉\lceil(N-k)/2\rceil bundles with a value of at least tit_{i}. Since ⌈(N−k)/2⌉=(n−1)−⌊k/2⌋≥n−k\lceil(N-k)/2\rceil=(n-1)-\lfloor k/2\rfloor\geq n-k whenever k≥1k\geq 1, condition (2) holds, and by Theorem 4.2, the Lone Divider algorithm finds a tt-fair division. ∎

As mentioned above, the Lone Divider algorithm requires O(n3)O(n^{3}) queries. However, with indivisible objects, answering each query requires agent ii to compute the 1-out-of-(2n−2)(2n-2) MMS. This requires solving an instance of the multi-way number partitioning problem, which is known to be NP-hard. If the number of agents and objects is sufficiently small, then the problem can be solved optimally by heuristic algorithms . Otherwise, a PTAS of Woeginger 1997 can be used to find in polynomial time, for each ϵ>0\epsilon>0, a partition in which the value of each part is at least (1−ϵ)\textscMMSi1-out-of-2n−2(C)(1-\epsilon)\textsc{MMS}^{1\text{-out-of-}2n-2}_{i}\left(C\right). Then, the Lone Divider algorithm can be executed with ti=(1−ϵ)\textscMMSi1-out-of-2n−2(C)t_{i}=(1-\epsilon)\textsc{MMS}^{1\text{-out-of-}2n-2}_{i}\left(C\right).

The Lone Divider algorithm cannot guarantee the 1-out-of-(2n−3)(2n-3) MMS. As an example, suppose there are 4n−64n-6 goods. Suppose some agent Alice values some 2n−32n-3 goods at 1−ϵ1-\epsilon and the others at ϵ\epsilon, so her 1-out-of-(2n−3)(2n-3) MMS equals 11. It is possible that the first divider partitions the goods such that all the 2n−32n-3 low-value goods are in a single bundle, and this bundle is allocated to another agent in the envy-free matching. If, in the next round, Alice is the divider, then she cannot partition the remaining 2n−32n-3 high-value goods into n−1n-1 bundles with a value of at least 11. Recently, Hosseini et al. 2021 developed a modified Lone Divider algorithm, that attains a better approximation.

Maximin-share allocation of bads

The proof of Theorem 1.9 uses the following combinatorial lemma.

Let (aj)j=1N(a_{j})_{j=1}^{N} be real numbers such that for all j∈[N]j\in[N]: aj∈a_{j}\in. If ∑jaj≤A\sum_{j}a_{j}\leq A for some integer AA, then the aja_{j} can be partitioned into 2A+12A+1 subsets such that the sum of each subset is at most 11.

Collect the aja_{j} sequentially into subsets, starting with a1a_{1}, until the sum of the current subset is at least one. Continue constructing subsets in this way until all the aja_{j}-s are arranged in subsets. Let s+1s+1 be the number of constructed subsets, where the sum of the first ss subsets is at least 11 and the sum of the last subset (which may be empty) is less than 11. The sum of all subsets is at least ss, so s≤As\leq A. From each subset, remove the last element added to it. Since aj≤1a_{j}\leq 1, we now have 2s+12s+1 subsets each of which has a sum of at most 11. By adding empty subsets if needed, we get 2A+12A+1 subsets with a sum of at most 11. ∎

Let (bj)j=1N(b_{j})_{j=1}^{N}, (cj)j=1N(c_{j})_{j=1}^{N} be real numbers such that for all j∈[N]j\in[N]: bj∈[0,cj]b_{j}\in[0,c_{j}] and cj∈c_{j}\in. If ∑jbj≤(∑jcj)−k\sum_{j}b_{j}\leq(\sum_{j}c_{j})-k for some integer k≥0k\geq 0, then the bjb_{j} can be partitioned into 2(N−k)+12(N-k)+1 subsets such that the sum of each subset is at most 11.

Figuratively, the lemma says the following. There are NN bottles of water, each of which contains at most 11 litre. Some water is spilled out of some of the bottles, such that the total amount spilled out is at least kk litres. Then, the bottles can be grouped into 2(N−k)+12(N-k)+1 subsets, such that the bottles in each subset together contain at most 11 litre.

Let aj:=bj/cja_{j}:=b_{j}/c_{j} for all j∈[N]j\in[N]. Then aj∈a_{j}\in, and

By Lemma 5.5, the aja_{j} can be partitioned into 2(N−k)+12(N-k)+1 subsets with a sum of at most 11. Since bj=cj⋅aj≤ajb_{j}=c_{j}\cdot a_{j}\leq a_{j}, the sum of bjb_{j} corresponding to the aja_{j} in each subset is at most 11. ∎

We now prove Theorem 1.9, which says that there always exists an allocation of bads among nn agents giving each agent ii a value of at least \textscMMSi1-out-of-N(C)\textsc{MMS}^{1\text{-out-of-}N}_{i}\left(C\right), where N=⌊2n/3⌋N=\lfloor 2n/3\rfloor.

We prove that the threshold values ti=\textscMMSi1-out-of-N(C)t_{i}=\textsc{MMS}^{1\text{-out-of-}N}_{i}\left(C\right) are reasonable. Condition (1) is obviously satisfied: by definition of MMS, each agent ii can partition CC into nn subsets worth \textscMMSi1-out-of-n(C)\textsc{MMS}^{1\text{-out-of-}n}_{i}\left(C\right). Since the values of all objects are negative, this value is at least \textscMMSi1-out-of-N(C)\textsc{MMS}^{1\text{-out-of-}N}_{i}\left(C\right) for any N≤nN\leq n (when the bads are partitioned into more subsets, the value in each subset is larger).

For condition (2), let (Cj)j∈[N](C_{j})_{j\in[N]} be a 1-out-of-NN MMS partition of agent ii. By definition of the MMS, Vi(Cj)≥tiV_{i}(C_{j})\geq t_{i}. The condition holds trivially whenever k≤n−Nk\leq n-N, since in this case n−k≥Nn-k\geq N, so adding (n−k)−N(n-k)-N empty bundles gives n−kn-k bundles with value at least tit_{i} (note that ti≤0t_{i}\leq 0). Therefore, we assume now that k≥n−N+1k\geq n-N+1.

Let cj:=Vi(Cj)/tic_{j}:=V_{i}(C_{j})/t_{i}. Since both Vi(Cj)V_{i}(C_{j}) and tit_{i} are negative, 0≤cj≤10\leq c_{j}\leq 1 for all j∈[N]j\in[N]. Suppose we remove some objects whose total value is at most k⋅tik\cdot t_{i}. Let bj:=b_{j}:= the total value remaining in CjC_{j} after the removal, divided by tit_{i}. So bj∈[0,cj]b_{j}\in[0,c_{j}], and ∑jbj≤(∑jcj)−k\sum_{j}b_{j}\leq(\sum_{j}c_{j})-k (again the sign of inequality is reversed since both quantities are negative). By Lemma 5.6, the bjb_{j} can be partitioned into 2(N−k)+12(N-k)+1 subsets with a sum of at most 11. This corresponds to a partition of the remaining bads into bundles of value at least tit_{i}. By the definition of NN,

By adding empty bundles if needed, agent ii can partition the remaining bads into n−kn-k bundles with a value of at least tit_{i}. Therefore, condition (2) holds, and by Theorem 4.2, the Lone Divider algorithm finds a tt-fair division. ∎

Suppose nn is divisible by 33 and N=2n/3N=2n/3. Then the Lone Divider algorithm cannot guarantee the 1-out-of-(N+1)(N+1) MMS. Suppose the bads’ values for Alice are

N+1N+1 big bads with value −1/2−1/2V-1/2-1/2V each, for V=N+n3+1V=N+\frac{n}{3}+1;

N+1N+1 sets of V−1V-1 small bads with value −1/2V-1/2V each. So the total value of each set is −1/2+1/2V-1/2+1/2V, and the total number of small bads is (N+1)(V−1)=NV+n3(N+1)(V-1)=NV+\frac{n}{3}.

The bads can be grouped into N+1N+1 sets with value −1-1, so \textscMMSA1-out-of-N+1(C)=−1\textsc{MMS}^{1\text{-out-of-}N+1}_{A}\left(C\right)=-1. But it is possible that the first envy-free matching allocates k=n−Nk=n-N unacceptable bundles, each of which contains 2V+12V+1 small bads (with total value −1−1/2V-1-1/2V); note that the total number of small bads allocated is (n−N)(2V+1)=n3(2V+1)=NV+n3(n-N)(2V+1)=\frac{n}{3}(2V+1)=NV+\frac{n}{3}. Then NN agents remain, and there are N+1N+1 big bads that Alice cannot partition into NN bundles with value at least −1-1.

Other maximin-share guarantees

Algorithm 4 can even make different guarantees to different agents. For example, it is possible to set t1=\textscMMS11-out-of-2n−2(C)t_{1}=\textsc{MMS}^{1\text{-out-of-}2n-2}_{1}\left(C\right) and t2=\textscMMS22-out-of-3n−2(C)t_{2}=\textsc{MMS}^{2\text{-out-of-}3n-2}_{2}\left(C\right) and t3=23\textscMMS31-out-of-n(C)t_{3}={2\over 3}\textsc{MMS}^{1\text{-out-of-}n}_{3}\left(C\right). Finally, if some agents are computationally-bounded, and cannot calculate their MMS partition exactly, they can use an approximation algorithm like that of Woeginger 1997 to calculate an approximate MMS partition — a partition in which the value of each bundle is at least (1−ϵ)\textscMMSi1-out-of-2n−2(C)(1-\epsilon)\textsc{MMS}^{1\text{-out-of-}2n-2}_{i}\left(C\right), for some ϵ>0\epsilon>0. They can then participate in Algorithm 4 with ti=(1−ϵ)\textscMMSi1-out-of-2n−2(C)t_{i}=(1-\epsilon)\textsc{MMS}^{1\text{-out-of-}2n-2}_{i}\left(C\right). The algorithm then guarantees to these agents a value of at least their approximate MMS. This does not affect the guarantee to computationally-unbounded agents, who are still guaranteed at least their exact MMS.

While there are now algorithms that attain better multiplicative approximation factors for goods and for bads , it may be useful to have a simple algorithm that allows each agent to choose between a multiplicative and various ordinal approximations. Recently, Bogomolnaia et al. ???? have shown that an algorithm very similar to Algorithm 4 attains a different approximate-fairness notion that they call “Pro1” (proportionality up to at most one object).

In general, the Lone Divider method cannot guarantee a 1-out-of-(n+1)(n+1) MMS allocation (see Remark 5.4). Corollary 1.5 can help to identify special cases in which such allocations do exist. First, recall that, if all nn agents have the same valuation function, then by definition a 1-out-of-nn MMS allocation exists. The same is true if all nn agents have the same MMS partition (even if their valuations are different). Moreover, the same is true even if only n−1n-1 agents have the same MMS partition, since then it is possible to let the nn-th agent pick a bundle and divide the remaining n−1n-1 bundles among the remaining n−1n-1 agents. The following theorem generalizes this observation.

Hence, we can proceed with Algorithm 4 and get a tt-fair division. ∎

As an example, for n=4n=4, a 1-out-of-55 MMS allocation exists whenever there exists a partition in which some two agents value each bundle by at least their 1-out-of-55 MMS; particularly, when some two agents have identical valuations. The general case remains open.

Extensions and open problems

Our definition of an envy-free matching is asymmetric in that it considers the envy of vertices in XX only. For example, the odd path in Figure 1(c) has a non-empty EFM w.r.t. YY but not w.r.t. XX.

One can define a matching as symmetric-envy-free if any unmatched vertex in GG is not adjacent to any matched vertex in GG. This definition extends naturally to non-bipartite graphs.

With this symmetric definition, the algorithmic problems studied here become much easier (and less interesting). Suppose first that G=(V,E)G=(V,E) is a connected graph (bipartite or not). If some matching in GG saturates some vertex v∈Vv\in V but does not saturate some other vertex v′∈Vv^{\prime}\in V, then on the path between vv and v′v^{\prime}, at least one vertex is envious. Therefore, a symmetric envy-free matching saturates either all vertices or no vertices. Hence, a connected graph admits a non-empty symmetric-envy-free matching if and only if it admits a perfect matching.

Therefore, an arbitrary graph admits a non-empty symmetric-envy-free matching if and only if it has a connected component admitting a perfect matching. A maximum cardinality (minimum cost) symmetric-envy-free matching is just the union of all perfect matchings (of minimum cost) of such connected components.

Star matchings

The envy-freeness concept can be generalised from a matching (a set of vertex-disjoint edges) to an rr-star matching — a set of vertex-disjoint copies of the the star K1,rK_{1,r}, where the star center is in XX and the star leaves are in YY. An envy-free rr-star matching is then an rr-star matching in which every vertex in XX that is not matched (as a center), is disconnected from any vertex in YY that is matched (as a leaf). Our results can be easily generalised to rr-star matchings. For example, the following theorem generalises Theorem 1.6(a) and Corollary 1.4(b).

(a) There is a polynomial-time algorithm that, given any bipartite graph G=(X∪˙Y,E)G=(X\dot{\cup}Y,E), finds a maximum-cardinality envy-free rr-star matching in GG.

(b) If ∣NG(X)∣≥r∣X∣≥1|N_{G}(X)|\geq r|X|\geq 1, then GG admits a non-empty envy-free rr-star matching.

Given GG, construct an auxiliary bipartite graph G′:=(X′∪˙Y,E′)G^{\prime}:=(X^{\prime}\dot{\cup}Y,E^{\prime}), where X′X^{\prime} has rr clones of every vertex in XX, and E′E^{\prime} has an edge from each clone vxv^{x} of x∈Xx\in X to every vertex y∈NG(x)y\in N_{G}(x). For x∈Xx\in X, let v1x,…,vrxv_{1}^{x},\ldots,v_{r}^{x} denote the rr clones of xx in X′X^{\prime}. There is a many-to-one correspondence between envy-free matchings in G′G^{\prime} and envy-free rr-star matchings in GG:

(1) Consider any envy-free matching W′W^{\prime} in G′G^{\prime}. For all x∈Xx\in X, consider the subgraph

This subgraph forms a complete bipartite graph. Hence, if (vix,y)∈W′(v_{i}^{x},y)\in W^{\prime} for some i∈[r]i\in[r], then W′W^{\prime} being envy-free in G′G^{\prime} means that W′W^{\prime} must saturate all of {v1x,…,vrx}\{v_{1}^{x},\ldots,v_{r}^{x}\}. All these vertices can only be paired to vertices of NG(x)N_{G}(x); all edges thus used by W′W^{\prime} (in G′G^{\prime}) correspond to different edges in GG whose one end is xx (the ends in NG(x)N_{G}(x) are distinct). Collapsing every set {v1x,…,vrx}\{v_{1}^{x},\ldots,v_{r}^{x}\} saturated by W′W^{\prime} back to its origin xx in GG gives an envy-free rr-star matching in GG.

(2) Given an envy-free rr-star matching WW in GG, create a matching W′W^{\prime} in G′G^{\prime} by connecting, for each saturated vertex x∈Xx\in X, each clone vixv_{i}^{x} of xx to one of the rr vertices in YY matched to xx in WW. Note that, for each saturated vertex x∈Xx\in X, there are r!r! ways to connect the clones of xx to its neighbors, so there are many different matchings W′W^{\prime} corresponding to WW. However, all such matchings have the same cardinality, and every such matching is envy-free in G′G^{\prime}: for every vertex xx that is saturated by WW, all its clones are saturated by W′W^{\prime} and thus are not envious; for every vertex xx that is unmatched by WW, all its clones are not adjacent to any matched vertex in YY, and thus are not envious either.

We now use the above correspondence for proving the two claims in the theorem.

(a) The size (number of edges) of the matchings W′W^{\prime} in G′G^{\prime} is exactly rr times the size (number of stars) of the corresponding matching WW in GG. Hence, applying Algorithm 2 to G′G^{\prime} yields a maximum-cardinality rr-star matching in GG.

(b) If ∣NG(X)∣≥r∣X∣≥1|N_{G}(X)|\geq r|X|\geq 1, then ∣NG′(X′)∣≥∣X′∣≥r≥1|N_{G^{\prime}}(X^{\prime})|\geq|X^{\prime}|\geq r\geq 1, so G′G^{\prime} satisfies the premise of Corollary 1.4(b) and thus admits a non-empty envy-free matching W′W^{\prime}. It corresponds to an envy-free rr-star matching WW in GG. ∎

In an rr-star matching, each vertex in XX is matched to either 00 or rr vertices in YY. One can also consider allocation problems in which each vertex in XX may be connected to any number in {0,…,r}\{0,\ldots,r\} of vertices in YY (but each vertex in YY may still be connected to at most one vertex in XX). A many-to-one matching M⊆EM\subseteq E is called envy-free if for every two vertices x1,x2∈Xx_{1},x_{2}\in X, the number of neighbors of x1x_{1} matched to x1x_{1} is at least as large as the number of neighbors of x1x_{1} matched to x2x_{2}. This definition reduces to Definition 1.1 when r=1r=1.

When r=∞r=\infty, the problem of finding an envy-free many-to-one matching is equivalent to the problem of fair allocation with binary additive valuations. YY is a set of discrete goods, and XX is a set of agents. Each agent values each object at either 00 or 11, and values each set of objects as the sum of the values of its elements. The goal is to allocate the objects among the agents such that each agent values its own bundle at least as much as the bundle of any other agent. Aziz et al. 2015 proved that deciding whether an envy-free allocation of all objects in YY exists is NP-complete (remark after Theorem 11; the same result was proved in a different way by Hosseini et al. 2019 at Proposition 3). Therefore, the problem of finding an envy-free one-to-many matching of maximum cardinality is NP-hard. However, the reductions consider only allocations in which all objects are allocated --- they do not allow partial allocations. For example, in the reduction of Hosseini et al. 2019, Property 2 does not necessarily hold for partial allocations: it is possible that each edge-agent receives a single edge-good, each dummy-agent receives nothing, and the vertex-goods remain unallocated. This is a non-empty envy-free allocation that does not correspond to an equitable coloring of GG. Therefore, the following problem remains open.

Is there a polynomial-time algorithm for deciding whether a given bipartite graph admits a non-empty envy-free one-to-many matching?

Maximum value envy-free matching

Suppose that the edge weights are interpreted as values rather than costs, and thus one is interested in finding an envy-free matching of maximum total value.

The unbalanced Hungarian method can be easily adapted to find an XX-saturating matching of maximum value . Hence, Algorithm 3 can be adapted to find a maximum-cardinality envy-free matching of maximum value. The following lemma shows that, whenever all values are non-negative, the maximum value of any envy-free matching is always attained by some maximum-cardinality envy-free matching. Note that the above does not hold for arbitrary matchings.

Let G:=(X∪˙Y,E)G:=(X\dot{\cup}Y,E) be a bipartite graph. Let WW be an envy-free matching in GG. Then, WW is contained in some maximum-cardinality envy-free matching in GG.

Let MM be a maximum-cardinality envy-free matching in GG. By Theorem 1.3, this MM is contained in G[XL,YL]G[X_{L},Y_{L}] and saturates XLX_{L}. For each vertex x∈XLx\in X_{L}, denote by NM(x)N_{M}(x) the vertex in YLY_{L} matched to it by MM. Let M′:={(x,NM(x)):x∈XL,x is unsaturated by W}M^{\prime}:=\{(x,N_{M}(x)):x\in X_{L},x\text{ is unsaturated by }W\},

Envy-freeness of WW implies that, for any vertex x∈XLx\in X_{L} unsaturated by WW, NM(x)N_{M}(x) must be unsaturated by WW too. Hence, W∪M′W\cup M^{\prime} is a matching. It saturates XLX_{L}, so by Theorem 1.3 it is a maximum-cardinality envy-free matching in GG. ∎

Hence, by taking Algorithm 3 and replacing “minimum-cost” by “maximum-value”, one gets an algorithm for finding a maximum-value envy-free matching.

However, this algorithm is meaningful only when w(x,y)w(x,y) represent the value of the pairing (x,y)(x,y) to “society” as a whole (or to the social planner), since it appears in the maximisation objective but not in the envy definition. An alternative interpretation is that w(x,y)w(x,y) represents the subjective value of yy to xx. This interpretation leads to a different definition of envy-freeness. Given a function ww on the edges and a matching MM, define:

A matching M⊆EM\subseteq E is called ww-envy-free if, for every vertex x∈Xx\in X and every matched vertex y′∈YMy^{\prime}\in Y_{M}: w(x,M)≥w(x,y′)w(x,M)\geq w(x,y^{\prime}), i.e, every agent in XX weakly prefers his or her own house (if any) to any house assigned to another agent. This definition reduces to Definition 1.1 when all edges have the same weight. The problem of finding a ww-envy-free matching was studied by several authors in parallel to the present work:

Gan et al. 2019 present a polynomial-time algorithm for finding an XX-saturating ww-envy-free matching, if and only if such a matching exists.

Beynier et al. 2019 consider a similar problem in a more complex setting where agents are located on a network, and each agent only envies his or her neighbors in the network.

Kamiyama et al. 2021 study the problem of finding an XX-saturating matching that is not necessarily ww-envy-free, but it maximizes the number of vertices of XX for which the ww-envy-free condition is satisfied. They prove that this problem is NP-hard even for binary weights (all weights are either 00 or 11). Moreover, for general weights, the problem is hard to approximate under some common complexity-theoretic assumptions.

In contrast to our work, these three works do not consider partial matchings (matchings that do not necessarily saturate XX). To illustrate the difference between the settings, suppose ∣X∣=∣Y∣=n|X|=|Y|=n, and

In the unique XX-saturating matching, xix_{i} is matched to yiy_{i} for all i∈[n]i\in[n], and ww-envy-freeness is satisfied only for xnx_{n}. However, the matching in which xix_{i} is matched to yiy_{i} for all i∈[n−1]i\in[n-1] and xnx_{n} remains unmatched is a partial ww-envy-free matching of size n−1n-1.

Is there a polynomial-time algorithm that, for any value function ww, finds a partial ww-envy-free matching of maximum cardinality? Of maximum value?

Relaxations of envy-free matching

Since non-empty envy-free matchings might not exist, one may be interested in relaxations. For example, given a real α>0\alpha>0, a matching MM is called α\alpha-fraction envy-free if for every unmatched x∈X∖XMx\in X\setminus X_{M}: ∣NG(x)∩YM∣≤α∣NG(x)∣|N_{G}(x)\cap Y_{M}|\leq\alpha|N_{G}(x)|. That is, agents unsaturated by MM are willing to “tolerate” at most an α\alpha-fraction of their acceptable houses being assigned to someone else. Alternatively, given an integer c≥0c\geq 0, MM is called cc-additive envy-free if for every unmatched x∈X∖XMx\in X\setminus X_{M}: ∣NG(x)∩YM∣≤c|N_{G}(x)\cap Y_{M}|\leq c.

Is there a polynomial-time algorithm for finding a maximum-cardinality matching among the approximate-envy-free matchings, for any of the above approximation notions?

From a probabilistic perspective, it may be interesting to calculate the probability that a non-empty envy-free matching exists in a random graph. This is related to the problem of calculating the probability that an envy-free allocation exists, which has recently been studied by e.g. Dickerson et al. 2014 and Manurangsi and Suksompong 2019.

Acknowledgments

Erel acknowledges Zur Luria , who first provided an existential proof to Corollary 1.4(b), as well as instructive answers by Yuval Filmus, Thomas Klimpel and bof in MathOverflow.com, Max, Vincent Tam and Elmex80s in MathStackExchange.com, and helpful comments by anonymous referees to the WTAF 2019 workshop, the EC 2020 conference, and the Information Sciences journal. This research is partly supported by Israel Science Foundation grant 712/20.

Appendix A Variants of Maximin Share Fairness

This appendix shows various fairness guarantees that can be attained by the Lone Divider algorithm when allocating discrete goods.

The first fairness guarantee uses several lemmas.

Let L≥1L\geq 1 be an integer. Let (dj)j=1N(d_{j})_{j=1}^{N}, (cj)j=1N(c_{j})_{j=1}^{N} be real numbers such that for all j∈[N]j\in[N]: dj∈d_{j}\in, and the sum of every LL-tuple of cjc_{j} is at least LL. If ∑jdj≥L\sum_{j}d_{j}\geq L, then ∑jcj⋅dj≥∑jdj\sum_{j}c_{j}\cdot d_{j}\geq\sum_{j}d_{j} (in particular ∑jdj≥L\sum_{j}d_{j}\geq L implies ∑jcj⋅dj≥L\sum_{j}c_{j}\cdot d_{j}\geq L and ∑jdj>L\sum_{j}d_{j}>L implies ∑jcj⋅dj>L\sum_{j}c_{j}\cdot d_{j}>L ).

Note that in the special case L=1L=1, cj≥1c_{j}\geq 1 for all j∈[N]j\in[N], so the claim is trivial.

Let D≥⊂ND_{\geq}\subset^{N} be the set of vectors d\mathbf{d} satisfying the lemma condition, i.e., ∑jdj≥L\sum_{j}d_{j}\geq L. Let D=⊂D≥D_{=}\subset D_{\geq} be those vectors satisfying ∑jdj=L\sum_{j}d_{j}=L. The lemma can be stated as a dot product: c⋅d≥L\mathbf{c}\cdot\mathbf{d}\geq L. We first show that it holds for all d∈D=\mathbf{d}\in D_{=} and then for all d∈D≥\mathbf{d}\in D_{\geq}.

Consider a vector d∈D=\mathbf{d}\in D_{=}. If it has only integer coordinates, then it must have exactly LL ones and N−LN-L zeros, so the sum c⋅d=∑jcj⋅dj\mathbf{c}\cdot\mathbf{d}=\sum_{j}c_{j}\cdot d_{j} contains exactly LL elements from c\mathbf{c}. By assumption, their sum is at least LL, so the lemma holds.

Otherwise, d\mathbf{d} has a non-integer coordinate, say dj1∈(0,1)d_{j1}\in(0,1). Since the sum of coordinates is an integer — it must have another non-integer coordinate, say dj2∈(0,1)d_{j2}\in(0,1). Given ϵ>0\epsilon>0, define a (j1,j2,ϵ)(j_{1},j_{2},\epsilon)-shift of d\mathbf{d} as a vector d′\mathbf{d}^{\prime} given by

Choosing ϵ=min⁡(dj1,1−dj2)\epsilon=\min(d_{j1},1-d_{j2}) guarantees that d′∈D=\mathbf{d}^{\prime}\in D_{=} and it has fewer non-integer coordinates than d\mathbf{d} (either dj1′=0d^{\prime}_{j1}=0 and dj2′=dj1+dj2d^{\prime}_{j2}=d_{j1}+d_{j2}, or dj2′=1d^{\prime}_{j2}=1 and dj1′=dj1+dj2−1d^{\prime}_{j1}=d_{j1}+d_{j2}-1). Choosing j1,j2j_{1},j_{2} such that cj1≥cj2c_{j1}\geq c_{j2} guarantees that each such shift decreases the dot product,

There is a finite sequence of (j1,j2,ϵ)(j_{1},j_{2},\epsilon)-shifts culminating in a vector d′′∈D=\mathbf{d}^{\prime\prime}\in D_{=} with only integer coordinates. Therefore,

so the claim holds for all d∈D=\mathbf{d}\in D_{=}.

For a vector d∈D≥\mathbf{d}\in D_{\geq}, Let d′:=d⋅L∑jdj\mathbf{d^{\prime}}:=\mathbf{d}\cdot\frac{L}{\sum_{j}d_{j}}; by assumption d′∈D=\mathbf{d^{\prime}}\in D_{=}, so c⋅d′≥L\mathbf{c}\cdot\mathbf{d^{\prime}}\geq L. Now,

so the claim holds for all d∈D≥\mathbf{d}\in D_{\geq} too. ∎

Let aj:=bj/cja_{j}:=b_{j}/c_{j} for all j∈[N]j\in[N]. Then aj∈a_{j}\in, and

Let dj:=cj−bjcjd_{j}:=\frac{c_{j}-b_{j}}{c_{j}}. By assumption,

Therefore, there exists a partition of the bjb_{j} as claimed. ∎

So condition (2) holds, and by Theorem 4.2, Lone Divider finds a tt-fair division. ∎

Multiplicative approximation

The Lone Divider algorithm can also provide a multiplicative approximation, similarly to the “APX-MMS” algorithm of Amanatidis et al. 2017. The proof uses the following lemma.

Let (bj)j=1N(b_{j})_{j=1}^{N}, (cj)j=1N(c_{j})_{j=1}^{N} be real numbers such that for all j∈[N]j\in[N]: bj∈[0,cj]b_{j}\in[0,c_{j}] and cj≥1c_{j}\geq 1. If ∑jbj≥∑jcj−2n3n−1k\sum_{j}b_{j}\geq\sum_{j}c_{j}-\frac{2n}{3n-1}k for some integer k≥0k\geq 0, then the bjb_{j} can be partitioned into n−kn-k subsets such that the sum of each subset is at least 2n3n−1\frac{2n}{3n-1}.

d0d_{0} — the number of jj such that (cj−bj)/cj∈[0,n−13n−1](c_{j}-b_{j})/c_{j}\in[0,\frac{n-1}{3n-1}].

d1d_{1} — the number of jj such that (cj−bj)/cj∈(n−13n−1,2n−13n−1](c_{j}-b_{j})/c_{j}\in(\frac{n-1}{3n-1},\frac{2n-1}{3n-1}].

d2d_{2} — the number of jj such that (cj−bj)/cj∈(2n−13n−1,1](c_{j}-b_{j})/c_{j}\in(\frac{2n-1}{3n-1},1].

If d1d_{1} is odd, then the left-hand side is integer, and we get

There are d0d_{0} indices jj for which bj/cj≥1−n−13n−1=2n3n−1b_{j}/c_{j}\geq 1-\frac{n-1}{3n-1}=\frac{2n}{3n-1}, so bj≥2n3n−1b_{j}\geq\frac{2n}{3n-1} too.

There are also d1d_{1} indices jj for which bj/cj≥1−2n−13n−1=n3n−1b_{j}/c_{j}\geq 1-\frac{2n-1}{3n-1}=\frac{n}{3n-1}, so bj≥n3n−1b_{j}\geq\frac{n}{3n-1} too. Pairing these elements gives ⌊d1/2⌋\lfloor d_{1}/2\rfloor pairs with a sum of at least 2n3n−1\frac{2n}{3n-1}. All in all, there are ⌊d1/2⌋+d0≥n−k\lfloor d_{1}/2\rfloor+d_{0}\geq n-k sets (singletons or pairs) with sum at least 2n3n−1\frac{2n}{3n-1}. ∎

The Lone Divider algorithm can attain a fair allocation of discrete goods with ti=2n3n−1\textscMMSi1-out-of-n(C)>23\textscMMSi1-out-of-n(C)t_{i}=\frac{2n}{3n-1}\textsc{MMS}^{1\text{-out-of-}n}_{i}\left(C\right)>\frac{2}{3}\textsc{MMS}^{1\text{-out-of-}n}_{i}\left(C\right).

By Theorem 4.2, it is sufficient to prove that the tit_{i} are reasonable thresholds for each agent ii. Let (Cj)j∈[n](C_{j})_{j\in[n]} be a 1-out-of-nn MMS partition of ii. Let cj:=Vi(Cj)/\textscMMSi1-out-of-n(C)c_{j}:=V_{i}(C_{j})/\textsc{MMS}^{1\text{-out-of-}n}_{i}\left(C\right). By definition of the MMS, cj≥1c_{j}\geq 1 for all j∈[n]j\in[n].

For every k≥0k\geq 0, suppose we remove some objects whose total value is at most 2n3n−1k⋅\textscMMSi1-out-of-n(C)\frac{2n}{3n-1}k\cdot\textsc{MMS}^{1\text{-out-of-}n}_{i}\left(C\right). Let bj:=b_{j}:= the total value remaining in CjC_{j}, divided by \textscMMSi1-out-of-n(C)\textsc{MMS}^{1\text{-out-of-}n}_{i}\left(C\right); so bj∈[0,cj]b_{j}\in[0,c_{j}], and the sum of bjb_{j} is at least ∑jcj−2n3n−1k\sum_{j}c_{j}-\frac{2n}{3n-1}k. Lemma A.5 implies that the bjb_{j} can be partitioned into n−kn-k subsets with a sum of at least 2n3n−1\frac{2n}{3n-1}. This corresponds to a partitioning of the remaining objects into n−kn-k bundles with a value of at least tit_{i}. Therefore, both conditions (1) and (2) in Definition 4.1 are satisfied. ∎

Appendix B Related concepts

Concepts similar to envy-free matching appeared in previous papers related to fair division, but they were “hidden” inside proofs of more specific algorithms. One goal of the present paper is to uncover these hidden gems.

As far as we know, the earliest concept similar to envy-free matching was presented by Kuhn 1967[unnumbered lemma in page 31]. Kuhn presents the lemma in matrix form. In graph terminology, his lemma says that an envy-free matching exists whenever ∣X∣=∣Y∣|X|=|Y| and there is a vertex x∈Xx\in X for whom NG({x})=YN_{G}(\{x\})=Y. This is a special case of our Corollary 1.4(b). Kuhn used this lemma in an algorithm for fair cake-cutting, which is now known as the Lone Divider algorithm (see Section 4).

Procaccia and Wang 2014[sub.3.1] mention another concept similar to envy-free matching, among proofs of other lemmas related to fair allocation of discrete objects. They constructed a particular bipartite graph that admits a perfect matching between a subset X∗⊆XX^{*}\subseteq X and a subset Y∗⊆YY^{*}\subseteq Y, where there are no edges between X∖X∗X\setminus X^{*} and Y∗Y^{*}; their X∗X^{*} and Y∗Y^{*} correspond to our XLX_{L} and YLY_{L}, and the “no edges” property corresponds to our Theorem 1.3(a). Since they were mainly interested in the case of a constant number of players, for which ∣X∣|X| is constant, they did not consider efficient algorithms for computing such a matching. This construction did not appear in the journal version .

Later, Amanatidis et al. 2017[lem.4.5] improved this construction and presented a polynomial-time algorithm for finding a non-empty envy-free matching. Their X∖X+X\setminus X^{+} and Y∖Γ(X+)Y\setminus\Gamma(X^{+}) correspond to our XLX_{L} and YLY_{L} respectively, and their APX-MMS algorithm corresponds to the Lone Divider algorithm (Algorithm 4) with threshold values corresponding to 2/32/3 fraction of the 1-out-of-nn MMS (see Appendix A).

Later, Ghodsi et al. 2018[def.3.5] presented a construction that corresponds to our construction as follows: given a maximum-cardinality matching MM, FH(M,X^)F_{H}(M,\widehat{X}) corresponds to YLY_{L}; N(FH(M,X^))N(F_{H}(M,\widehat{X})) corresponds to XLX_{L}; In fact, as we prove in Theorem 1.3, YLY_{L} and XLX_{L} depend only on GG and are independent of MM. Y1^∪Y2^\widehat{Y_{1}}\cup\widehat{Y_{2}} corresponds to XSX_{S}; and X^∖FH(M,X^)\widehat{X}\setminus F_{H}(M,\widehat{X}) corresponds to YSY_{S}. Their Lemmas 3.6, 3.7, 3.8 correspond to Theorem 1.3 parts (b), (c), (e).

Recently, Bogomolnaia et al. ???? presented a similar concept which they called a “proper matching”, for finding a min-max cake allocation when agents have general valuations.

Since all these authors used envy-free matching mainly as an intermediate step in a larger algorithm, they did not consider questions such as the uniqueness of the partition, and did not attempt to find an envy-free matching of maximum cardinality or minimum cost.

Our presentation of envy-free matching as a stand-alone graph-theoretic concept allows us to both simplify old algorithms and design new ones, as illustrated in Sections 4 and 5.

Different concepts with a similar name

The term envy-free matching is used, in a somewhat more specific sense, in the context of markets, both with and without money.

(1) In a market with money, there are several buyers and several goods, and each good may have a price. Given a price-vector, an “envy-free matching” is an allocation of bundles to agents in which each agent weakly prefers his bundle over all other bundles, given their respective prices. This is a relaxation of a Walrasian equilibrium. A Walrasian equilibrium is an envy-free matching in which every item with a positive price is allocated to some agent. In a Walrasian equilibrium, the seller’s revenue might be low. This motivates its relaxation to envy-free matching, in which the seller may set reserve-prices (and leave some items with positive price unallocated) in order to increase his expected revenue. See, for example, Guruswami et al. 2005, Alaei et al. 2012.

(2) In a market without money, there are several people who should be assigned to positions. For example, several doctors have to be matched for residency in hospitals. Each doctor has a preference-relation on hospitals (ranking the hospitals from best to worst), and each hospital has a preference relation on doctors. Each doctor can work in at most one hospital, and each hospital can employ at most a fixed number of doctors (called the capacity of the hospital). A matching has justified envy if there is a doctor dd and a hospital hh, such that dd prefers hh over his current employer, and hh prefers dd over one of its current employees. An “envy-free matching” is a matching with no justified envy. This is a relaxation of a stable matching. A stable matching is an envy-free matching which is also non-wasteful — there is no doctor dd and a hospital hh, such that dd prefers hh over his current employer and hh has some vacant positions . When the hospitals have, in addition to upper quotas (capacities), also lower quotas, a stable matching might not exist. This motivates its relaxation to envy-free matching.

(3) In contrast, our envy-free matching is an abstract graph-theoretic concept: it is defined for any bipartite graph, and does not require any notion of a price or a ranking.

To differentiate the terms, one can use, for example:

For (1) — “price envy-free matching” or “market envy-free matching”;

For (2) — “no-justified-envy matching” or “justified-envy-free matching”;

For (3) — “binary envy-free matching” or “abstract envy-free matching”.

References