Almost Envy-Free Allocations with Connected Bundles

Vittorio Bilò, Ioannis Caragiannis, Michele Flammini, Ayumi Igarashi, Gianpiero Monaco, Dominik Peters, Cosimo Vinci, William S. Zwicker

Introduction

A famous literature considers the problem of cake-cutting (Brams and Taylor, 1996; Robertson and Webb, 1998; Procaccia, 2016). There, a divisible heterogeneous resource (a cake, usually formalized as the interval $)needstobedividedamong) needs to be divided amongnagents.Eachagenthasavaluationfunctionoversubsetsofthecake,usuallyformalizedasanatomlessmeasureoveragents. Each agent has a valuation function over subsets of the cake, usually formalized as an atomless measure over.Theaimistopartitionthecakeinto. The aim is to partition the cake inton$ pieces, and allocate each piece to one agent, in a “fair” way. By fair, we will mean that the allocation is envy-free: no agent thinks that another agent’s piece is more valuable than her own.

When there are two agents, the classic procedure of cut-and-choose can produce an envy-free division: a knife is moved from left to right, until an agent shouts to indicate that she thinks the pieces to either side are equally valuable. The other agent then picks one of the pieces, leaving the remainder for the shouter. As is easy to see, the result is an envy-free allocation. For three or more agents, finding an envy-free division has turned out to be much trickier. An early result by Dubins and Spanier (1961) used Lyapunov’s Theorem and measure-theoretic techniques to show, non-constructively, that an envy-free allocation always exists. However, as Stromquist (1980) memorably writes, “their result depends on a liberal definition of a ‘piece’ of cake, in which the possible pieces form an entire σ\sigma-algebra of subsets. A player who only hopes for a modest interval of cake may be presented instead with a countable union of crumbs.” In many applications of resource allocation (such as land division, or the allocation of time slots), agents have little use for a severely disconnected piece of cake.

Stromquist (1980) himself offered a solution, and gave a new non-constructive argument (using topology) which proved that there always exists an envy-free division of the cake into intervals. Forest Simmons later observed that the proof could be simplified by using Sperner’s lemma, and this technique was subsequently presented in a paper by Su (1999). For the three-agent case, Stromquist (1980) also presented an appealing moving-knife procedure that more directly yields a connected envy-free allocation. For n⩾4n\geqslant 4 agents, no explicit procedures are known to produce a connected envy-free allocation (i.e., an allocation where the cake is cut in exactly n−1n-1 places). However, for n=4n=4, several moving-knife procedures exist that only need a few cuts; for example, the Brams–Taylor–Zwicker (1997) procedure requires 11 cuts, and a protocol of Barbanel and Brams (2004) requires 5 cuts.

In many applications, the resources to be allocated are not infinitely divisible, and we face the problem of allocating indivisible goods. Most of the literature on indivisible goods has not assumed any kind of structure on the item space, in contrast to the rich structure of the interval $$ in cake-cutting. Thus, there has been little attention on minimizing the number of “cuts” required in an allocation. However, when the items have a spatial or temporal structure, this consideration is important.

In this paper, we study the allocation of items that are arranged on a path or other structure, and impose the requirement that only connected subsets of items may be allocated to the agents. Formally, we work in the model of Bouveret et al. (2017), who assume that the items form the vertex set of a graph GG, and a bundle is connected if it induces a connected subgraph of GG. For example, such connectivity requirements are encountered in allocation problems in which the items correspond to indivisible pieces of an underlying region of Euclidean space (such as plots of land), and each allocated bundle (i.e., a collection of pieces) must be a connected portion of the space. We are most interested in the case when GG is a path, on which connectivity requirements are natural when the items are time slots, for example. In practice, connectivity may not be a hard constraint, and agents may find bundles with few connected components acceptable, but we will not consider such relaxations.

In the work of Bouveret et al. (2017), it became apparent that techniques from cake-cutting can be usefully ported to achieve good connected allocations in the indivisible case. For example, moving-knife procedures that achieve proportionality in cake-cutting have analogues that produce allocations that satisfy the maximin share guarantee (Budish, 2011).Another paper by Suksompong (2019) works in the same model, and also found that procedures for proportionality and other concepts can be applied to the indivisible setting.

Do envy-free procedures for cake-cutting also translate to the indivisible case? Of course, in general, it is impossible to achieve envy-freeness with indivisibilities (consider two agents and a single desirable item), but we can look for approximations. A relaxation of envy-freeness that has been very influential recently is envy-freeness up to one good (EF1), introduced by Budish (2011). It requires that an agent’s envy towards another bundle vanishes if we remove some item from the envied bundle. In the setting without connectivity constraints and with additive valuations, the maximum Nash welfare solution satisfies EF1, as does a simple round-robin procedure (Caragiannis et al., 2019). The well-known envy-graph algorithm (Lipton et al., 2004) also guarantees EF1. However, none of these procedures respects connectivity constraints.

When items are arranged on a path, we prove that connected EF1 allocations exist when there are two, three, or four agents. As was necessary in cake-cutting, we use successively more complicated tools to establish these existence results. For two agents, there is a discrete analogue of cut-and-choose that satisfies EF1. In that procedure, a knife moves across the path, and an agent shouts when the knife reaches what we call a lumpy tie, that is when the bundles to either side of the knife have equal value up to one item. For three agents, we design an algorithm mirroring Stromquist’s moving-knife procedure which guarantees EF1. For four agents, we show that Sperner’s lemma can be used to prove that an EF1 allocation exists, via a technique inspired by the Simmons–Su approach, and an appropriately triangulated simplex of connected partitions of the path. For five or more agents, we were not able to establish the existence of EF1 allocations on a path, but we can show (again via Sperner’s lemma) that EF2 allocations exist, strengthening a prior result of Suksompong (2019). We also show that if all agents have the same valuation function over bundles, then an egalitarian-welfare-optimal allocation, after suitably reallocating some items, is EF1.

These existence results require only that agents’ valuations are monotonic (they need not be additive), and in addition, ensure that the constructed allocation satisfies the maximin share guarantee (see Appendix A.1). Moreover, the fairness guarantee of our algorithms is slightly stronger than the standard notion of EF1: in the returned allocations, envy can be avoided by removing just an outer item – one whose removal leaves the envied bundle connected. Computationally speaking, all our existence results are constructive in the weak sense that an EF1 allocation can be found by iterating through all O(mn)O(m^{n}) connected allocation (this stands in contrast to cake-cutting where we cannot iterate through all possibilities). While we know of no faster algorithms to obtain an EF1 or EF2 allocation in the cases where we appeal to Sperner’s lemma, our other procedures (for two or three agents, or for identical valuations) can all be implemented efficiently to produce a fair allocation in polynomial time. We summarize our results concerning paths in Table 1.

In simultaneous and independent work, Oh et al. (2019) designed protocols to find EF1 allocations in the setting without connectivity constraints, aiming for low query complexity. They found that adapting cake-cutting protocols to the setting of indivisible items arranged on a path is an especially potent way to achieve low query complexity. This led them to also study a discrete version of the cut-and-choose protocol which achieves connected EF1 allocations for two agents, and they found an alternative proof that an EF1 allocation on a path always exists with identical valuations. They also present a discrete analogue of the Selfridge–Conway procedure which, for three agents with additive valuations, produces an allocation of a path into bundles that have a constant number of connected components. However, they do not study connected allocations on graphs that are not paths, and they do not consider the case of (non-identical) general valuations with more than two agents.

A recurring theme in our algorithms is the specific way that the moving knives from cake-cutting are rendered in the discrete setting. While one might expect knives to be placed over the edges of the path, and ‘move’ from edge to edge, we find that this movement is too ‘fast’ to ensure EF1 (see also footnote 5 regarding EF2). Instead, our knives alternate between hovering over edges and items. When a knife hovers over an item, we imagine the knife’s blade to be ‘thick’: the knife covers the item, and agents then pretend that the covered item does not exist. These intermediate steps are useful, since they can tell us that envy will vanish if we hide an item from a bundle.

What about graphs GG other than paths? Our existential results for paths immediately generalize to traceable graphs (those that contain a Hamiltonian path), since we can run the algorithms pretending that the graph only consists of the Hamiltonian path. For the two-agent case, we completely characterize the class of graphs that guarantee the existence of EF1 allocations: Our discrete cut-and-choose protocol can be shown to work on all graphs GG that admit a bipolar numbering, which exists if and only if the biconnected components (blocks) of GG can be arranged in a path. By constructing counterexamples, we prove that no graph failing this condition (for example, a star) guarantees EF1, even for identical, additive, binary valuations. For the case of three or more agents, it is a challenging open problem to characterize the class of graphs guaranteeing EF1 (or even to find an infinite class of non-traceable graphs that guarantees EF1).

Preliminaries

We say that the agents have identical valuations if, for all i,j∈Ni,j\in N and every bundle I∈C(V)I\in\mathcal{C}(V), we have ui(I)=uj(I)u_{i}(I)=u_{j}(I). A valuation function uiu_{i} is additive if ui(I)=∑v∈Iui({v})u_{i}(I)=\sum_{v\in I}u_{i}(\{v\}) for each bundle I∈C(V)I\in\mathcal{C}(V). Many examples in this paper will use identical additive valuations, and will take GG to be a path. In this case, we use a shorthand to specify these examples; the meaning of this notation should be clear. For example, we write “2–1–3–1” to denote an instance with four items v1,v2,v3,v4v_{1},v_{2},v_{3},v_{4} arranged on a path, and where ui({v1})=2u_{i}(\{v_{1}\})=2, …, ui({v4})=1u_{i}(\{v_{4}\})=1 for each ii. For such an instance, an allocation will be written as a tuple, e.g., (2, 1–3–1) denoting an allocation allocating bundles {v1}\{v_{1}\} and {v2,v3,v4}\{v_{2},v_{3},v_{4}\}, noting that with identical valuations it does not usually matter which agent receives which bundle.

An allocation AA is envy-free if ui(A(i))⩾ui(A(j))u_{i}(A(i))\geqslant u_{i}(A(j)) for every pair i,j∈Ni,j\in N of agents, that is, if every agent thinks that their bundle is at least as good as any other bundle in the allocation. It is well-known that an envy-free allocation may not exist (consider two agents and one good). The main fairness notion that we study is a version of envy-freeness up to one good (EF1), a relaxation of envy-freeness introduced by Budish (2011), adapted to the model with connectivity constraints. This property states that an agent ii will not envy another agent jj after we remove some item from jj’s bundle. Since we only allow connected bundles in our set-up, we may only remove an item from A(j)A(j) if removal of this item leaves the bundle connected.

An allocation AA satisfies EF1 if, for any pair i,j∈Ni,j\in N of agents, either A(j)=∅A(j)=\emptyset or there is a good v∈A(j)v\in A(j) such that A(j)∖{v}A(j)\setminus\{v\} is connected and ui(A(i))⩾ui(A(j)∖{v})u_{i}(A(i))\geqslant u_{i}(A(j)\setminus\{v\}).

In the instance 2–1–3–1 for two agents, the allocation (2–1, 3–1) is EF1, since the left agent’s envy can be eliminated by removing the item of value 3 from the right-hand bundle. However, the allocation (2, 1–3–1) fails to be EF1 according to our definition, since eliminating either outer good of the right bundle does not prevent envy.This example shows that our definition is strictly stronger than the standard definition of EF1 without connectivity constraints. In the instance 2–1–3–1, considered without connectivity constraints, the allocation (2, 1–3–1) does satisfy EF1 since in the standard setting we are allowed to remove the middle item (with value 3) of the right bundle.

A graph GG guarantees EF1 for nn agents if, for all possible monotonic valuations for nn agents, there exists some connected allocation that is EF1. A graph GG guarantees EF1 for nn agents and a restricted class of valuations if, for all allowed valuations, a connected EF1 allocation exists.

Thus, an allocation AA satisfies EF1 if and only if ui(A(i))⩾ui−(A(j))u_{i}(A(i))\geqslant u_{i}^{-}(A(j)) for any pair i,j∈Ni,j\in N of agents.

As we show in the appendix in Example A.5, allocations satisfying a strengthened version of EF1 called envy-freeness up to the least good (EFX) (Caragiannis et al., 2019) may not exist on a path.

Given an ordered sequence of the vertices P=(v1,v2,…,vm)P=(v_{1},v_{2},\ldots,v_{m}), and j,k∈[m]j,k\in[m] with j⩽kj\leqslant k, we write P(vj,vk)P(v_{j},v_{k}) for the subsequence from vjv_{j} to vkv_{k}, so P(vj,vk)=(vj,vj+1,…,vk−1,vk)P(v_{j},v_{k})=(v_{j},v_{j+1},\ldots,v_{k-1},v_{k}). With a little abuse of notation, we often identify a subsequence P(vj,vk)P(v_{j},v_{k}) with the bundle of the corresponding vertices. Let L(vj)=P(v1,vj−1)L(v_{j})=P(v_{1},v_{j-1}) be the subsequence of vertices strictly left of vjv_{j} and R(vj)=P(vj+1,vm)R(v_{j})=P(v_{j+1},v_{m}) be the subsequence of vertices strictly right of vjv_{j}. When graph GG is a path, we always implicitly assume that its vertices v1,v2,…,vmv_{1},v_{2},\ldots,v_{m} are numbered from left to right according to the order they appear along the path, so that the set of the edges of GG is {{vj,vj+1}:1⩽j<m}\{\{v_{j},v_{j+1}\}:1\leqslant j<m\}. Each connected bundle in the path clearly corresponds to a subpath or subsequence of the vertices. A Hamiltonian path of a graph GG is a path that visits all the vertices of the graph exactly once. A graph is traceable if it contains a Hamiltonian path.

EF1 existence for two agents

In cake-cutting for two agents, the standard way of obtaining an envy-free allocation is the cut-and-choose protocol: Alice divides the cake into two equally-valued pieces, and Bob selects the piece he prefers; the other piece goes to Alice. The same strategy almost works in the indivisible case when items form a path; the problem is that Alice might not be able to divide the items into two exactly equal pieces. Instead, we ask Alice to divide the items into pieces that are equally valued “up to one good”. The formal version is as follows. For a sequence of vertices P=(v1,v2,…,vm)P=(v_{1},v_{2},\ldots,v_{m}) and an agent ii, we say that vjv_{j} is the lumpy tie over PP for agent ii if jj is the smallest index such that

For example, when ii has additive valuations 1–3–2–1–3–1, then the third item (of value 2) is the lumpy tie for ii, since 1+3+2⩾1+3+11+3+2\geqslant 1+3+1 and 2+1+3+1⩾1+32+1+3+1\geqslant 1+3. The lumpy tie always exists: taking jj to be the smallest index such that ui(L(vj)∪{vj})⩾ui(R(vj))u_{i}(L(v_{j})\cup\{v_{j}\})\geqslant u_{i}(R(v_{j})) (which exists as the inequality holds for j=mj=m by monotonicity), the first part of (3.1) holds. If j=1j=1, the second part of (3.1) is immediate by monotonicity. If j>1j>1, then since jj is minimal, we have ui(L(vj))=ui(L(vj−1)∪{vj−1})<ui(R(vj−1))=ui(R(vj)∪{vj})u_{i}(L(v_{j}))=u_{i}(L(v_{j-1})\cup\{v_{j-1}\})<u_{i}(R(v_{j-1}))=u_{i}(R(v_{j})\cup\{v_{j}\}) as required.

Using lumpy ties, our discrete version of the cut-and-choose protocol is specified as follows.

The discrete cut-and-choose protocol for n=2n=2 agents on a sequence P=(v1,v2,…,vm)P=(v_{1},v_{2},\ldots,v_{m}) proceeds as follows:

Step 1. Alice selects her lumpy tie vjv_{j} over (v1,v2,…,vm)(v_{1},v_{2},\ldots,v_{m}).

Step 2. Bob chooses a weakly preferred bundle among L(vj)L(v_{j}) and R(vj)R(v_{j}).

Step 3. Alice receives the bundle of all the remaining vertices, including vjv_{j}.

Intuitively, the protocol allows Alice to select an item vjv_{j} that she will receive for sure, with the advice that the two pieces to either side of vjv_{j} should have almost equal value to her. Then, Bob is allowed to choose which side of vjv_{j} he wishes to receive. In our example with valuations 1–3–2–1–3–1, Alice selects the lumpy tie of value 2, then Bob chooses the bundle 1–3–1 to the right and receives it, and Alice receives the bundle 1–3–2. The result is EF1. This is true in general, and also if valuations are not identical.

When GG is a path and there are n=2n=2 agents, the discrete cut-and-choose protocol yields an EF1 allocation.

Clearly, the protocol returns a connected allocation. The returned allocation satisfies EF1: Bob does not envy Alice up to item vjv_{j}, since Bob receives his preferred bundle among L(vj)L(v_{j}) and R(vj)R(v_{j}). Also, by (3.1), Alice does not envy Bob, since Alice either receives the bundle L(vj)∪{vj}L(v_{j})\cup\{v_{j}\} which she weakly prefers to Bob’s bundle R(vj)R(v_{j}), or she receives the bundle R(vj)∪{vj}R(v_{j})\cup\{v_{j}\}, which she weakly prefers to Bob’s bundle L(vj)L(v_{j}). ∎

Proposition 3.2 implies that an EF1 allocation always exists on a path. Hence, an EF1 allocation exists for every traceable graph GG: simply use the discrete cut-and-choose protocol on a Hamiltonian path of GG. In fact, the discrete cut-and-choose protocol works on a broader class of graphs: We only need to require that the vertices of the graph can be numbered in a way that the allocation resulting from the discrete cut-and-choose protocol is guaranteed to be connected. Since the protocol always partitions the items into an initial and a terminal segment of the sequence, such a numbering needs to satisfy the following property.

A bipolar numbering of a graph GG is an ordering (v1,v2,…,(v_{1},v_{2},\dots, vm)v_{m}) of its vertices such that for all j∈[n]j\in[n], the sets L(vj)∪{vj}L(v_{j})\cup\{v_{j}\} and R(vj)∪{vj}R(v_{j})\cup\{v_{j}\} are connected in GG.

In a slightly different context, bipolar numberings are known as stst-numberings and turn out to be useful in algorithms for testing planarity and for graph drawing (Lempel et al., 1967; Even and Tarjan, 1976; Tarjan, 1986). The more common (equivalent) definition is phrased to say that a numbering is bipolar if, for every j∈[n]j\in[n], the vertex vjv_{j} has a neighbor that appears earlier in the sequence, and a neighbor that appears later in the sequence.

Clearly, every traceable graph has a bipolar numbering, since we can just use a Hamiltonian path. However, there are also non-traceable graphs that admit a bipolar numbering. Figure 1 shows some examples.

When there are n=2n=2 agents, then the discrete cut-and-choose protocol run on a bipolar numbering of GG yields an EF1 allocation.

The discrete cut-and-choose protocol returns an allocation whose bundles are either initial or terminal segments of the ordered sequence (v1,v2,…,vm)(v_{1},v_{2},\dots,v_{m}). By definition of a bipolar numbering, such an allocation is connected, and it is EF1 by the same argument as in Proposition 3.2. ∎

It is clear that the discrete cut-and-choose protocol cannot be extended to graphs other than those admitting a bipolar numbering. However, it could be that a different protocol is able to produce EF1 allocations on other graphs. In the remainder of this section, we prove that this is not the case: for n=2n=2 agents, a connected graph GG guarantees the existence of an EF1 allocation if and only if it admits a bipolar numbering. This completely characterizes the class of graphs that guarantee EF1 existence in the two-agent case.Note that no non-trivial disconnected graph guarantees EF1 for two agents: If GG is disconnected, take a connected component CC with at least two vertices. Let both agents have additive valuations that value each item in CC at 1, and value items outside of CC at 0. Then, in a connected allocation, all items in CC must go to a single agent, since the other agent needs to receive items from another connected component. This induces envy in the other agent that is not bounded by one good.

For a different number of agents, the class of graphs guaranteeing an EF1 allocation will be different. In particular, the star with three leaves does not guarantee an EF1 allocation for two agents (as it does not have a bipolar numbering, see below), but one can check that this star does guarantee an EF1 allocation for three or more agents (see Example A.6 in the appendix).

Based on a known characterization of graphs admitting a bipolar numbering, we characterize this class in terms of forbidden substructures. We then show that these forbidden structures are also forbidden for EF1: if a graph contains such a structure, we can exhibit an additive valuation profile for which no EF1 allocation exists.

As a simple example, consider the star with three leaves, which is the smallest connected graph that does not have a bipolar numbering.

Take two agents with identical additive valuations that value each item at 1. Any connected allocation must allocate three items to one agent, and a single item to the other agent. Then the latter agent envies the former agent, even up to one good. This star is an example of a forbidden substructure called a trident, which takes one of two forms, illustrated in Figure 2.

there is a vertex ss whose removal from GG leaves three or more connected components (a type I trident), or

there are subgraphs C,P1,P2,P3C,P_{1},P_{2},P_{3} of GG such that (i) P1,P2,P3P_{1},P_{2},P_{3} are vertex-disjoint, (ii) each PiP_{i} contains at least two vertices, (iii) CC has exactly one contact vertex sis_{i} in common with PiP_{i}, i=1,2,3i=1,2,3, and (iv) for i=1,2,3i=1,2,3, removal of vertex sis_{i} from GG disconnects Pi∖{si}P_{i}\setminus\{s_{i}\} from C∖{si}C\setminus\{s_{i}\} (hence from the other two PjP_{j}) in GG (a type II trident).

We will prove that a graph GG fails to admit a bipolar numbering, and fails to guarantee EF1 for two agents, if and only if GG contains a trident. To reason about these structures, it is useful to consider the standard concept of the block decomposition of a graph (see, e.g., the textbook Bondy and Murty, 2008, Sec. 5.2).

A decomposition of a graph G=(V,E)G=(V,E) is a family {F1,F2,…,Ft}\{F_{1},F_{2},\ldots,F_{t}\} of edge-disjoint subgraphs of GG such that ⋃i=1tE(Fi)=E\bigcup^{t}_{i=1}E(F_{i})=E where E(Fi)E(F_{i}) is the set of edges of FiF_{i}. A vertex is called a cut vertex of a graph GG if removing it increases the number of connected components of GG. A graph GG is biconnected if GG is connected and does not have a cut vertex. A block of GG is a maximal biconnected subgraph of GG.

Equivalently, a block of a graph GG can be defined as a maximal subgraph of GG where each pair of vertices lie on a common cycle (Bondy and Murty, 2008). Given a connected graph GG, we define a bipartite graph B(G)B(G) with bipartition (B,S)(\mathcal{B},S), where B\mathcal{B} is the set of blocks of GG and SS is the set of cut vertices of GG; a block BB and a cut vertex vv are adjacent in B(G)B(G) if and only if BB includes vv. Since every cycle of a graph is included in some block, the graph B(G)B(G) is a tree:

any two blocks of GG have at most one cut vertex in common;

the set of blocks forms a decomposition of GG; and

Thus, for a connected graph GG, we call B(G)B(G) the block tree of GG. It turns out that GG admits a bipolar numbering if and only if B(G)B(G) is a path. For example, the graphs shown in Figure 1 all have their blocks arranged in a path (so that B(G)B(G) is a path), as shown in Figure 3.

A graph GG admits a bipolar numbering if its block tree B(G)B(G) is a path.

Lempel et al. (1967) show that GG admits a bipolar numbering if there are s,t∈Vs,t\in V such that adding an edge {s,t}\{s,t\} to GG makes it biconnected. If B(G)B(G) is a path, let B1B_{1} and B2B_{2} be the leaf blocks at the ends of the path B(G)B(G). Take any s∈B1s\in B_{1} and t∈B2t\in B_{2}. If we add the edge {s,t}\{s,t\} to GG, the graph becomes biconnected. Hence, GG admits a bipolar numbering. ∎

There is a linear-time algorithm based on depth-first search to construct a bipolar numbering for any biconnected graph (Even and Tarjan, 1976; Tarjan, 1986), and one can also calculate the block tree B(G)B(G) of a given graph in linear time (Hopcroft and Tarjan, 1973). Thus, in linear time, we can compute a bipolar numbering of a graph or report that none exists. Clearly, given a bipolar numbering, the discrete cut-and-choose protocol can also be run in linear time.

Next, we show that if B(G)B(G) is not a path, then GG cannot guarantee EF1. The proof constructs explicit counter-examples, which have a very simple structure. We say that additive valuations uiu_{i} are binary if ui({v})∈{0,1}u_{i}(\{v\})\in\{0,1\} for every v∈Vv\in V.

If the block tree B(G)B(G) of GG is not a path, then GG contains a trident.

If GG contains a trident, then there exist identical, additive, binary valuations over GG for two agents such that no connected allocation is EF1.

If B(G)B(G) is not a path, then it contains a vertex with at least three neighbors, and thus either

there is a cut vertex ss adjacent to three blocks B1B_{1}, B2B_{2}, and B3B_{3}; or

there is a block BB adjacent to three different cut vertices s1s_{1}, s2s_{2}, and s3s_{3}.

Note that in both cases, all blocks contain at least two vertices each, as maximality guarantees that a block in a connected graph GG never consists of a single vertex, unless GG itself has only one vertex. Thus, in case (a), GG contains a type I trident. In case (b), the cut vertices s1s_{1}, s2s_{2}, and s3s_{3} serve as the contact vertices in the earlier definition of type II tridents and are adjacent to blocks that serve as the subgraphs P1P_{1}, P2P_{2}, and P3P_{3}. This proves the first part.

To prove the second part, we construct identical additive valuations that do not admit an EF1 allocation. If GG contains a type I trident, let ss be the corresponding cut vertex, and choose vertices v1,v2,v3v_{1},v_{2},v_{3} from each of three different connected components that remain after ss is deleted from GG. The two agents have utility 11 for each of ss, v1v_{1}, v2v_{2}, and v3v_{3}, and for the remaining vertices. Now take any connected allocation (I1,I2)(I_{1},I_{2}). One of the bundles, say I1I_{1}, includes the cut vertex ss. Then I2I_{2} can contain at most one of the vertices v1v_{1}, v2v_{2}, v3v_{3}, since I2I_{2} is connected and does not contain ss yet any path between distinct viv_{i} and vjv_{j} goes through ss. Hence ui(I2)⩽1u_{i}(I_{2})\leqslant 1. Now, the bundle I1I_{1} contains ss and at least two of v1v_{1}, v2v_{2}, v3v_{3}, so ui(I1)⩾3u_{i}(I_{1})\geqslant 3. Thus, the allocation is not EF1.

Suppose GG contains a type II trident consisting of subgraphs C,P1,P2,P3C,P_{1},P_{2},P_{3} with contact vertices s1,s2,s3s_{1},s_{2},s_{3}. Then for i=1,2,3i=1,2,3 choose a vertex vi≠siv_{i}\neq s_{i} from PiP_{i}. The two agents have utility 11 for each of s1s_{1}, s2s_{2}, s3s_{3}, v1v_{1}, v2v_{2}, and v3v_{3}, and for the remaining vertices. Now take any connected allocation (I1,I2)(I_{1},I_{2}). One of the bundles, say I1I_{1}, contains at least two contact vertices sis_{i} and the other contains at most one contact vertex sis_{i}. Say that s1,s2∈I1s_{1},s_{2}\in I_{1}. Now, G∖{s1,s2}G\setminus\{s_{1},s_{2}\} has at least three connected components, and since I2I_{2} is connected, it must be contained in one of these components. But each component contains at most two vertices with utility 1, so ui(I2)⩽2u_{i}(I_{2})\leqslant 2. Since there are six vertices with utility 1 in total, ui(I1)⩾4u_{i}(I_{1})\geqslant 4. Thus, the allocation is not EF1. ∎

Combining these results, we obtain the promised characterization.

The following conditions are equivalent for every connected graph GG:

GG guarantees EF1 for two agents with identical, additive, binary valuations.

The implication (1)⇒(2)(1)\Rightarrow(2) follows from Proposition 3.4 which shows that the discrete cut-and-choose protocol yields a connected EF1 allocation when run on a bipolar numbering. The implication (2)⇒(3)(2)\Rightarrow(3) is immediate. The implications (3)⇒(4)(3)\Rightarrow(4) and (4)⇒(5)(4)\Rightarrow(5) follow from Lemma 3.9 which proves the contrapositives. Finally, (5)⇒(1)(5)\Rightarrow(1) follows from Lemma 3.8. ∎

The equivalence (2)⇔(3)(2)\Leftrightarrow(3) is noteworthy and perhaps surprising: It is often easier to guarantee fairness when agents’ valuations are identical, yet in terms of the graphs that guarantee EF1 for two agents, there is no difference between identical and non-identical valuations. Intriguingly, even for more than two agents, we do not know of a graph which guarantees EF1 for identical valuations, but fails it for non-identical valuations.

EF1 existence for three agents: A moving-knife protocol

We will now consider the case of three agents. Stromquist (1980) designed a protocol that results in an envy-free contiguous allocation of a divisible cake. We now give a brief outline of the protocol, illustrated by Figure 4.

A referee holds a sword over the cake. Each of the three agents holds their own knife over the portion of the cake to the right of the sword, positioning it so that this portion is divided into two pieces they judge to have the same value. Now, initially, the sword is at the left end of the cake. It starts moving at a constant speed from left to right, while the agents continuously move their knives to keep dividing the right-hand portion into equally-valued pieces. At some point (when the leftmost piece becomes valuable enough), one of the agents shouts “cut”, and the cake will be cut twice: once by the sword, and once by the middle one of the three knives. Agents shout “cut” as soon as the left piece is a highest-valued piece among the three. The agent who shouts receives the left piece. The remaining agents each receive a piece containing their knife. The resulting allocation is envy-free, since the agent receiving the left piece prefers it to the other pieces, and the other agents who are not shouting receive at least half the value of the part of the cake to the right of the sword.

Let GG be a path, P=(v1,v2,…,vm)P=(v_{1},v_{2},\ldots,v_{m}). There are several difficulties in translating Stromquist’s continuous procedure to the discrete setting for GG. First, agents need to divide the piece to the right of the sword in half, and this might not be possible exactly given indivisibilities; but this can be handled using our concept of lumpy ties from Section 3. Next, when the sword moves one item to the right, the lumpy ties of the agents may need to jump several items to the right, for example, because the new member of the leftmost bundle is very valuable. To ensure EF1, we will need to smoothen these jumps, so that the middle piece grows one item at a time. Also, it will be helpful to have the sword move in half-steps: it alternates between being placed between items (so it cuts the edge between the items), and being placed over an item, in which case the sword covers the item and agents ignore that item. Finally, while the sword covers an item, we will only terminate if at least two agents shout to indicate that they prefer the leftmost piece; this will ensure that there is an agent who is flexible about which of the bundles they are assigned. The algorithm moves in steps, and alternates between moving the sword, and updating the lumpy ties.

In our formal description of the algorithm, we do not use swords and knives. Instead, we maintain three bundles LL, MM, and RR that can be seen as resulting from a certain configuration this cutting implements. We also need a few definitions. For a subsequence of vertices P(vs,vr)=(vs,vs+1,…,vr)P(v_{s},v_{r})=(v_{s},v_{s+1},\ldots,v_{r}) and an agent ii, recall that vjv_{j} (s⩽j⩽rs\leqslant j\leqslant r) is the lumpy tie over P(vs,vr)P(v_{s},v_{r}) for ii if jj is the smallest index such that

Here, the definitions of L(vj)L(v_{j}) and R(vj)R(v_{j}) apply to the subsequence P(vs,vr)P(v_{s},v_{r}). The lumpy tie always exists by the discussion after equation (3.1). Each of the three agents has a lumpy tie over P(vs,vr)P(v_{s},v_{r}); a key concept for us is the median lumpy tie which is the median of the lumpy ties of the three agents, where the median is taken with respect to the ordering of P(vs,vr)P(v_{s},v_{r}). We say that i∈Ni\in N is a left agent (respectively, a middle agent or a right agent) over P(vs,vr)P(v_{s},v_{r}) if the lumpy tie for ii appears strictly before (respectively, is equal to, or appears strictly after) the median lumpy tie. Note that by definition of the median, there is at most one left agent, at most one right agent, and at least one middle agent. Suppose that the median lumpy tie over the subsequence P(vs,vr)P(v_{s},v_{r}) is vjv_{j}, and let ii be an agent. Then using the definitions of lumpy tie and left/right agents, we find that

Given the median lumpy tie vjv_{j} over P(vs,vr)P(v_{s},v_{r}), and a two-agent set S={i,k}⊆NS=\{i,k\}\subseteq N, we define Lumpy(S,vj,P(vs,vr))\mathsf{Lumpy}(S,v_{j},P(v_{s},v_{r})) to be the allocation of the items in P(vs,vr)P(v_{s},v_{r}) to SS such that

if ii is a left agent and kk is a right agent, then ii receives L(vj)L(v_{j}) and kk receives R(vj)∪{vj}R(v_{j})\cup\{v_{j}\};

if ii is a middle agent, then agent kk receives kk’s preferred bundle among L(vj)L(v_{j}) and R(vj)R(v_{j}), and agent ii receives the other bundle along with vjv_{j}.

Using (4.1) and (4.2), we see that Lumpy(S,vj,P(vs,vr))\mathsf{Lumpy}(S,v_{j},P(v_{s},v_{r})) is an EF1 allocation:

Let S={i,k}⊆NS=\{i,k\}\subseteq N and let vjv_{j} be the median lumpy tie over P(vs,vr)P(v_{s},v_{r}). Then Lumpy(S,vj,P(vs,vr))\mathsf{Lumpy}(S,v_{j},P(v_{s},v_{r})) is an EF1 allocation of the items in P(vs,vr)P(v_{s},v_{r}) to SS. Further, each agent in SS weakly prefers their bundle to L(vj)L(v_{j}) and R(vj)R(v_{j}).

The discrete moving-knife protocol for n=3n=3 agents on a sequence P=(v1,v2,…,vm)P=(v_{1},v_{2},\ldots,v_{m}) proceeds as follows. We say that an agent i∈Ni\in N is a shouter if ui(L)⩾ui(M)u_{i}(L)\geqslant u_{i}(M) and ui(L)⩾ui(R)u_{i}(L)\geqslant u_{i}(R).

The moving-knife protocol finds an EF1 allocation for three agents and runs in O(m)O(m) time, when GG is a path.

The algorithm terminates and returns an allocation, since the bundle LL grows throughout the algorithm until eventually, at least two agents will think that LL is a best bundle and thus will shout and thereby terminate the algorithm. We will now consider every possible way that the algorithm could have terminated, and show that the resulting allocation is EF1.

Step 4(a). We first prove that if ii is a shouter who did not shout in the previous step, then

In the previous step (which was either Step 3 or Step 4), the middle bundle was M∖{vr−1}M\setminus\{v_{r-1}\} and the right bundle was {vr}∪R\{v_{r}\}\cup R. (While Step 4 allows for the possibility that the middle and right bundles are not changed in Step 4, this is not the case if we enter Step 4(a): if the bundles are unchanged and two agents shout, these agents already shouted in Step 3, contradicting that we did not terminate then.) Since ii did not shout with the middle and right bundles of the previous step, we have

Since ii is a shouter, ui(L)⩾ui(M)u_{i}(L)\geqslant u_{i}(M), so that the first case is impossible by monotonicity. Hence ui({vr}∪R)>ui(L)u_{i}(\{v_{r}\}\cup R)>u_{i}(L), showing (4.5), when combined with ui(L)⩾ui(M)u_{i}(L)\geqslant u_{i}(M).

Agent s{s} does not envy others up to one good:

EF2 existence for any number of agents

For two or three agents, we have seen algorithms that are guaranteed to find an EF1 allocation on a path (and on traceable graphs). Both algorithms were adaptations of procedures that identify envy-free divisions in the cake-cutting problem. For the case of four or more agents, we face a problem: there are no known procedures that find connected envy-free division in cake-cutting if the number of agents is larger than three. However, in the divisible setting, a non-constructive existence result is known: Su (1999) proved, using Sperner’s lemma, that for any number of agents, a connected envy-free division of a cake always exists. One might try to use this result as a black box to obtain a fair allocation for the indivisible problem on a path: Translate an indivisible instance with additive valuations into a divisible cake (where each item corresponds to a region of the cake), obtain an envy-free division of the cake, and round it to get an allocation of the items. Suksompong (2019) followed this approach and showed that the result is an allocation where any agent ii’s envy ui(A(j))−ui(A(i))u_{i}(A(j))-u_{i}(A(i)) is at most 2umax2u_{\text{max}}, where umaxu_{\text{max}} is the maximum valuation for a single item.

In this section, rather than using Su’s (1999) result as a black box, we directly apply Sperner’s lemma to the indivisible problem. This allows us to obtain a stronger fairness guarantee: We show that on paths (and on traceable graphs), there always exists an EF2 allocation.To see that EF2 is a stronger property than bounding envy up to 2umax2u_{\text{max}}, consider a path of four items and two agents with additive valuations 11–1010–22–22. The allocation (1,10(1,10–22–2)2) is not EF2, but the first agent has an envy of 13<20=2umax13<20=2u_{\text{max}}. An allocation is EF2 if any agent’s envy can be avoided by removing up to two items from the envied bundle. Again, we only allow removal of items if this operation leaves a connected bundle.

An allocation AA satisfies EF2 if, for any pair i,j∈Ni,j\in N of agents, either ∣A(j)∣⩽1|A(j)|\leqslant 1, or there are two goods u,v∈A(j)u,v\in A(j) such that A(j)∖{u,v}A(j)\setminus\{u,v\} is connected and ui(A(i))⩾ui(A(j)∖{u,v})u_{i}(A(i))\geqslant u_{i}(A(j)\setminus\{u,v\}).

Let us first give a high-level illustration with three agents of how Sperner’s lemma can be used to find low-envy allocations.

Given a path P=(a,b,c,d)P=(a,b,c,d), the family of connected partitions of PP can naturally be arranged as the vertices of a subdivided simplex, as in Figure 5.

For each of these partitions, each agent ii labels the corresponding vertex by the index of a bundle from that partition that ii most-prefers. For example, the top vertex will be labelled as “index 1” by all agents, since they all most-prefer the leftmost bundle in (abcd,∅,∅)(abcd,\emptyset,\emptyset). Now, Sperner’s lemma will imply that at least one of the simplices (say the shaded one) is “fully-labeled”, which means that the first agent most-prefers the leftmost bundle at one vertex, the second agent most-prefers the middle bundle at another vertex, and the third agent most-prefers the rightmost bundle at the last vertex. Notice that the partitions at the corner points of the shaded simplex are all “similar” to each other (they can be obtained from each other by moving only one item). Hence, we can “round” the corner-partitions into a common allocation A∗A^{*}, say by picking one of the corner partitions arbitrarily and then allocating bundles to agents according to the labels. The resulting allocation has the property that any agents’ envy can be eliminated by moving at most one good.One can generalize this argument to show that on paths, there exists an allocation AA satisfying a weak form of EF1: for any i,j∈[n]i,j\in[n], we have ui(Ii∪{gi})⩾ui(Ij∖{gj})u_{i}(I_{i}\cup\{g_{i}\})\geqslant u_{i}(I_{j}\setminus\{g_{j}\}) for some items gi,gjg_{i},g_{j} such that Ii∪{gi}I_{i}\cup\{g_{i}\} and Ij∖{gj}I_{j}\setminus\{g_{j}\} are connected. For additive valuations, this implies that envy is bounded by ui(gi)+ui(gj)⩽2umaxu_{i}(g_{i})+u_{i}(g_{j})\leqslant 2u_{\text{max}}, which is the result of Suksompong (2019).

The argument sketched above does not yield an EF1 nor even an EF2 allocation. Intuitively, the problem is that the connected partitions at the corners of the fully-labeled simplex are “too far apart”, so that no matter how we round the corner partitions into a common allocation A∗A^{*}, some agents’ bundles will have changed too much, and so we cannot prevent envy even up to one or two goods. In the following, we present a solution to this problem, by considering a finer subdivision: we introduce n−1n-1 knives which move in half-steps (rather than full steps), and which might ‘cover’ an item so that it appears in none of the bundles. The result is that the partial partitions in the corners of the fully-labeled simplex are closer together, and can be successfully rounded into an EF2 allocation A∗A^{*}.

In our approach, we use a specific triangulation (Kuhn’s triangulation, Kuhn, 1960). This triangulation has the needed property that the partitions at the corners of sub-simplices are close together, and adjacent partitions can be obtained from each other in a natural way. While this type of triangulation has also been used in cake-cutting, e.g., by Deng et al. (2012), there it was only used to speed up algorithms (compared to the barycentric subdivision used by Su (1999)), not to obtain better fairness properties.

For each main vertex vi\boldsymbol{v}_{i} of the simplex, LL assigns color ii to vi\boldsymbol{v}_{i}: L(vi)=iL(\boldsymbol{v}_{i})=i; and

L(v)≠iL(\boldsymbol{v})\neq i for any vertex v∈V(T)\boldsymbol{v}\in V(T) belonging to the (n−2)(n-2)-face of SS not containing vi\boldsymbol{v}_{i}.

Sperner’s lemma states that if LL is a proper labeling function, then there exists an elementary simplex of TT whose vertices have all different labels.

We will consider a generalized version of Sperner’s lemma, proved, for example, by Bapat (1989). In this version, there are nn labeling functions L1,…,LnL_{1},\dots,L_{n}, and we are looking for an elementary simplex that is fully-labeled for some way of assigning labeling functions to vertices, where we must use each labeling function exactly once. The formal definition is as follows.

The generalized version of Sperner’s lemma that we consider, taken from Bapat (1989), guarantees the existence of a fully-labeled simplex.

Let TT be a triangulation of an (n−1)(n-1)-simplex SS, and let L1,…,LnL_{1},\dots,L_{n} be proper labeling functions. Then there is a fully-labeled simplex S∗S^{*} of TT.

2 Existence of EF2 allocations

Consider the (n−1)(n-1)-simplexThe simplex SmS_{m} is affinely equivalent to the standard (n−1)(n-1)-simplex Δn−1={(l1,…,ln)⩾0:∑li=1}\Delta_{n-1}=\{(l_{1},\dots,l_{n})\geqslant 0:\sum l_{i}=1\} via xi=m⋅(l1+l2+⋯+li)+12x_{i}=m\cdot(l_{1}+l_{2}+\cdots+l_{i})+\frac{1}{2}. In these coordinates, lil_{i} is the length of the ii-th piece (times 1/m1/m).

where ej=(0,…,1,…,0)\mathbf{e}^{j}=(0,\dots,1,\dots,0) is the jj-th unit vector.

Property (5.2) means that, if we visit the knife positions x1,x2,…xn\boldsymbol{x}_{1},\boldsymbol{x}_{2},\ldots\boldsymbol{x}_{n} at the corners of an elementary simplex in the listed order, then at each step exactly one of the knives moves by half a step, and each knife moves only at one of the steps.

If there are several most-preferred bundles in A(x)A(\boldsymbol{x}), ties can be broken arbitrarily. However, we insist that the index Li(x)L_{i}(\boldsymbol{x}) always corresponds to a non-empty bundle (this can be ensured since A(x)A(\boldsymbol{x}) always contains a non-empty bundle, and uiu_{i} is monotonic).

The labeling functions LiL_{i} are proper. For each j∈[m]j\in[m], the main vertex vj\boldsymbol{v}_{j} of the simplex SmS_{m} has the form vj=(12,…,12,m+12,…,m+12)\boldsymbol{v}_{j}=(\frac{1}{2},\dots,\frac{1}{2},m+\frac{1}{2},\dots,m+\frac{1}{2}), where the first j−1j-1 entries are 12\frac{1}{2} and the rest are m+12m+\frac{1}{2}. In the partition A(vj)A(\boldsymbol{v}_{j}), the bundle Ij(vj)I^{j}(\boldsymbol{v}_{j}) contains all the items, so is most-preferred (since uiu_{i} is monotonic and by our tie-breaking), and so Li(vj)=jL_{i}(\boldsymbol{v}_{j})=j. Further, any vertex x\boldsymbol{x} belonging to the (n−2)(n-2)-face of SmS_{m} not containing vj\boldsymbol{v}_{j} satisfies xj−1=xjx^{j-1}=x^{j}, and thus in partition A(x)A(\boldsymbol{x}), bundle Ij(x)I^{j}(\boldsymbol{x}) is empty, hence is not selected, and so Li(x)≠jL_{i}(\boldsymbol{x})\neq j.

The fully-labeled elementary simplex S∗S^{*} corresponds to a sequence (A1,A2,…,An)(A_{1},A_{2},\ldots,A_{n}) of partial partitions of PP, which we call the Sperner sequence, where Ai=(Ii1,…,Iin):=A(xi)A_{i}=(I_{i}^{1},\dots,I_{i}^{n}):=A(\boldsymbol{x}_{i}) for each i∈[n]i\in[n]. An example of a Sperner sequence is shown in Figure 6. From the labeling, for each agent i∈[n]i\in[n], since Li(xi)=ϕ(i)L_{i}(\boldsymbol{x}_{i})=\phi(i), the bundle with index ϕ(i)\phi(i) in the partition AiA_{i} is a best bundle for ii:

Now, for each j∈[n]j\in[n], we define the basic bundle Bj:=I1j∩⋯∩InjB^{j}:=I_{1}^{j}\cap\cdots\cap I_{n}^{j} to be the bundle of items that appear in the jj-th bundle of every partition in the Sperner sequence. The set of basic bundles is a partial partition. Let us analyze the items between basic bundles.

From (5.2), each of the n−1n-1 knives moves exactly once, by half a step, while passing through the Sperner sequence (A1,A2,…,An)(A_{1},A_{2},\ldots,A_{n}). Thus, the numbers x1j,…,xnjx_{1}^{j},\dots,x_{n}^{j} take on two different values, one of which is integral and the other half-integral. We write yjy^{j} for the integral value (so yj=xijy^{j}=x_{i}^{j} for some i∈[n]i\in[n]), and call yjy^{j} a boundary item. The jj-th knife covers the item yjy^{j} in some, but not all, of the partial partitions in the Sperner sequence. Now, there are two cases:

x1j=⋯=xij=yj−12x_{1}^{j}=\dots=x_{i}^{j}=y^{j}-\frac{1}{2} and xi+1j=⋯=xnj=yjx_{i+1}^{j}=\dots=x_{n}^{j}=y^{j} for some i∈[n]i\in[n], so that yjy^{j} never occurs in the jj-th bundle in the Sperner sequence but sometimes occurs in the (j+1)(j+1)-th bundle, or

x1j=⋯=xij=yjx_{1}^{j}=\dots=x_{i}^{j}=y^{j} and xi+1j=⋯=xnj=yj+12x_{i+1}^{j}=\dots=x_{n}^{j}=y^{j}+\frac{1}{2} for some i∈[n]i\in[n], so that yjy^{j} sometimes occurs in the jj-th bundle in the Sperner sequence but never occurs in the (j+1)(j+1)-th bundle.

Since yjy^{j} is sometimes covered by a knife, it is not part of any basic bundle. Note that

We now construct a complete partition of the path PP into the bundles (I∗1,I∗2,…,I∗n)(I_{*}^{1},I_{*}^{2},\ldots,I_{*}^{n}) which are defined as follows:

Thus, the bundle I∗jI_{*}^{j} contains the basic bundle BjB^{j}, plus all of the boundary items yj−1y^{j-1} or yjy^{j} that occur in the jj-th bundle at some point of the Sperner sequence. Precisely, for each boundary item yjy^{j}, j∈[n−1]j\in[n-1], the item yjy^{j} is placed in bundle I∗j+1I_{*}^{j+1} in case (a) above, and it is placed in bundle I∗jI_{*}^{j} in case (b). Thus, every item is allocated to exactly one bundle.

We first show that the partition (I∗1,I∗2,…,I∗n)(I_{*}^{1},I_{*}^{2},\ldots,I_{*}^{n}) is such that agents’ expectations about the value of the bundles I∗jI_{*}^{j} are approximately correct (up to two items):

This follows by monotonicity of uiu_{i}, since I∗j=I1j∪⋯∪Inj⊇Iij⊇BjI_{*}^{j}=I_{1}^{j}\cup\cdots\cup I_{n}^{j}\supseteq I_{i}^{j}\supseteq B^{j} by (5.4).

Now, based on the partition, we define an allocation A∗A_{*} by A∗(i)=I∗ϕ(i)A_{*}(i)=I_{*}^{\phi(i)} for each agent i∈[n]i\in[n]. Then A∗A_{*} satisfies EF2: For any pair i,j∈[n]i,j\in[n] of agents, we have

Hence, we have proved the main result of this section:

On a path, for any number of agents with monotone valuation functions, a connected EF2 allocation exists.

EF1 existence for four agents

We have seen that Sperner’s lemma can be used to show EF2 existence for any number of agents. Why does our proof in the previous section only establish EF2, and not EF1? The reason is that agents’ expectations about the contents of a bundle might differ by up to two goods from what the bundle will actually contain. In the notation of the previous section, an agent ii may be presented with a partial partition IiI_{i} where the jj-th bundle IijI_{i}^{j} is the basic bundle, i.e., Iij=BjI_{i}^{j}=B^{j}. The agent then selects their favorite bundle from IiI_{i}, implicitly assuming that the jj-th bundle in the rounded partition I∗I_{*} will also equal BjB^{j}, i.e., that I∗j=BjI_{*}^{j}=B^{j}. However, it may happen that in fact I∗j={yj−1}∪Bj∪{yj}I_{*}^{j}=\{y^{j-1}\}\cup B^{j}\cup\{y^{j}\}, and then ii envies the agent who receives bundle jj by a margin of two goods.

For four agents, we can adapt our argument to achieve EF1. To do this, we both change the way we round the Sperner sequence into an allocation, and define new labeling functions that better anticipate how a partial partition will be rounded into the final allocation. In this way, agents’ expectations about bundles can only be wrong up to one good. In crude terms, agents will expect that each of the two interior bundles will be assigned at least one of the boundary items, and the rounding method ensures that this will indeed happen.

Thus, for an interior bundle j=2,3j=2,3, if both the items xj−1x^{j-1} and xjx^{j} to either side of the bundle are covered by a knife, an agent expects that one of these items (the less-valuable one) will be put into bundle I∗jI_{*}^{j} of the final rounded allocation (recall the definition of ui−u_{i}^{-} in equation (2.1)). For exterior bundles, j=1j=1 (resp. j=4j=4), if the item x1x^{1} (resp. x3x^{3}) is not covered by a knife, the agent does not expect the interior item (next to the knife) to belong to the final bundle I∗jI_{*}^{j}, even though it belongs to the observed bundle IijI_{i}^{j}. Otherwise, the virtual allocations are equal to ui(Ij(x))u_{i}(I^{j}(\boldsymbol{x})), so the agent expects that I∗j=IijI_{*}^{j}=I_{i}^{j}. Later, we show that these expectations are correct up to one item.

One can check that these valuation functions are still proper.

To shorten a case distinction, we assume that y2∈I12∪I22∪I32∪I42y^{2}\in I^{2}_{1}\cup I^{2}_{2}\cup I^{2}_{3}\cup I^{2}_{4}, i.e., that the boundary item y2y^{2} appears in the second but not in the third bundle in the Sperner sequence. This assumption is without loss of generality, since by the left-right symmetry of the definition of virtual valuations, if necessary we can reverse the path PP and consider the same elementary simplex with vertices ordered in reverse (x4,x3,x2,x1\boldsymbol{x}_{4},\boldsymbol{x}_{3},\boldsymbol{x}_{2},\boldsymbol{x}_{1}); it will still be fully-labeled.

With this assumption made throughout the rest of the argument, we now round the Sperner sequence into a complete partition (I∗1,I∗2,I∗3,I∗4)(I_{*}^{1},I_{*}^{2},I_{*}^{3},I_{*}^{4}) of PP defined as follows:

Depending on the placement of the boundary item y1y^{1}, we will either have I∗1=B1I_{*}^{1}=B^{1} or I∗1=B1∪{y1}I_{*}^{1}=B^{1}\cup\{y^{1}\}; and either I∗2={y1}∪B2∪{y2}I_{*}^{2}=\{y^{1}\}\cup B^{2}\cup\{y^{2}\} or I∗2=B2∪{y2}I_{*}^{2}=B^{2}\cup\{y^{2}\}. With these choices, each interior bundle (j=2,3j=2,3) receives at least one of the boundary items adjacent to it.

The main part of showing that the partition (I∗1,I∗2,I∗3,I∗4)(I_{*}^{1},I_{*}^{2},I_{*}^{3},I_{*}^{4}) can be made into an EF1 allocation is an analogue of (5.5), which shows that agents’ expectations about their bundle are approximately correct. The following analogous proposition is proved by case analysis.

For each i∈[n]i\in[n] and each j∈[n]j\in[n], we have ui(I∗j)⩾u^i(xi,j)⩾ui−(I∗j)u_{i}(I_{*}^{j})\geqslant\hat{u}_{i}(\boldsymbol{x}_{i},j)\geqslant u_{i}^{-}(I_{*}^{j}).

We consider each bundle j=1,2,3,4j=1,2,3,4 separately.

y1=xi1−12y^{1}=x_{i}^{1}-\frac{1}{2} so that y1∈Ii1y^{1}\in I_{i}^{1}, and so I∗1=B1∪{y1}={1,…,xi1−12}I_{*}^{1}=B^{1}\cup\{y^{1}\}=\{1,\dots,x_{i}^{1}-\frac{1}{2}\}, or

y1=xi1+12y^{1}=x_{i}^{1}+\frac{1}{2} so that y1∉I∗1y^{1}\not\in I_{*}^{1}, and so I∗1=B1={1,…,xi1−12}I_{*}^{1}=B^{1}=\{1,\dots,x_{i}^{1}-\frac{1}{2}\}.

In either case, I∗1={1,…,xi1−32,xi1−12}I_{*}^{1}=\{1,\dots,x_{i}^{1}-\frac{3}{2},x_{i}^{1}-\frac{1}{2}\}, so ui(I∗1)⩾u^i(xi,1)⩾ui−(I∗1)u_{i}(I_{*}^{1})\geqslant\hat{u}_{i}(\boldsymbol{x}_{i},1)\geqslant u_{i}^{-}(I_{*}^{1}).

Suppose j=2j=2, and suppose that I∗2=B2∪{y2}I_{*}^{2}=B^{2}\cup\{y^{2}\}

Otherwise u^i(xi,2)=ui(Ii2(x))\hat{u}_{i}(\boldsymbol{x}_{i},2)=u_{i}(I_{i}^{2}(\boldsymbol{x})). Since y1∉I12(x)y^{1}\not\in I_{1}^{2}(\boldsymbol{x}) (because y1∈I∗1y^{1}\in I^{1}_{*}), we have that Ii2(x)I_{i}^{2}(\boldsymbol{x}) is either B2B^{2} or B2∪{y2}B^{2}\cup\{y^{2}\}. So ui(I∗2)⩾u^i(xi,2)=ui(Ii2(x))⩾ui−(I∗2)u_{i}(I_{*}^{2})\geqslant\hat{u}_{i}(\boldsymbol{x}_{i},2)=u_{i}(I_{i}^{2}(\boldsymbol{x}))\geqslant u_{i}^{-}(I_{*}^{2}) since I∗2=B2∪{y2}I_{*}^{2}=B^{2}\cup\{y^{2}\}.

Suppose j=2j=2, and suppose that I∗2={y1}∪B2∪{y2}I_{*}^{2}=\{y^{1}\}\cup B^{2}\cup\{y^{2}\}.

Otherwise u^i(xi,2)=ui(Ii2(x))\hat{u}_{i}(\boldsymbol{x}_{i},2)=u_{i}(I_{i}^{2}(\boldsymbol{x})). First note that Ii2(x)≠B2I_{i}^{2}(\boldsymbol{x})\neq B^{2}: this is because both y1y^{1} and y2y^{2} appear in the second bundle of the Sperner sequence (by the case and the wlog assumption), so that xi1⩽y1x_{i}^{1}\leqslant y^{1} and y2⩽xi2y^{2}\leqslant x_{i}^{2}. Since at least one of xi1x_{i}^{1} or xi2x_{i}^{2} is not integral, at least one of y1y^{1} or y2y^{2} must be in Ii2(x)I_{i}^{2}(\boldsymbol{x}). Hence Ii2(x)I_{i}^{2}(\boldsymbol{x}) is either {y1}∪B2∪{y2}\{y^{1}\}\cup B^{2}\cup\{y^{2}\} or {y1}∪B2\{y^{1}\}\cup B^{2} or B2∪{y2}B^{2}\cup\{y^{2}\}. In each case, ui(I∗2)⩾u^i(xi,2)=ui(Ii2(x))⩾ui−(I∗2)u_{i}(I_{*}^{2})\geqslant\hat{u}_{i}(\boldsymbol{x}_{i},2)=u_{i}(I_{i}^{2}(\boldsymbol{x}))\geqslant u_{i}^{-}(I_{*}^{2}) since I∗2={y1}∪B2∪{y2}I_{*}^{2}=\{y^{1}\}\cup B^{2}\cup\{y^{2}\}.

Otherwise, since y2y^{2} does not appear in I13(x)I_{1}^{3}(\boldsymbol{x}) (by our wlog assumption), we have that Ii3(x)I_{i}^{3}(\boldsymbol{x}) is either B3B^{3} or B3∪{y3}B^{3}\cup\{y^{3}\}. Now ui(I∗3)⩾u^i(xi,3)=ui(Ii3(x))⩾ui−(I∗3)u_{i}(I_{*}^{3})\geqslant\hat{u}_{i}(\boldsymbol{x}_{i},3)=u_{i}(I_{i}^{3}(\boldsymbol{x}))\geqslant u_{i}^{-}(I_{*}^{3}) since I∗3=B3∪{y3}I_{*}^{3}=B^{3}\cup\{y^{3}\}.

y3=xi3+12y^{3}=x_{i}^{3}+\frac{1}{2} so I∗4=B4={xi3+32,…,m}I_{*}^{4}=B^{4}=\{x_{i}^{3}+\frac{3}{2},\dots,m\}, or

y3=xi3−12y^{3}=x_{i}^{3}-\frac{1}{2} so I∗4=B4={xi3+12,…,m}I_{*}^{4}=B^{4}=\{x_{i}^{3}+\frac{1}{2},\dots,m\}.

In either case, ui(I∗4)⩾u^i(xi,4)=ui({xi3+32,…,m})⩾ui−(I∗4)u_{i}(I_{*}^{4})\geqslant\hat{u}_{i}(\boldsymbol{x}_{i},4)=u_{i}(\{x_{i}^{3}+\frac{3}{2},\dots,m\})\geqslant u_{i}^{-}(I_{*}^{4}).∎

Now again, based on the partition, we can define an allocation A∗A_{*} by A∗(i)=I∗ϕ(i)A_{*}(i)=I_{*}^{\phi(i)} for each agent i∈[n]i\in[n]. Thus, each agent ii receives the bundle in the complete partition corresponding to ii’s most-preferred index ϕ(i)\phi(i). We prove that A∗A_{*} satisfies EF1: For any pair i,j∈[n]i,j\in[n] of agents, we have

Hence, we have proved the main result of this section:

On a path, for four agents with monotone valuation functions, a connected EF1 allocation exists.

For five or more agents, we were not able to construct labeling functions and a rounding scheme which ensure that agents’ expectations are correct up to one item. In the four-agent case, each interior bundle is adjacent to an exterior bundle (which helps in the construction), but for five agents, there is a middle bundle whose neighboring bundles are also interior.

EF1 existence for identical valuations

A special case of the fair division problem is the case of identical valuations, where all agents have the same valuation for the goods: for all agents i,j∈Ni,j\in N and every bundle I∈C(V)I\in\mathcal{C}(V), we have ui(I)=uj(I)u_{i}(I)=u_{j}(I). We then write u(I)u(I) for the common valuation of bundle II. The case of identical valuations often allows for more positive results and an easier analysis. Indeed, we can prove that, for identical valuations and any number of agents, an EF1 allocation connected on a path is guaranteed to exist and can be found in polynomial time.

Now, one might guess that in the restricted case of identical valuations, egalitarian allocations are EF1. However, the leximin-optimal connected allocation may fail EF1: Consider a path with five items and additive valuations 1–3–1–1–1 shared by three agents. The unique leximin allocation is (1, 3, 1–1–1), which induces envy even up to one good. The same allocation also uniquely maximizes Nash welfare, so the Nash optimum also does not guarantee EF1. In contrast, when requiring bundles to satisfy matroid constraints (rather than connectivity constraints), the Nash optimum is EF1 with identical valuations (Biswas and Barman, 2018).

Maximizing an egalitarian objective seemed promising because it ensures that no-one is too badly off, and therefore has not much reason to envy others. The problem is that some bundles might be too desirable. To fix this, we could try to reallocate items so that no bundle is too valuable. This is exactly the strategy of our algorithm: It starts with a leximin allocation, and then moves items from high-value bundles to lower-value bundles, until the result is EF1. In more detail, the algorithm identifies one agent ii who is worst-off in the leximin allocation, and then adjusts the allocation so that ii does not envy any other bundle up to one good. The algorithm does this by going through all bundles in the allocation, outside-in, and if ii envies a bundle IjI^{j} even up to one good, it moves one item from IjI^{j} inwards (in ii’s direction), see Figure 7. As we will show, a key invariant preserved by the algorithm is that the value of IiI^{i} never increases, and ii remains worst-off. Thus, since ii does not envy others up to one good, the allocation at the end is EF1.

Formally, a leximin allocation is an allocation which maximizes the lowest utility of an agent; subject to that it maximizes the second-lowest utility, and so on. In particular, if the highest achievable minimum utility is uLu_{L}, then the leximin allocation is such that every agent has utility at least uLu_{L}, and the number of agents with utility exactly uLu_{L} is minimum.

For identical valuations on a path, Algorithm 1 finds an EF1 allocation.

For an allocation A=(I1,…,In)A=(I^{1},\dots,I^{n}), write uL(A):=min⁡j∈Nu(Ij)u_{L}(A):=\min_{j\in N}u(I^{j}) for the minimum utility obtained in AA, and write L(A):={j∈[n]:u(Ij)=uL(A)}L(A):=\{j\in[n]:u(I^{j})=u_{L}(A)\} for the set of agents (losers) who obtain this utility. For the leximin allocation AleximinA_{\text{leximin}} obtained at the start of the algorithm, write uL∗:=uL(Aleximin)u_{L}^{*}:=u_{L}(A_{\text{leximin}}) and L∗:=L(Aleximin)L^{*}:=L(A_{\text{leximin}}). Note that by leximin-optimality, for every allocation AA we must have uL(A)⩽uL∗u_{L}(A)\leqslant u_{L}^{*}, and if uL(A)=uL∗u_{L}(A)=u_{L}^{*} then ∣L(A)∣⩾∣L∗∣|L(A)|\geqslant|L^{*}|. Let i∈L∗i\in L^{*} be the agent fixed at the start of the algorithm.

Claim 1. Throughout the algorithm, uL(A)=uL∗u_{L}(A)=u_{L}^{*} and L(A)=L∗L(A)=L^{*}.

The claim is true before we start the for-loops. Suppose the claim holds up until some iteration of the first for-loop, and we now move an item from IjI^{j} to Ij+1I^{j+1}, obtaining the new bundles InewjI_{\text{new}}^{j} and Inewj+1I_{\text{new}}^{j+1} in the new allocation AnewA_{\text{new}}. Then u(Inewj)⩾u−(Ij)>u(Ii)=uL∗u(I_{\text{new}}^{j})\geqslant u^{-}(I^{j})>u(I^{i})=u_{L}^{*}, where the strict inequality holds by the if- and until-clauses. Since no agent other than jj has become worse-off in AnewA_{\text{new}}, it follows that uL(Anew)⩾uL(A)=uL∗u_{L}(A_{\text{new}})\geqslant u_{L}(A)=u_{L}^{*}. As noted, by optimality of uL∗u_{L}^{*}, we have uL(Anew)⩽uL∗u_{L}(A_{\text{new}})\leqslant u_{L}^{*}. Hence uL(Anew)=uL∗u_{L}(A_{\text{new}})=u_{L}^{*}. Thus, by optimality of L∗L^{*}, we have ∣L(Anew)∣⩾∣L∗∣|L(A_{\text{new}})|\geqslant|L^{*}|. Because agent jj has not become a loser (since u(Inewj)>uL∗\smash{u(I_{\text{new}}^{j})}>u_{L}^{*} as shown before) and no other agent has become a loser, we have L(Anew)⊆L(A)=L∗L(A_{\text{new}})\subseteq L(A)=L^{*}. Thus L(Anew)=L∗L(A_{\text{new}})=L^{*}, as required. The second for-loop is handled similarly.

Claim 2. After both for-loops terminate, agent ii does not envy any agent up to one good.

For any j≠ij\neq i, agent ii does not envy jj up to one good immediately after the relevant loop has handled jj, and at no later stage of the algorithm does IjI^{j} change.

It follows that the allocation AA returned by the algorithm is EF1: By Claim 1, we have i∈L(A)i\in L(A), so that u(Ij)⩾u(Ii)u(I^{j})\geqslant u(I^{i}) for all j∈[n]j\in[n]. By Claim 22, agent ii does not envy any other agent up to one good, so that u(Ii)⩾u−(Ik)u(I^{i})\geqslant u^{-}(I^{k}) for all k∈[n]k\in[n]. Hence, for all j,k∈[n]j,k\in[n], we have u(Ij)⩾u−(Ik)u(I^{j})\geqslant u^{-}(I^{k}), that is, no agent envies another agent up to one good. ∎

Algorithm 1 can be implemented to run in polynomial time, because with identical valuations, one can use dynamic programming to find a leximin allocation in time O(m2n2)O(m^{2}n^{2}), and the remainder of Algorithm 1 takes time O(mn)O(mn), as each item is moved at most nn times. A slight speed-up can be achieved by observing that the proof of Theorem 7.1 only needed that the initial allocation optimizes the egalitarian welfare uLu_{L} and minimizes the cardinality of the set LL of losers. Such an allocation can be found by dynamic programming in time O(m2n)O(m^{2}n), and, after some refinements on the implementation of the dynamic programming approach, the running time can be lowered to O(mn)O(mn) (see Algorithm 2 in the appendix).

The reallocation stage of our algorithm bears some similarity to Suksompong’s (2019, Thm. 2) proof that a umaxu_{\text{max}}-equitable allocation exists. Oh et al. (2019, Lem. C.2) proved independently, using an inductive argument, that EF1 allocations on a path exist for identical valuations, and can be found in polynomial time. More recently, Misra et al. (2021) presented another algorithm for this task in the context of aiming for connected allocations satisfying equitability up to one good (EQ1).

Concluding remarks

We have studied the existence of EF1 allocations under connectivity constraints imposed by an undirected graph. We have shown that for two, three, or four agents, an EF1 allocation exists if the graph is traceable and if the agents have monotone valuations. For any number of agents, we also proved that traceable graphs guarantee the existence of an EF2 allocation. The latter two results are proved using Sperner’s lemma, which has been used many times in economics and game theory to show the existence of equilibria and fair allocations (Scarf, 1982; Su, 1999). Unusually, in our application we were able to use Sperner’s lemma in a setting with indivisibilities. We leave as an open question whether EF1 allocations on a path exist for five and more agents.

Our procedures for identical valuations as well as for the cases of two or three agents can be efficiently implemented, so that we can find EF1 allocations in polynomial time. For our results based on Sperner’s lemma, it is not clear how to compute EF1 and EF2 allocations efficiently. On the other hand, as is the case with the computation of other structures whose existence follows from Sperner’s lemma (such as Nash equilibrium or more broadly PPAD problems), our proof based on Sperner’s lemma allows for a “path-following” algorithm through the subdivided simplex. This type of algorithm has been observed to be practically efficient in other contexts (Scarf, 1967), and may also be efficient in our allocation setting on practical instances. Formally, we do not know of a computational complexity result for the problem of finding EF1 or EF2 allocations on a path. For divisible cake-cutting, it is PPAD-complete to find an ε\varepsilon-approximate envy-free allocation (Deng et al., 2012), implying that it is unlikely that there is an algorithm that runs in time polynomial in nn and log⁡1ε\log\frac{1}{\varepsilon}. However, the PPAD-hardness proof of Deng et al. (2012) uses non-monotone valuations, and thus does not easily extend to our setting, where we assume monotone valuations. For general graphs, Deligkas et al. (2021, Thm. 2) recently showed that deciding whether an EF1 allocation exists on a given instance is NP-hard. Their result applies when the underlying graph is a star, and holds even if the nn agents have binary additive valuations.

Regarding strategic aspects, existing results from the literature imply that there are no EF1 allocation rules which are strategyproof.In this paragraph, we follow the exposition of Peters (2019, Chapter 12). Amanatidis et al. (2017a) characterized all strategyproof allocation mechanisms when there are n=2n=2 agents with additive valuations over indivisible items (with no connectivity constraints). They then proved that no mechanism in their class guarantees EF1 (Amanatidis et al., 2017a, Sec. 4.2) for m⩾5m\geqslant 5 items. It follows that there is also no strategyproof EF1 mechanism that respects connectivity constraints. We can also obtain such a result by reduction from divisible cake-cutting. Fix some ε>0\varepsilon>0, and suppose we had a mechanism for allocating a path of MM items among nn agents while being strategyproof and EF1. Then we can use this mechanism as a mechanism for cake-cutting: Given continuous agent valuations over the interval $,approximatethesebyadditivevaluationsoverthepathof, approximate these by additive valuations over the path ofMitemsandrunthemechanismonthisinstance.Forsufficientlylargeitems and run the mechanism on this instance. For sufficiently largeM,theresultingmechanismforcake−cuttingwillbe, the resulting mechanism for cake-cutting will be\varepsilon−strategyproof(inthesensethatamisreportcanincreaseutilitybyatmost-strategyproof (in the sense that a misreport can increase utility by at most\varepsilon)and) and\varepsilon−envy−free(inthesensethatenvyisboundedby-envy-free (in the sense that envy is bounded by\varepsilon).However,theliteratureoncake−cuttingcontainsimpossibilitiesaboutstrategyproofnessandenvy−freenesswhenrequiringconnectedpieces(Beietal.,2017,Theorem1,Beietal.,2018,Theorem3),andtheproofsalsoestablishimpossibilityforthe). However, the literature on cake-cutting contains impossibilities about strategyproofness and envy-freeness when requiring connected pieces (Bei et al., 2017, Theorem 1, Bei et al., 2018, Theorem 3), and the proofs also establish impossibility for the\varepsilon−versionsofthesepropertiesforsmallenough-versions of these properties for small enough\varepsilon.Hence,forlargeenough. Hence, for large enoughM,nostrategyproofEF1mechanismfortheindivisiblesettingcanexist.ByusingtheresultofBeietal.(2018),wecanobtainanimpossibilityfor, no strategyproof EF1 mechanism for the indivisible setting can exist. By using the result of Bei et al. (2018), we can obtain an impossibility forn=2andevenforbinaryadditivevaluationswhereeachagentapprovesanintervalofitemsbeginningwiththeleft−mostitem.Finally,Peters(2019,Chapter12)givesasimpledirectproofthattherearenostrategyproofEF1mechanisms,evenforand even for binary additive valuations where each agent approves an interval of items beginning with the left-most item. Finally, Peters (2019, Chapter 12) gives a simple direct proof that there are no strategyproof EF1 mechanisms, even forn=2agentsandagents andm=5$ items on a line.

We gave a forbidden minor type characterization of all graphs that guarantee the existence of EF1 allocations for two agents. It is natural to also consider the case of more than two agents. However, there are several difficulties in extending the characterization result beyond two agents. First, one cannot generalize the notion of a bipolar ordering in a meaningful way; indeed, a tripolar ordering, requiring each initial, middle, and last segment to be connected in a given graph, reduces to the notion of a Hamiltonian path because every consecutive pair of such an ordering must be connected. Second, our two-agent characterization heavily depends on having a simple envy-free protocol: the cut-and-choose procedure. Unfortunately, for three agents, the known protocol becomes much more complex (see Section 4), and for four agents, there is no known explicit protocol that constructs an envy-free division. Nevertheless, Igarashi and Zwicker (2021) recently proposed a forbidden minor type conjecture for the continuous variant of our problem. It would be interesting to explore the discrete version of their conjecture.

In the setting without connectivity constraints, it is possible to achieve efficiency and fairness simultaneously: the maximum Nash welfare solution yields an allocation that is both EF1 and Pareto-optimal (Caragiannis et al., 2019). In our model, this is unfortunately impossible, since on a path there are instances where there is no connected allocation which is EF1 and Pareto-optimal, and it is NP-hard to decide whether such an allocation exists (Igarashi and Peters, 2019).

In this paper, we have only considered goods, with monotonic valuations. The setting where some or all items are undesirable (so-called chores) is also of interest (Aziz et al., 2019; Bogomolnaia et al., 2016; Meunier and Zerbib, 2019; Segal-Halevi, 2018; Bouveret et al., 2019; Höhne and van Stee, 2021). On a path, a connected allocation satisfying proportionality up to one good (PROP1) always exists (Aziz et al., 2019), but the existence of EF1 or EF2 allocations in this domain is open. For cake-cutting, when agents consider some parts of the cake undesirable, Sperner’s lemma does not directly produce a connected envy-free allocation (Segal-Halevi, 2018), but other methods can prove the existence of such allocations in most cases (Segal-Halevi, 2018; Meunier and Zerbib, 2019).

References

Appendix A Appendix

The maximin share guarantee of an agent i∈Ni\in N is

where Πn\Pi_{n} denotes the space of all partitions of VV into nn connected bundles. An allocation AA is a maximin share (MMS) allocation if ui(A(i))⩾MMSiu_{i}(A(i))\geqslant\text{MMS}_{i} for each agent i∈Ni\in N. (Note that the maximum is taken only over connected partitions, so the MMS value could be lower than the standard definition from the model without connectivity constraints.) Bouveret et al. (2017) showed that an MMS allocation exists if the underlying graph GG is a tree. On the other hand, MMS allocations need not exist on a cycle (Bouveret et al., 2017; Lonc and Truszczynski, 2020) or on a complete graph (Kurokawa et al., 2018). The computational complexity of determining the existence of MMS allocations under several graph constraints has also been investigated (Greco and Scarcello, 2020).

Since we have seen that EF1 or EF2 allocations are guaranteed to exist on a path, it is natural to ask whether we can additionally require MMS: on a path, does there always exist an allocation that satisfies EF1 and MMS?

First, let us note that not every EF1 allocation is also MMS. For 3–1–1–1–3 and three agents, the MMS value is 3 via the partition (3, 1–1–1, 3), but the EF1 allocation (3–1, 1, 1–3) gives the middle agent a utility of only 1. In fact, one can show that this example is worst possible, for subadditive valuations. Valuations uiu_{i} are subadditive if, for any bundles I,I′I,I^{\prime}, we have ui(I∪I′)⩽ui(I)+ui(I′)u_{i}(I\cup I^{\prime})\leqslant u_{i}(I)+u_{i}(I^{\prime}). An allocation satisfies α\alpha-MMS for some α>0\alpha>0 if ui(A(i))⩾α⋅MMSiu_{i}(A(i))\geqslant\alpha\cdot\text{MMS}_{i} for each agent i∈Ni\in N. As MMS allocations need not exist in general, α\alpha-MMS allocations have been widely investigated (Amanatidis et al., 2017b, 2018; Kurokawa et al., 2018).

For subadditive valuations, an EF1-allocation on a path guarantees 1/3-MMS.

Let AA be an EF1 allocation, write Ij=A(j)I^{j}=A(j) for all j∈[n]j\in[n], and fix some agent ii. For each j∈[n]∖{i}j\in[n]\setminus\{i\}, let gj∈Ijg_{j}\in I^{j} be an item such that ui(Ii)⩾ui(Ij∖{gj})u_{i}(I^{i})\geqslant u_{i}(I^{j}\setminus\{g_{j}\}). We show that ui(Ii)⩾13MMSiu_{i}(I^{i})\geqslant\frac{1}{3}\text{MMS}_{i}.

Let P=(P1,…,Pn)P=(P^{1},\dots,P^{n}) be a partition of the items into nn bundles such that ui(Pj)⩾MMSiu_{i}(P^{j})\geqslant\text{MMS}_{i} for each j∈[n]j\in[n]. Since there are nn bundles in PP but only n−1n-1 items gjg_{j}, there must be some bundle PkP^{k} such that gj∉Pkg_{j}\not\in P^{k} for all j∈[n]∖{i}j\in[n]\setminus\{i\}; we show that ui(Pk)⩽3⋅ui(Ii)u_{i}(P^{k})\leqslant 3\cdot u_{i}(I^{i}).

Suppose for a contradiction that there are three distinct agents j1,j2,j3∈[n]∖{i}j_{1},j_{2},j_{3}\in[n]\setminus\{i\} such that Pk∩Ijr≠∅P^{k}\cap I^{j_{r}}\neq\emptyset for r=1,2,3r=1,2,3. Since PkP^{k} and the IjrI^{j_{r}}’s are all intervals of a path, the middle interval must be completely contained in PkP^{k}, that is, Ijr⊆PkI^{j_{r}}\subseteq P^{k} for some rr. Hence gjr∈Pkg_{j_{r}}\in P^{k}, contradicting the choice of PkP^{k}. So PkP^{k} intersects at most two bundles from AA other than IiI^{i}. Thus, for some j1,j2∈[n]∖{i}j_{1},j_{2}\in[n]\setminus\{i\}, we have Pk⊆Ij1∪Ii∪Ij2∖{gj1,gj2}P^{k}\subseteq I^{j_{1}}\cup I^{i}\cup I^{j_{2}}\setminus\{g_{j_{1}},g_{j_{2}}\}, and thus by subadditivity,

Hence, we have ui(Ii)⩾13ui(Pk)⩾13MMSiu_{i}(I^{i})\geqslant\frac{1}{3}u_{i}(P^{k})\geqslant\frac{1}{3}\text{MMS}_{i}, as required. ∎

Interestingly, using a similar proof, one can show that the two agents receiving the outer bundles of the path both get at least half of their MMS value. This is also tight; consider 1–1–2–2–1–1 for four agents, and the EF1 allocation (1,1–2,2–1,1).

If we do not restrict valuations to be subadditive, then EF1 does not guarantee α\alpha-MMS for any α>0\alpha>0: Consider a path P=(v1,v2,v3)P=(v_{1},v_{2},v_{3}) of three items, and two agents with identical valuations uu defined so that u(I)=1u(I)=1 if I⊇{v1,v2}I\supseteq\{v_{1},v_{2}\} or I⊇{v3}I\supseteq\{v_{3}\}, and u(I)=0u(I)=0 otherwise. Then the MMS value is 1 via the partition (v1v_{1}–v2v_{2}, v3v_{3}), but the allocation (v1v_{1}, v2v_{2}–v3v_{3}) is EF1 and gives the left agent utility 0.

For graphs that are not paths, Proposition A.1 does not hold. For a complete graph (i.e., in the absence of connectivity constraints), EF1 only implies 1/n1/n-MMS (Caragiannis et al., 2019; Amanatidis et al., 2018).

While we have seen that EF1 on a path does not immediately imply MMS, it does imply MMS in many cases. The following lemma will be useful to show that the allocations produced by our arguments in the main text all satisfy the MMS guarantee.

Suppose there are n⩾2n\geqslant 2 agents, and the items are arranged on a path. Take any n−1n-1 items y1<⋯<yn−1y^{1}<\dots<y^{n-1}, and define the bundles B1,…,BnB^{1},\dots,B^{n} as follows:

Then for any agent ii, there is some r∈[n]r\in[n] such that ui(Br)⩾MMSiu_{i}(B^{r})\geqslant\text{MMS}_{i}.

Let P=(P1,…,Pn)P=(P^{1},\dots,P^{n}) be a connected partition of the items (ordered left-to-right) so that ui(Pj)⩾MMSiu_{i}(P^{j})\geqslant\text{MMS}_{i} for all j∈[n]j\in[n]. Since there are nn bundles in PP but only n−1n-1 items y1,…,yn−1y^{1},\dots,y^{n-1}, there exists a bundle PkP^{k} in PP that does not contain any yjy^{j}. Writing Y={y1,…,yn−1}Y=\{y^{1},\dots,y^{n-1}\}, we see that there is some r∈[n]r\in[n] such that

Thus, we have Pk⊆P(yr−1+1,yr−1)=BrP^{k}\subseteq P(y^{r-1}+1,y^{r}-1)=B^{r} so that ui(Br)⩾ui(Pk)⩾MMSiu_{i}(B^{r})\geqslant u_{i}(P^{k})\geqslant\text{MMS}_{i}. ∎

For a path, the EF1 allocations constructed by any of our methods guarantee MMS.

Discrete cut-and-choose protocol for two agents. Suppose Alice’s lumpy tie is vjv_{j}. Then, using the definition of lumpy tie, a connected partition witnessing Alice’s MMS value is either P1=(L(vj),R(vj)∪{vj})P_{1}=(L(v_{j}),R(v_{j})\cup\{v_{j}\}) or P2=(L(vj)∪{vj},R(vj))P_{2}=(L(v_{j})\cup\{v_{j}\},R(v_{j})). At the end of the procedure, Alice receives either L(vj)∪{vj}L(v_{j})\cup\{v_{j}\} or R(vj)∪{vj}R(v_{j})\cup\{v_{j}\}. For either of these options, there is a bundle in P1P_{1} and a bundle in P2P_{2} which are weakly worse. So Alice receives a bundle that satisfies her MMS value. For Bob, he receives his preferred bundle among L(vj)L(v_{j}) or R(vj)R(v_{j}). These two bundles are of the shape described in Lemma A.2 with y1=vjy^{1}=v_{j}, so Bob’s choice satisfies his MMS value.

Identical valuations. Algorithm 1 gives each agent a utility of at least uL∗u_{L}^{*}. By their definitions, the MMS-value is the same as the optimal egalitarian welfare under identical valuations.

EF2 via Sperner’s lemma. For each agent ii, by Lemma A.2, there exists a basic bundle whose value is at least MMSi\text{MMS}_{i}. We showed that the allocation A∗A_{*} is such that agent ii weakly prefers the bundle ii receives in A∗A_{*} to any basic bundle. Hence, A∗A_{*} is an MMS allocation.

EF1 for four agents via Sperner’s lemma. For each vertex xi\boldsymbol{x}_{i} of the full-labeled simplex S∗S^{*}, invoke Lemma A.2 with y1=⌊xi1⌋y^{1}=\lfloor x_{i}^{1}\rfloor, y2=⌊xi2⌋y^{2}=\lfloor x_{i}^{2}\rfloor, y3=⌈xi3⌉y^{3}=\lceil x_{i}^{3}\rceil. By case-analysis one can check that u^i(xi,j)⩾ui(Bj)\hat{u}_{i}(\boldsymbol{x}_{i},j)\geqslant u_{i}(B^{j}) for each j=1,2,3,4j=1,2,3,4, where the BjB^{j}’s are defined like in Lemma A.2. By Proposition 6.1, we have that ui(A∗(i))⩾u^i(xi,ϕ(i))=max⁡j∈[n]u^i(xi,j)=max⁡j∈[n]ui(Bj)⩾MMSiu_{i}(A_{*}(i))\geqslant\hat{u}_{i}(\boldsymbol{x}_{i},\phi(i))=\max_{j\in[n]}\hat{u}_{i}(\boldsymbol{x}_{i},j)=\max_{j\in[n]}u_{i}(B^{j})\geqslant\text{MMS}_{i}. ∎

A.2 Example of an instance with no EFX allocation

An allocation AA satisfies EFX (Envy-freeness up to any outer good) if the envy is bounded up to the least valuable outer good, i.e., for any pair i,j∈Ni,j\in N of agents, and for every good u∈A(j)u\in A(j) such that A(j)∖{u}A(j)\setminus\{u\} is connected, we have ui(A(i))⩾ui(A(j)∖{u})u_{i}(A(i))\geqslant u_{i}(A(j)\setminus\{u\}).

Consider the instance 2–3–1–3 for three agents. This instance admits no connected EFX allocation: It is clear that no allocation in which some bundle is empty satisfies EFX. In (2, 3, 1–3), the left agent envies the right agent even after removing the outer good of value 1; in (2, 3–1,3), the left agent envies the middle agent even after removing the outer good of value 1; and in (2–3, 1,3), the middle agent envies the left agent even after removing the outer good of value 3. One can also consider the instance 1–1–3–3 for two agents. ∎

A.3 Example of a non-traceable graph that guarantees EF1

Consider a star with three leaves. We will divide the graph among three agents. Consider the allocation where each agent chooses the most favorite leaf-vertex among the unallocated vertices in order, with the last agent in that order being assigned to the central vertex of the star. The resulting allocation satisfies EF1, since the envy towards agents allocated to a single item can be bounded up to one good, and the first and second agent do not envy the third agent if one removes the central vertex from his bundle. ∎

A.4 Efficient computation of SMMS allocations for identical valuations

In this section, we discuss how to compute the initial allocation that is needed for Algorithm 1 to obtain an EF1 allocation under identical valuations (Theorem 7.1).

Given a path P=(v1,v2,…,vm)P=(v_{1},v_{2},\ldots,v_{m}), nn agents with identical monotonic valuations uu, and an allocation A=(I1,…,In)A=(I^{1},\dots,I^{n}), write uL(A):=min⁡j∈Nu(Ij)u_{L}(A):=\min_{j\in N}u(I^{j}) to denote the egalitarian welfare of AA, i.e., the minimum valuation in AA among all agents, and L(A):={j∈[n]:u(Ij)=uL(A)}L(A):=\{j\in[n]:u(I^{j})=u_{L}(A)\} for the set of agents who obtain this minimum utility. We refer to the agents in L(A)L(A) as the losers.

An allocation of a path for agents with identical monotonic valuations satisfies strong maximin share (SMMS) if it minimizes the number of losers among all allocations maximizing the egalitarian welfare.

In the following, we provide an efficient dynamic programming algorithm for computing an SMMS allocation. We first present a simple algorithm that runs in time O(m2n)O(m^{2}n), and then we refine it to improve the running time to O(mn)O(mn).

In order to use a dynamic programming approach, we start by deriving a recurrence relation characterizing the SMMS allocations.

Given two partial allocations A,A′A,A^{\prime}, we write A⪰A′A\succeq A^{\prime} if either uL(A)>uL(A′)u_{L}(A)>u_{L}(A^{\prime}) holds, or both uL(A)=uL(A′)u_{L}(A)=u_{L}(A^{\prime}) and ∣L(A)∣⩽∣L(A′)∣|L(A)|\leqslant|L(A^{\prime})| hold; furthermore, we write A∼A′A\sim A^{\prime} if both A⪰A′A\succeq A^{\prime} and A⪯A′A\preceq A^{\prime} hold. We observe that an allocation AA of path PP for nn agents is SMMS iff it is “optimal” according to the ordering relation ⪰\succeq, i.e., iff A⪰A′A\succeq A^{\prime} for any allocation A′A^{\prime} (of path PP for nn agents).

For any h∈[m+1]h\in[m+1] and j∈[m]j\in[m], let u[h,j]:=u(P(vh,vj))u[h,j]:=u(P(v_{h},v_{j})) be the utility assigned by uu to the path segment from vhv_{h} to vjv_{j}. If h>jh>j then we use the convention that P(vh,vj)=∅P(v_{h},v_{j})=\emptyset and u[h,j]=0u[h,j]=0. Given i∈[n]i\in[n] and j∈[m]∪{0}j\in[m]\cup\{0\}, let A[i,j]A[i,j] be an SMMS allocation of the subpath P(v1,vj)P(v_{1},v_{j}) for ii agents. Also, let Egal[i,j]\textit{Egal}[i,j] and L[i,j]L[i,j] denote the egalitarian welfare and the number of losers of the SMMS allocation A[i,j]A[i,j]. Note that our ultimate aim is to find A[n,m]A[n,m].

For any i∈[n]∖{1}i\in[n]\setminus\{1\}, j∈[m]∪{0}j\in[m]\cup\{0\} and h∈[j+1]h\in[j+1], let A[i,h,j]A[i,h,j] be an allocation of the subpath P(v1,vj)P(v_{1},v_{j}) for ii agents that is optimal according to ⪰\succeq after constraining the ii-th bundle to be equal to the subpath P(vh,vj)P(v_{h},v_{j}); furthermore, let Egal[i,h,j]\textit{Egal}[i,h,j] and L[i,h,j]L[i,h,j] denote the egalitarian welfare and the number of losers of allocation A[i,h,j]A[i,h,j]. Observe that we allow hh to reach the value j+1j+1 in order to model the case in which the ii-th agent gets an empty bundle. By definition, it holds that

where Egal[1,h−1]=u[1,h−1]\textit{Egal}[1,h-1]=u[1,h-1] and L[1,h−1]=1L[1,h-1]=1.

One can easily observe that, for any fixed i∈[n]i\in[n] and j∈[m]∪{0}j\in[m]\cup\{0\}, an optimal allocation A[i,j]A[i,j] of subpath P(v1,vj)P(v_{1},v_{j}) for ii agents can be computed according to the following recurrence relation:

where the quality of each allocation A[i,h,j]A[i,h,j] depends on Egal[i,h,j]\textit{Egal}[i,h,j] and L[i,h,j]L[i,h,j] only.

The recurrence relation (A.3) can be used to design a dynamic programming algorithm that computes the SMMS allocation A[n,m]A[n,m] in time O(m2n)O(m^{2}n). To do this, we will iteratively compute an integer k[i,j]k[i,j] such that A[i,j]∼A[i,k[i,j],j]A[i,j]\sim A[i,k[i,j],j] for all i∈[n]i\in[n] and for all j∈[m]j\in[m].

To do this, in each round (i,j)(i,j), we identify the allocations A[i,h,j]A[i,h,j] for each h∈[j+1]h\in[j+1], and compute the corresponding values Egal[i,h,j]\textit{Egal}[i,h,j] and L[i,h,j]L[i,h,j] using (A.1) and (A.2). Using the computed values Egal[i,h,j]\textit{Egal}[i,h,j] and L[i,h,j]L[i,h,j] we can then use (A.3) to find the index k[i,j]k[i,j] such that A[i,k[i,j],j]=A[i,j]A[i,k[i,j],j]=A[i,j] is optimal, and we store the resulting values Egal[i,j]\textit{Egal}[i,j] and L[i,j]L[i,j] (which will be used in the subsequent rounds). Then we proceed to the next round. Finally, at the end of the last round (n,m)(n,m), we can recursively reconstruct the optimal allocation A[n,m]A[n,m] by using the indices of type k[i,j]k[i,j] previously stored.

By (A.3), the resulting algorithm returns an SMMS allocation, and its time complexity is O(m2n)O(m^{2}n), given by the number of rounds (which is the number of pairs (i,j)(i,j) which is O(nm)O(nm)) multiplied by the complexity of each round (checking each value of hh which is in O(m)O(m)).

An improved algorithm.

By exploiting the monotonicity properties of the valuation functions, we can improve the above algorithm and lower its running time. In particular, we will see how to execute each round (i,j)(i,j) in constant amortized time, thus lowering the overall time complexity to O(mn)O(mn).

The problem with the existing algorithm is we need to check all possible values of k[i,j]k[i,j]. Instead we will introduce three quantities k1[i,j]k_{1}[i,j], k2[i,j]k_{2}[i,j], and k3[i,j]k_{3}[i,j], each of which can be computed quickly, and prove that one of the three values provides a suitable value of k[i,j]k[i,j]. Specifically, for any i∈[n]i\in[n] and j∈[m]j\in[m], letIn the definition of k1[i,j]k_{1}[i,j], if the set D:={h⩾1:Egal[i−1,h−1]<u[h,j]}D:=\{h\geqslant 1:\textit{Egal}[i-1,h-1]<u[h,j]\} is empty, taking the maximum between sup⁡D\sup D and 11 guarantees that k1[i,j]k_{1}[i,j] is equal to 11 in this extreme case.

By the monotonicity of the utility function, we have that, for any fixed value of hh, u[h,j]u[h,j] is non-decreasing in jj. This implies that for t=1,2,3t=1,2,3 and fixed i∈[n]i\in[n], the value kt[i,j]k_{t}[i,j] is non-decreasing in j∈[m]j\in[m]. Hence the integers of type kt[i,j]k_{t}[i,j] can be recursively written as

In Lemma A.9 we will show that A[i,j]A[i,j] can be set equal to the best allocation among the three allocations of type A[i,kt[i,j],j]A[i,k_{t}[i,j],j] (with t=1,2,3t=1,2,3). We first outline some preliminary properties in Lemma A.8.

Egal[i,h,j]\textit{Egal}[i,h,j] is non-decreasing in h⩽k1[i,j]h\leqslant k_{1}[i,j], it is constant in k1[i,j]<h⩽k2[i,j]k_{1}[i,j]<h\leqslant k_{2}[i,j], and it is non-increasing in h>k2[i,j]h>k_{2}[i,j].

We first show (i). Given i∈[n]i\in[n] and j∈[m]j\in[m], let A′[i,j]A^{\prime}[i,j] be the allocation obtained from A[i,j−1]A[i,j-1] by adding item jj to the last bundle of A[i,j−1]A[i,j-1]. By the optimality of A[i,j]A[i,j], we have that A[i,j]⪰A′[i,j]⪰A[i,j−1]A[i,j]\succeq A^{\prime}[i,j]\succeq A[i,j-1], and this shows (i).

Now, we show (ii). We have the following properties: (a) Egal[i−1,h−1]\textit{Egal}[i-1,h-1] is non-decreasing in hh (by (i)), and (b) u[h,j]u[h,j] is non-increasing in hh (by the monotonicity of the valuation function). Thus, we get the following additional properties, that immediately imply (ii):

Egal[i−1,h−1]<u[h,j]\textit{Egal}[i-1,h-1]<u[h,j] for any h⩽k1[i,j]h\leqslant k_{1}[i,j] (by definition of k1[i,j]k_{1}[i,j] and because of (a) and (b)), and then Egal[i,h,j]=Egal[i−1,h−1]\textit{Egal}[i,h,j]=\textit{Egal}[i-1,h-1] is non-decreasing in h⩽k1[i,j]h\leqslant k_{1}[i,j] (by (a));

u[h,j]<Egal[i−1,h−1]u[h,j]<\textit{Egal}[i-1,h-1] for any h>k2[i,j]h>k_{2}[i,j] (by definition of k2[i,j]k_{2}[i,j] and because of (a) and (b)), and then Egal[i,h,j]=u[h,j]\textit{Egal}[i,h,j]=u[h,j] is non-increasing in h>k2[i,j]h>k_{2}[i,j] (by (b));

Egal[i,h,j]=Egal[i−1,h−1]=u[h,j]\textit{Egal}[i,h,j]=\textit{Egal}[i-1,h-1]=u[h,j] in k1[i,j]<h⩽k2[i,j]k_{1}[i,j]<h\leqslant k_{2}[i,j] (by definition of both k1[i,j]k_{1}[i,j] and k2[i,j]k_{2}[i,j]), and then Egal[i,h,j]\textit{Egal}[i,h,j] is necessarily constant in k1[i,j]<h⩽k2[i,j]k_{1}[i,j]<h\leqslant k_{2}[i,j] (by (a) and (b)). ∎

Given i∈[n]i\in[n] and j∈[m]j\in[m], at least one index k[i,j]∈{k1[i,j],k2[i,j],k3[i,j]}k[i,j]\in\{k_{1}[i,j],k_{2}[i,j],k_{3}[i,j]\} guarantees that A[i,k[i,j],j]A[i,k[i,j],j] is an SMMS allocation of subpath P(v1,vj)P(v_{1},v_{j}) for ii agents (i.e., A[i,j]∼A[i,k[i,j],j]A[i,j]\sim A[i,k[i,j],j]).

Let i∈[n]i\in[n], j∈[m]j\in[m], and let k∈[j+1]k\in[j+1] be an index such that A[i,k,j]A[i,k,j] is optimal (i.e., SMMS). We consider three cases, depending on the value of kk.

Suppose k⩽k1[i,j]k\leqslant k_{1}[i,j]. By exploiting the monotonicity properties of Lemma A.8 and the definition of k1[i,j]k_{1}[i,j], we will show that A[i,k1[i,j],j]⪰A[i,k,j]A[i,k_{1}[i,j],j]\succeq A[i,k,j]. By Lemma A.8, the set H1H_{1} of integers h⩽k1[i,j]h\leqslant k_{1}[i,j] such that Egal[i,h,j]=Egal[i,j]\textit{Egal}[i,h,j]=\textit{Egal}[i,j] is an integer interval having k1[i,j]k_{1}[i,j] as its maximum, thus both kk and k1[i,j]k_{1}[i,j] belong to H1H_{1}. Furthermore, for any h∈H1h\in H_{1}, the egalitarian welfare of each allocation A[i,h,j]A[i,h,j] is equal to that of allocation A[i−1,h−1]A[i-1,h-1], and the set of losers in A[i,h,j]A[i,h,j] is the same as in A[i−1,h−1]A[i-1,h-1] (indeed, agent ii is not a loser since Egal[i−1,h−1]<u[h,j]\textit{Egal}[i-1,h-1]<u[h,j]). Thus, since A[i−1,k1[i,j]−1]⪰A[i−1,h−1]A[i-1,k_{1}[i,j]-1]\succeq A[i-1,h-1] (by Lemma A.8(i)), we necessarily have that A[i,k1[i,j],j]⪰A[i,h,j]A[i,k_{1}[i,j],j]\succeq A[i,h,j] for any h∈H1h\in H_{1}, and this shows the optimality of allocation A[i,k1[i,j],j]A[i,k_{1}[i,j],j].

Suppose k1[i,j]<k⩽k2[i,j]k_{1}[i,j]<k\leqslant k_{2}[i,j]. Then we can analogously show that A[i,k2[i,j],j]⪰A[i,k,j]A[i,k_{2}[i,j],j]\succeq A[i,k,j]. The set H2H_{2} of values hh with k1[i,j]<h⩽k2[i,j]k_{1}[i,j]<h\leqslant k_{2}[i,j] and Egal[i,h,j]=Egal[i,j]\textit{Egal}[i,h,j]=\textit{Egal}[i,j] is an integer interval having k2[i,j]k_{2}[i,j] as its maximum, thus both kk and k2[i,j]k_{2}[i,j] belong to H2H_{2}. For any h∈H2h\in H_{2}, the valuation u[h,j]u[h,j] for the ii-th bundle of A[i,h,j]A[i,h,j] is equal to the egalitarian welfare Egal[i,h−1]\textit{Egal}[i,h-1] of the allocation restricted to the first i−1i-1 bundles (by definition of k1[i,j]k_{1}[i,j] and k2[i,j]k_{2}[i,j], and by Lemma A.8(ii)). Thus, the number of losers L[i,h,j]L[i,h,j] in allocation A[i,h,j]A[i,h,j] is equal to L[i−1,h−1]L[i-1,h-1] (i.e., the quantity of losers among the first i−1i-1 agents) plus 11 (i.e., agent ii). As A[i−1,k2[i,j]−1]⪰A[i−1,h−1]A[i-1,k_{2}[i,j]-1]\succeq A[i-1,h-1] (by Lemma A.8(i)) and Egal[i−1,k2[i,j]−1]=Egal[i−1,h−1]\textit{Egal}[i-1,k_{2}[i,j]-1]=\textit{Egal}[i-1,h-1], we necessarily have that L[i,k2[i,j],j]⩽L[i,h,j]L[i,k_{2}[i,j],j]\leqslant L[i,h,j] for any h∈H2h\in H_{2}. We conclude that the best allocation of type A[i,h,j]A[i,h,j] with h∈H2h\in H_{2} is achieved by h:=k2[i,j]h:=k_{2}[i,j], and this shows the optimality of A[i,k2[i,j],j]A[i,k_{2}[i,j],j].

Suppose k3[i,j]⩽kk_{3}[i,j]\leqslant k. Then we can also show that A[i,k3[i,j],j]⪰A[i,k,j]A[i,k_{3}[i,j],j]\succeq A[i,k,j]. The set H3H_{3} of values h⩾k3[i,j]h\geqslant k_{3}[i,j] with Egal[i,h,j]=Egal[i,j]\textit{Egal}[i,h,j]=\textit{Egal}[i,j] is an interval whose minimum is k3[i,j]k_{3}[i,j], thus both kk and k3[i,j]k_{3}[i,j] belong to H3H_{3}. As u[k3[i,j],j]<Egal[i−1,k3[i,j]−1]u[k_{3}[i,j],j]<\textit{Egal}[i-1,k_{3}[i,j]-1] (by definition of k3[i,j]k_{3}[i,j]), we have that agent ii is a loser in A[i,k3[i,j],j]A[i,k_{3}[i,j],j], and it is the only one. Thus, allocation A[i,k3[i,j],j]A[i,k_{3}[i,j],j] must be necessarily optimal. ∎

By exploiting (A.3) and the characterization of optimal allocations given in Lemma A.9, we can derive an efficient dynamic programming algorithm (Algorithm 2) that computes an SMMS allocation.

Algorithm 2 computes an SMMS allocation in O(mn)O(mn) time.

We first show that the output of Algorithm 2 is an SMMS allocation. In lines 1–5 of the algorithm we initialize, for i=1i=1 or j=0j=0, the maximum egalitarian welfare Egal[i,j]\textit{Egal}[i,j] and the number of losers L[i,j]L[i,j] of the optimal allocation A[i,j]A[i,j] (of path P(v1,vj)P(v_{1},v_{j}) for ii agents). By using the characterization provided in Lemma A.9, in lines 6–14 we iteratively compute an index k[i,j]k[i,j] such that A[i,k[i,j],j]A[i,k[i,j],j] is an SMMS allocation of subpath P(v1,vj)P(v_{1},v_{j}) for ii agents, and we compute the corresponding maximum egalitarian welfare Egal[i,j]\textit{Egal}[i,j] and number of losers L[i,j]L[i,j]. Finally, in lines 15–20 we recursively reconstruct the optimal allocation A[n,m]A[n,m] that is returned as output.

Now, we show that the time complexity of Algorithm 2 is O(mn)O(mn). Observe that the body of the nested for-loops in lines 6–14 can be performed in time T(i,j)=c∑t=12(kt[i,j]−kt[i,j−1])T(i,j)=c\sum_{t=1}^{2}(k_{t}[i,j]-k_{t}[i,j-1]), where cc is a constant that does not depend on ii and jj. Indeed, this running time depends on the computation in lines 8–9 of each index kt[i,j]k_{t}[i,j] for t=1,2t=1,2, and to compute it we can simply analyze all the indices from kt[i,j−1]+1k_{t}[i,j-1]+1 to kt[i,j]+1k_{t}[i,j]+1 only. We conclude that the time complexity TT of the nested for-loops in lines 6–14 satisfies

Since the time complexity of the other parts of the algorithm is clearly O(mn)O(mn), it follows that Algorithm 2 terminates in O(mn)O(mn) time. ∎