Equitability and welfare maximization for allocating indivisible items

We study fair allocations of indivisible goods and chores in conjunction with system efficiency, measured by two social welfare functions, namely utilitarian and egalitarian welfare. To model preference, each agent is associated with a cardinal and additive valuation function. The fairness criteria we are concerned with are equitability up to any item (EQX) and equitability up to one item (EQ1). For the trade-off between fairness and efficiency, we investigate efficiency loss under these fairness constraints and establish the price of fairness. From the computational perspective, we provide a complete picture of the computational complexity of (i) deciding the existence of an EQX/EQ1 and welfare-maximizing allocation; (ii) computing a welfare maximizer among all EQX/EQ1 allocations.


Introduction
Fairness and efficiency are two fascinating goals in resource allocation problems and have been extensively studied in social science, operations research and computer science [5,11,28,36]. It is known that there is a trade-off between fairness and efficiency, i.e., optimization on one notion may lead to bad performance on the other. Such a trade-off motivates theoretical work on quantifying the efficiency loss under fairness constraints [8,19,37] and practical work on balancing fairness and efficiency, such as in GPU cluster [20], organ transplant [10] and transportation [35]. To investigate the relationship between fairness and efficiency, the very first problem is to determine whether there exists a fair allocation that achieves the optimal social welfare. On the one hand, a positive answer dramatically narrows down the search space of the desired allocations, which makes it possible to compute and choose such an allocation in practice efficiently. On the other hand, a negative answer implies that some realistic relaxations on one of or both criteria are needed. For example, when international agencies and organizations distribute aid material to refugees, the assignment needs to not only improve the overall happiness of the refugee group, but also treat every member in the group equally, so as to avoid potential internal conflicts caused by unreasonable distributions. For the distributor, a crucial work is to determine whether there is such a distribution that can maximize the solution to the needs of the refugee group while ensuring that everyone is treated equally. If the distributor knows that the desired assignment exists, she can efficiently find such an allocation by searching the set of maximum welfare allocations.
The underlying fairness notion of this work is equitability that requires all agents to receive the same value in an allocation. Equitability acts as an interpersonal fairness criterion and affects agents' choice and behaviour when facing one-shot distribution problems [23] and voluntary cooperation games [24]. Herreiner and Puppe [31] conduct free-form bargaining experiments to compare interpersonal (equitability) and intrapersonal (envyfreeness) criteria and indicate that interpersonal criterion plays the dominant role and acts as the cognitive fairness more often than envy-freeness. When assigning indivisible items, the existence of an equitable (EQ) allocation is not guaranteed, which motivates us to study two of its realistic relaxations: equitability up to one item (EQ1) and equitability up to any item (EQX). The idea of relaxing equitability through eliminating some specific items is originated by Gourvès et al. [30] in which it is named as "Near Jealousy-Freeness". Freeman et al. [25] formally define the notions of EQX and EQ1 in goods allocation and show that both notions are satisfiable when agents have additive valuations. Then, the existence of EQX and EQ1 is proved by Freeman et al. [26] in chores allocation.
Social welfare or social efficiency is measured by social welfare functions in welfare economics, microeconomic techniques for evaluating well-being at the aggregate level. Given a set of social states, a welfare function can prioritize every possible pair of social states as more desirable and less desirable or indifferent between these two. In this work, we are interested in two typical ethical principles, utilitarianism and egalitarianism, important both in theoretical and practical social decision making [36]. Two corresponding cardinal welfare functions, utilitarian welfare and egalitarian welfare (also known as Rawlsian welfare [34]) are studied. While a utilitarian measures the welfare by the sum of individuals' value, egalitarian welfare is the well-being of the worst-off individual (also known as maximin criterion). In some cases, achieving optimal social welfare may lead to very unfair outcomes, and recent work in fair division concern the interaction between fairness and efficiency by quantifying efficiency under fairness constraints [3,7,19,38] and optimizing welfare in the domain of fair allocations [14,29].
In this work, we consider the problem of allocating indivisible items to several agents and investigate both goods and chores allocations. Although problems under these two settings are similar, results established in one setting do not necessarily hold for the other [15,16,26]. According to Bogomolnaia et al. [14, p. 3], "the results for goods and bads are similar but not mirror images of one another." Therefore, our study on fair allocations together with welfare maximization will be on both settings of goods and chores. In particular, we wish to decide whether there exists a nearly equitable allocation that also achieves the maximum utilitarian or egalitarian welfare, and efficiently compute a welfare maximizer among all nearly equitable allocations.

Related literature
The notion of equitable allocation is originally studied in the cake-cutting problem (a divisible item) and its existence has been proved to be guaranteed by Dubins and Spanier [22]. For indivisible items, Gourvès et al. [30] relax equitability based on the up to one item scheme and prove the existence of this relaxed equitability in the matroid context. The notions of EQX and EQ1 are formally defined by Freeman et al. [25] that study these two fairness criteria together with Pareto efficiency and envy-freeness. They answer the existence and computational complexity of a sequence of related problems. In chores allocation, Freeman et al. [26] also consider EQX and EQ1 together with Pareto efficiency and answer corresponding existence and computation problems. Additional work on equitable allocations imposes connectivity constraints; each item is placed in a vertex of a graph and the bundle received by agents must be connected. Bouveret et al. [18] consider assigning chores in the path, star, and complete graph and establish results on the complexity of the existence of equitable and other fair allocations. None of the above-mentioned work studies these two fairness notions together with another important objective, social welfare.
Study on fairness together with social welfare is considerably intensified recently [8,9,19]. To quantify the efficiency loss under fairness requirements, Caragiannis et al. [19] introduce the price of fairness and study the notion of envy-freeness, proportionality, and equitability in divisible and indivisible goods and chores. In the case of indivisible goods, Bei et al. [7] consider fairness notions whose existences are guaranteed and provide characterizations on their price of fairness. They present lower bound Xð ffiffi ffi n p Þ and upper bound O (n) on the price of envy-free up to one item, and this gap is then closed by Barman et al. [6], who show that the price of envy-free up to one item and of (1/2)-approximate maximin share are both Hð ffiffi ffi n p Þ. When assigning indivisible chores, Sun et al. [38] provide tight results on several fairness notions that are proposed as relaxation of envy-freeness. The notion of the price of fairness is also applied to more practical topics such as kidney exchange [21] and machine scheduling [1,12]. One of the papers closest to ours is Aziz et al. [4], which focuses on the notion of (relaxed) envy-freeness and proportionality. The authors study in the setting of goods the computational complexity of computing fair and welfare-maximizing allocations. They also briefly discuss the adaptability of their approach to other notions of fairness. In addition, the relationship between fairness and social welfare has been recently investigated in the online setting [14,29,39].

Main results
The main contribution of this work is to provide a clear picture of the computational complexity of determining the existence of a nearly equitable allocation that also achieves the maximum social welfare and moreover, the complexity of computing a welfare maximizer among all equitable allocations. We also establish the price of fairness under every pairwise fairness and welfare combination.
On the price of fairness, we have the following main results, which are summarized in Table 1.
-In chores allocation, the price of EQX and of EQ1 with respect to utilitarian and egalitarian welfare are both infinite. -In goods allocation, the price of EQX and of EQ1 with respect to egalitarian welfare are both 1. For utilitarian welfare, if there are two agents, the price of EQX is 3/2 and the price of EQ1 is at least 6/5 and at most ð ffiffi ffi 2 p þ 1Þ=2. For general n agents, the price of EQX and of EQ1 are both at least n À 1 and at most 3n, asymptotically tight HðnÞ.
After quantifying the welfare loss under fair allocations, we investigate relaxed equitability and welfare maximization from the algorithmic perspective. When concerning egalitarian welfare in goods allocation, results on the price of fairness show that there exist EQX and EQ1 allocations that achieve the optimal egalitarian welfare. We then prove that, on the contrary, when assigning chores, deciding the existence of an EQX (resp., EQ1) allocation that also maximizes the egalitarian welfare is strongly NP-hard for general n and NP-hard for fixed n ! 2 (resp., n ! 3). For optimization problems, we show that computing an EQX (or EQ1) allocation with the maximum egalitarian welfare is strongly NP-hard for general n and NP-hard for fixed n ! 2 in both cases of goods and chores. Moreover, in the case of fixed n, we design pseudo-polynomial time algorithms that output an EQX or EQ1 allocation with the maximum egalitarian welfare.
On the other hand, when focusing on utilitarian welfare, the computational complexity in allocating goods and chores is identical. In particular, for general n, every decision or optimization problem is strongly NP-complete and strongly NP-hard, respectively. For fixed n, our results are summarized in Table 2. The first column of Table 2 contains the (decision/ optimization) problem descriptors. We denote by "E(W Â F)" the problem of deciding whether there exists an F allocation that also maximizes W among all allocations, and denote by "C(W/F)" the problem of computing an F allocation that maximizes W among all F allocations. The notion of W refers to the welfare function, and the first row of Table 2 introduces the welfare function under consideration.
Most of the proofs of our results are presented in the main body of the paper, whereas the rest (particularly those with similar arguments) is relegated to the Appendix.

Preliminaries
A fair division instance I ¼ h½n; E; Vi is composed of a set [n] of agents and a set E ¼ fe 1 ; . . .; e m g of m indivisible items, where ½n ¼ f1; . . .; ng for n 2 N þ . Each agent i is associated with a valuation function v i 2 V and v i : 2 E ! R. Given an item e 2 E, we say that e is a good if for every i 2 ½n, v i ðeÞ ! 0 and e is a chore if for every i 2 ½n, v i ðeÞ 0. We consider the situation where all items are either goods or chores and we call I a fair-goods (resp., fairchores) instance if every item is a good (resp., a chore). Throughout the paper, for every i 2 ½n, we assume v i ð;Þ ¼ 0 and function v i ðÁÞ is additive, that is, v i ðSÞ ¼ P e2S v i ðeÞ for any S E. For simplicity, instead of v i ðfe j gÞ, we use v i ðe j Þ to represent the value of item e j on agent i. An allocation A :¼ ðA 1 ; . . .; A n Þ is an n-partition of E among agents, i.e., A i \ A j ¼ ; for any i 6 ¼ j and S i2½n A i ¼ E. Each subset S E also refers to a bundle of items. For any bundle S and k 2 N þ , we denote by P k ðSÞ the set of all k-partition of S, and |S| the number of items in S.

Social welfare functions
Utilitarian welfare is defined as the sum of individuals' values, and egalitarian welfare is equal to the value of the worst-off agents. Formally, we have the following two definitions. Definition 2.1 Given an allocation A, the utilitarian welfare (UW) of A is defined as Definition 2.2 Given an allocation A, the egalitarian welfare (EW) of A is defined as Among all allocations, we are interested in the one that has the maximum social welfare and such an allocation is also called a welfare maximizer.

Definition 2.3 An allocation
A is said to be a utilitarian welfare maximizer (UWM) and a egalitarian welfare maximizer (EWM) if it has the maximum utilitarian welfare and maximum egalitarian welfare, respectively.

Fairness criteria
We study equitable allocations and two of its relaxations. When presenting the definition of approximately equitable allocations, we distinguish between the case of goods and chores.

Price of fairness
The price of fairness (PoF) quantifies the loss of economic welfare when enforcing allocation fairness. For allocation of goods, PoF is the supremum ratio over all problem instances between the maximum welfare of all allocations and maximum welfare of all fair allocations. In the case of chores, PoF is the supremum ratio over all problem instances between the maximum welfare of all fair allocations and maximum welfare of all allocations. The price of fairness has been applied to quantify the welfare loss under fairness requirements in both settings of goods [3,7,19] and chores [19,32,33]. Following previous studies [7,19,33], we assume agents' valuation functions are normalized 1 to 1 in the case of goods and À1 in the case of chores (only) when we are concerned with the price of fairness. Given an instance I and a welfare function W 2 fEW; UWg, denote by OPT W ðI Þ the maximum welfare with respect to W over all allocations of instance I . Moreover, given a fairness criterion F and an instance I , denote by FðI Þ the set of all allocations of instance I satisfying fairness criterion F. Definition 2.7 Given a fair-goods instance I, for any fairness criterion F and welfare function W, the price of F with respect to W is defined as In the case of chores, swap the positions of the numerator and denominator.
In the above definition, we apply the following convention for the case where the maximum welfare of a fair-chores instance is equal to zero: if some fair allocation can achieve welfare zero, then the price of fairness is 1; otherwise, the price of fairness is infinite. The price of fairness with respect to fairness notion F is also called price of F, i.e., price of EQ1 and price of EQX.

Results on price of fairness
We start with studying the price of fairness for every possible pair of welfare function and fairness criterion, which also answers the question of the existence of a nearly equitable allocation that approximates a welfare maximizer. Intuitively, if the price of fairness with respect to fairness criterion F and welfare function W is 1, then in any instance I , there exists an F allocation that achieves OPT W ðI Þ.

With respect to egalitarian welfare
First we are concerned with egalitarian welfare in both cases of goods and chores, and provide tight results that also reveal differences between goods and chores allocation. Freeman et al. [25] state that leximin 2 implies EQX in allocating goods when agents have a strictly positive value on every item, while leximin fails to guarantee EQX when some items are valued at 0. Below, we prove that EQX (or EQ1) is compatible with optimal egalitarian welfare, even dropping the requirement of strictly positive values of all items.
Theorem 3.1 When allocating goods, the price of EQX and of EQ1 with respect to egalitarian welfare are both equal to 1.
Proof Since EQX is stricter than EQ1, it suffices to show the statement holds for EQX. We explicitly construct such an allocation A ¼ ðA 1 ; . . .; A n Þ as follows.
A first maximizes the egalitarian welfare among all allocations. If there is a tie, A minimizes the number of agents who receive the value EWðAÞ, and subject to that, maximizes the total number of items assigned to all agents who receive the value EWðAÞ.
By construction, it is straightforward to see that A is an egalitarian-welfare maximizing allocation. If allocation A is EQX, then clearly the theorem statement holds. Next, we focus on the case where A is not EQX. Without loss of generality, assume v 1 A 1 ð Þ Á Á Á v n ðA n Þ. Note that if v 1 A 1 ð Þ!v j ðA j nfegÞ holds for all j and e 2 A j with v j ðeÞ [ 0, then allocation A is EQX, a contradiction. Thus, agent 1 must violate EQX. Let J be the set of agents such that agent 1 violates EQX when compare to agent j 2 J . For each j 2 J , order goods as A j ¼ e j1 ; . . .; e j jA j j n o with v j e jk À Á v j e jkþ1 À Á . We claim that v j e j1 À Á [ 0 holds; otherwise, reassigning e j1 to agent 1 results in another allocation satisfying one of the following properties: (1) the egalitarian welfare is larger than EWðAÞ; (2) the number of agents receiving the value EWðAÞ is one less than that of A; (3) the total number of items assigned to all agents with the value EWðAÞ is one more than that of A. For each j 2 J , since agent 1 violates EQX when comparing to agent j, it holds that v 1 A 1 ð Þ\v j A j n e j 1 È É À Á , and accordingly, there exists an index l ! 1 such that We then refer bundle fe j1 ; . . .; e jl g as S j , and clearly, for each j 2 J , one can construct the corresponding non-empty set S j . Moreover, we claim that v 1 ðS j Þ ¼ 0 for each j 2 J ; otherwise, reassigning S j to agent 1 results in another allocation that either has egalitarian welfare larger than EWðAÞ or has one less agent receiving the value EWðAÞ than that of A. We then consider Due to the construction of J and fS j g j2J , allocation A 0 achieves the optimal egalitarian welfare, and moreover, the number of agents receiving the value EWðAÞ in A 0 is the same as that of A. However, in allocation A 0 , the total number of items assigned to all agents who receive value EWðAÞ is P j2J jS j j more than that of A, which contradicts the definition of allocation A as S j is non-empty for each j 2 J . Therefore, allocation A must satisfy EQX. h We remark that the allocation A constructed in the proof of Theorem 3.1 is not necessarily leximin. To see this, consider Example 1 in Freeman et al. [25]. There are three agents and a set E ¼ fe 1 ; . . .; e 6 g of six goods. The goods e 1 ; e 2 ; e 3 are valued at 1 by agent 1 and 0 by agents 2 and 3. The goods e 4 ; e 5 ; e 6 are valued at 1 by agents 2 and 3 and at 0 by agent 1. In the constructed allocation, one of e 1 ; e 2 ; e 3 is assigned to agent 2 or agent 3, so that the total number of items received by the agents with value 1 is maximized. However, in leximin allocations, all e 1 ; e 2 ; e 3 must be assigned to agent 1. Proof Note that EQX is stricter than EQ1, and it suffices to prove the statement for EQ1. Let us consider a fair-chores instance with n ! 2 agents and a set E ¼ fe 1 ; . . .; e mþ1 g of m þ 1 chores with m ! n. The valuations are shown in Table 3, where V [ 0 is arbitrarily large.
Since V is arbitrarily large, we have Àm=V [ À 1=m þ 1=ð2mV Þ, and so, the unique EWM assigns the first m items to agent 1 and e mþ1 to any agent i with i ! 2, yielding the maximum egalitarian welfare Àm=V . But in this allocation, agent 1 violates EQ1 because she still receives less value even eliminating one chore from her bundle. Then, to achieve EQ1, agent 1 cannot receive all the first m items, and thus, the egalitarian welfare of an EQ1 allocation is at most À1=m þ 1=ð2mV Þ, based on which the price of EQ1 is at least V =m 2 À 1=ð2 m 2 Þ that approaches to positive infinity as V ! þ1. h According to Theorems 3.1 and 3.2, in goods allocation, both EQX and EQ1 are compatible with EWM, while in chores allocation, achieving EQX or EQ1 sacrifices most of the egalitarian welfare.

With Utilitarian welfare
On utilitarian welfare, we establish the price of fairness for each of EQX and EQ1. A sharp contrast between goods and chores is also revealed by the results below. Specifically, EQX/ EQ1 allocations can provide a bounded welfare guarantee relative to the optimal one in goods allocation, while in the case of chores, the price of fairness is infinite.
Theorem 3.3 When allocating chores, the price of EQX and of EQ1 with respect to utilitarian welfare are both infinite.
Proof Note that EQX is stricter than EQ1, and so it suffices to prove that the statement holds for EQ1. Again, we consider the instance constructed in the proof of Theorem 3.2.
Since V is arbitrarily large, we have À1=V [ À 1=m þ 1=ð2mV Þ and À1=ð2V Þ [ À 1 þ m=V , and as a consequence, in a UWM allocation, the first m items are assigned to agent 1 and e mþ1 is assigned to agent i with i ! 2, yielding the maximum utilitarian welfare Àð2m þ 1Þ=ð2V Þ. But in such an allocation, agent 1 violates EQ1 because she still receives less value even eliminating one chore from her bundle. Then, to achieve EQ1, agent 1 cannot receive all the first m items, and thus, the utilitarian welfare of an EQ1 allocation is at most À1=m þ 1=ð2mV Þ, based on which the price of EQ1 is at least ð2V À 1Þ=ð2 m 2 þ mÞ ! þ1 as V ! þ1. h When moving to the case of goods, we distinguish between two cases: n ¼ 2 and general n ! 3, and provide (asymptotically) tight results on the price of fairness.
Theorem 3.4 When allocating goods to two agents, the price of EQX with respect to utilitarian welfare is equal to 3/2.
Proof In the proof of Theorem 3.1, we show that, for any instance I , there exists an EQX allocation achieving the maximum egalitarian welfare. Let A be such an EQX allocation, and without loss of generality, assume v 1 ðA 1 Þ v 2 ðA 2 Þ. Thus, the maximum egalitarian welfare is v 1 ðA 1 Þ and the maximum utilitarian welfare is at most 1 þ v 1 ðA 1 Þ. Consider another allocation A 0 with A 0 1 ¼ A 2 and A 0 2 ¼ A 1 . Since A achieves the maximum egalitarian welfare, we must have v 1 A 1 ð Þ! min v 1 ðA 2 Þ; v 2 ðA 1 Þ f g , and accordingly, v 1 ðA 1 Þ ! v 2 ðA 1 Þ implies v 1 A 1 ð Þ þ v 2 ðA 2 Þ ! 1 due to the normalized valuations; v 1 ðA 1 Þ ! v 1 ðA 2 Þ also implies v 1 ðA 1 Þ þ v 2 ðA 2 Þ ! 1 due to v 1 ðA 1 Þ v 2 ðA 2 Þ and the normalized valuations. Hence, we have UWðAÞ ! maxf2v 1 ðA 1 Þ; 1g. Recall that the maximum utilitarian welfare of I is at most 1 þ v 1 ðA 1 Þ, then for any 0 v 1 ðA 1 Þ 1, we have For the lower bound, let us consider a fair-goods instance with two agents and a set E ¼ fe 1 ; e 2 ; e 3 g of three goods. The valuations are shown in Table 4, where [ 0 is arbitrarily small. A utilitarian welfare-maximization allocation assigns e 1 to an arbitrary agent and e 2 ; e 3 to agent 1 and agent 2, respectively, which leads to an optimal utilitarian welfare 3=2 À 2. But in such allocations, the agent who does not receive e 1 violates EQX, and so, in any EQX allocations, one agent only receives e 1 and the other agent receives the rest two goods, yielding utilitarian welfare exactly 1. Therefore, the price of EQX is at least 3=2 À 2 ! 3=2 as ! 0. h Before we state our result on the price of EQ1 in Theorem 3.5, we first present Algorithm 1, which uses Algorithm 2 as a subroutine and outputs an EQ1 allocation with utilitarian welfare guarantee at least 2=ð ffiffi ffi 2 p þ 1Þ times the maximum one. Intuitively, given a fairgoods instance I, Algorithm 1 first checks whether a specific partial allocation, in which some items are assigned to the agent having the larger value, can be extended to an EQ1 allocation. If yes, it implements Algorithm 2, a subroutine where in each turn, let the agent with the smallest current value pick the item of the highest value from the remaining, and makes the partial allocation a complete EQ1 allocation with the maximum utilitarian welfare. If the answer is no, to achieve EQ1, Algorithm 1 carefully reassigns some items from the bundle of the agent with the larger value to the other agent, while avoiding as much welfare loss as possible. For simplicity, in the description of Algorithm 1 and its proof we write LðkÞ :¼ fe 1 ; . . .; e k g and RðkÞ :¼ fe k ; . . .; e m g for any k 2 ½m.
Lemma 3.1 Algorithm1 always terminates and returns an EQ1 allocation.
Proof If the condition of Step 2 in Algorithm 1 holds, then clearly Algorithm 1 terminates and allocation A is returned by Greedy with partial assignment ðE 1 ; E 2 Þ. For any i 2 ½2, let When Algorithm 1 goes to Step 5, since valuations are normalized and v 2 ðe 0 Þ ¼ 0, the existence of f is guaranteed. According the order and index s, we have E 2 ¼ LðsÞ and E 0 [ E 1 ¼ Rðs þ 1Þ. Moreover, we can assume without loss of generality s ! 2 because the condition of Step 2 would hold if Þ holds, and this relationship satisfies the condition of Step 2, a contradiction. Thus, it must hold that f s À 2. We then prove that allocation A constructed by Step 9 is EQ1. For agent 1, she would not violate EQ1 since v 1 ðA 1 Þ ¼ v 1 ðRðf þ 2ÞÞ ! v 2 ðLðf ÞÞ ¼ v 2 ðA 2 nfe f þ1 gÞ. As for agent 2, since f þ 1 s À 1 and f þ 1 is not chosen by Step 8, then we have v 2 ðLðf þ 1ÞÞ [ v 1 ðRðf þ 3ÞÞ, equivalent to v 2 ðA 2 Þ [ v 1 ðA 1 nfe f þ2 gÞ. Thus, agent 2 also satisfies EQ1. h Theorem 3.5 When allocating goods to two agents, the price of EQ1 with respect to utilitarian welfare is at least 6/5, and at most ð ffiffi ffi 2 p þ 1Þ=2.
Proof We start from the upper bound and consider the allocation A returned by the Algorithm 1. Based on Lemma 3.1, it suffices to show that the UWðAÞ is at least 2=ð ffiffi ffi 2 p þ 1Þ times the maximum utilitarian welfare. If allocation A is returned by Step 3 of Algorithm 1, according to Greedy, we have E i A i for any i 2 ½2, which implies UWðAÞ equals to the optimal utilitarian welfare. We then consider the case where A is created by Step 9. Denote by O ¼ ðO 1 ; O 2 Þ an allocation with maximum utilitarian welfare. Clearly, E i O i for any i 2 ½2. Then, due to index order in Step 5 and f s À 2, it holds that which then implies the following Then, we have the following: and equivalently, We observe that the right hand side is actually a function with two variables v 1 ðO 1 Þ; v 2 ðO 2 Þ, and for simplicity, corresponds to the right hand side of the above inequality, then we have its derivatives with respect to y, We then let gðx; yÞ ¼ ð1 þ xÞy 2 þ 2ðx 2 À xÞy þ x 3 À x 2 , and its partial derivative with respect to y is The root of equation og=oy ¼ 0 is y ¼ xÀx 2 1þx and inequality xÀx 2 1þx \x consistently holds for any x 2 ½0; 1Þ. Thus, for any x 2 ½0; 1Þ, function g(x, y) is monotonically increase on y. Accordingly, we have the following: It is not hard to verify that gðx; yÞ ! 0 consistently holds, which implies that, for any x 2 ½0; 1Þ, f(x, y) is a monotonically increasing function of y. Then, to find the maxima of f (x, y), we substitute y ¼ 1, then by simple calculation, the maximum value of f(x, 1) is equal to ð ffiffi ffi 2 p þ 1Þ=2 which happens when x ¼ ffiffi ffi 2 p À 1, completing the proof for upper bound. As for the lower bound, let us consider a fair-goods instance with two agents and a set E ¼ fe 1 ; e 2 ; e 3 g of three items. The valuations are shown in Table 5 ð Þ\v 1 ðO 1 nfegÞ for any e 2 O 1 . Thus, in any EQ1 allocations, agent 1 can not receive both e 2 ; e 3 , which means the welfare loss of EQ1 allocations is at least 1=4 À . And one can verify that A 0 with A 0 1 ¼ fe 3 g and A 0 2 ¼ fe 1 ; e 2 g is an EQ1 allocation with UWðA 0 Þ ¼ 5=4 À . Therefore, regarding utilitarian welfare, we have Price of EQ1 ! which completes the proof. h We now consider the case of general n ! 3 and provide asymptotically tight results. Before stating the main result, we first present several lemmas. The following lemma provides a sufficient condition for extending a partial allocation into a complete EQX allocation.
Lemma 3.2 Given a fair-goods instance I and a partial allocation A 0 of I, if allocation A 0 is EQX and for any i with A 0 Proof For the sake of contradiction, we assume that A is not EQX. Without loss of generality we assume v 1 ðA 1 Þ Á Á Á v n ðA n Þ and agent 1 violates EQX when comparing to agent k, i.e., max Denote by e ðkÞ the last item received by agent k in Greedy and A ðkÞ the partial allocation right before agent k receiving item e ðkÞ , i.e., guarantee v k ðe ðkÞ Þ v k ðeÞ for any e 2 A k . Accordingly, we have max e2A k v k ðA k nfegÞ ¼ v k ðA ðkÞ k Þ v 1 ðA 1 Þ, contradicting the assumption that agent 1 violates EQX when comparing to agent k.
which again contradicts the assumption that agent 1 violates EQX when comparing to agent k. h In the following, we propose algorithm ALG 3 , which efficiently computes an EQX allocation that also has an absolute welfare guarantee. The ALG 3 first assigns one large item, with value at least 1/(3n), to as many agents as possible, and at the same time, maximizes the welfare of the partial allocation. This is achieved by computing a maximum-weight matching of a bipartite graph. Then, it carefully assigns a bundle to every unmatched agent so that each of them receives value at least 1/(3n), while maintaining the partial allocation being EQX. At last, the remaining goods are assigned to agents by running algorithm Greedy. In what follows we formally prove that ALG 3 can efficiently output an EQX allocation with the desired utilitarian welfare guarantee. Proof We first consider the case where allocation A is returned in Step 4 of ALG 3 . For this case, allocation B is the partial allocation established based on matching l and hence jB i j 1 for i 2 ½n. Observe that allocation A is returned by Greedy ðB; IÞ, and thus, B i A i for any i 2 ½n. Consequently, we have UWðAÞ ! UWðBÞ ! 1=3. What remains to be shown is that allocation A is EQX. Notice that jB i j ¼ 1 for each matched agent i 2 N 0 and B i ¼ ; , then by matching i to the corresponding vertex of e and keeping other matched pair in l, one can find another matching l 0 with a weight larger than that of l, a contradiction. Thus, for every i with B i 6 ¼ ;, it holds that v i ðB i Þ ! max e2EnE 0 v i ðeÞ. According to Lemma 3.2 and the fact that B is EQX, we conclude that allocation A is EQX. Now consider the case where allocation A is not returned in Step 4 of ALG 3 and hence UWðBÞ\1=3. Clearly, not all agents are matched in l. Since l is a maximum-weight matching, for any i 2 ½nnN 0 and e 2 EnE 0 , we have v i ðeÞ\1=ð3nÞ. Moreover, even if v i ðe 0 Þ ! 1=ð3nÞ for some e 0 2 E 0 and e 0 ¼ lði 0 Þ, it must hold that v i ðe 0 Þ v i 0 ðe 0 Þ. Accordingly, for each i 2 ½nnN 0 , we have v i ðE 0 Þ UWðBÞ and thus, v i ðEnE 0 Þ [ 1 À UWðBÞ [ 2=3. We then prove that every agent i 2 ½n n N 0 can receive a bundle S i in the while-loop of ALG 3 , which is equivalent to showing that the value of the remaining items for agent i is always at least 1/(3n). Consider an arbitrary point where the while-loop starts with remaining items E 0 and agents N 0 . For each j 2 ½nnðN 0 [ N 0 Þ and i 2 N 0 , it must hold that v i ðS j Þ\2=ð3nÞ; otherwise, at the time when agent j receives a bundle, there exists a subset S Ã (S j such that v i ðS Ã Þ [ 1=ð3nÞ and v i ðS Ã nfegÞ\1=ð3nÞ for all e 2 S Ã , and thus, instead of agent j, the algorithm assigns a bundle to agent i, a contradiction. Consequently, for each i 2 N 0 , we have where the last transition is due to jN 0 j ! 1. Thus, every agent i 2 ½n n N 0 is able to receive a bundle that satisfies the conditions described in Step 8.
With a slight abuse of notations, we now let B be the partial allocation when the whileloop ends. Clearly, we have v i ðB i Þ ! 1=ð3nÞ for every i 2 ½n, which implies UWðBÞ ! 1=3. Since allocation A is computed by Greedy with input B, it then holds that UWðAÞ ! UWðBÞ ! 1=3. In order to prove that allocation A is EQX, we use Lemma 3.2. We first claim that allocation B satisfies EQX. For each agent i 2 ½n, when comparing to agent j 2 N 0 , it does not violate EQX as jB j j ¼ 1, and when comparing to agent j 2 ½nnN 0 , agent i also satisfies EQX because v i ðB i Þ ! 1=ð3nÞ [ max e2Bj v j ðB j nfegÞ. Thus, allocation B is EQX. As for the remaining condition, for any for some e 2 B i , then at the moment when agent i is chosen in Step 9 and bundle S i is constructed, bundle S i [ fe 0 g n feg is also a candidate and has the same size as jS i j but with value strictly larger than v i ðS i Þ. Thus, instead of S i , bundle S i [ fe 0 g n feg would be assigned to agent i, a contradiction. Therefore, based on Lemma 3.2, we can conclude that allocation A is EQX and has welfare UWðAÞ ! 1=3.
As for time complexity of ALG 3 , since the maximum-weight matching can be computed efficiently, ALG 3 clearly finishes in polynomial time.
h Now, we are at the stage to present and prove the main statement on the price of EQX and of EQ1 with respect to utilitarian welfare.
Theorem 3.6 When allocating goods to n agents, the price of EQ1 and of EQX with respect to utilitarian welfare are at least n À 1 and at most 3n, asymptotically tight HðnÞ.
Proof We start from the upper bound. According to Lemma 3.3, there exists an EQX allocation with welfare at least 1/3. Due to the normalized valuations, the optimal utilitarian welfare is at most n, and thus, the price of EQX is at most 3n. This upper bound also holds for the price of EQ1 as the notion of EQX is stricter than EQ1. As for the lower bound, it suffices to prove that the statement holds for EQ1. Let us consider a fair-goods instance I with n agents and a set E ¼ fe 1 ; . . .; e ðnÀ2Þpþ1 g of ðn À 2Þp þ 1 goods where p 2 N þ is arbitrarily large. For agent i 2 ½n À 2, her valuation function is: v i ðe j Þ ¼ 1=p if ði À 1Þp þ 1 j ip and v i ðe j Þ ¼ 0 for other j. Both agents n À 1 and n value e ðnÀ2Þpþ1 at 1 and other items at 0. In a utilitarian welfare-maximizing allocation O, bundle O i ¼ fe ðiÀ1Þpþ1 ; . . .; e ip g is assigned to agent i for all i 2 ½n À 2. One of agents n À 1 and n receives e ðnÀ2Þpþ1 , which leaves the other receiving an empty set. The optimal utilitarian welfare equals UWðOÞ ¼ n À 1. Note that the agent receiving an empty set violates EQ1 in O when comparing to every agent i 2 ½n À 2. To achieve EQ1, each agent i 2 ½n À 2 can receive at most one of the goods on which she has non-zero value, and accordingly, the welfare of an EQ1 allocation is at most 1 þ ðn À 2Þ=p. Therefore, regarding utilitarian welfare, we have which completes the proof. h According to Caragiannis et al. [19], when assigning indivisible goods, the price of EQ is infinite for general n and two for the case of n ¼ 2. From our results, the prices of EQX and EQ1 are smaller than that of EQ in both cases of general n and two agents. Moreover, the price of EQX is greater than that of EQ1 when n ¼ 2. Such observations confirm an intuition in stating that if one relaxes the fairness requirement, then less welfare would be sacrificed. Equitability aims to reduce the difference between agents' value, while utilitarianism may lead to unbalanced outcomes. This intuition suggests that approximately equitable allocations may have a poor performance in guaranteeing utilitarian welfare, and Theorems 3.3 and 3.6 can be evidence for this intuition. Egalitarianism also aims for "balancing" agents' value, and accordingly, equitability is highly likely to have a considerable guarantee on egalitarian welfare. However, while Theorem 3.1 confirms this guess in goods allocation, Theorem 3.2 states that the price of EQ1 with respect to egalitarian welfare is infinite in the case of chores. We believe the reason behind is that in the case of chores, agents' value are balanced around zero, and the price of fairness as the ratio of two negligible numbers can be enormous.

Results on computational complexity
Results on the price of fairness not only quantify the efficiency loss under fairness constraints but also can derive answers to the existence of a welfare maximizer that is also fair. In particular, our results on the price of fairness suggest that relaxed equitability is not always compatible with utilitarian welfare in either goods or chores and not always compatible with egalitarian welfare in chores allocation. These impossibilities motivate two crucial follow-up algorithmic problems, i.e., given an instance, whether one can efficiently determine the existence of fair and welfare-maximizing allocations and whether one can efficiently compute the allocation with maximum welfare among the set of fair allocations. In this section, we settle the computational complexity of these two algorithmic problems.
We introduce some notation for ease of reference to a problem. For a fairness criterion F 2 fEQX; EQ1g and welfare objective W 2 fUW; EWg, denote by "E(W Â F)" the problem of deciding whether there exists an F allocation that also maximizes W, and denote by "C(W/F)" the problem of computing an F allocation that maximizes W among all F allocations. For example, E(UWÂEQX) refers to the problem of deciding the existence of an EQX allocation that also maximizes utilitarian welfare, and C(EW/EQ1) denotes the problem of computing an EQ1 allocation that maximizes the egalitarian welfare among all EQ1 allocations.
To establish (strong) NP-hardness, we provide polynomial time reductions from two well-known problems; that is, 3-PARTITION and PARTITION, described as below. According to Garey and Johnson [27], the problem 3-PARTITION is strongly NP-complete, and the problem PARTITION is NP-complete.
3-PARTITION: given a non-empty finite set B ¼ fb i : i 2 I ¼ f1; . . .; 3 mgg of 3 m positive integers and another positive integer T such that T =4\b i \T =2 for any i 2 ½3 m and P i2I b i ¼ mT , can I be partitioned into m disjoint subsets I 1 ; . . .; I m such that PARTITION: given a non-empty finite set P ¼ fp i : i 2 I ¼ f1; . . .; mgg of m positive integers such that P i2I p i ¼ 2T , can I be partition into two disjoint subsets I 1 ;

Non-equivalence between goods and chores
As we already mentioned, the results for goods and chores are not mirror images of one another, which is supported by our results on the price of fairness. Before diving deep into studying the complexity, we argue that even being restricted to the algorithmic problems we are concerned with, the chores problem may not be equivalent to the corresponding goods version, neither do the other direction. Proof For the sake of contradiction, assume such a mapping f exists. We first consider instance I c 1 ¼ h½2; E 1 ; V 1 i with two agents and three items It is not hard to verify that I c 1 admits an unique UWM, in which agent 1 violates fairness criterion F. Accordingly, no UWM of I c 1 satisfies F. We then consider the corresponding fair-goods instance I g Due to the definition of mapping f, it must hold that instance I g 1 does not admit F and utilitarian welfare-maximizing allocations, either. Next, we discuss the several cases classified by the possible relationship among f ðÀ1Þ; f ðÀ1=2Þ and f(0).
If f ðÀ1Þ ! maxff ðÀ1=2Þ; f ð0Þg, then assigning e 1 1 ; e 1 2 to agent 2 and e 1 3 to agent 1 results in an F allocation that is also a UWM, a contradiction.
If f ðÀ1=2Þ [ f ðÀ1Þ ! f ð0Þ, we consider another fair-chores instance . . .; e 2 6 g and its corresponding fair-goods instance If f ð0Þ [ f ðÀ1=2Þ ! f ðÀ1Þ, for instance I g 1 , assigning e 1 1 ; e 1 2 to agent 1 and e 1 3 to agent 2 leads to a UWM that also satisfies F. This contradicts the fact that I c 1 does not have an F and utilitarian welfare-maximizing allocation. If . . .; e 3 5 È É and its corresponding fair-goods instance and v 3 2 ðe 3 5 Þ ¼ 0. It is not hard to verify that any UWM of I c 3 satisfies fairness criterion F. But in a UWM of I g 3 , agent 1 has value 3f ð0Þ þ f ðÀ1Þ and agent 2 has value f(0). Hence, agent 2 violates F in the unique UWM of I g 3 , and consequently, instance I g 3 does not admit a UWM that also satisfies F, a contradiction.
Overall, no possible relationship among f ðÀ1Þ; f ðÀ1=2Þ and f(0) can make such a mapping f exist, completing the proof. h The above assertion indicates that a fair-chores instance can not be transformed to a fairgoods instance by a unified mapping on valuations so that two instances admit the same answer to the question of whether there exists a UWM that also satisfies the notion of F. This statement, together with the price of fairness with respect to egalitarian welfare, motivates us to study the complexity of the existence and optimization problem from both goods and chores perspectives.

Computational complexity with variable number of agents
We first consider the case of general n agents and study the utilitarian welfare. For the problem of deciding the existence of an EQX and utilitarian welfare-maximizing allocation, we establish the strong NP-hardness in both goods and chores. For some statements, we present the proof regarding chores after the statement, while that for goods is in Appendix A.  Table 6.
It is not hard to verify that an allocation is a UWM if and only if the first 3m chores are assigned to the first m agents and the last two chores are assigned to agent m þ 1.
Suppose we have a "yes" instance of 3-PARTITION, and let I 1 ; . . .; I m be a solution. Then, consider the allocation A with A i ¼ S j2Ii e j for any i 2 ½m and A mþ1 ¼ fe 3 mþ1 ; e 3 mþ2 g. It is straightforward to see that allocation A has the maximum utilitarian welfare. As for the fairness requirement, since v i ðA i Þ ¼ ÀT for any i 2 ½m and v mþ1 ðA mþ1 Þ ¼ À2T , none of the first m agents would violate the condition of EQX. Moreover, for any e 2 A mþ1 , we have v mþ1 ðA mþ1 nfegÞ ¼ v i ðA i Þ for any i 2 ½m. Thus, allocation A is a UWM and satisfies EQX. Now we prove the other direction. Suppose we have a "no" instance of 3-PARTITION. Notice that in any UWM, agent m þ 1 receives value À2T . Because it is a "no" 3-PAR-TITION instance, assigning the first 3m chores to the first m agents always results in an allocation in which at least one agent receives value strictly larger than ÀT . Through the comparison between agent m þ 1 and the agent receiving the largest value, agent m þ 1 violates the condition of EQX in any UWM, completing the proof. h For the notion of EQ1, the strong NP-hardness on the decision problem is also established for both goods and chores. When concerning egalitarian welfare, results are different under these two settings. According to Theorem 3.1, the price of EQX and of EQ1 with respect to egalitarian welfare are both 1 in goods allocation, which implies that the existence of a goods allocation that is an EWM and also satisfies EQX (or EQ1) is guaranteed. Then, the answer to both problems E(EWÂEQX) and E(EWÂEQ1) is "yes" in the case of goods; however, finding the egalitarian welfare-maximizing allocation that satisfies EQX (or EQ1) is computationally hard as shown in our Theorem 4.15 later. On the other hand, when assigning chores, as shown by the results below, deciding the existence of an EQX and egalitarian welfare-maximizing allocation is computationally intractable. Proof Given an arbitrary instance of 3-PARTITION, we construct a fair-chores instance as follows. There are m þ 1 agents and a set E ¼ fe 1 ; . . .; e 3mþ2 g of 3m þ 2 chores. The valuation functions are shown in Table 7. Consider an allocationÂ withÂ i ¼ fe 3iÀ2 ; e 3iÀ1 ; e 3i g for i 2 ½m and A mþ1 ¼ fe 3 mþ1 ; e 3 mþ2 g. Due to T =4\b i \T =2, we have EWðÂÞ [ À 3T =2, so that the maximum egalitarian welfare of this instance is larger than À3T =2. Thus, in any EWM, agent m þ 1 must receive exactly the last two chores, resulting in value ÀT À 1 for her. Suppose we have a "yes" instance of 3-PARTITION, and let I 1 ; . . .; I m be a solution. Then, consider allocation A with A i ¼ S j2I i e j for i 2 ½m and A mþ1 ¼ fe 3 mþ1 ; e 3 mþ2 g. One can compute EWðAÞ ¼ ÀT À 1. Since agent m þ 1 must receive value ÀT À 1 in an EWM, allocation A clearly achieves the maximum egalitarian welfare. As for fairness constraint, since for any i 2 ½m, v i ðA i Þ ¼ ÀT and v mþ1 ðA mþ1 Þ ¼ ÀT À 1, none of the first m agents would violate EQX. For agent m þ 1, it holds that v mþ1 ðA mþ1 nfegÞ ! v i ðA i Þ ¼ ÀT ; 8i 2 ½m; 8e 2 A mþ1 . Thus, allocation A is an EWM and also satisfies EQX.
We now prove the other direction. Suppose we have a "no" instance of 3-ARTITION. Recall that in any EWM, agent m þ 1 must receive value exactly ÀT À 1. Because it is a "no" instance, assigning the first 3m items to the first m agents always results in an allocation in which at least one agent receives value larger than ÀT . Through the comparison between agent m þ 1 and the agent receiving the largest value, one can easily verify that no EWM can also be EQX, completing the proof. h For the problem in which the quantity of optimal egalitarian welfare is involved, since computing an EWM is NP-hard [11], which is different from the utilitarian welfare, one may not able to find the maximum egalitarian welfare in polynomial time. As a consequence, we are unclear whether verifying a "yes" instance of E(EWÂEQX) can be done in polynomial time, based on which we only state hardness in Theorem 4.3. For the same reason, we also only state hardness in the following theorem.
Theorem 4.4 When allocating chores, the decision problem E(EWÂEQ1) is strongly NPhard.
Proof Given an arbitrary instance of 3-PARTITION, we construct a fair-chores instance as follows. There are m þ 1 agents and a set E ¼ fe 1 ; . . .; e 3mþ2 g of 3m þ 2 items. The valuation functions are shown in Table 8. We first consider an allocation that assigns three of fe 1 ; . . .; e 3 m g to each agent i 2 ½m, and assigns e 3 mþ1 and e 3 mþ2 to agent m þ 1. Due to b j \T =2 for any j 2 ½3m, the value of agent i is larger than À3T =2 for each i 2 ½m. The value of agent m þ 1 is equal to À2T , and hence the egalitarian welfare of this allocation is equal to À2T . Due to the value of e 3 mþ1 and e 3 mþ2 , no allocation can achieve egalitarian welfare larger than À2T , which then implies that the maximum egalitarian welfare of the constructed fair-chores instance is equal to À2T . Suppose we have a "yes" instance of 3-PARTITION, and let I 1 ; . . .; I n be the solution. Consider an allocation A with A i ¼ S j2I i e j for any i 2 ½m and A mþ1 ¼ fe 3 mþ1 ; e 3 mþ2 g. It is not hard to see that v i ðA i Þ ¼ ÀT for any i 2 ½m and v mþ1 ðA mþ1 Þ ¼ À2T , then we have EWðAÞ ¼ À2T , which implies that the allocation A is an EWM. As for the fairness constraint, none of the first m agents would violate EQ1, and for agent m þ 1, we have v mþ1 ðA mþ1 nfegÞ ¼ v i ðA i Þ ¼ ÀT for any i 2 ½m and e 2 A mþ1 . Thus, the allocation A is also EQ1. We now prove the other direction. Suppose we have a "no" instance of 3-PARTITION. Recall that in any EWM, agent m þ 1 must receive exactly items e 3 mþ1 and e 3 mþ2 , and must have value exactly À2T. Due to "no" instance, there exists an agent receiving a value strictly larger than ÀT from the assignment of the first 3m chores. Through the comparison between agent m þ 1 and the agent receiving the largest value, one can verify that no EWM can satisfy EQ1, completing the proof. h The above results show that, except for concerning egalitarian welfare in goods allocation, all other decision problems are strongly NP-hard in the case of general n agents. These results directly imply the NP-hardness of computing the allocation with maximum utilitarian welfare among all EQX (or EQ1) allocations. Notice that an UWM (without EQX requirement) can be found in polynomial time by assigning each item to the agent who has the largest value on it, and so, one can efficiently find the optimal utilitarian welfare. By comparing the optimal utilitarian welfare with the output from ALG, the problem E (UWÂEQX) is then solved in (pseudo) polynomial time, a contradiction. Based on Theorem 4.2, similar arguments can be applied to prove the strong NP-hardness of C(UW/ EQ1). h Theorem 4.6 When allocating goods and chores, problems C(EW/EQ1) and C(EW/EQX) are strongly NP-hard.
Proof It suffices to prove strong NP-completeness of the decision version of C(EW/EQ1) (resp., C(EW/EQX)): given an instance I ¼ h½n; E; Vi and a threshold value W, does there exist an EQ1 (resp., EQX) allocation with egalitarian welfare at least W? For both goods and chores, we provide a reduction from 3-PARTITION. Given an arbitrary instance of 3-PARTITION, we construct a fair-goods (resp. fair-chores) instance with m agents and a set E ¼ fe 1 ; . . .; e 3 m g of 3 m goods (resp. chores). Agents have identical valuation functions and in the fair-goods instance, v i ðe j Þ ¼ b j for any i 2 ½m and j 2 ½3 m; in the fair-chores instance, v i ðe j Þ ¼ Àb j for any i 2 ½m and j 2 ½3 m. The Results of this section completely answer the computational complexity of the decision and computation problem we are concerned with for general n agents. Most problems are computationally intractable, which means that one can not efficiently determine the existence of a fair and welfare-maximizing allocation or compute the allocation with maximum welfare among all fair allocations. In addition, our results provide more insights into the similarities between goods and chores. According to Theorems 4.1 and 4.2, for both EQX and EQ1, together with utilitarian welfare, problems for goods and chores share the same complexity. When concerning egalitarian welfare, we show that decision problems for chores are strongly NP-hard and one can directly answer "yes" in the case of goods, but this may not indicate goods and chores have different algorithmic features. Instead of linking to algorithmic property, such an "inconsistency" is due to distinct structural properties, i.e., optimal egalitarian welfare is compatible with EQX/EQ1 for goods but not for chores.

Computational complexity with fixed number of agents
The above complexity results are for general n, but in practice, the number of agents is usually fixed. Theoretically, even a system with two agents, n ¼ 2, can already yield valuable and non-trivial results, especially in machine scheduling [1,2], an application of chores allocation. This observation motivates us to resolve the complexity for the case where n is fixed. We carry out the analysis for the case of small and fixed n from utilitarian welfare and EQX, and show NP-completeness for both goods and chores. Proof of Theorem 4.7 for chores To prove NP-hardness, we derive a reduction from the problem PARTITION. Given an arbitrary instance of PARTITION, we construct a fairchores instance with two agents and a set E ¼ fe 1 ; . . .; e mþ4 g of m þ 4 chores. The valuation functions are shown in Table 9, where 0\\1. It is not hard to verify that an allocation is a UWM if and only if chores e mþ1 and e mþ2 are assigned to agent 2 and e mþ3 ; e mþ4 are assigned to agent 1.
Suppose we have a "yes" instance of PARTITION, and let I 1 ; I 2 be a solution. Then, consider an allocation A in which A 1 contains bundle S j2I 1 e j and e mþ3 ; e mþ4 , and A 2 ¼ EnA 1 . Clearly, allocation A is a UWM. Moreover, for agents' value, we have We now prove the other direction. Suppose we have a "no" instance of PARTITION. Let S ¼ fe 1 ; . . .; e m g be the set of first m items, and recall P 2 ðSÞ be the set of 2-partition of S. We denote by D ¼ min B2P2ðSÞ jv 1 ðB 1 Þ À v 2 ðB 2 Þj, and claim that D ! 1 because p i 2 N for any i 2 ½m and it's a "no" instance. Notice that any utilitarian welfare-maximizing allocation O has the form of O 1 ¼ B 1 [ fe mþ3 ; e mþ4 g and O 2 ¼ B 2 [ fe mþ1 ; e mþ2 g where fB 1 ; B 2 g 2 P 2 ðSÞ. Without loss of generality we assume v 2 ðO 2 Þ [ v 1 ðO 1 Þ, and accordingly, due to the definition of D and , we have v 1 ðO 1 nfe mþ3 gÞ À v 2 ðO 2 Þ À D\0. So agent 1 violates EQX in allocation O, and therefore, no UWM can satisfy EQX, completing the proof. h The theorem below follows from Theorem 4.7.
Theorem 4.8 For both goods and chores, the problem C(UW/EQX) is NP-hard, even with two agents.
We then move to EQ1, a notion weaker than EQX, and show that E(UWÂEQ1) is NPcomplete when n ! 3, but in P when only two agents are involved.
Theorem 4.9 For both goods and chores, the decision problem E(UWÂEQ1) is NPcomplete, even for three agents.
Proof of Theorem 4.9 for chores The problem is in NP as both utilitarian welfare-maximization and EQ1 can be examined in polynomial time. To prove NP-hardness, we derive a reduction from problem PARTITION. Given an arbitrary instance of PARTITION, we construct a fair-chores instance for three agents with a set E ¼ fe 1 ; . . .; e mþ3 g of m þ 3 chores. The valuation functions are shown in Table 10. An allocation of the constructed instance is a UWM if and only if the first m þ 2 chores are assigned to the first two agents and the last chore is assigned to agent 3. Suppose we have a "yes" instance of PARTITION, and let I 1 ; I 2 be a solution. Then, consider allocation A, in which A 1 contains bundle S j2I1 e j and e mþ1 ; A 2 contains bundle S j2I2 e j and e mþ2 ; A 3 ¼ fe mþ3 g. Clearly, allocation A is a UWM. As for agents' value, it holds that v 1 ðA 1 Þ ¼ v 2 ðA 2 Þ\v 3 ðA 3 Þ, and moreover, v i ðA i nfe mþi gÞ ¼ v 3 ðA 3 Þ for any i 2 ½2. Thus, allocation A is a UWM that also satisfies EQ1.
We now prove the other direction. Suppose we have a "no" instance of PARTITION. Since for any j 2 ½m, p j \2T , then agent 3 receives value exactly ÀT in any UWM. Based on the assignment of chores e mþ1 and e mþ2 , we discuss two cases: (i) allocations with exactly one À5T chore for each i 2 ½2; (ii) other assignments. If case (ii) happens, without loss of generality assume agent 1 receives two À5T chores. Then, when comparing agent 1 and agent 3, agent 1 still receives less value no matter which chore is removed from his bundle, violating the condition of EQ1. Consequently, to make an allocation be both EQ1 and utilitarian welfare-maximizing, case (i) must happen. Moreover, since it is a "no" instance of PARTITION, assigning the first m chores to the first two agents always results in allocations in which there exists one agent with value strictly less than ÀT . Then, when comparing to agent 3, the agent receiving the least value violates EQ1. Thus, no UWM can satisfy EQ1, completing the proof. h The theorem below follows from Theorem 4.9.
Theorem 4.10 For both goods and chores, problem C(UW/EQ1) is NP-hard, even for three agents.
Next, we provide a polynomial-time algorithm that can determine the existence of an EQ1 and utilitarian welfare-maximizing allocation in the case of two agents. In the algorithm, we first guarantee the allocation achieving maximum utilitarian welfare by assigning each item to the agent who values it the most, and then for unassigned items (if exist), in each round, allocate one of them to the agent with a smaller absolute value via Algorithm 2.

Theorem 4.11 For both goods and chores allocation with two agents, there exists a polynomial time algorithm that solves problem E(UWÂEQ1)
Proof of Theorem 4.11 for chores The proof uses Algorithm 4. It is not hard to verify that assigning E i to agent i for all i is a necessary and sufficient condition for the output having maximum utilitarian welfare. l is the l-th chore assigned to agent 2. If the algorithm terminates at Step 4, clearly we find a UWM that satisfies EQ1. We now consider the case where algorithm terminates at

Denote by
Step 6, and show if so, no UWM is EQ1. We first claim that, in this case, either E 0 A 1 or E 0 A 2 holds. It suffices to show that if both A 1 \ E 0 and A 2 \ E 0 are not empty set, Algorithm 4 terminates at Step 4. To prove this claim, we discuss two cases. If jv 1 ðA 1 Þj [ jv 2 ðA 2 Þj, since A 1 \ E 0 6 ¼ ;, we have e ð1Þ k 1 2 E 0 . Then by algorithm, it must hold that jv 1 ðA 1 nfe ð1Þ k 1 gÞj jv 2 ðA 2 Þj; otherwise, agent 1 would not receive chore e ð1Þ k 1 . Accordingly, allocation A is EQ1, and Algorithm 4 terminates at Step 4. On the other hand, if jv 1 ðA 1 Þj\jv 2 ðA 2 Þj, then since A 2 \ E 0 6 ¼ ;, similarly, jv 1 ðA 1 Þj ! jv 2 ðA 2 nfe ð2Þ k2 gÞj holds and A is EQ1. Up to here, the claim is proved.
Next, if E 0 A 1 , then either (i) jv 1 ðA 1 Þj\jv 2 ðA 2 Þj or (ii) jv 1 ðA 1 Þj [ jv 2 ðA 2 Þj and jv 1 ðA 1 Þnfe ð1Þ k1 gj\jv 2 ðA 2 Þj holds. The latter one indicates that allocation A is EQ1, a contradiction. As for the first possible case, recall that terminating at Step 6 implies allocation A is not EQ1, and consequently, even when agent 2 only receives E 2 , she still violates the condition of EQ1. Notice that in any UWM, all E 2 must be assigned to agent 2, and so, no UWM satisfies EQ1. If E 0 A 2 , similarly, there are two possible cases: (i) jv 1 ðA 1 Þj [ jv 2 ðA 2 Þj; (ii) jv 1 ðA 1 Þj\jv 2 ðA 2 Þj but jv 1 ðA 1 Þj ! jv 2 ðA 2 nfe ð2Þ k 2 gÞj. If case (ii) happens, allocation A is EQ1, a contradiction. The only possibility is case (i), which then implies that even when agent 1 only receives bundle E 1 , he still violates the condition of EQ1. Therefore, no UWM is EQ1, completing the proof. h We remark that the goods version of Algorithm 4 has been proposed by Aziz et al. [4] to answer E(UWÂEQ1) on allocating goods to two agents. For completeness, we have presented the algorithm and proof for both cases of chores and goods.
In the case of two agents, given that E(UWÂEQ1) is polynomial-time solvable, the remaining question is whether one can solve C(UW/EQ1) in polynomial time. Given an arbitrary instance of PARTITION, we construct an instance of fair-chores with two agents and a set E ¼ fe 1 ; . . .; e mþ1 g of m þ 1 chores. The valuation functions are shown in Table 11, where 0\\0:1. The thresholds value is defined as Suppose we have a "yes" instance of PARTITION, and let I 1 ; I 2 be a solution. Then, consider allocation A with A 1 ¼ [ j2I1 e j and A 2 ¼ EnA 1 . For agents' value, we have v 1 ðA 1 Þ [ v 2 ðA 2 Þ and v 2 ðA 2 nfe mþ1 gÞ [ v 1 ðA 1 Þ, and thus, A is an EQ1 allocation with utilitarian welfare Therefore, we find an EQ1 allocation A with utilitarian welfare W.
We now prove the other direction. Suppose we have a "no" instance of PARTITION. Denote by B ¼ ðB 1 ; B 2 Þ an EQ1 allocation and it must be in the form of fS 1 [ fe mþ1 g; S 2 g where fS 1 ; S 2 g is a partition of set fe 1 ; . . .; e m g. We highlight that S 1 is not necessarily To meet the condition of EQ1, chore e mþ1 has to be eliminated when comparing; otherwise, the agent who receives bundle S 1 [ fe mþ1 g would violate the condition of EQ1, even when S 1 ¼ ;. As a consequence, the condition of EQ1 is equivalent to D T . Moreover, since it's a "no" instance of PARTITION, we have D\T . Given the form of fS 1 [ fe mþ1 g; S 2 g, there are two possible allocations: assigning bundle S 1 [ fe mþ1 g to agent 1; assigning bundle S 1 [ fe mþ1 g to agent 2.
If B 1 ¼ S 1 [ fe mþ1 g and B 2 ¼ S 2 , then such an assignment results in welfare UWðBÞ ¼ ÀD À 3T À À ð1 À Þð2T À DÞ ¼ À5T þ ð2T À D À 1Þ\W : where the last transition is due to D\T . Therefore, in both cases, no EQ1 allocations can have utilitarian welfare at least W, completing the proof. h We have completely settled the computational complexity of algorithmic decision and optimization problems when utilitarian welfare is concerned. Most of results are computationally intractable. In addition, the above algorithmic problems (regarding utilitarian welfare) for goods and chores have the same computational complexity, which somewhat reveals similarities between these two settings. Next, we investigate egalitarian welfare-maximizing allocations and provide the computational complexity in the case of chores. Proof To prove NP-hardness, we derive a reduction from the problem PARTITION. Given an arbitrary instance of ARTITION, we construct a fair-chores instance with two agents and a set E ¼ fe 1 ; . . .; e mþ2 g of m þ 2 items. The valuation functions are shown in Table 12, where 0\\0:1. Since P i2½m p i ¼ 2T , it is not hard to verify that in an EWM, chores e mþ1 and e mþ2 must be assigned to agent 1 and agent 2, respectively, and moreover, the maximum egalitarian welfare is at most ÀT À .
Suppose we have a "yes" instance of PARTITION, and let I 1 ; I 2 be a solution. Then, consider an allocation A, in which A 1 contains bundle S j2I 1 e j and chore e mþ1 , and A 2 ¼ EnA 1 . For agents' value, we have v 1 ðA 1 Þ ¼ v 2 ðA 2 Þ ¼ ÀT À , and so allocation A is an EWM that satisfies EQX. We now prove the other direction. Suppose we have a "no" instance of PARTITION. Let S ¼ fe 1 ; . . .; e m g be the set of the first m chores, and P 2 ðSÞ be the set of 2-partition of S. We then denote by D ¼ min B2P2ðSÞ jv 1 ðB 1 Þ À v 2 ðB 2 Þj, and claim that D ! 1 because p i 2 N; 8i 2 ½m and it's a "no" instance. Notice that every egalitarian welfare-maximizing allocation O is in the form of O 1 ¼ B 1 [ fe mþ1 g and O 2 ¼ B 2 [ fe mþ2 g where fB 1 ; B 2 g 2 P 2 ðSÞ. Without loss of generality we assume v 1 ðO 1 Þ\v 2 ðO 2 Þ, and based on the definition of D and , we have v 1 ðO 1 nfe mþ1 gÞ À v 2 ðO 2 Þ À D\0, based on which, agent 1 violates EQX in allocation O. Therefore, no EWM is EQX, completing the proof. h Theorem 4.14 When allocating chores, the problem E(EWÂEQ1) is NP-hard, even for three agents.
Proof To prove NP-hardness, we derive a reduction from PARTITION. Given an arbitrary instance of PARTITION, we construct a fair-chores instance with three agents and a set E ¼ fe 1 ; . . .; e mþ2 g of m þ 2 items. The valuation functions are shown in Table 13. Consider an allocation of arbitrarily assigning the first m chores to the first two agents, and assigning chores e mþ1 and e mþ2 to agent 3. Since P m j¼1 p j ¼ 2T , the egalitarian welfare of that allocation is À2T . Due to the value of e mþ1 and e mþ2 , no allocation can achieve egalitarian welfare larger than À2T , which then implies that the maximum egalitarian welfare of the constructed fair-chores instance is equal to À2T .
Suppose we have a "yes" instance of PARTITION, and let I 1 , I 2 be a solution. Consider an allocation A with It is not hard to see that v 1 ðA 1 Þ ¼ v 2 ðA 2 Þ ¼ ÀT and v 3 ðA 3 Þ ¼ À2T , and accordingly, the allocation A is an EWM. Since v 3 ðA 3 nfegÞ ¼ v i ðA i Þ holds for any e 2 A 3 and i ¼ 1; 2, the allocation A is also EQ1.
We now prove the other direction. Suppose we have a "no" instance of PARTITION. Recall that in any EWM, agent 3 must receive exactly items e mþ1 and e mþ2 and have value exactly À2T. Due to "no" instance, one of the first two agents receives a value strictly larger than ÀT from the assignment of the first m chores. Through the comparision between agent 3 and the agent receiving the largest value, one can verify that no EWM can satisfy EQ1, completing the proof. h

Pseudo-polynomial-time algorithms for fixed number of agents
From the results established in the previous sections, for general n, all decision and computation problems are strongly NP-hard. However, for fixed n it is still unknown whether problems are pseudo-polynomial time solvable. In this section, we design pseudo-polynomial time algorithms that can output the approximately equitable allocation with the maximum welfare for both goods and chores. Similar to the algorithms in Aziz et al. [4], our pseudo-polynomial time algorithms mainly rely on dynamic programming with the subproblem of assigning the first k items. Once the assignment of k-th item has been settled, we augment k by one and analyse the assignment of ðk þ 1Þ-th item upon the allocation of the first k items. Throughout this section, we assume agents' values are integers and V ¼ max i2½n P j2½m jv i ðe j Þj. When considering utilitarian welfare, Aziz et al. [4] already provide an algorithm to compute an EQ1/EQX allocation with the maximum utilitarian welfare in the case of goods. For each i 2 ½n, their algorithm uses t i and s i to represent the lower bound of agent i's value and a specific item in agent i's bundle, respectively. In particular, it applies dynamic programming to compute G k ðt 1 ; . . .; t n ; s 1 ; . . .; s n Þ for all k, t i and s i , and sets it as True if there exists an allocation of e 1 ; . . .; e k such that for all i, the value of agent i is at least t i and item s i is in agent i's bundle; otherwise, False. The desired EQ1/EQX allocation can be found by visiting all G m ðt 1 ; . . .; t n ; s 1 ; . . .; s n Þ. Since for each i, parameter t i 2 f0; 1; . . .; V g has V þ 1 possible values and parameter s i 2 E has m possible values, the worst-case running time of their algorithm is at least Oðm n V n Þ.
In what follows, we borrow the idea from Aziz et al. [4] and design psuedo-polynomial time algorithms for optimization/decision problems regarding egalitarian welfare. Our algorithms rely on dynamic programmings subroutines, Algorithms 5 and 6, which compute Bðk; t; sÞ for all possible k; t and s. For every Bðk; t; sÞ, the parameter k refers to the number of items; vector t ¼ ðt 1 ; . . .; t n Þ represents agents' values; vector s ¼ ðs 1 ; . . .; s n Þ represents specific items in bundles of individual agents. To make the case of k ¼ 0 well-defined, we assume that every agent is endowed with a dummy item e 0 of zero value (in total there are n dummy items) and moreover, the dummy item of an agent cannot be reassigned to others. We remark that for all i, s i takes value from fe 0 ; e 1 ; . . .; e m g. Note that Algorithms 5 and 6 work for both fair-goods and fair-chores instances. After computing Bðk; t; sÞ 2 fTrue; Falseg for every k, t and s, the desired EQ1 or EQX allocations can be found by visiting all Bðm; t; sÞ and backtracking the specific one.
The following lemma holds in both cases of goods and chores. Consequently, we have the following theorem.
Theorem 5.1 Given an instance I ¼ h½n; E; Vi, one can compute an EQ1 allocation with the maximum egalitarian welfare in time Oðm nþ2 V n Þ.
Proof Note that Algorithm 5 can return Bðm; t; sÞ for all t and s. By visiting the entire Bðm; t; sÞ, we can find the set C, of which the construction depends on the underlying items. The full construction of C is presented below, and the second condition for both goods and chores is to verify the underlying fairness notion.
C ¼ fðt; sÞjBðm; t; sÞ ¼ True and t i þ v j ðs j Þ ! t j for all i; jg; for goods; fðt; sÞjBðm; t; sÞ ¼ True and t i À v i ðs i Þ ! t j for all i; jg; for chores:

&
Given an arbitrary EQ1 allocation A 0 ¼ ðA 0 1 ; . . .; A 0 n Þ, construct ðt 0 ; s 0 Þ as follows: for all i, t 0 i ¼ v i ðA 0 i Þ and s 0 i 2 A 0 i is the item with the largest absolute value for agent i. Then, we have ðt 0 ; s 0 Þ 2 C due to the property of EQ1 and the construction of t 0 and s 0 . Accordingly, by visiting all element of C, we are able to find the element ðt Ã ; s Ã Þ 2 C, of which t Ã represents the agents' values in the EQ1 allocation maximizing egalitarain welfare over all EQ1 allocations. In particular, one can pursue the ðt Ã ; s Ã Þ with min i2½n t Ã i ! min i2½n t i for all ðt; sÞ 2 C. The specific EQ1 allocation can be found by backtracking Bðm; t Ã ; s Ã Þ in the following way: assigning e m to agent i m if the value of Bðm; t Ã ; s Ã Þ is set to True by Bðm À 1; t mÀ1 ; s mÀ1 Þ ¼ True and at that time the for-loop in Step 5 is i ¼ i m ; then assigning e mÀ1 to agent i mÀ1 if the value of Bðm À 1; t mÀ1 ; s mÀ1 Þ is set to True by Bðm À 2; t mÀ2 ; s mÀ2 Þ ¼ True and at that time the for-loop in Step 5 is i ¼ i mÀ1 ; repeat this process until all items are assigned. If in some step, the choice of Bðh; t h ; s h Þ is not unique, then arbitrarily pick one.
As for the time complexity, the running time of Algorithm 5 is Oðm nþ2 V n Þ, and visiting the entire Bðm; t; sÞ and backtracking takes time Oðm n V n Þ. Therefore, the running time of the algorithm is Oðm nþ2 V n Þ. h Moving on to our consideration of EQX, the dynamic programming for problem C(EW/ EQX) is shown as Algorithm 6. Different from Algorithm 5, we now use s i to represent the item with least non-zero absolute value in agent i's bundle if agent i receives a non-zero value. We establish that the EQX allocation with the maximum egalitarian welfare can be found by visiting the entire Bðm; t; sÞ and backtracking specific ones.
The following lemma holds in both cases of goods and chores. (i) the value of agent i is equal to t i ; (ii) if s i ¼ e 0 , then t i ¼ 0; if s i 6 ¼ e 0 , item s i 2 S r2½k e r is in agent i's bundle and moreover, either s i is the unique item of non-zero value in agent i's bundle or 0\jv i ðs i Þj jv i ðeÞj for every item e of non-zero value in agent i's bundle.
Consequently, we obtain the following theorem.
Theorem 5.2 Given an instance I ¼ h½n; E; Vi, one can compute an EQX allocation with the maximum egalitarian welfare in time Oðm nþ2 V n Þ.
Proof Similar proof to that of Theorem 5.1 applies. The proof is deferred to Appendix A.9. h Theorems 5.1 and 5.2 indicate that both problems of C(EW/EQ1) and C(EW/EQX) can be solved in pseudo-polynomial time. Accordingly, for fixed n, problems C(EW/EQ1) and C (EW/EQX) are weakly NP-hard. Note that for goods, optimal egalitarian welfare is compatible with EQX/EQ1. To address the decision problems of E(EWÂEQ1) and E (EWÂEQX) for chores, we remark that in Algorithms 5 and 6, tuples Bðm; t; sÞ actually record all possible values that agents can receive in nearly equitable allocations. Moreover, by eliminating the conditions for parameters fs i g n i¼1 , it is possible to compute the maximum egalitarian welfare in time OðmV n Þ via a dynamic program similar to Algorithm 5. Therefore, in the case of chores, the problems of E(EWÂEQ1) and E(EWÂEQX) are also weakly NP-hard. In some resource allocation scenarios, the number of items m to be allocated can be larger than V, and allocating items to agents with dichotomous preferences 3 is a typical example of m ) V . We then further explore the possibility of algorithms whose running time is smaller than Oðm nþ2 V n Þ in the case of m ) V . The main strategy is to decrease the running time related to input size m, which may inevitably increase the running time caused by V. Below we design pseudo-polynomial time algorithms that can compute the EQ1/EQX allocation with the maximum utilitarian/egalitarian welfare in time OðmV 2nþ1 Þ. The algorithms rely on dynamic programming subroutines, Algorithm 7, in which for each i 2 ½n, we use t i to represent the value of agent i and p i to represent the absolute value of a special item in agent i's bundle. The special item is in particular used to examine whether the underlying fairness notion is satisfied or not. To take an example, when considering EQ1, p i would represent the absolute value of the item with the largest absolute value in agent i's bundle. The dynamic programming subroutines therefore admit two n-dimensional vectors t ¼ ðt 1 ; . . .; t n Þ with t i 2 fÀV ; . . .; 0; . . .; V g and p ¼ ðp 1 ; . . .; p n Þ with p i 2 f0; . . .; V g. For any t and p, the dynamic programming examines that for each k 2 ½m whether the assignments of the first k items can satisfy the constraints regarding t and p, and returns a tuple Bðk; t; pÞ that takes value from fTrue; Falseg. Informally, given fixed k, t and p, if there exists an assignment of e 1 ; . . .; e k such that for each i 2 ½n, agent i receives value t i and the value of the special item in agent i's bundle is equal to p i , then the dynamic programming sets Bðk; t; pÞ ¼ True; otherwise, Bðk; t; pÞ ¼ False. when considering EQX, if v i ðA i Þ ¼ 0 then p i ¼ 0, and otherwise p i ¼ min Proof We first prove the "only if" part by mathematical induction. In the case of k ¼ 0, Step 2 of Algorithm 7 sets Bð0; t; pÞ ¼ True only if t i ¼ p i ¼ 0 for all i. Note that when k ¼ 0, each agent receives nothing and has value 0. Thus, the statement holds for the case of k ¼ 0. We now assume that the statement holds for k ¼ 0; . . .; h, and show that it also holds for the case of k ¼ h þ 1. Fix t and p with Bðh þ 1; t; pÞ ¼ True and suppose that Algorithm 7 makes Bðh þ 1; t; pÞ ¼ True when the for-loop in Step 5 is i ¼ i Ã . By Steps 7 and 10, it holds that Bðh; t 1 ; . . .; t i Ã À v i Ã ðe hþ1 Þ; . . .; t n ; p 1 ; . . .; p 0 i Ã ; . . .; p n Þ ¼ True for some p 0 i Ã . As the statement holds for k ¼ h, there exists an allocation R of e 1 ; . . .; e h satisfying properties (i) and (ii) regarding ðt 1 ; . . .; t i Ã À v i Ã ðe hþ1 Þ; . . .; t n Þ and ðp 1 ; . . .; p 0 i Ã ; . . .; p n Þ. We now consider the allocation R Ã of e 1 ; . . .; e hþ1 with R Ã j ¼ R j for j 6 ¼ i Ã and It is not hard to see that v j ðR Ã j Þ ¼ t j for any j 2 ½n.
As for property (i), since each agent j 6 ¼ i Ã receives an identical bundle in allocations R and R Ã and the parameter p j is consistent in the two tuples under consideration, it suffices to prove that property (i) regarding agent i Ã is satisfied by the allocation R Ã . When considering EQ1, we split the proof into two cases: Case 1 p 0 i Ã ¼ 0. As the allocation R satisfies property (i) regarding ðp 1 ; . . .; p 0 i Ã ; . . .; p n Þ, the equality v i Ã ðR i Ã Þ ¼ 0 holds. Based on Step 7, we have In this case, the following holds, where the first equality is due to Step 7 and the second is owing to the construction of R. Thus, property (i) regarding p is also satisfied by R Ã . Therefore, R Ã is an allocation of e 1 ; . . .; e hþ1 that satisfies properties (i) and (ii) regarding t and p.
When considering EQX, we also split the proof into two cases. Case 1: v i Ã ðe hþ1 Þ ¼ 0. According to Step 10, we have p 0 and thus property (i) is satisfied by R Ã . If p 0 i Ã 6 ¼ 0, then we have the following: where the second equality is due to the construction of R and the third is due to v i Ã ðe hþ1 Þ ¼ 0. Thus, the property (i) is also satisfied. Case 2: v i Ã ðe hþ1 Þ 6 ¼ 0. If p 0 i Ã ¼ 0, then according to Step 10, it holds that ¼0 jv i Ã ðeÞj and property (i) is satisfied. If p 0 i Ã 6 ¼ 0, then the following holds where the first equality is due to Step 10; the second is due to the construction of R; and the third is due to v i Ã ðe hþ1 Þ 6 ¼ 0 and R Ã i Ã ¼ R i Ã [ fe hþ1 g. As a consequence, property (i) is also satisfied. Therefore, when considering EQX, R Ã is an allocation of e 1 ; . . .; e hþ1 that satisfies properties (i) and (ii) regarding t and p.
Overall, by mathematical induction, the "only if" part is proved. Now let us prove the "if" part, again with mathematical induction. In the case of k ¼ 0, Step 2 of Algorithm 7 sets Bð0; t; pÞ ¼ True if t i ¼ p i ¼ 0 for all i. Accordingly, if Bð0; t 0 ; p 0 Þ ¼ False, then either t 0 q 6 ¼ 0 or p 0 q 6 ¼ 0 holds for some q. Note that the value of an agent can only be zero in the case of k ¼ 0. Thus, the statement holds for the case of k ¼ 0. We now assume the statement holds for k ¼ 0; . . .; h and show that it also holds for the case of k ¼ h þ 1. Fix t and p with Bðh þ 1; t; pÞ ¼ False. For a contradiction, assume that S is an allocation of e 1 ; . . .; e hþ1 satisfying the properties (i) and (ii) regarding t and p. Without loss of generality, we assume e hþ1 2 S i Ã . Construct an allocation S 0 of e 1 ; . . .; e h with S 0 j ¼ S j for j 6 ¼ i Ã and S 0 i Ã ¼ S i Ã nfe hþ1 g. In the following, we show that S 0 is an allocation that makes Bðh; t 1 ; . . .; t i Ã À v i Ã ðe hþ1 Þ; . . .; t n ; p 1 ; . . .; e p i Ã ; . . .; p n Þ ¼ True for some e p i Ã (will be specified later on) satisfying the condition in Steps 7 and 10, which then results in Bðh þ 1; t; pÞ ¼ True, a desired contradiction. Note that v j ðS 0 Þ, then the property (ii) regarding ðt 1 ; . . .; t i Ã À v i Ã ðe hþ1 Þ; . . .; t n Þ is satisfied by S 0 .
As for property (i), since each agent j 6 ¼ i Ã receives an identical bundle in allocations S and S 0 and the parameter p j is consistent in the two tuples under consideration, it suffices to prove that property (i) regarding agent i Ã is satisfied by the allocation S 0 .
When considering EQ1, if v i Ã ðS 0 i Ã Þ ¼ 0 then let e p i Ã ¼ 0, and otherwise e p i Ã ¼ max e2S 0 i Ã jv i Ã ðeÞj. It is not hard to verify that the allocation S 0 makes Bðh; t 1 ; . . .; t i Ã À v i Ã ðe hþ1 Þ; . . .; t n ; p 1 ; . . .; e p i Ã ; . . .; t n Þ ¼ True. If e p i Ã ¼ 0, we clearly have max jv i Ã ðe hþ1 Þj; e p i Ã f g ¼ p i Ã . If e p i Ã [ 0, the following holds, where the second equality is due to Step 7 always sets Bðh þ 1; t; pÞ ¼ True when the for-loop in Step 5 is i ¼ i Ã , a contradiction.
When considering EQX, we define e p i Ã as follows, Then one can verify that the allocation S 0 makes Bðh; t 1 ; . . .; t i Ã À v i Ã ðe hþ1 Þ; . . .; t n ; p 1 ; . . .; e p i Ã ; . . .; p n Þ ¼ True because the statement holds for k ¼ h. In the following, we split the proof into two cases and for each case prove that the condition in Step 10 is satisfied.
Þj; e p i Ã g no matter whether e p i Ã ¼ 0 or not.
Case 2: v i Ã ðe hþ1 Þ 6 ¼ 0. If e p i Ã ¼ 0, then e hþ1 is the unique item in S i Ã having non-zero value for agent i Ã . Accordingly, we have p i Ã ¼ jv i Ã ðe hþ1 Þj ¼ maxfjv i Ã ðe hþ1 Þj; e p i Ã g, and thus the condition of Step 10 is satisfied. If e p i Ã 6 ¼ 0, then the following holds, where the second equality is due to S i Ã ¼ S 0 i Ã [ fe hþ1 g; the third equality comes from the definition of e p i Ã . Thus, in both cases, Step 10 sets Bðh þ 1; t; pÞ ¼ True when the for-loop in Step 5 is i ¼ i Ã , a contradiction, Therefore, with mathematical induction, we have also proved the "if" part of the lemma. h Theorem 5.4 Given an instance I ¼ h½n; E; Vi, one can compute an F 2 fEQ1; EQXg allocation with the maximum W 2 fEW; UWg welfare in time OðmV 2nþ1 Þ.
Proof Note that Algorithm 7 can return Bðm; t; pÞ for all t and p. By visiting the entire Bðm; t; pÞ, we can find the set C, of which the construction depends on the underlying items.
The full construction of C is presented below, and the second condition for both goods and chores is to examine whether the underlying fairness notion is satisfied or not.
C ¼ fðt; pÞjBðm; t; pÞ ¼ True and t i þ p j ! t j for all i; jg; for goods; fðt; pÞjBðm; t; pÞ ¼ True and t i þ p i ! t j for all i; jg; for chores:

&
For an arbitrary F allocation A 0 ¼ ðA 0 1 ; . . .; A 0 n Þ, consider two vectors t 0 and p 0 with for all i, t 0 i ¼ v i ðA 0 i Þ, and for p 0 i , we distinguish between EQ1 and EQX: for EQ1, if v i ðA 0 i Þ ¼ 0 then let p 0 i ¼ 0, and otherwise let p 0 We first claim that ðt 0 ; p 0 Þ 2 C. Based on Lemma 5.3, the allocation A 0 makes Bðm; t 0 ; p 0 Þ ¼ True. Moreover, due to the construction of t 0 and p 0 and the fact that A 0 is an F allocation, the second condition is also satisfied. As a consequence, it holds that ðt 0 ; p 0 Þ 2 C. Then, by visiting all elements of C, we are able to find the element ðt Ã ; p Ã Þ 2 C, of which t Ã represents the agents' values in the F allocation maximizing W over all F allocations. In particular, when W ¼ UW (resp., W ¼ EW), one can pursue the ðt Ã ; p Ã Þ with P i2½n t Ã i ! P i2½n t i (resp., min i2½n t Ã i ! min i2½n t i ) for all ðt; pÞ 2 C. The specific F allocation that maximizes Wover all F allocations can be constructed by backtracking Bðm; t Ã ; p Ã Þ in the following way: assigning e m to agent i m if the value of Bðm; t Ã ; p Ã Þ is set to True by B m À 1; t mÀ1 ; p mÀ1 ð Þ ¼ True and at that time the for-loop in Step 5 is i ¼ i m ; then assigning e mÀ1 to agent i mÀ1 if the value of B m À 1; t mÀ1 ; p mÀ1 ð Þ is set to True by B m À 2; t mÀ2 ; p mÀ2 ð Þ ¼ True and at that time the forloop in Step 5 is i ¼ i mÀ1 ; repeat this process until all items are assigned. If in some step, the choice of Bðh; t h ; p h Þ is not unique, then arbitrarily pick one.
As for the time complexity, the running time of Algorithm 7 is O mV 2nþ1 ð Þ , and visiting all Bðm; t; pÞ and backtracking the specific one takes time O mV 2n ð Þ. Therefore, the running time of the algorithm is O mV 2nþ1 ð Þ . h For the decision problems, note that the maximum utilitarian welfare can be computed in linear time, and accordingly, problems E(UWÂEQ1) and E(UWÂEQX) can be answered in time O mV 2nþ1 ð Þ .
Theorem 5.5 When allocating goods and chores, problems E(UWÂEQ1) and E (UWÂEQX) can be answered in time O mV 2nþ1 ð Þ .
When considering egalitarian welfare, recall that for goods, decision problems E(EWÂEQ1) and E(EWÂEQX) trivially have answer "yes". For the allocation of chores, the maximum egalitarian welfare can be computed in time OðmV n Þ via a dynamic program similar to Algorithm 7 (eliminating p and the corresponding conditions). Consequently, for chores, the problems of E(EWÂEQ1) and E(EWÂEQX) can also be answered in time OðmV 2nþ1 Þ.
We remark that, when considering egalitarian welfare, we have presented two pseudopolynomial algorithms, one using Algorithms 5 and 6 as subroutines, and the other using Algorithm 7 as subroutines. The two types of algorithms are mutually non-dominating in terms of running time. Specific resource allocation problems determine which one is more efficient.

Concluding remarks
In this paper, we have conducted an analysis on both indivisible goods and indivisible chores and studied two notions of relaxed equitability, namely EQX and EQ1, together with efficiency measured by two welfare allocations, utilitarian and egalitarian welfare. On every pairwise fairness and welfare combination, we have provided (almost) tight results on the price of fairness. In the case of chores, to achieve relaxed equitability, almost all efficiency would be sacrificed, while the prices of fairness in goods allocation are all bounded. Particularly, with two agents, fairness can be achieved at the cost of at most half of welfare in goods allocations; however, in the case of chores, fair allocations cannot have a bounded guarantee on welfare. Our results on the price of fairness somewhat reflect the differences between goods and chores. From the results on the price of fairness, relaxed equitability is not always compatible with optimal social welfare, which motivates us to investigate whether one can efficiently determine the existence of a fair and welfare-maximizing allocation and compute the one with maximum welfare among fair allocations. We have depicted a complete picture of the computational complexity of all decision and optimization problems. In particular, when utilitarian welfare is concerned, all decision and optimization problems are strongly NPcomplete or strongly NP-hard for general n agents. For the case of fixed n, except for E (UWÂEQ1) with two agents, other problems are still intractable in polynomial time. On the positive side, we are able to propose a pseudo-polynomial time algorithm that output the fair allocation with the maximum utilitarian welfare. For problem E(UWÂEQ1) with two agents, a polynomial time algorithm exists. When focusing on egalitarian welfare, EQX and EQ1 are compatible with optimal egalitarian welfare in goods allocations. On the contrary, in the case of chores, deciding the existence of EQX (resp., EQ1) and egalitarian welfaremaximizing allocation is strongly NP-hard for general n and weakly NP-complete for fixed n ! 2 (resp., n ! 3). Both goods and chores versions for optimization problems are strongly NP-hard for general n and weakly NP-hard for fixed n. Our results indicate that although goods and chores yield different results in the problem where the numerical value of input matters, for example, price of fairness, they may have similar features in terms of computational complexity.
Looking forward, areas that allure immediate exploration include: (a) bound tightness on the price of EQX in the case of general n and the price of EQ1 with respect to utilitarian welfare; (b) whether Theorem 4.12 still holds when agents' valuations are normalized to a constant; (c) for the allocations of chores with two agents, what is the time complexity of deciding the existence of an EQ1 allocation that also achieves the maximum egalitarian welfare? Besides, given unboundedness of the PoF in our consideration of fair and efficient allocation of chores, it is desirable to improve our current lens of the PoF to see a refined picture about the efficiency loss of a fair allocation of chores. One possible way could be to add a positive parameter intrinsic to the problem instance to both the numerator and denominator of our current definition of the PoF ratio.
Given an arbitrary instance of 3-PARTITION, we construct a fair-goods instance as follows. There are m þ 1 agents and a set E ¼ fe 1 ; . . .; e 3 mþ2 g of 3 m þ 2 goods. The valuation functions are shown in Table 14. It is not hard to verify that an allocation is a UWM if and only if the first 3m goods are assigned to the first m agents and the last two goods are allocated to agent m þ 1.
Suppose we have a "yes" instance of 3-PARTITION, and let I 1 ; . . .; I m be a solution. Then, consider allocation A with A i ¼ S j2Ii e j for any i 2 ½m and A mþ1 ¼ fe 3 mþ1 ; e 3 mþ2 g. Clearly, allocation A is a UWM. For agents' value, we have v i ðA i Þ ¼ T for every i 2 ½m and v mþ1 ðA mþ1 Þ ¼ 2T . Notice that v i ðA i Þ ¼ v mþ1 ðA mþ1 nfegÞ holds for any i 2 ½m and e 2 A mþ1 , and consequently, A is a UWM that satisfies EQX. Now we prove the other direction. Suppose we have a "no" instance of 3-PARTITION. Recall that in any UWM, agent m þ 1 only receives the last two goods and has value 2T. Because it is a "no" instance, assigning the first 3m goods to the first m agents always results in an allocation in which at least one agent receives value strictly smaller than T. In any UWM, when comparing to agent m þ 1, the agent receiving the least value violates the condition of EQX, completing the proof.

A.2 Proof of Theorem 4.2 for goods
This decision problem is in NP as both utilitarian welfare maximization and EQ1 can be examined in polynomial time. The polynomial time reduction in the proof of Theorem 4.1 for goods can be carried over to problem E(UWÂEQ1).

A.3 Proof of Theorem 4.7 for goods
To prove NP-hardness, we derive a reduction from the problem PARTITION. Given an arbitrary instance of PARTITION, we construct a fair-goods instance with two agents and a set E ¼ fe 1 ; . . .; e mþ2 g of m þ 2 goods. The valuation functions are shown in Table 15, where 0\\1. Given these valuation functions, an allocation is a UWM if and only if e mþ1 and e mþ2 are assigned to agent 2 and agent 1, respectively.
Suppose we have a "yes" instance of PARTITION, and let I 1 ; I 2 be a solution. Then, consider allocation A in which A 1 contains bundle S j2I i e j and good e mþ2 , and A 2 ¼ EnA 1 . Clearly, allocation A is a UWM. Then, since v 1 ðA 1 Þ ¼ v 2 ðA 2 Þ ¼ T þ , allocation A is also EQX.
We now prove the other direction. Suppose we have a "no" instance of PARTITION. Then, let S ¼ fe 1 ; . . .; e m g be the set of first m goods and P 2 ðSÞ be the set of 2-partition of S. We denote by D ¼ arg min B2P 2 ðSÞ jv 1 ðB 1 Þ À v 2 ðB 2 Þj, and we claim that D ! 1 because p i 2 N; 8i 2 ½m and it's a "no" PARTITION instance. Let O be an arbitrary UWM, and without loss of generality assume v 1 ðO 1 Þ [ v 2 ðO 2 Þ. According to the construction of D, it must hold that 0\D À v 1 ðO 1 nfe mþ2 gÞ À v 2 ðO 2 Þ implying that agent 2 violates the condition of EQX. Therefore, no UWM can also be EQX, completing the proof.

A.4 Proof of Theorem 4.9 for goods
The problem is in NP as both utilitarian welfare maximization and EQ1 can be tested in polynomial time. To prove NP-hardness, we derive a reduction from the problem of PARTITION. Given an arbitrary instance of PARTITION, we construct a fair-goods instance for three agents with a set E ¼ fe 1 ; . . .; e mþ2 g of m þ 2 goods. The valuation functions are shown in Table 16. An allocation is a UWM if and only if the first m goods are assigned to the first two agents and the last two goods are assigned to agent 3.
Suppose we have a "yes" instance of PARTITION, and let I 1 ; I 2 be a solution. Then, consider allocation A with A 1 ¼ S j2I1 e j , A 2 ¼ S j2I2 e j and A 3 ¼ fe mþ1 ; e mþ2 g. It is straightforward to verify that allocation A is a UWM. As for agents' value, we have v 1 ðA 1 Þ ¼ v 2 ðA 2 Þ ¼ T and v 3 ðA 3 Þ ¼ 2T , and moreover, v 3 ðA 3 nfegÞ ¼ T holds for any e 2 A 3 . Thus, allocation A is also EQ1.
We now prove the other direction. Suppose we have a "no" instance of PARTITION. Recall that in any UWM, agent 3 receives value 2T. Since it is a "no" PARTITION instance, assigning the first m goods to the first two agents always results in an allocation in which one agent receives value strictly smaller than T. In an UWM, when comparing to agent 3, the agent receiving the least value violates the condition of EQ1. Therefore, no UWM is EQ1, completing the proof.

A.5 Proof of Theorem 4.11 for goods
The proof uses Algorithm 4. It is not hard to verify that assigning E i to agent i for all i is the necessary and sufficient condition for guaranteeing the output being an UWM. Clearly, we have k 1 þ k 2 ¼ m. Term e ðiÞ j refers to the j-th goods assigned by algorithm to agent i. If Algorithm 4 terminates at Step 4, clearly we find a UWM that satisfies EQ1. We now consider the case where Algorithm 4 terminates at Step 6, and claim in this case, either E 0 A 1 or E 0 A 2 . It suffices to show that if both A 1 \ E 0 and A 2 \ E 0 are not empty set, then Algorithm 4 terminates at Step 4. To prove this claim, we discuss two cases. If  n o v 2 ðA 2 Þ. The latter one indicates that allocation A is EQ1, a contradiction.
As for the first possible case, recall that terminating at Step 6 means that allocation A is not EQ1, and as a consequence, even when agent 1 receives all E 0 , he still violates the condition of EQ1. Notice that in any UWM, agent 1 receives value at most v 1 ðE 0 [ E 1 Þ ¼ v 1 ðA 1 Þ, and so, no UWM is EQ1. If E 0 A 2 , similarly, there are two possible cases: (i) then allocation A is EQ1, a contradiction. The only possibility is case (i), which then implies that even when agent 2 receives both E 0 and E 2 , she still violates that condition of EQ1. Thus, no UWM is EQ1, completing the proof.
A.6 Proof of Theorem 4.12 for goods It suffices to prove that the decision version of C(UW/EQ1) is NP-complete. We prove it by deriving a reduction from the problem of PARTITION.
Given an arbitrary instance of PARTITION, we construct an instance of the decision version of C(UW/EQ1) with a set E ¼ fe 1 ; . . .; e mþ3 g goods. The valuation functions are shown in Table 17, where 0\\1=T . The threshold value is defined as W ¼ 5T .
We denote by S ¼ fe 1 ; . . .; e m g. Suppose we have a "yes" instance of PARTITION, and let I 1 ; I 2 be a solution. Then, consider an allocation A, in which A 1 contains bundles S j2I1 e j and good e mþ1 and A 2 ¼ EnA 1 . It holds that v 1 ðA 1 Þ ¼ 2T ¼ v 2 ðA 2 nfe mþ3 gÞ, which implies that allocation A is EQ1. Also, we have UWðAÞ ¼ 5T implying that A is an EQ1 allocation with utilitarian welfare 5W.
We now prove the other direction. Suppose we have a "no" instance of PARTITION. For an arbitrary EQ1 allocation B, its utilitarian welfare is no less than 5T only if e mþ1 is assigned to agent 1 and e mþ2 ; e mþ3 are assigned to agent 2. Moreover, it is not hard to verify that in order to gain utilitarian welfare 5T, agent 2 has to receive value at least ð1 þ ÞT from bundle S. Then we discuss two cases according to the largest p i . Let i Ã 2 arg max i2½m p i .
If p i Ã [ T , then due to p i Ã 2 N þ and it is an "no" instance, we have p i Ã À T ! 1. Then, good e i Ã must be assigned to agent 2 so that the utilitarian welfare is no less than 5T. Then, in such an allocation B, agent 1 has value v 1 ðB 1 Þ 3T À p i Ã 2T À 1\2T À T min e2B 2 v 2 ðB 2 nfegÞ. Thus, B is not EQ1, which implies that the utilitarian welfare of any EQ1 allocation is smaller than 5T.
If p i Ã \T (p i Ã 6 ¼ T because of "no" instance), suppose S 1 ; S 2 be a 2-PARTITION of S such that allocation B is composed of B 1 ¼ S 1 [ fe mþ1 g and B 2 ¼ S 2 [ fe mþ2 ; e mþ3 g and has utilitarian welfare no less than 5T. Recall that to meet the requirement on welfare, v 2 ðS 2 Þ ! ð1 þ ÞT must hold, and moreover, owing to "no" PARTITION instance, it holds that v 2 ðS 2 Þ [ ð1 þ ÞT . Accordingly, we have v 1 ðS 1 Þ\T , derived by P i2½m p i ¼ 2T. As a consequence, v 1 ðB 1 Þ\2T min e2B2 v 2 ðB 2 nfegÞ where the last transition is because, in this We first prove the "only if" part by mathematical induction. In the case of k ¼ 0, Step 2 of Algorithm 5 sets Bð0; t; sÞ ¼ True if s i ¼ e 0 and t i ¼ 0 for all i. Note that when k ¼ 0, each agent i receives only e 0 with value equal to 0. Thus, the statement holds for the case of k ¼ 0. We now assume that the statement holds for k ¼ 0; . . .; h and show that it also holds for the case of k ¼ h þ 1. Fix t and s with Bðh þ 1; t; sÞ ¼ True and suppose that Algorithm 5 makes Bðh þ 1; t; sÞ ¼ True when the for-loop in Step 5 being i ¼ i Ã . If s i Ã ¼ e hþ1 , then Step 7 sets Bðh þ 1; t; sÞ ¼ True and thus Bðh; t 1 ; . . .; t i Ã À v i Ã ðe hþ1 Þ; . . .; t n ; s 1 ; . . .; s 0 i Ã ; . . .; s n Þ ¼ True for some s 0 i Ã 2 S h r¼0 e r . As the statement holds for k ¼ h, there exists an allocation P of e 1 ; . . .; e h such that (i) v j ðP j Þ ¼ t j for j 6 ¼ i Ã and v i Ã ðP i Ã Þ ¼ t i Ã À v i Ã ðe hþ1 Þ; (ii) s j 2 S h r¼0 e r and s j 2 P j for all j 6 ¼ i Ã ; s 0 i Ã 2 S h r¼0 e r and s 0 i Ã 2 P i Ã . Then consider allocation P Ã with P Ã j ¼ P j for j 6 ¼ i Ã and P Ã i Ã ¼ P i Ã [ fe hþ1 g. One can verify that P Ã is an allocation of e 1 ; . . .; e hþ1 with v i ðP Ã i Þ ¼ t i and s i 2 P Ã i for all i. If s i Ã 6 ¼ e hþ1 , then Step 10 sets Bðh þ 1; t; sÞ ¼ True and thus Bðh; t 1 ; . . .; t i Ã À v i Ã ðe hþ1 Þ; . . .; t n ; s 1 ; . . .; s i Ã ; . . .; s n Þ ¼ True. As the statement holds for k ¼ h, there exists an allocation Q of e 1 ; . . .; e h such that (i) v j ðQ j Þ ¼ t j for j 6 ¼ i Ã and v i Ã ðQ i Ã Þ ¼ t i Ã À v i Ã ðe hþ1 Þ; (ii) s j 2 S h r¼0 e r and s j 2 Q j for all j. Then consider allocation Q Ã with Q Ã j ¼ Q j for j 6 ¼ i Ã and Q Ã i Ã ¼ Q i Ã [ fe hþ1 g. One can verify that Q Ã is an allocation of e 1 ; . . .; e hþ1 with v i ðQ Ã i Þ ¼ t i and s i 2 Q Ã i for all i. Up to here, the statement also holds when k ¼ h þ 1. Overall, by mathematical induction, the "only if" part is proved. Now let us prove the "if" part, again with mathematical induction. In the case of k ¼ 0, Step 2 of Algorithm 5 sets Bð0; t; sÞ ¼ True if s i ¼ e 0 and t i ¼ 0 for all i. Accordingly, if Bð0; t 0 ; s 0 Þ ¼ False, then either t 0 q 6 ¼ 0 or s 0 q 6 ¼ e 0 holds for some q. Note that in the case of k ¼ 0, no allocation can make agent q receive non-dummy item s 0 q or a non-zero value. Thus, the statement holds for the case of k ¼ 0. We now assume that the statement holds for k ¼ 0; . . .; h and show that it also holds for the case of k ¼ h þ 1. Fix t and s with Bðh þ 1; t; sÞ ¼ False. For a contradiction, assume that P is an allocation of e 1 ; . . .; e hþ1 with v j ðP j Þ ¼ t j and s j 2 P j for all j. Without loss of generality, we assume e hþ1 2 P i Ã . Construct an allocation P 0 of e 1 ; . . .; e h with P 0 j ¼ P j for j 6 ¼ i Ã and P 0 i Ã ¼ P i Ã nfe hþ1 g. If s i Ã ¼ e hþ1 , due to the construction of P and P 0 and the fact that the statement holds for k ¼ h, one can verify that allocation P 0 makes Bðh; t 1 ; . . .; t i Ã À v i Ã ðe hþ1 Þ; . . .; t n ; s 1 ; . . .; s 0 i Ã ; . . .; s n gÞ ¼ True, where s 0 i Ã 2 S h r¼0 e r . Accordingly, when the for-loop in Step 5 is i ¼ i Ã , Step 7 will set Bðh þ 1; t; sÞ ¼ True, a contradiction. If s i Ã 6 ¼ e hþ1 , since s i Ã 2 P i Ã and s i Ã 6 ¼ e hþ1 , we have s i Ã 2 P 0 i Ã . Due to the construction of P and P 0 and the fact that the statement holds for k ¼ h, one can verify that allocation P 0