This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Dividing Conflicting Items Fairly

Ayumi Igarashi Pasin Manurangsi The University of Tokyo Google Research igarashi@mist.i.u-tokyo.ac.jp pasin@google.com Hirotaka Yoneda The University of Tokyo yoneda-h@g.ecc.u-tokyo.ac.jp
Abstract

We study the allocation of indivisible goods under conflicting constraints, represented by a graph. In this framework, vertices correspond to goods and edges correspond to conflicts between a pair of goods. Each agent is allocated an independent set in the graph. In a recent work of Kumar et al. [21], it was shown that a maximal EF1 allocation exists for interval graphs and two agents with monotone valuations. We significantly extend this result by establishing that a maximal EF1 allocation exists for any graph when the two agents have monotone valuations. To compute such an allocation, we present a polynomial-time algorithm for additive valuations, as well as a pseudo-polynomial time algorithm for monotone valuations. Moreover, we complement our findings by providing a counterexample demonstrating a maximal EF1 allocation may not exist for three agents with monotone valuations; further, we establish NP-hardness of determining the existence of such allocations for every fixed number n3n\geq 3 of agents. All of our results for goods also apply to the allocation of chores.

1 Introduction

How can we allocate a resource fairly? This problem was first formalized by the pioneering work of Steinhaus [25] and has since been extensively studied in the fields of economics, mathematics, and computer science under the umbrella of fair division. Applications of fair division arise in many real-life situations, including the allocation of courses among students [11], the division of family inheritance among family members [15], and the division of household chores between couples [19].

A central notion of fairness in fair division is envy-freeness, which requires that every agent is allocated their most preferred bundle in the allocation. However, such a fairness guarantee is impossible to achieve when dealing with indivisible resources, such as courses, houses, or tasks. Consequently, recent literature on discrete fair division has focused on approximate fairness, exploring various concepts and algorithmic results [1]. One particular influential relaxation of envy-freeness is, envy-freeness up to one good (EF1), introduced by Budish [10], allowing agents to remove one good from others’ bundle to eliminate envy. This concept has garnered significant attention over the past decade. It is known that for general classes of monotone valuations, an EF1 allocation exists and can be computed efficiently [23].

Most studies on fair division assume that any allocation is feasible. While this assumption may hold in some cases, many practical scenarios involve constraints that restrict the structure of allocations. For instance, consider the allocation of multiple offices among several people over different periods of time. If the time intervals associated with two offices overlap, they cannot be assigned to the same person. Similar constraints arise in job scheduling, where overlapping shifts cannot be allocated to the same employee. Another example is the allocation of players to sports teams. If two players have overlapping areas of expertise, it is preferable not to assign them to the same team. A versatile framework for modeling such constraints, explored in a series of recent papers [12, 18, 21], represents conflicts among indivisible resources using a graph structure, where vertices correspond to resources and edges represent conflicts.

Conflicting constraints introduce new challenges, as standard fairness and efficiency concepts often become unattainable. Notably, canonical efficiency concepts such as completeness and Pareto-optimality are incompatible with EF1 under these constraints. In fact, with conflicting constraints, a complete allocation that assigns all goods may not always exist. Furthermore, even if such an allocation exists, there are simple instances where a complete EF1 allocation is unattainable [18].

Kumar et al. [21] studied chore allocation under conflicting constraints, observing that even on a path, EF1 is incompatible with Pareto-optimality for two agents with identical additive valuations.111In [21], Pareto-optimality is defined with respect to maximal allocations. To address this limitation, they introduced the notion of maximality. A maximal allocation ensures that no unassigned item can be feasibly allocated to some agent. Kumar et al. showed that for interval graphs—a common structure in job scheduling—a maximal EF1 allocation among two agents always exists and can be efficiently found for monotone valuations. However, the existence of a maximal EF1 allocation for more general graph families remains unresolved, offering a rich avenue for further research.

Our contributions.

In this paper, we study the allocation of indivisible goods under conflicting constraints. Our goal is to identify conditions under which a maximal EF1 allocation exists and can be efficiently computed. Our main contributions are as follows:

  1. 1.

    Two-Agent-Case: We significantly extend the result of Kumar et al. [21] by establishing that a maximal EF1 allocation exists for any graph when the agents have monotone valuations. Further, we develop efficient algorithms for finding such allocations, including a polynomial-time algorithm for additive valuations and a pseudo-polynomial-time algorithm for monotone valuations. Note that the two-agent case is of particular importance in fair division, with various applications, including inheritance division, house-chore division, and divorce settlements [7, 8, 19].

  2. 2.

    Three or More Agents: We establish a sharp dichotomy from the two-agent case in terms of both existence and computational complexity. First, we provide an example where a maximal EF1 allocation fails to exist, even for three agents with monotone valuations. While Hummel and Hetland [18] previously identified a counterexample for four agents, no such example was known for three agents. We also prove the NP-hardnesss of determining the existence of a maximal EF1 allocation for a fixed number n3n\geq 3 of agents with monotone valuations.

  3. 3.

    Chore Allocation: Finally, we consider the problem of chore allocation, where each agent has a monotone non-increasing valuation. We show that the existence of a maximal EF1 allocation under identical valuations directly translates from the goods case, establishing that all our results for goods hold for chores as well.

Related work.

There is a growing body of research on fair division under constraints. For a comprehensive survey on the topic, see Suksompong [26]. Conflicting constraints in the context of fair division were introduced by Chiarelli et al. [12] and have been further explored by [18, 21, 5, 22]. Chiarelli et al. [12] explored different fairness objectives from ours, focusing on partial allocations that maximize the egalitarian social welfare—defined as the value of a bundle received by the worst-off agent. Hummel and Hetland [18] studied complete allocations satisfying fairness criteria such as EF1 and MMS (maximin fair share). Biswas et al. [5] generalized the model of [18], taking into account capacity of resources. Li et al. [22] and Kumar et al. [21] considered an interval scheduling problem, with the goal of achieving fairness concepts such as EF1 and MMS. While Li et al. [22] focused on goods allocation with flexible intervals, Kumar et al. [21] examined chore allocation.

Our problem is closely related to the problem of equitable coloring in graph theory, which corresponds to a complete EF1 allocation when agents have uniform valuations (namely, all goods are equally valued 11). In Appendix B, we make this connection more precise and show that for such valuations, a maximal EF1 allocation exists on trees.

A related type of constraints to conflicting constraints is the connectivity constraints of a graph [4, 6], where each agent receives a connected bundle of a graph. Note that while connectivity constraints imposed by a sparse graph such as a tree allow fewer feasible allocations, in our setting, sparsity implies greater flexibility, as it increases the number of feasible allocations.

2 Preliminaries

For any natural number ss\in\mathbb{N}, let [s]={1,2,,s}[s]=\{1,2,\ldots,s\}.

Problem instance.

We use M=[m]M=[m] to denote the set of goods and N=[n]N=[n] to denote the set of agents. Let G=(M,E)G=(M,E) denote an undirected graph, where each vertex corresponds to a good and each edge corresponds to a conflict. Each agent ii has a valuation function vi:2M+v_{i}:2^{M}\rightarrow\mathbb{R}_{+}; here, +\mathbb{R}_{+} is the set of non-negative reals. We assume that vi()=0v_{i}(\emptyset)=0. For simplicity, the valuation of a single good gMg\in M, vi({g})v_{i}(\{g\}), is denoted by vi(g)v_{i}(g). An instance of our problem is given by the tuple (N,M,𝒱,G)(N,M,\mathcal{V},G) where 𝒱=(v1,v2,,vn)\mathcal{V}=(v_{1},v_{2},\dots,v_{n}) denotes a valuation profile. We use Ks,tK_{s,t} to denote a complete bipartite graph with a bipartition in which one part contains ss vertices and another part includes tt vertices.

Valuation function.

A valuation function viv_{i} is monotone non-decreasing if vi(S)vi(T)v_{i}(S)\leq v_{i}(T) for every STMS\subseteq T\subseteq M. Unless specified otherwise, we refer to such a function simply as monotone. It is additive if vi(S)=gSvi(g)v_{i}(S)=\sum_{g\in S}v_{i}(g) holds for every SMS\subseteq M and iNi\in N. A valuation profile 𝒱\mathcal{V} is called identical if every agent iNi\in N has the same valuation function; in this case, we denote this function by vv. Let T(m)T(m) denote the time to compute valuation vi(S)v_{i}(S) for a given SMS\subseteq M.

Allocation.

An allocation is an ordered subpartition 𝒜=(A1,,An)\mathcal{A}=(A_{1},\ldots,A_{n}) of MM where for every pair of distinct agents i,jNi,j\in N, AiAj=A_{i}\cap A_{j}=\emptyset, iNAiM\cup_{i\in N}A_{i}\subseteq M, and for each iNi\in N, AiA_{i} is an independent set of GG, namely, there is no pair of goods in AiA_{i} that are adjacent to each other. The subset AiA_{i} is called the bundle of agent ii. An allocation is complete if all goods are allocated, i.e., iNAi=M\cup_{i\in N}A_{i}=M.

Fairness and efficiency notions.

An allocation is envy-free if for every pair of agents i,jNi,j\in N, we have vi(Ai)vi(Aj)v_{i}(A_{i})\geq v_{i}(A_{j}) [13, 14]. It is called envy-free up to one good (EF1) if for every pair of agents i,jNi,j\in N, either Aj=A_{j}=\emptyset, or there exists some good gAjg\in A_{j} such that vi(Ai)vi(Aj{g})v_{i}(A_{i})\geq v_{i}(A_{j}\setminus\{g\}) [10, 23].

As discussed in the Introduction, observe that a complete allocation may not always exist (e.g., consider a complete graph K2K_{2} with one agent). Further, even when a complete allocation exists, a complete EF1 allocation may not exist: For instance, in a setting with nn agents and a star where the center has a value of 0 and each of the n+1n+1 leaves has a value of 11, an agent receiving the center cannot receive any other good, while at least one agent receives two or more leaves.

Besides completeness, another commonly used notion of efficiency in fair division is Pareto-optimality. Similar to the chore setting [21], EF1 is incompatible with Pareto-optimality for goods instances. Specifically, an allocation 𝒜\mathcal{A}^{\prime} Pareto-dominates another allocation 𝒜\mathcal{A} if vi(Ai)vi(Ai)v_{i}(A^{\prime}_{i})\geq v_{i}(A_{i}) for every iNi\in N and the inequality is strict for at least one agent. An allocation 𝒜\mathcal{A} is Pareto-optimal (PO) if there is no other allocation that Pareto-dominates it. Consider two agents and a cycle of four goods with values 1,3,1,31,3,1,3 in order. In any EF1 allocation, no agent should receive both goods of value 33, and no agent can receive two goods of different values due to conflicting constraints. However, such an allocation is Pareto-dominated by assigning the two high-value goods to one agent and the two low-value goods to the other.

As in Kumar et al. [21], we therefore consider a relaxed efficiency notion of maximality. An allocation 𝒜\mathcal{A} is maximal if for every agent iNi\in N and every unallocated good gMiNAig\in M\setminus\bigcup_{i\in N}A_{i}, gg is adjacent to some good in AiA_{i}. Our goal is to achieve an allocation that simultaneously satisfies maximality and EF1.

3 Two Agents

In this section, we consider the case of two agents.

3.1 Cut-and-Choose Protocol

When there are two agents, we can use a well-known strategy called cut-and-choose protocol [9].

Theorem 1.

Suppose that a maximal EF1 allocation always exists and can be computed in τ\tau time for instances with two agents and identical valuations. Then, a maximal EF1 allocation always exists and can be computed in τ+2T(m)\tau+2T(m) time for instances with two agents.

Proof.

Let (A1,A2)(A_{1},A_{2}) a maximal EF1 allocation in a hypothetical scenario that valuations of both agents are v1v_{1}. Then, agent 22 chooses a preferred bundle, leaving the reminder for 11. The resulting allocation is maximal and EF1. ∎

Now, the question is whether a maximal EF1 allocation exists for identical valuations. In subsections 3.2-3.5, we assume that the valuations are identical and monotone, and valuations for both agents are represented by v(S)(SM)v(S)\ (S\subseteq M).

3.2 Proof Strategy of Kumar et al.

To describe our proof strategy, let us (informally) review Kumar et al.’s proof of the existence of maximal EF1 allocation when GG is a path. At a high level, the idea of the proof is to construct a chain of maximal allocations 𝒜(0),,𝒜(m1)\mathcal{A}^{(0)},\dots,\mathcal{A}^{(m-1)}, as illustrated in Figure 1, satisfying the following two properties: (i) adjacent allocations only “differ slightly” and (ii) (A1(0),A2(0))=(A2(m1),A1(m1))(A^{(0)}_{1},A^{(0)}_{2})=(A^{(m-1)}_{2},A^{(m-1)}_{1}). The latter implies that the signs of v(A1(0))v(A2(0))v(A^{(0)}_{1})-v(A^{(0)}_{2}) and v(A1(m1))v(A2(m1))v(A^{(m-1)}_{1})-v(A^{(m-1)}_{2}) are different. Therefore, there exists an ii that the signs of v(A1(i))v(A2(i))v(A^{(i)}_{1})-v(A^{(i)}_{2}) and v(A1(i+1))v(A2(i+1))v(A^{(i+1)}_{1})-v(A^{(i+1)}_{2}) are different. At this point, they show that at least one of 𝒜(i)\mathcal{A}^{(i)} or 𝒜(i+1)\mathcal{A}^{(i+1)} must be EF1, which shows the existence of a maximal EF1 allocation. This concludes the proof overview of [21] for path graphs. They also extended this method to interval graphs, although the construction of the chain of maximal allocations becomes significantly more involved. Indeed, as explained and formalized below, our main contribution is to give a construction of a chain for any graph.

Refer to caption
Figure 1: An example of chain of allocations for a path graph, 𝒜(0),,𝒜(5)\mathcal{A}^{(0)},\dots,\mathcal{A}^{(5)}. The number written in each vertex is a valuation of the corresponding good. Red and blue vertices are those assigned to agent 11 and 22, respectively.

3.3 Useful Definitions and Lemmata

Our construction will require several generalizations of definitions and lemmata from Kumar et al. [21]. We believe that these tools can be useful beyond the context of our work. Firstly, we use the following definition of “adjacency”. Compared to [21], our definition (Definition 2) is more relaxed, in that it does not place any requirement on |A1A1||A^{\prime}_{1}\setminus A_{1}| and |A2A2||A_{2}\setminus A^{\prime}_{2}| whereas Kumar et al.’s enforces that these are at most one. Such a relaxation is crucial since our “chain” constructed below violates the aforementioned Kumar et al.’s condition.

Definition 2.

A pair (𝒜,𝒜)(\mathcal{A},\mathcal{A}^{\prime}) of allocations is ordered adjacent if |A1A1|1|A_{1}\setminus A^{\prime}_{1}|\leq 1 and |A2A2|1|A^{\prime}_{2}\setminus A_{2}|\leq 1.

The following is the key lemma that enables to find an EF1 allocation at the point when v(A1)v(A2)v(A_{1})-v(A_{2}) crosses from positive to negative.

Lemma 3.

Let (𝒜,𝒜)(\mathcal{A},\mathcal{A}^{\prime}) be any ordered adjacent pair of allocations. Further, assume that the following conditions hold:

  1. 1.

    v(A1)v(A2)v(A_{1})\geq v(A_{2})

  2. 2.

    v(A1)v(A2)v(A^{\prime}_{1})\leq v(A^{\prime}_{2})

Then, at least one of 𝒜\mathcal{A} or 𝒜\mathcal{A}^{\prime} must be EF1.

Proof.

Suppose that the allocation 𝒜\mathcal{A} is not EF1. Since v(A1)v(A2)v(A_{1})\geq v(A_{2}), agent a2a_{2} envies agent a1a_{1} even if one good is removed from A1A_{1}. Since |A1A1|1|A_{1}\setminus A^{\prime}_{1}|\leq 1, we must have v(A1A1)=v(A1(A1A1))v(A2)v(A_{1}\cap A^{\prime}_{1})=v(A_{1}\setminus(A_{1}\setminus A^{\prime}_{1}))\geq v(A_{2}). As a result,

v(A1)\textstyle v(A^{\prime}_{1}) v(A1A1)\textstyle\geq v(A_{1}\cap A^{\prime}_{1})
v(A2)\textstyle\geq v(A_{2})
v(A2A2)=v(A2(A2A2)),\textstyle\geq v(A^{\prime}_{2}\cap A_{2})=v(A^{\prime}_{2}\setminus(A^{\prime}_{2}\setminus A_{2})), (1)

where the first and third inequalities hold because vv is monotone. Now, consider the allocation 𝒜\mathcal{A}^{\prime}:

  • Since |A2A2|1|A^{\prime}_{2}\setminus A_{2}|\leq 1, (1) implies that agent 11 does not envy agent 22 after removing a good from A2A^{\prime}_{2}.

  • Agent 22 does not envy agent 11 since v(A1)v(A2)v(A^{\prime}_{1})\leq v(A^{\prime}_{2}).

Therefore, this allocation is EF1. ∎

We generalize Kumar et al.’s method by defining a gapless chain, and prove that any gapless chain must contain an EF1 allocation. We stress again that our requirements are weaker than the chain used in Kumar et al.’s222Namely, we use a weaker adjacency notion and we only require the sign flip (first two conditions) whereas Kumar et al. require that (A1(0),A2(0))=(A2(k),A1(k))(A^{(0)}_{1},A^{(0)}_{2})=(A^{(k)}_{2},A^{(k)}_{1})., but still suffices to ensure EF1 for identical valuations.

Definition 4.

A sequence of allocation 𝒜(0),,𝒜(k)\mathcal{A}^{(0)},\dots,\mathcal{A}^{(k)} is a gapless chain if it satisfies the following conditions:

  1. 1.

    v(A1(0))v(A2(0))v(A^{(0)}_{1})\geq v(A^{(0)}_{2}).

  2. 2.

    v(A1(k))v(A2(k))v(A^{(k)}_{1})\leq v(A^{(k)}_{2}).

  3. 3.

    (𝒜(i1),𝒜(i))(\mathcal{A}^{(i-1)},\mathcal{A}^{(i)}) is ordered adjacent for every i[k]i\in[k].

Lemma 5.

If 𝒜(0),,𝒜(k)\mathcal{A}^{(0)},\dots,\mathcal{A}^{(k)} is a gapless chain, there exists an i{0,,k}i\in\{0,\dots,k\} that 𝒜(i)\mathcal{A}^{(i)} is EF1.

Proof.

From the first two conditions, there exists i[k]i\in[k] that v(A1(i1))v(A2(i1))v(A^{(i-1)}_{1})\geq v(A^{(i-1)}_{2}) and v(A1(i))v(A2(i))v(A^{(i)}_{1})\leq v(A^{(i)}_{2}). Lemma 3 then implies that at least one of 𝒜(i1)\mathcal{A}^{(i-1)} or 𝒜(i)\mathcal{A}^{(i)} is EF1. ∎

Given Lemma 5, our main task is thus to (efficiently) construct a gapless chain of maximal allocations (for any graph GG). We devote the remainder of this section to this task.

3.4 Proof of Existence

Algorithm 1 ChainEF1(S;G=(M,E),v)(S;G=(M,E),v)
1:S={s1,,sk}S=\{s_{1},\dots,s_{k}\} is a maximal independent of GG.
2:for tMSt\in M\setminus S do
3:     Γt:={i[k]{si,t}E}\Gamma_{t}:=\{i\in[k]\mid\{s_{i},t\}\in E\} \triangleright Non-empty since SS is a maximal independent set
4:     pt=miniΓtip_{t}=\min_{i\in\Gamma_{t}}i
5:     qt=maxiΓtiq_{t}=\max_{i\in\Gamma_{t}}i
6:end for
7:X1X_{1}\leftarrow\emptyset
8:for tMSt\in M\setminus S in increasing order of qtq_{t} do
9:     if tt has no neighbor in X1X_{1} then
10:         X1X1{t}X_{1}\leftarrow X_{1}\cup\{t\}
11:     end if
12:end for
13:X2X_{2}\leftarrow\emptyset
14:for tMSt\in M\setminus S in decreasing order of ptp_{t} do
15:     if tt has no neighbor in X2X_{2} then
16:         X2X2{t}X_{2}\leftarrow X_{2}\cup\{t\}
17:     end if
18:end for
19:for i=0,,ki=0,\dots,k do
20:     A1(i)={si+1,,sk}{tX1qti}A^{(i)}_{1}=\{s_{i+1},\dots,s_{k}\}\cup\{t\in X_{1}\mid q_{t}\leq i\}
21:     A2(i)={s1,,si}{tX2pt>i}A^{(i)}_{2}=\{s_{1},\dots,s_{i}\}\cup\{t\in X_{2}\mid p_{t}>i\}
22:     if 𝒜(i)=(A1(i),A2(i))\mathcal{A}^{(i)}=(A^{(i)}_{1},A^{(i)}_{2}) is EF1 then
23:         return 𝒜(i)\mathcal{A}^{(i)}
24:     end if
25:end for
26:return NULL

Now, we prove that, a maximal EF1 allocation always exists for two agents, as stated below.

Theorem 6.

For n=2n=2 agents, any graph GG and any monotone valuation vv, there exists a maximal EF1 allocation.

Although we only claim the existence in the above theorem, we will in fact present an algorithm for finding such an allocation, as its running time will be discussed in the next section. Our algorithm is presented in Algorithm 1 where the input SS can be any maximal independent set of GG. To prove Theorem 6, we will use one that maximizes v(S)v(S). In Figure 2, we provide an example of a chain constructed by the algorithm.

Refer to caption
Figure 2: An example of a gapless chain of allocations, constructed by Algorithm 1. The number written in each vertex is a valuation of the corresponding good. Red and blue vertices are those assigned to agent 11 and 22, respectively.

We now prove a couple of crucial lemmata. Starting with the fact that each allocation is valid and maximal:

Lemma 7.

For every i{0,,k}i\in\{0,\dots,k\}, 𝒜(i)\mathcal{A}^{(i)} is a valid maximal allocation.

Proof.

First, we prove that the allocation is valid:

  • No good is assigned to both agents. This is obvious for goods in SS. For good tMSt\in M\setminus S, since qtptq_{t}\geq p_{t}, at most one of the conditions qtiq_{t}\leq i or pt>ip_{t}>i can hold; thus, it is assigned to at most one agent.

  • No adjacent goods are assigned to the same agent. Consider two goods g,g(gg)g,g^{\prime}\ (g\neq g^{\prime}) that are assigned to agent 11 and consider the following cases:

    1. 1.

      Both goods are in SS. They are not adjacent because SS is an independent set.

    2. 2.

      Both goods are in MSM\setminus S. They are not adjacent because g,gX1g,g^{\prime}\in X_{1} and X1X_{1} is an independent set.

    3. 3.

      One good is from SS and the other is from MSM\setminus S. Assume w.l.o.g. that gSg\in S and gMSg^{\prime}\in M\setminus S. From this, we must have g{si+1,,sk}g\in\{s_{i+1},\dots,s_{k}\} and that qgiq_{g^{\prime}}\leq i. By the definition of qgq_{g^{\prime}}, this ensures that g,gg,g^{\prime} are not adjacent.

Next, we prove maximality of 𝒜(i)\mathcal{A}^{(i)}, i.e., that no good in M(A1(i)A2(i))M\setminus(A_{1}^{(i)}\cup A_{2}^{(i)}) can be assigned to one of the agents. Let gM(A1(i)A2(i))g\in M\setminus(A_{1}^{(i)}\cup A_{2}^{(i)}) be any unassigned good. Consider three following cases:

  1. 1.

    qgiq_{g}\leq i. Since gg is adjacent to sqgA2(i)s_{q_{g}}\in A^{(i)}_{2}, gg cannot be assigned to agent 22. Moreover, since gA1(i)g\notin A^{(i)}_{1}, it must be that gX1g\notin X_{1}. From how X1X_{1} is constructed, there exists tX1t\in X_{1} such that qtqgq_{t}\leq q_{g} and tt is adjacent to gg. As tA1(i)t\in A^{(i)}_{1}, gg cannot be assigned to agent 11.

  2. 2.

    pg>ip_{g}>i. This case follows from an analogous argument to the first case.

  3. 3.

    pgi<qgp_{g}\leq i<q_{g}. In this case, gg is adjacent to spgA2(i)s_{p_{g}}\in A^{(i)}_{2} and sqgA1(i)s_{q_{g}}\in A^{(i)}_{1}. Thus, tjt_{j} cannot be assigned. ∎

Next, we show that 𝒜(0),,𝒜(k)\mathcal{A}^{(0)},\dots,\mathcal{A}^{(k)} is a gapless chain. However, this requires an additional requirement that v(S)v(S) is no smaller than v(X1),v(X2)v(X_{1}),v(X_{2}).

Lemma 8.

If v(S)v(X1)v(S)\geq v(X_{1}) and v(S)v(X2)v(S)\geq v(X_{2}), then 𝒜(0),,𝒜(k)\mathcal{A}^{(0)},\dots,\mathcal{A}^{(k)} is a gapless chain.

Proof.

Note that 𝒜(0)=(S,X2)\mathcal{A}^{(0)}=(S,X_{2}) and 𝒜(k)=(X1,S)\mathcal{A}^{(k)}=(X_{1},S). Thus, the first two conditions are satisfied by our assumption v(S)v(X1),v(S)v(X2)v(S)\geq v(X_{1}),v(S)\geq v(X_{2}). Finally, for every i[k]i\in[k], we can see that A1(i1)A1(i)={si}A_{1}^{(i-1)}\setminus A_{1}^{(i)}=\left\{s_{i}\right\} and A2(i)A2(i1)={si}A_{2}^{(i)}\setminus A_{2}^{(i-1)}=\left\{s_{i}\right\}. Thus, (𝒜(i1),𝒜(i))(\mathcal{A}^{(i-1)},\mathcal{A}^{(i)}) is ordered adjacent. ∎

Lemmas 5, 7 and 8 together immediately imply the following:

Lemma 9.

If v(S)v(X1)v(S)\geq v(X_{1}) and v(S)v(X2)v(S)\geq v(X_{2}), then Algorithm 1 outputs a maximal EF1 allocation.

Our main theorem of this section (Theorem 6) now then follows easily from Lemma 9 by choosing an appropriate SS.

Proof of Theorem 6.

Let SS be a maximal independent set of GG that maximizes v(S)v(S). Since X1,X2X_{1},X_{2} are independent set and vv is monotone, we have v(S)v(X1)v(S)\geq v(X_{1}) and v(S)v(X2)v(S)\geq v(X_{2}). Thus, Lemma 9 ensures that running Algorithm 1 on input SS yields a maximal EF1 allocation. ∎

3.5 Algorithm

Recall in the proof of Theorem 6 that we pick SS to be a maximal independent set with largest valuation. Doing so trivially would require enumerating through all 2m2^{m} subsets of MM. In this section, we give a simple algorithm (Algorithm 2) that significantly improves upon this running time. In particular, it runs in polynomial-time for additive valuations and pseudo-polynomial time for general monotone valuations.

Algorithm 2 SwapEF1(G=(M,E),v)(G=(M,E),v)
1:gargmaxgMv(g)g^{*}\leftarrow\operatorname{argmax}_{g\in M}v(g)
2:SiS^{i}\leftarrow any maximal independent set of GG containing gg^{*}
3:i0i\leftarrow 0
4:while True do
5:     if ChainEF1(Si;G,v)\textsc{ChainEF1}(S^{i};G,v)\neq NULL then
6:         return ChainEF1(S0;G,v)\textsc{ChainEF1}(S^{0};G,v)
7:     end if
8:     X1i,X2iX1,X2X^{i}_{1},X^{i}_{2}\leftarrow X_{1},X_{2} in ChainEF1(Si;G,v)\textsc{ChainEF1}(S^{i};G,v)
9:     argmax{1,2}v(Xi)\ell\leftarrow\operatorname{argmax}_{\ell^{\prime}\in\{1,2\}}v(X^{i}_{\ell^{\prime}})
10:     Si+1S^{i+1}\leftarrow any maximal independent set containing XiX^{i}_{\ell}
11:     ii+1i\leftarrow i+1
12:end while

Our algorithm running time is stated below in Theorem 10. Note that in the second case BB is the number of different values the valuation function can take. This implies that, if the valuations v(S)v(S) are all integers, the running time is pseudo-polynomial.

Theorem 10.

When there are n=2n=2 agents, there exists an algorithm that can find a maximal EF1 allocation and its running time is as follows:

  • O(3m/3(mT(m)+|E|))O(3^{m/3}\cdot(m\cdot T(m)+|E|)) for monotone valuations,

  • O(B(mT(m)+|E|))O(B\cdot(m\cdot T(m)+|E|)) for monotone valuations such that the number of distinct values of v(S)v(S) is at most BB (i.e. |{v(S)SM}|B|\{v(S)\mid S\subseteq M\}|\leq B), and,

  • O(mlogm(mT(m)+|E|))O(m\log m\cdot(m\cdot T(m)+|E|)) for additive valuations.

Proof.

Observe that the preprocessing time and the running time of each loop is O(mT(m)+|E|)O(m\cdot T(m)+|E|). Thus, it suffices to bound the number of iterations of the loop in each case.

  • For general monotone valuations, by Lemma 9, each loop either terminates or we must have v(Xi)>v(Si)v(X^{i}_{\ell})>v(S^{i}). From monotonicity, this implies v(Si+1)>v(Si)v(S^{i+1})>v(S^{i}). This means that S0,S1,S^{0},S^{1},\dots are all distinct maximal independent sets of GG. Since there are at most 3m/33^{m/3} maximal independent sets [24], the number of iterations is at most 3m/33^{m/3}.

  • Next, suppose that v(S)v(S) can take at most BB distinct values. From the argument above, v(S0),v(S1),v(S^{0}),v(S^{1}),\dots are strictly increasing and are thus distinct. As a result, the number of iterations is at most BB.

  • Finally, suppose that vv is additive. We claim that the following holds for each loop ii that does not terminate:

    v(Si+1)>mm1v(Si).\textstyle v(S^{i+1})>\frac{m}{m-1}\cdot v(S^{i}). (2)

    Before we prove (2), let us first use it to bound the number of iterations. Notice that (2) implies that, after loop ii, we must have v(Si+1)>(mm1)i+1v(S0)(mm1)i+1v(g)v(S^{i+1})>\left(\frac{m}{m-1}\right)^{i+1}\cdot v(S^{0})\geq\left(\frac{m}{m-1}\right)^{i+1}\cdot v(g^{*}). Moreover, our choice of gg^{*} ensures that v(Si+1)mv(g)v(S^{i+1})\leq m\cdot v(g^{*}). Thus, the number of iterations is at most logm/(m1)m+1=O(mlogm)\log_{m/(m-1)}m+1=O(m\log m).

    To see that (2) holds, first recall from Algorithm 1 that, if Algorithm 1 returns NULL, it has considered either (Si,Xi)(S^{i},X^{i}_{\ell}) or (Xi,Si)(X^{i}_{\ell},S^{i}) already and has determined that this is not EF1. Since v(Xi)>v(Si)v(X^{i}_{\ell})>v(S^{i}), this means that, for any good gXig\in X^{i}_{\ell}, we must have v(S)<v(Xi{g})v(S)<v(X^{i}_{\ell}\setminus\left\{g\right\}). When we pick gXig\in X^{i}_{\ell} with the largest v(g)v(g), we have

    v(g)1|Xi|v(Xi)1mv(Xi).v(g)\geq\frac{1}{\left|X^{i}_{\ell}\right|}v(X^{i}_{\ell})\geq\frac{1}{m}v(X^{i}_{\ell}).

    Hence, v(Si)<v(Xi{g})m1mv(Xi)v(S^{i})<v(X^{i}_{\ell}\setminus\{g\})\leq\frac{m-1}{m}v(X^{i}_{\ell}), proving (2). ∎

4 Three or More Agents

4.1 Negative Examples

While a maximal EF1 allocation always exists when there are two agents, it turns out that this is not the case for three agents or more.

{restatable}

theoremExampleThreeAgents For n=3n=3 agents, there exists an instance with identical monotone valuations where no maximal EF1 allocation exists.

Proof.

Consider the following instance with 77 goods. The graph consists of a complete bipartite graph K3,3K_{3,3} with bipartition X={1,2,3}X=\{1,2,3\} and Y={4,5,6}Y=\{4,5,6\} together with two edges {1,7}\{1,7\} and {4,7}\{4,7\}. Each of the three agents has an identical monotone valuation vv such that

  • v()=0v(\emptyset)=0;

  • v(S)=1v(S)=1 if |S|=1|S|=1 and S{{1},{4}}S\in\{\{1\},\{4\}\};

  • v(S)=2v(S)=2 if |S|=1|S|=1 and S{{1},{4}}S\not\in\{\{1\},\{4\}\};

  • v(S)=3v(S)=3 if SS is {2,7}\{2,7\}, {3,7}\{3,7\}, {5,7}\{5,7\}, or {6,7}\{6,7\};

  • v(S)=4v(S)=4 for any other SMS\subseteq M.

Note that the symmetry on the graph and valuation holds: swapping 22 and 33, swapping 55, 66, and swapping {1,2,3}\{1,2,3\} and {4,5,6}\{4,5,6\} all lead to the same instance, and swapping the bundles of agents does not change whether the allocation is EF1 or not because valuations are identical.

Specifically, consider any maximal allocation 𝒜\mathcal{A}. By maximality, good 77 must be allocated to some agent since it has degree 22. Since agents have identical valuations, without loss of generality, suppose it is allocated to agent 11. Thus, agent 11 can receive neither of good 11 nor 44; let us assume that if 11 is allocated, then it is allocated to agent 22 and if 44 is allocated, then it is allocated to agent 33. Further, agent 11 can receive a good from at most one part of the bipartition XX and YY due to conflicting constraints. Without loss of generality, suppose it is YY. Now consider the following cases.

  1. 1.

    If none of the goods in YY is allocated to agent 11, then 𝒜\mathcal{A} must allocate XX to agent 22 and YY to agent 33.

  2. 2.

    Suppose that exactly one of the goods in YY, say good 55, is allocated to agent 11. In this case, observe that 44 must be allocated. This is because if 44 is unallocated, this means that both agents 22 and 33 receive at least one good from XX and 66 must be allocated to agent 11, a contradiction. Thus, the only possible maximal allocations are ({5,7},{1,2,3},{4,6})(\{5,7\},\{1,2,3\},\{4,6\}) and ({5,7},{6},{4})(\{5,7\},\{6\},\{4\}). A similar argument holds when 66 is allocated to agent 11 due to the symmetry of the graph.

  3. 3.

    Suppose that two goods, 55 and 66, in YY are allocated to agent 11. If 44 is allocated, then the only possible maximal allocation is ({5,6,7},{1,2,3},{4})(\{5,6,7\},\{1,2,3\},\{4\}). If 44 is unallocated, this means that both agents 22 and 33 receive at least one good from XX and all goods in XX must be allocated to either of such agents. Thus, the only possible maximal allocations are ({5,6,7},{1},{2,3})(\{5,6,7\},\{1\},\{2,3\}), ({5,6,7},{1,2},{3})(\{5,6,7\},\{1,2\},\{3\}), together with ({5,6,7},{1,3},{2})(\{5,6,7\},\{1,3\},\{2\}).

For this reason, there are only 66 maximal allocations to consider (refer to Figure 3). All of them are not EF1, because:

  • Allocations #1, #4, #5, #6: one agent takes one good but there is another agent who takes three goods

  • Allocation #2: v({5,7})=3v(\{5,7\})=3 but v({1,2})=v({1,3})=v({2,3})=4v(\{1,2\})=v(\{1,3\})=v(\{2,3\})=4.

  • Allocation #3: v(4)=1v(4)=1 but v(5)=v(7)=2v(5)=v(7)=2. ∎

Refer to caption
Figure 3: 66 maximal allocations to consider in the instance of Theorem 4.1. The vertices in red, blue, green, and gray are goods taken by agent 1,2,31,2,3, and no one, respectively.

The instance constructed in the proof of Theorem 4.1 uses an identical monotone valuation. It remains an open question whether a counterexample exists for three agents with (even identical) additive valuations.

For every number n4n\geq 4 of agents, Hummel and Hetland [18] presented an instance with identical additive valuations and a complete bipartite graph Kn1,n1K_{n-1,n-1} for which a complete EF1 allocation does not exist. In such cases, a complete allocation does exist, as the maximum degree of the graph is less than the number of agents. Thus, this counterexample implies that achieving both EF1 and maximality is impossible even when four agents have identical additive valuations. Here, we provide a smaller example using K3,n1K_{3,n-1}, which turns out to be smallest since for mn+1m\leq n+1, there always exists a maximal EF1 allocation.

{restatable}

propositionExampleFourAgents For every number n4n\geq 4 of agents, there is an instance with identical additive valuations, m=n+2m=n+2, and G=K3,n1G=K_{3,n-1} where no maximal EF1 allocation exists.

Proof.

Consider the following instance with m=n+2m=n+2 goods and a complete bipartite graph K3,n1K_{3,n-1} with the left part containing three goods and the right part containing n1n-1 goods. Let a1,a2,a3a_{1},a_{2},a_{3} denote the three goods on the left side and b1,b2,,bn1b_{1},b_{2},\ldots,b_{n-1}. Each agent has an identical additive valuation where

v(g)={2(g{a1,a2,a3})3(otherwise).v(g)=\begin{cases}2&(g\in\{a_{1},a_{2},a_{3}\})\\ 3&(\text{otherwise}).\end{cases}

Consider an arbitrary maximal allocation 𝒜\mathcal{A}. Since the maximum degree of the graph is n1n-1, all goods must be allocated in this allocation. Due to pigeonhole’s principle, there exists an agent X that cannot receive any of goods on the right.

  • Case 1: If there is only one such agent, goods b1,b2,,bn1b_{1},b_{2},\ldots,b_{n-1} are allocated to n1n-1 other agents, which means that each of such agents takes one good of value 33. The remaining goods a1,a2,a3a_{1},a_{2},a_{3} must be taken by agent X. Thus, agent X is envied by each of the other agents even after removing one of the goods a1,a2,a3a_{1},a_{2},a_{3} from X’s bundle.

  • Case 2: If there are two or more such agents, there exists an agent Y who takes two or more goods among goods b1,b2,,bn1b_{1},b_{2},\ldots,b_{n-1}; further, there exists an agent Z who does not receive any of the goods on the right and takes at most one good from the left side. Then, agent Y is envied by agent Z after removing one of the goods from Y’s bundle.

Therefore, in either case, the allocation 𝒜\mathcal{A} is not EF1. ∎

{restatable}

propositionnPlusOne For nn agents with monotone valuations and mm goods with mn+1m\leq n+1, there exists a maximal EF1 allocation.

Proof.

Suppose mn+1m\leq n+1. Consider the following algorithm.

  1. 1.

    For each agent i=1,2,,ni=1,2,\dots,n in this order, run one cycle of the round-robin algorithm. Namely, agent ii chooses the most preferred good gg^{*} among the remaining goods (namely, gargmaxgRvi(g)g^{*}\in\operatorname{argmax}_{g\in R}v_{i}(g) where RR is the set of remaining goods). If there is no remaining good, the agent does not receive any good.

  2. 2.

    After that, at most one good gg remains. If gg can be feasibly assigned to some agent ii (namely, gg is not adjacent to the good received by ii in the first phase), assign it to any of such agents.

It is obvious that the resulting allocation is maximal. If mnm\leq n, the resulting allocation is clearly EF1 since each agent receives at most one good. If m=n+1m=n+1, consider an agent ii who gets two goods. After removing the first good she has chosen, each of the other agents does not envy ii since the last good gg was not selected in the first phase. ∎

4.2 NP-Hardness

Now, we will show that it is NP-hard to decide whether a maximal EF1 allocation exists, as stated below.

Theorem 11.

Given the graph and valuations, determining whether a maximal EF1 allocation exists is NP-hard for:

  1. 1.

    any fixed n4n\geq 4, even when restricted to identical and additive valuation, and,

  2. 2.

    n=3n=3, even when restricted to identical and monotone valuation.

In fact, our proof can transform any negative example into an NP-hardness result, as stated more precisely below.

Lemma 12.

Suppose that there exists an instance I~=([n],M~,v~,G~=(M~,E~))\tilde{I}=([n],\tilde{M},\tilde{v},\tilde{G}=(\tilde{M},\tilde{E})) (with identical valuation) where the number nn of agents and the number |M~||\tilde{M}| of items are both constants, such that no maximal EF1 allocation exists. Then, it is NP-hard to decide whether a maximal EF1 allocation exists for nn agents with identical valuations. Furthermore, if v~\tilde{v} is additive, then this NP-hardness applies even when the valuations are additive.

Theorem 11 is an immediate corollary of Lemma 12 where I~\tilde{I} is the instance from Figure 3 or Section 4.1. Note that we state Lemma 12 in this generic form so that, if subsequent work finds such an instance I~\tilde{I} for additive valuation for n=3n=3, then the NP-hardness would follow as a corollary.

Reduction.

We will reduce from the Independent Set (IS) problem, which is one of Karp’s classic NP-hard problems [20]. In the IS problem, we are given a graph H=(VH,EH)H=(V_{H},E_{H}) and a positive integer tt, and the goal is to decide whether HH contains an IS of size tt.

At a high-level, our reduction starts from I~\tilde{I} and adds to it nn copies of the graph HH, where each good has the same value λ\lambda. Roughly speaking, we wish the ii-th copy of HH (denoted by XiX_{i} in the proof below) to give “extra goods” to the ii-th agent, in case that agent envies some other agent by more than one good. The crux of the reduction is that such an agent can “catch up” (and thus satisfy EF1) iff there is a sufficiently large independent set in HH. This is not yet a complete reduction since, HH may not have a maximal independent set of a certain prescribed size. To alleviate this, we introduce “dummy goods” with zero value (denoted by YiY_{i} below) to ensure that we can pick any desired number of goods from each copy of HH. Finally, some additional edges are also added to ensure that each agent selects goods from a single copy of HH.

For the proof below, we will use the following notation: for any valuation vv and set SS of goods, let v1(S):=minjSv(S{j})v^{-1}(S):=\min_{j\in S}v(S\setminus\{j\}) denote the value of SS after its most valuable good is removed. We use the convention v1()=0v^{-1}(\emptyset)=0.

Proof of Lemma 12.

Recall I~\tilde{I} from the lemma statement. Let333γ\gamma can be computed in O(1)O(1) time by bruteforce.γ:=min𝒜~maxi,i[n](v~1(A~i)v~(A~i))\gamma:=\min_{\tilde{\mathcal{A}}}\max_{i,i^{\prime}\in[n]}\left(\tilde{v}^{-1}(\tilde{A}_{i})-\tilde{v}(\tilde{A}_{i^{\prime}})\right) where the outer minimum is over all maximal allocation 𝒜~\tilde{\mathcal{A}} of I~\tilde{I}. By the assumption on I~\tilde{I}, we have γ>0\gamma>0. Let λ:=γ/t\lambda:=\gamma/t.

Let (H=(VH,EH),t)(H=(V_{H},E_{H}),t) denote the IS instance. Our reduction constructs the instance I=([n],M,v,G)I=([n],M,v,G) as follows:

  • Goods: M=M~X1XnY1YnM=\tilde{M}\cup X_{1}\cdots\cup X_{n}\cup Y_{1}\cup\cdots\cup Y_{n} where Xi={xi,wwVH}X_{i}=\{x_{i,w}\mid w\in V_{H}\} and Yi={yi,wwVH}Y_{i}=\{y_{i,w}\mid w\in V_{H}\} are sets (each of size |VH||V_{H}|) of additional goods.

  • Graph: GG contains the following edges:

    1. [(i)]

    2. 1.

      All edges in G~\tilde{G},

    3. 2.

      (xi,u,xi,w)(x_{i,u},x_{i,w}) for all i[n]i\in[n] and (u,w)VH(u,w)\in V_{H},

    4. 3.

      (xi,w,yi,w)(x_{i,w},y_{i,w}) for all i[n]i\in[n] and wVHw\in V_{H},

    5. 4.

      all pairs of vertices in (XiYi)×(XiYi)(X_{i}\cup Y_{i})\times(X_{i^{\prime}}\cup Y_{i^{\prime}}) for all distinct i,i[n]i,i^{\prime}\in[n].

  • Valuation: For all SMS\subseteq M, let v(S)=v~(SM~)+λ|SX|v(S)=\tilde{v}(S\cap\tilde{M})+\lambda|S\cap X| where X:=X1XnX:=X_{1}\cup\cdots\cup X_{n}. That is, the valuations on original goods remain the same, the valuations of each good in XX is λ\lambda, and the goods in Y1YnY_{1}\cup\cdots\cup Y_{n} have valuations zero.

See Figure 4 for an illustration of the instance II.

It is clear that the reduction runs in polynomial time, and that, if v~\tilde{v} is additive, then vv is also additive.

(YES)

Suppose that HH contains an IS of size tt. Let 𝒜~\tilde{\mathcal{A}}^{*} be a maximal allocation of I~\tilde{I} such that maxi,i[n](v~1(A~i)v~(A~i))=γ\max_{i,i^{\prime}\in[n]}\left(\tilde{v}^{-1}(\tilde{A}^{*}_{i})-\tilde{v}(\tilde{A}^{*}_{i^{\prime}})\right)=\gamma. We may assume w.l.o.g. that v1(A~1)v1(A~2),,v1(A~n)v^{-1}(\tilde{A}^{*}_{1})\geq v^{-1}(\tilde{A}^{*}_{2}),\dots,v^{-1}(\tilde{A}^{*}_{n}). For each i[n]i\in[n], we construct AiA^{*}_{i} as follows:

  1. 1.

    Let ci:=max{0,v~1(A~1)v~(A~i)}/λtc_{i}:=\lceil\max\{0,\tilde{v}^{-1}(\tilde{A}^{*}_{1})-\tilde{v}(\tilde{A}_{i}^{*})\}/\lambda\rceil\leq t.

  2. 2.

    Let SiS_{i} be any (non-necessarily maximal) IS of size cic_{i} in HH, which exists since HH contains an IS of size tt.

  3. 3.

    Let Ai=A~i{xi,v}vSi{yi,v}v(VHSi)A^{*}_{i}=\tilde{A}^{*}_{i}\cup\{x_{i,v}\}_{v\in S_{i}}\cup\{y_{i,v}\}_{v\in(V_{H}\setminus S_{i})}

Observe that each good in XiYiX_{i}\cup Y_{i} can only belong to AiA^{*}_{i}, and it is obvious that there is no edge between goods in AiA^{*}_{i}. Thus, 𝒜=(A1,,An)\mathcal{A}^{*}=(A^{*}_{1},\dots,A^{*}_{n}) is a valid allocation. To see that this is maximal, note that the goods from YiY_{i} (resp., XiX_{i}) together with type-(iii) edges ensure that no other goods in XiX_{i} (resp., YiY_{i}) can be added to AiA^{*}_{i}. Since at least one good from XiYiX_{i}\cup Y_{i} is picked, type-(iv) edges ensure that no goods in XiYiX_{i^{\prime}}\cup Y_{i^{\prime}} for iii^{\prime}\neq i can be added to AiA^{*}_{i}.

Finally, we argue that 𝒜\mathcal{A}^{*} is EF1. To bound v1(Ai)v^{-1}(A^{*}_{i}), note that v(Ai)=v~(A~i)+ciλv(A^{*}_{i})=\tilde{v}(\tilde{A}^{*}_{i})+c_{i}\lambda. Consider two cases based on cic_{i}.

  • If ci=0c_{i}=0, we have v1(Ai)=v~1(A~i)v~1(A~1)v^{-1}(A^{*}_{i})=\tilde{v}^{-1}(\tilde{A}^{*}_{i})\leq\tilde{v}^{-1}(\tilde{A}^{*}_{1}).

  • If ci>0c_{i}>0, by definition of cic_{i}, we have v(Ai)<v~1(A~1)+λv(A^{*}_{i})<\tilde{v}^{-1}(\tilde{A}^{*}_{1})+\lambda. Thus, v1(Ai)v(Ai)λ<v~1(A~1)v^{-1}(A^{*}_{i})\leq v(A^{*}_{i})-\lambda<\tilde{v}^{-1}(\tilde{A}^{*}_{1}).

Thus, in both cases, we have v1(Ai)v~1(A~1)v^{-1}(A^{*}_{i})\leq\tilde{v}^{-1}(\tilde{A}^{*}_{1}).

On the other hand, for any i[n]i^{\prime}\in[n], the definition of cic_{i^{\prime}} immediately implies v(Ai)v~1(A~1)v(A^{*}_{i^{\prime}})\geq\tilde{v}^{-1}(\tilde{A}^{*}_{1}).

By the two previous paragraphs, 𝒜\mathcal{A}^{*} is EF1.

(NO)

Suppose that HH does not contain an IS of size tt. Consider any maximal allocation 𝒜=(A1,,An)\mathcal{A}=(A_{1},\dots,A_{n}) of II. Notice that the allocation 𝒜~=(A1M~,,AnM~)\tilde{\mathcal{A}}=(A_{1}\cap\tilde{M},\dots,A_{n}\cap\tilde{M}) is maximal w.r.t. I~\tilde{I}. Thus, there exist i,i[n]i,i^{\prime}\in[n] such that v~1(A~i)v~(A~i)γ\tilde{v}^{-1}(\tilde{A}_{i})-\tilde{v}(\tilde{A}_{i^{\prime}})\geq\gamma. Due to type-(iv) edges, at most one of AiX1,,AiXnA_{i^{\prime}}\cap X_{1},\dots,A_{i^{\prime}}\cap X_{n} can be non-empty. Furthermore, type-(ii) edges imply that the non-empty set must correspond to an independent set in HH. From our assumption, this implies |AiX|<t|A_{i^{\prime}}\cap X|<t. As a result,

v1(Ai)v~1(Ai)\textstyle v^{-1}(A_{i})\geq\tilde{v}^{-1}(A_{i}) γ+v~(A~i)\textstyle\geq\gamma+\tilde{v}(\tilde{A}_{i^{\prime}})
=γ+v(Ai)λ|AiX|\textstyle=\gamma+v(A_{i^{\prime}})-\lambda|A_{i^{\prime}}\cap X|
>γ+v(Ai)λt()v(Ai),\textstyle>\gamma+v(A_{i^{\prime}})-\lambda\cdot t\qquad\overset{(\star)}{\geq}v(A_{i^{\prime}}),

where ()(\star) is due to our choice of λ\lambda. Thus, A~\tilde{A} is not EF1. ∎

Refer to caption
Figure 4: Instance II created with n=4n=4 instance given by Proposition 3 for I~\tilde{I}, and 55-vertex 77-edge graph for HH, setting t=3t=3 (note that γ=1,λ=13\gamma=1,\lambda=\frac{1}{3}). The bands in purple represents type-(iv) edges.

.

5 Chore Allocation

In this section, we consider the chore version of our problem, where each agent ii has a monotone non-increasing valuation function viv_{i}, namely, vi(S)vi(T)v_{i}(S)\geq v_{i}(T) for every STMS\subseteq T\subseteq M. An allocation 𝒜=(A1,,An)\mathcal{A}=(A_{1},\dots,A_{n}) is envy-free up to one chore (EF1 for chores) if for every pair of agents i,jNi,j\in N, either Ai=A_{i}=\emptyset, or vi(Ai{c})vi(Aj)v_{i}(A_{i}\setminus\{c\})\geq v_{i}(A_{j}) some cAic\in A_{i} [2, 3]. For identical valuations, it is easy to see that the existence of a maximal EF1 allocation is equivalent for goods and chores. Specifically, an allocation 𝒜\mathcal{A} is envy-free up to one chore under valuation vv if and only if 𝒜\mathcal{A} is envy-free up to one good under valuation v-v. Thus, a maximal allocation that is envy-free up to one chore exists for vv if and only if a maximal allocation that is envy-free up to one good exists for v-v.

Consider the case of two agents with monotone non-increasing valuations. Theorem 1 holds in this case, so we can assume without loss of generality that the agents have identical valuations vv. By combining the discussion above with the fact that v-v is monotone non-decreasing, Theorem 6 guarantees the existence of a maximal EF1 allocation. Moreover, the algorithms presented in Theorems 10, 13 and A remain applicable in this setting.

For three or more agents with monotone non-increasing valuations, there exist instances where a maximal allocation does not exist. In fact, the instances given in Theorem 3 and Proposition 4.1 use an identical valuation vv, and the corresponding instance obtained by replacing vv with v-v yields no maximal allocation that is EF1 for chores. Also, determining whether a maximal EF1 allocation exists or not is NP-hard also for monotone non-increasing valuations. This follows from Theorem 11 since the constructed instance uses an identical monotone non-decreasing valuation.

6 Conclusion

While we give a nearly complete picture of the existence for maximal EF1 allocations for monotone valuations, there are still a few open interesting questions left. First, for n=2n=2, our algorithm (Theorem 10) runs in pseudo-polynomial time for general monotone valuations. Is there a polynomial-time (in m,T(m)m,T(m)) algorithm for this task?

It might also be worthwhile considering special cases, which can result from restricting either the valuations or the graphs. We list a few intriguing cases below.

  • Additive valuations: The existence of maximal EF1 allocation remains open only for the case n=3n=3 since our lower bound in Section 4.1 requires non-additive valuations, but the lower bound for n4n\geq 4 (Figure 3) holds for additive (and identical) valuations.

  • Uniform valuations: All n3n\geq 3 remains open in this case as we are not aware of any lower bound that holds for uniform valuations. We also note that the well-known Hajnal-Szemerédi theorem ([16]) is equivalent to stating that a maximal EF1 allocation exists when the graph has maximum degree at most n1n-1. Thus, a positive answer to the question for arbitrary graphs will significantly generalize the theorem. We make progress on this question by proving the existence on trees (see Appendix B).

  • Restricted Graph Classes: It might also be interesting to study special graph classes, such as bounded degree graphs (as suggested by the above Hajnal-Szemerédi theorem) or trees. Some other interesting graph classes include interval graphs–which was studied by Kumar et al. [21]–and bipartite graphs.

Acknowledgements

This work was partially supported by JST FOREST Grant Numbers JPMJPR20C1. We thank the anonymous IJCAI 2025 for their valuable comments.

References

  • [1] G. Amanatidis, H. Aziz, G. Birmpas, A. Filos-Ratsikas, B. Li, H. Moulin, A. A. Voudouris, and X. Wu. Fair division of indivisible goods: recent progress and open questions. Artificial Intelligence, page 103965, 2023.
  • [2] H. Aziz, I. Caragiannis, A. Igarashi, and T. Walsh. Fair allocation of indivisible goods and chores. Autonomous Agents and Multi-Agent Systems, 36(1):1–21, 2022.
  • [3] U. Bhaskar, A. R. Sricharan, and R. Vaish. On Approximate Envy-Freeness for Indivisible Chores and Mixed Resources. In Proceedings of Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2021), pages 1:1–1:23, 2021.
  • [4] V. Bilò, I. Caragiannis, M. Flammini, A. Igarashi, G. Monaco, D. Peters, C. Vinci, and W. S. Zwicker. Almost envy-free allocations with connected bundles. Games and Economic Behavior, 131:197–221, 2022.
  • [5] A. Biswas, Y. Ke, S. Khuller, and Q. C. Liu. An algorithmic approach to address course enrollment challenges. In Proceedings of 4th Symposium on Foundations of Responsible Computing (FORC 2023), pages 8:1–8:23, 2023.
  • [6] S. Bouveret, K. Cechlárová, E. Elkind, A. Igarashi, and D. Peters. Fair division of a graph. In Proceedings of the 26th International Joint Conference on Artificial Intelligence (IJCAI), pages 135–141, 2017.
  • [7] S. J. Brams and P. C. Fishburn. Fair division of indivisible items between two people with identical preferences: Envy-freeness, Pareto-optimality, and equity. Social Choice and Welfare, 17(2):247–267, 2000.
  • [8] S. J. Brams, M. Kilgour, and C. Klamler. Two-person fair division of indivisible items: An efficient, envy-free algorithm. Notices of the AMS, 61(2):130–141, 2014.
  • [9] S. J. Brams and A. D. Taylor. Fair division: from cake-cutting to dispute resolution. Cambridge University Press, 1996.
  • [10] E. Budish. The combinatorial assignment problem: Approximate competitive equilibrium from equal incomes. Journal of Political Economy, 119(6):1061–1103, 2011.
  • [11] E. Budish, G. P. Cachon, J. B. Kessler, and A. Othman. Course Match: a large-scale implementation of approximate competitive equilibrium from equal incomes for combinatorial allocation. Operations Research, 65(2):314–336, 2017.
  • [12] N. Chiarelli, M. Krnc, M. Milanic, U. Pferschy, N. Pivac, and J. Schauer. Fair packing of independent sets. Algorithmica, 85(5):1459–1489, 2023.
  • [13] D. Foley. Resource allocation and the public sector. Yale Economic Essays, pages 45–98, 1967.
  • [14] G. Gamow and M. Stern. Puzzle-Math. Viking Press, 1958.
  • [15] J. Goldman and A. D. Procaccia. Spliddit: Unleashing fair division algorithms. ACM SIGecom Exchanges, 13(2):41–46, 2014.
  • [16] A. Hajnal and E. Szemerédi. Proof of a conjecture of P. Erdős. Colloq Math Soc János Bolyai, 4:601–623, 01 1970.
  • [17] W.-L. Hsu. A simple test for interval graphs. In Graph-Theoretic Concepts in Computer Science: 18th International Workshop, WG’92 Wiesbaden-Naurod, Germany, June 18–20, 1992 Proceedings 18, pages 11–16, 1993.
  • [18] H. Hummel and M. L. Hetland. Fair allocation of conflicting items. Autonomous Agents and Multi-Agent Systems, 36(1):8, 2022.
  • [19] A. Igarashi and T. Yokoyama. Kajibuntan: a house chore division app. In Proceedings of the 37th AAAI Conference on Artificial Intelligence (AAAI), pages 16449–16451, 2023.
  • [20] R. M. Karp. Reducibility among combinatorial problems. In R. E. Miller and J. W. Thatcher, editors, Proceedings of a symposium on the Complexity of Computer Computations, held March 20-22, 1972, at the IBM Thomas J. Watson Research Center, Yorktown Heights, New York, USA, The IBM Research Symposia Series, pages 85–103, 1972.
  • [21] Y. Kumar, S. Equbal, R. Gurjar, S. Nath, and R. Vaish. Fair scheduling of indivisible chores. In Proceedings of the 23rd International Conference on Autonomous Agents and Multi-Agent Systems (AAMAS), pages 2345–2347, 2024. Extended version available at https://arxiv.org/abs/2402.04353.
  • [22] B. Li, M. Li, and R. Zhang. Fair scheduling for time-dependent resources. In Proceedings of the 34th Annual Conference on Neural Information Processing Systems (NeurIPS), 2021.
  • [23] R. J. Lipton, E. Markakis, E. Mossel, and A. Saberi. On approximately fair allocations of indivisible goods. In Proceedings of the 5th ACM Conference on Electronic Commerce (EC), pages 125–131, 2004.
  • [24] J. W. Moon and L. Moser. On cliques in graphs. Israel Journal of Mathematics, 3:23–28, 1965.
  • [25] H. Steinhaus. Sur la division pragmatique. Econometrica, 17:315–319, 1949.
  • [26] W. Suksompong. Constraints in fair division. ACM SIGecom Exchanges, 19(2):46–61, 2021.

Appendix

Appendix A Two agents and Special Graph Classes

Bipartite Graphs.

For two agents and special graph classes like bipartite graphs, we can find a maximal EF1 and allocation in polynomial time.

Theorem 13.

When there are n=2n=2 agents and GG is bipartite, a maximal EF1 allocation can be found in O(|E|+mT(m))O\left(\left|E\right|+m\cdot T(m)\right) time.

Proof.

Let M1,M2M_{1},M_{2} the two parts of bipartite graphs that v(M1)v(M2)v(M_{1})\geq v(M_{2}); we may assume w.l.o.g. that M1M_{1} contains all vertices of degree zero. The algorithm is simply to run Algorithm 1 with S=M1S=M_{1}. The running time claim is obvious. Meanwhile, since X1,X2M2X_{1},X_{2}\subseteq M_{2}, we have that v(X1),v(X2)v(M2)v(M1)=v(S)v(X_{1}),v(X_{2})\leq v(M_{2})\leq v(M_{1})=v(S). Thus, Lemma 8 guarantees that the algorithm finds an EF1 allocation. ∎

Interval Graphs.

For interval graphs, Kumar et al. [21] proved that a maximal EF1 allocation exists among two agents and can be computed in polynomial time. They extended the idea presented in Figure 1 for path graphs to interval graphs. However, unlike paths, there is an issue that the allocation after the slight change may not be maximal. Kumar et al. addressed this issue by dividing the structure of intervals into five cases, showing that there is a way to amend the allocation to satisfy maximality for each case. However, their proof is technically involved. Here, we provide a simpler proof by utilizing Theorem 6.

{restatable}

theoremIntervalTwo When there are n=2n=2 agents with monotone valuations and GG is an interval graph, a maximal EF1 allocation can be found in O(mlogm+mT(m))O(m\log m+m\cdot T(m)) time.

We consider (generalized) interval scheduling problem as a base.

IntervalScheduling.

Given nn intervals [l1,r1),,[l_{1},r_{1}),\dots, [ln,rn)[l_{n},r_{n}) and an integer c1c\geq 1, find a subset of intervals with maximum size such that no point is covered by more than cc intervals. For simplicity, we assume that l1,r1,,ln,rnl_{1},r_{1},\dots,l_{n},r_{n} are all distinct.

This can be solved by greedy algorithm: First, we sort intervals so that r1<<rnr_{1}<\dots<r_{n}. Then, for i=1,,ni=1,\dots,n in this order, if [li,ri)[l_{i},r_{i}) can be added while satisfying the constraint that each point is covered by at most cc intervals, add this to the current solution.

Let’s understand the structure of greedy solution. Let [l1,r1),,[lk,rk)(r1<<rk)[l^{\prime}_{1},r^{\prime}_{1}),\dots,[l^{\prime}_{k^{\prime}},r^{\prime}_{k^{\prime}})\ (r^{\prime}_{1}<\dots<r^{\prime}_{k^{\prime}}) be any valid solution. For convenience, li,ril^{\prime}_{i},r^{\prime}_{i} for ik+1i\geq k^{\prime}+1 are set to ++\infty. Also, let [l1,r1),,[lk,rk)(r1<<rk)[l^{*}_{1},r^{*}_{1}),\dots,[l^{*}_{k},r^{*}_{k})\ (r^{*}_{1}<\dots<r^{*}_{k}) be the greedy solution.

Lemma 14.

ririr^{*}_{i}\leq r^{\prime}_{i} holds for any i{1,,k}i\in\{1,\dots,k\}.

Proof.

We prove by induction of ii.

  • Base Case (i=1)(i=1): r1r1r^{*}_{1}\leq r^{\prime}_{1} holds, because the greedy algorithm first chooses the interval [li,ri)[l_{i},r_{i}) with the smallest rir_{i}.

  • Induction (i2)(i\geq 2): We assume that r1r1,,ri1ri1r^{*}_{1}\leq r^{\prime}_{1},\dots,r^{*}_{i-1}\leq r^{\prime}_{i-1} holds. Suppose that ri>rir^{*}_{i}>r^{\prime}_{i}. Because each point is covered by at most cc intervals, riclir^{\prime}_{i-c}\leq l^{\prime}_{i} must hold. The assumption ricricr^{*}_{i-c}\leq r^{\prime}_{i-c} implies that riclir^{*}_{i-c}\leq l^{\prime}_{i}, so [l1,r1),,[li1,ri1),[li,ri)[l^{*}_{1},r^{*}_{1}),\dots,[l^{*}_{i-1},r^{*}_{i-1}),[l^{\prime}_{i},r^{\prime}_{i}) is a valid solution. Because of the construction of the greedy algorithm, [li,ri)[l^{\prime}_{i},r^{\prime}_{i}) should have been added before [li,ri)[l^{*}_{i},r^{*}_{i}), a contradiction. Therefore, ririr^{*}_{i}\leq r^{\prime}_{i}. ∎

The above result also implies that the greedy solution is optimal, i.e. kkk\geq k^{\prime}.

Lemma 15.

Consider the interval scheduling problem with c=1c=1. Suppose that [l1,r1),,[lk,rk)[l^{\prime}_{1},r^{\prime}_{1}),\dots,[l^{\prime}_{k},r^{\prime}_{k}) is an optimal solution. Then, for any i{0,,k}i\in\{0,\dots,k\}, [l1,r1),,[li1,ri1),[li,ri),,[lk,rk)[l^{*}_{1},r^{*}_{1}),\dots,[l^{*}_{i-1},r^{*}_{i-1}),[l^{\prime}_{i},r^{\prime}_{i}),\dots,[l^{\prime}_{k},r^{\prime}_{k}) is an optimal solution.

Proof.

The inequality that ri1ri1r^{*}_{i-1}\leq r^{\prime}_{i-1} holds due to Lemma 14, and ri1<lir^{\prime}_{i-1}<l^{\prime}_{i} holds because [li1,ri1)[l^{\prime}_{i-1},r^{\prime}_{i-1}) and [li,ri)[l^{\prime}_{i},r^{\prime}_{i}) do not overlap. Therefore, ri1<lir^{*}_{i-1}<l^{\prime}_{i} holds, so the intervals do not overlap. Also, the number of chosen intervals is kk, so it is an optimal solution. ∎

Algorithm 3 IntervalEF1(G=(M,E),v)\textsc{IntervalEF1}(G=(M,E),v)
1:[l1,r1),,[lm,rm)[l_{1},r_{1}),\dots,[l_{m},r_{m})\leftarrow intervals corresponding to each vertex in GG such that l1,r1,,lm,rml_{1},r_{1},\dots,l_{m},r_{m} are distinct
2:ZZ\leftarrow an optimal solution of IntervalScheduling with c=2c=2 \triangleright Let Z={z1,,zk}Z=\{z_{1},\dots,z_{k}\} to be rz1<<rzkr_{z_{1}}<\dots<r_{z_{k}}
3:Z1{z1,z3,z5,}Z_{1}\leftarrow\{z_{1},z_{3},z_{5},\dots\}
4:Z2{z2,z4,z6,}Z_{2}\leftarrow\{z_{2},z_{4},z_{6},\dots\}
5:if v(Z1)<v(Z2)v(Z_{1})<v(Z_{2}) then swap Z1,Z2Z_{1},Z_{2}
6:end if
7:for zZ2z\in Z_{2} do
8:     if intervals contained in Z1{z}Z_{1}\cup\{z\} do not overlap then
9:         Add zz to Z1Z_{1} and remove zz from Z2Z_{2}
10:     end if
11:end for
12:X1,X2X^{\prime}_{1},X^{\prime}_{2}\leftarrow a “greedy solution” and a “greedy solution from the opposite direction” for Interval Scheduling of intervals in MZ1M\setminus Z_{1} with c=1c=1
13:𝒞1\mathcal{C}_{1}\leftarrow chain of allocations generated by Algorithm 1 setting S=Z1,X1=X1,X2=X2S=Z_{1},X_{1}=X^{\prime}_{1},X_{2}=X^{\prime}_{2}
14:𝒞2\mathcal{C}_{2}\leftarrow a chain of allocations which starts with (Z1,Z2)(Z_{1},Z_{2}) and ends with (Z1,X2)(Z_{1},X^{\prime}_{2})
15:𝒞3\mathcal{C}_{3}\leftarrow a chain of allocations which starts with (X1,Z1)(X^{\prime}_{1},Z_{1}) and ends with (Z2,Z1)(Z_{2},Z_{1})
16:𝒞\mathcal{C}\leftarrow chain of allocations created by concatenating 𝒞2,𝒞1,𝒞3\mathcal{C}_{2},\mathcal{C}_{1},\mathcal{C}_{3} in this order \triangleright 𝒞\mathcal{C} is a gapless chain
17:return any maximal EF1 allocation in 𝒞\mathcal{C}
Proof of Theorem A.

We show that IntervalEF1 returns a maximal EF1 allocation. First, the resulting Z1,Z2Z_{1},Z_{2} meet the following conditions:

  • Z1Z_{1} is maximal in MM. Due to lines 6-8, any zZ2z\in Z_{2} cannot be added to Z1Z_{1}. Also, if zZ(Z1Z2)z\in Z\setminus(Z_{1}\cup Z_{2}) can be added, this contradicts the fact that ZZ is an optimal solution for IntervalScheduling with c=2c=2.

  • v(Z1)v(Z2)v(Z_{1})\geq v(Z_{2}) due to line 5 and monotonicity.

Next, we consider 𝒞1\mathcal{C}_{1}. In Algorithm 1, when SS is sorted, i.e. ls1<rs1<<lsk<rskl_{s_{1}}<r_{s_{1}}<\dots<l_{s_{k}}<r_{s_{k}}, it suffices to regard ptp_{t} as ltl_{t} and qtq_{t} as rtr_{t}.444Note that, for example, the actual ptp_{t} can take the same value even if ltl_{t}’s are different, but it does not affect the construction of X2X_{2} because ties of ptp_{t} can be resolved in any way. Then, X1X_{1} becomes a greedy solution, and X2X_{2} becomes a greedy solution from opposite direction. Hence, the construction of 𝒞1\mathcal{C}_{1} is justified.

Finally, we consider 𝒞3\mathcal{C}_{3}. We use Lemma 15 to construct this chain. We note that both X1X^{\prime}_{1} and Z2Z_{2} are optimal solutions for IntervalScheduling of intervals in MZ1M\setminus Z_{1}.

  • X1X^{\prime}_{1} is an optimal solution because the greedy solution is optimal (Lemma 14).

  • Z2Z_{2} is an optimal solution because otherwise, this would contradict the optimality of ZZ (for IntervalScheduling with c=2c=2).

We use Lemma 15 by setting [l1,r1),,[lk,rk)[l^{\prime}_{1},r^{\prime}_{1}),\dots,[l^{\prime}_{k},r^{\prime}_{k}) to intervals of Z2Z_{2}. We create 𝒞3\mathcal{C}_{3} by arranging the following allocation for i=k,,0i=k,\dots,0 in this order.

({[l1,r1),,[li1,ri1),[li,ri),,[lk,rk)},Z1)(\{[l^{*}_{1},r^{*}_{1}),\dots,[l^{*}_{i-1},r^{*}_{i-1}),[l^{\prime}_{i},r^{\prime}_{i}),\dots,[l^{\prime}_{k},r^{\prime}_{k})\},Z_{1})

They are maximal due to Lemma 15. By symmetry, we can construct 𝒞2\mathcal{C}_{2} in a similar way.

Combining all these facts, 𝒞\mathcal{C} is a gapless chain. Note that 𝒞\mathcal{C} starts with (Z1,Z2)(Z_{1},Z_{2}) and ends with (Z2,Z1)(Z_{2},Z_{1}), where v(Z1)v(Z2)v(Z_{1})\geq v(Z_{2}) is ensured.

Finally, we analyze the running time of the algorithm.

  • Reconstructing [l1,r1),,[lm,rm)[l_{1},r_{1}),\dots,[l_{m},r_{m}) can be done in O(m)O(m) time, due to [17].

  • Obtaining an optimal solution of IntervalScheduling can be done in O(m)O(m) time by the greedy algorithm.

  • Making Z1Z_{1} maximal (lines 6-8) can be done in O(mlogm)O(m\log m) time by using binary search tree.

  • The length of 𝒞\mathcal{C} is at most 3m+13m+1, so it takes O(mT(m))O(m\cdot T(m)) time to find a maximal EF1 allocation among them.

Thus, the algorithm runs in O(mlogm+mT(m))O(m\log m+m\cdot T(m)) time. ∎

Appendix B Uniform Valuations

We consider the case of uniform valuations, i.e., vi(S)=|S|v_{i}(S)=\left|S\right| for all SMS\subseteq M. For such valuations, our problem is closely related to an equitable coloring of a graph, where the number of vertices assigned to each color differs by at most 11. The key difference is that an equitable coloring must be complete—no vertex can remain uncolored—whereas in our problem, we aim to find a maximal equitable (partial) coloring defined as follows.

Given a graph G=(V,E)G=(V,E) and nn\in\mathbb{N}, a maximal equitable nn-coloring is a subpartition (S1,,Sn)(S_{1},\dots,S_{n}) of VV, where S1,,SnVS_{1},\dots,S_{n}\subseteq V, with the following conditions:

  • S1,,SnS_{1},\dots,S_{n} are disjoint.

  • (independence) For any pair of distinct vertices x,ySix,y\in S_{i}, the vertices x,yx,y are not adjacent.

  • (maximality) For every vV(S1Sn)v\in V\setminus(S_{1}\cup\dots\cup S_{n}) and i{1,,n}i\in\{1,\dots,n\}, vv has an adjacent vertex in SiS_{i}.

  • (equitability) maxi[n]|Si|mini[n]|Si|1\max_{i\in[n]}\left|S_{i}\right|-\min_{i\in[n]}\left|S_{i}\right|\leq 1.

Below, we prove that a maximal equitable nn-coloring exists when GG is a tree. It remains an open problem whether this can be extended to all graphs.

Theorem 16.

For every tree T=(V,E)T=(V,E) and every nn\in\mathbb{N}, there exists a maximal equitable nn-coloring of TT.

Proof.

Consider TT as a rooted tree with root rr. We prove a stronger fact that there exists a maximal equitable nn-coloring of TT such that rr is colored with a higher color or is uncolored. Here, for a coloring 𝒮=(S1,,Sn)\mathcal{S}=(S_{1},\dots,S_{n}), we define that color ii is a higher color if |Si|=maxj[n]|Sj||S_{i}|=\max_{j\in[n]}|S_{j}|.

We will prove this by strong induction on the number of vertices of T=(V,E)T=(V,E). The base case |V|=1|V|=1 is trivial.

For the inductive step, consider any tree T=(V,E)T=(V,E) with |V|>1|V|>1 and suppose that the statement holds for all trees with smaller number of vertices. Let r1,,rkr_{1},\dots,r_{k} be the children of rr, and let T1,,TkT_{1},\dots,T_{k} be the subtree of r1,,rkr_{1},\dots,r_{k}, respectively. By the inductive hypothesis, for each ii, there exists a maximal equitable nn-coloring of TiT_{i} where rir_{i} is a higher color or is uncolored; let it be 𝒮(i)=(S1(i),,Sn(i))\mathcal{S}^{(i)}=(S^{(i)}_{1},\dots,S^{(i)}_{n}). Without loss of generality, we assume |S1(i)||Sn(i)||S^{(i)}_{1}|\geq\dots\geq|S^{(i)}_{n}|. We say that TiT_{i} is a singular subtree if 𝒮(i)\mathcal{S}^{(i)} has only one higher color (color 11) and rir_{i} has color 11. Without loss of generality, for some cc, T1,,TcT_{1},\dots,T_{c} are singular subtrees and Tc+1,,TkT_{c+1},\dots,T_{k} are not.

First, we aim to obtain an equitable nn-coloring 𝒮\mathcal{S} of T1TkT_{1}\cup\dots\cup T_{k} in the following way:

  1. 1.

    Initialize 𝒮=(,,)\mathcal{S}=(\emptyset,\dots,\emptyset) and x=0x=0.

  2. 2.

    For i=1,,ki=1,\dots,k, do the following:

    1. (a)

      (S1,,Sn)(S1Snx+1(i),,SxSn(i),Sx+1S1(i),,SnSnx(i))(S_{1},\dots,S_{n})\leftarrow(S_{1}\cup S^{(i)}_{n-x+1},\dots,S_{x}\cup S^{(i)}_{n},S_{x+1}\cup S^{(i)}_{1},\dots,S_{n}\cup S^{(i)}_{n-x}) where the indices of 𝒮(i)\mathcal{S}^{(i)} wrap around to 1 after nn, and,

    2. (b)

      x(x+(number of higher colors in 𝒮(i)))modnx\leftarrow(x+(\text{number of higher colors in $\mathcal{S}^{(i)}$}))\bmod n.

It is not difficult to see that, for every loop just after step 2 (b), colors 1,,x1,\dots,x are higher colors of 𝒮\mathcal{S}, and colors x+1,,nx+1,\dots,n are not (or, when x=0x=0, all colors are higher colors). Also, observe that the algorithm works in a way that r1,,rmin(c,n)r_{1},\dots,r_{\min(c,n)} will have colors 1,,min(c,n)1,\cdots,\min(c,n), respectively, as T1,,Tmin(c,n)T_{1},\dots,T_{\min(c,n)} are singular subtrees.

The problem is that, in order to obtain a coloring of TT, we need to consider vertex rr. We divide it into two cases to solve this issue.

  • (Case 1. cnc\geq n) r1,,rnr_{1},\dots,r_{n} will have colors 1,,n1,\dots,n, respectively. Therefore, rr can be left uncolored, and 𝒮\mathcal{S} is already a maximum equitable nn-coloring of TT.

  • (Case 2. c<nc<n) We aim to color vertex rr with color nn. The case when this cannot be done is that some rir_{i} already has color nn. However, since r1,,rcr_{1},\dots,r_{c} have colors 1,,c(<n)1,\dots,c\ (<n), we know that TiT_{i} is not a singular subtree. So, there is another higher color inside TiT_{i}, say color xx (in the context of coloring 𝒮\mathcal{S}; xnx\neq n must hold). Then, we can swap color xx and color nn inside the entire TiT_{i} — then rir_{i} no longer has color nn, and the number of vertices of each color does not change. We repeat this process until no rir_{i} has color nn. Since color nn is used by the least number of vertices, coloring vertex rr in color nn does not break the equitability condition, and color nn becomes a higher color.

Therefore, we obtained the desired coloring of TT. ∎