1 Introduction
Fair division refers to the general problem of allocating a set of resources to a set of agents in a way satisfying a desired fairness criterion. A wellknown example of such a criterion is envyfreeness (Gamow and Stern, 1958; Foley, 1967; Varian, 1974), where each agent perceives the share she receives to be no worse than what any other agent receives. Since the problem was formally introduced by Banach, Knaster and Steinhaus (Steinhaus, 1948), fair division has attracted the attention of various scientific disciplines, including mathematics, economics, and political science. During the last two decades, the algorithmic aspects of fair division have been the focus of a particularly active line of work within the computer science community, e.g., see (Procaccia, 2016; Bouveret et al., 2016; Markakis, 2017) and references therein.
We consider the classic setting where the resources are indivisible goods that need to be fully allocated and the agents have additive valuation functions. One of the main challenges in this setting is that classic fairness notions such as equitability, envyfreeness and proportionality—introduced several decades ago having divisible resources in mind—are impossible to satisfy. To see this for envyfreeness, it suffices to consider two agents and one good of value; the agent who does not get the good is going to be envious. This has led to the recent emergence of several weaker fairness notions (see 1.2 Related work). As a result, there is a plethora of open questions about the existence, the computation and the interrelationships of such notions. In this work we focus on two of the most prominent: envyfreeness up to any good (EFX) and maximum Nash welfare (MNW).
EFX, introduced recently by Caragiannis et al. (2019b), is an additive relaxation of envyfreeness. Here an agent may envy another agent but only by the value of the least desirable good in the other agent’s bundle. While this added flexibility of EFX takes care of extreme pathological cases like the one mentioned above ( agents, good), this notion is not well understood yet. Despite the active interest in it, it is not known whether EFX allocations always exist, even for agents with additive valuation functions. We consider the problem of proving (or disproving) the existence of EFX allocations to be one of the most intriguing currently open questions in fair division.
The Nash social welfare
(or, simply, Nash welfare) is the geometric mean of the agents’ utilities. By considering maximum Nash welfare (MNW) allocations, i.e., allocations that maximize the product of the utilities, we achieve some kind of balance between the
efficiency of the maximum utilitarian social welfare—the sum of the utilities—and the individual fairness of the maximum egalitarian social welfare—the minimum utility. Although not a fairness concept per se, MNW has strong ties to fairness. In the setting where the goods are divisible, each (possibly fractional) MNW allocation corresponds to a competitive equilibrium from equal incomes, a market equilibrium (under the assumption that all agents are endowed with the same budget) that is known to guarantee envyfreeness and Pareto optimality (Varian, 1974). Even in our setting, Caragiannis et al. (2019b) showed that integral MNW allocations, besides being Pareto optimal, are envyfree up to one good (EF1) and approximately satisfy maximin share fairness up to a factor. Both these guarantees are significantly weaker than EFX, in the sense that they are both implied by EFX but they do not imply any approximation of it.In general, MNW does not imply EFX. One of our goals is to identify the cases where it does, in terms of the allowed number of distinct values for the goods. For such cases, we immediately obtain that EFX allocations must exist and then investigate how to efficiently compute them, either through maximizing the Nash welfare or directly. Since, in general, MNW does not even imply a nontrivial approximation of EFX, we further introduce a less stringent, yet natural, new interpretation of approximate EFX and investigate how it is related to MNW.
1.1 Our contribution
There are two variants of EFX used in the related literature, depending on whether only the positively valued goods are considered or not; for the latter case we adopt the name suggested by Kyropoulou et al. (2019). We start by establishing a strong algorithmic connection between the two variants (Proposition 2.3). Then we explore the relationship between maximizing the Nash welfare and achieving EFX or allocations. In doing so, we also obtain some interesting results for the individual notions. In particular:

In case there are at most two possible values for the goods (2value instances), we show that any allocation that maximizes the Nash welfare is (Theorem 3.2). This has the following two consequences:

For any 2value instance, there exists an allocation. Note that this is the first such existence result for nonidentical valuations that holds for any number of agents and goods.

For the special case of binary valuations, by adapting an algorithm of Barman et al. (2018c), we can efficiently construct an allocation that is both MNW and .
Note that the implication is no longer true for three or more distinct values.


While for general 2value instances the efficient computation of an MNW allocation remains an open problem, we propose a polynomialtime algorithm for producing allocations in this case (Theorem 4.1). This algorithm, which we call Match&Freeze, is based on repeatedly computing maximum matchings and “freezing” certain agents whenever they acquire too much value compared to their peers. We believe these novel ideas might be a stepping stone for proving the existence of EFX allocations in more general settings.

We also show that the difficulty of computing EFX allocations does not depend solely on the different number of values, but also on the ratio between the maximum and the minimum value. In particular, for instances where the values of the agents lie in an interval such that the ratio between the maximum and the minimum value is at most , we can compute an EFX allocation using a simple variation of the wellknown roundrobin algorithm (Theorem 4.4).

For general additive valuations, we show that an MNW allocation does not guarantee any nontrivial approximation of EFX. However, we argue that the current definition of approximate EFX allocations is not always meaningful. Instead, we explore a different natural definition based on the idea of (hypothetically) augmenting an agent’s bundle until an EFXlike condition is satisfied. For this new benchmark, which we call EFXvalue, we show that any MNW allocation is a approximation of EFX (Theorem 5.5).
1.2 Related work
As there is a vast literature on fair division, here we focus on the indivisible items setting and on related fairness notions. The concept of envyfreeness up to one good (EF1) was implicitly suggested by Lipton et al. (2004) and formally defined by Budish (2011). Budish (2011) also introduced the notion of maximin share (MMS), which has been studied extensively (Kurokawa et al., 2018; Amanatidis et al., 2017; Barman and Murthy, 2017; Garg et al., 2019; Ghodsi et al., 2018; Garg and Taki, 2019) and has yielded several very interesting variants like pairwise MMS Caragiannis et al. (2019b), groupwise MMS (Barman et al., 2018a), and MMS for groups of agents Suksompong (2018).
As already mentioned, EFX was introduced by Caragiannis et al. (2019b). Plaut and Roughgarden (2018) defined what an approximate EFX (or EFX) allocation is and studied exact and approximate EFX allocations with both additive and general valuations. Most of their results, including the existence of EFX allocations for identical valuations, hold under the similar but stricter notion of which is implicitly introduced therein. The currently best approximation of either EFX or for the additive case is due to Amanatidis et al. (2020). For binary additive valuations, Aleksandrov and Walsh (2019) recently proposed an algorithm that produces EFX—but not necessarily —allocations.
Besides (Caragiannis et al., 2019b), there are several recent papers which relate allocations that maximize (exactly or approximately) the Nash welfare with other fairness notions. Caragiannis et al. (2019a) showed that there exist incomplete allocations that are EFX and in which each agent receives at least half of the value they get in a MNW allocation; Chaudhury et al. (2020) achieved the same with only a few unallocated goods. Garg and McGlaughlin showed how to get an allocation that 2approximates the Nash welfare of an MNW allocation that is also proportional up to one good, satisfies a weak MMS guarantee and is Pareto optimal.
Since computing MNW allocations is an APXhard problem (Lee, 2017), there is an active interest on special cases or on approximation algorithms. Barman et al. (2018c) show how to efficiently compute MNW allocations for binary additive valuation functions. Cole and Gkatzelis (2018) were the first to obtain a constant approximation algorithm to the MNW objective. This algorithm, as shown via the improved analysis of Cole et al. (2017), achieves a factor of 2. The currently bestknown factor of 1.45 is due to Barman et al. (2018b). Going beyond the additive case, in a recent work Garg et al. (2020) study the problem for submodular valuation functions.
2 Preliminaries and Notation
We consider fair division instances in which there is a set of agents and a set of indivisible goods. Each agent has a valuation function assigning a nonnegative real value to each good . Throughout this work, is additive, i.e., for every set (or bundle) of goods . We pay particular attention to the following subclasses of additive valuation functions:

Binary: for every and ;

value: there is a set consisting of distinct, nonnegative real values such that for every and ;

Intervalvalue: for every agent there exist two real nonnegative numbers and such that , and for every .
Of course, any binary instance is a value instance with , but we distinguish between these cases as we are able to obtain stronger algorithmic results for the binary case.
A complete allocation (or just allocation)
is a vector listing the bundle
of goods that each agent receives, such that for every , and . Our goal is to come up with allocations that are considered to be fair by all agents. We begin by defining envyfreeness and its additive relaxations.Definition 2.1.
An allocation is

envyfree (EF) if for every pair ;

envyfree up to one good (EF1) if for every pair with there exists a good , such that ;

envyfree up to any (positivelyvalued) good (EFX) if for every pair and every good for which , it holds that ;

envyfree up to any good () if for every pair and every good , it holds that .
By definition, we have , but no implication works in the opposite direction. For brevity, we say that agent is towards agent when the criterion of
is true for the ordered pair
.As mentioned in the 1 Introduction, the Nash welfare is usually defined as the geometric mean of the values. Here, for simplicity, we use the product of the values instead. As the allocations (exactly) maximizing the Nash welfare are the same under both definitions, this is without loss of generality.
Definition 2.2.
The Nash welfare of an allocation is the product of the values of the agents for their bundles:
We will usually denote by one of the allocations that maximize the Nash welfare (MNW). Among all such allocations, we will sometimes select so that some additional properties are satisfied; e.g., see the discussion in Section 3. Caragiannis et al. (2019b) showed that , but the exact connection between MNW and the variants of EFX is not wellunderstood.
Before we dive into our main technical results, we show a somewhat surprising connection between EFX and . In particular, assuming agents with value valuation functions, for any , the question of finding an allocation reduces to finding an EFX allocation for an instance with only slightly perturbed valuation functions. An immediate corollary is that the existence (resp. the efficient computation) of EFX allocations for additive agents implies the existence (resp. the efficient computation) of allocations; the converse statements are obvious.
Proposition 2.3.
Let . The problem of computing allocations for value instances reduces to the problem of computing EFX allocations for value instances. When all values are rational numbers, this reduction requires only polynomial time.
Proof.
Consider any instance . Let be the minimum nonzero value difference among any two subsets of goods, according to the valuation function of any agent, that is
Furthermore, pick an arbitrarily small . Now, let be an instance such that
That is, is obtained from by changing any in the valuation functions of the agents to . Assume that there exists an EFX allocation for instance . We will show that is also an allocation for .
Consider any pair of agents . Since is EFX in , we have that for every . Let . Observe that by the choice of , is the one that must be ignored when we check whether is for as well.

If , then it must be the case that . Assume otherwise that . Then, by the definition of , it must be . Using the fact that , by our choice of , we have that
contradicting the assumption that is EFX in . Hence, is envyfree towards .

If , then it must be the case that . As before, assume otherwise that or, equivalently, . Since , and by our choice of , we have that
again contradicting the assumption that is EFX in . Hence, is towards .
Therefore the computation of an allocation can be reduced to computing an EFX allocation in an instance with slightly perturbed valuation functions as above.
In case the values are rational numbers, this reduction needs only polynomial time as is at least , where is the denominator of the product of the values of all agents for all goods, and hence it suffices to choose . ∎
3 Maximum Nash Welfare: EFX and Computational Complexity
In this section we focus on allocations that maximize the Nash welfare. We first identify the subclasses of valuation functions for which the MNW allocations are always , and then consider computational complexity questions.
Before moving forward, we need to discuss how we handle instances with zero Nash welfare and instances containing zerovalued goods, i.e., goods for which all agents have value .^{1}^{1}1 Even though it seems quite natural to discard such zerovalued goods, there are settings where one cannot assume free disposal and all goods must be allocated.
Instances with zero Nash welfare. When we talk about the MNW allocations of an instance, the standard interpretation would be to include all complete allocations which achieve the maximum Nash welfare. When it is possible to achieve positive Nash welfare this is indeed true. However, for the extreme case of instances where all allocations have zero Nash welfare we are going to need a refinement. Following the work of Caragiannis et al. (2019b), we call an allocation an MNW allocation if it (1) maximizes the number of agents with positive value, and then (2) maximizes the product of the values of such agents.
The requirements (1) and (2) are by default true for MNW allocations in instances with positive Nash welfare. They are also necessary because when the Nash welfare is zero, the idea of maximizing it clearly fails to distinguish “good” allocations in any sense. To illustrate this, consider the next instance:



agent  
agent  
agent 
Since the first two agents only like , the Nash welfare of any allocation is . However, not all allocations are . The allocation is clearly not since the first two agents envy agent even after the removal of either or . Even an allocation such as , which maximizes the number of agents with positive value, is not since agent envies agent even after the removal of . On the other hand, the allocation , which maximizes the number of agents with positive value as well as the product of their values, is indeed : the envy of agent towards agent is eliminated by the removal of .
Instances with zerovalued goods. While, clearly, zerovalued goods do not affect the Nash welfare of an allocation, they do play an important role as to whether this allocation is . To allocate such goods, we first ignore them completely, and compute a Nash welfare maximizing partial allocation only for the remaining goods (which are positively valued by some agent), subject to the requirements (1) and (2) in case the Nash welfare is zero. We then obtain the complete MNW allocation by allocating all the zerovalued goods to one of the agents with the least value according to .^{2}^{2}2 For the restricted valuation classes we study here, this suffices. A more general alternative way to complete the allocation would be to allocate all the zerovalued goods to one of the agents that no one envies in . It is not hard to show that in any MNW (partial) allocation at least one such agent exists. Observe that , by definition. Allocating the zerovalued goods this way is also necessary as we illustrate next. Consider the same example as above, but with an extra zerovalued good , such that:



agent  
agent  
agent 
As before, all allocations have zero Nash welfare, and hence we need an allocation that satisfies (1) and (2). The allocation is indeed such an allocation: the number of agents with positive value as well as the product of their values are maximized. However, because has been given to agent (who has value ) instead of (who has value ), agent envies agent even after its, and thus the allocation is not . By moving to agent , we obtain the allocation , which maximizes the number of agents with positive value, the product of their values, and gives the allzero good to the agent with the least value among all agents, and is indeed as agent has only one good.
3.1 When does MNW imply EFX?
Our main result here is that for all value instances any MNW allocation is also . Moreover, this result is tight: there exist value instances for which this implication is no longer true. To simplify the presentation of our results, we distinguish between binary and general value instances.
Theorem 3.1.
For every binary instance, any MNW allocation is .
Proof.
Consider any binary instance , and let be the allocation that maximizes the Nash welfare (by maximizing the number of agents with positive value and then the product of their value in case the MNW is zero) for the subinstance consisting only of the goods which are positively valued by some agent. Then, is obtained from by allocating the remaining goods (which are valued as zero by all agents) to one of the agents with the least value for their own bundles.
Observe that in , must be such that all agents with positive value get goods which they value as and all agents with zero value get an empty set. Assume otherwise that some agent gets a good such that . Then by moving to some agent with we can strictly increase either the product of the values of the agents that have positive value or the number of agents that get positive value, a contradiction. Hence, we have that .
We next show that by allocating all the zerovalued goods to some agent we have that is as long as is . We distinguish between two cases depending on whether or .
Case I: .
Consider a pair of agents and . If , then must be towards since is EF1 towards , and the two notions coincide. So, from now on we assume that . Moreover, we assume that there exists a good in that values as , since otherwise would trivially be towards , and hence .
We will show that is in fact envyfree towards , and thus . Assume towards a contradiction that . Since there exists a good such that , we have that . By the fact that and , we thus obtain that . Now, define a new allocation by moving a good in that values as from to . The product of the values of the two agents in the new allocation is equal to
Since the bundles of the remaining agents have not changed, the new allocation has strictly higher Nash welfare compared to , a contradiction.
Case II: .
Consider a pair of agents and . If and , then they are trivially envyfree towards each other. Also, if and , we can show that they are towards each other by adapting our arguments for the previous case. Hence, we now focus on the case where and . If , then is trivially towards . Hence, assume that . We claim that , and consequently is envyfree towards . Assume otherwise that there exists a good such that . Then, by moving from to we can either obtain positive Nash welfare if is the only agent with zero value, or we can increase the number of agents with positive value in case the Nash welfare remains equal to ; since , still has positive value even after losing .
In any case, we conclude that is , and consequently is as well. ∎
We continue by showing that maximizing the Nash welfare yields an allocation for all value instances. Since a value instance with values and is equivalent to a binary instance (by normalizing the values), Theorem 3.1 above implies that we only need to focus on instances with positive values. Note that in this case coincides with EFX.
Theorem 3.2.
For any value instance with positive values, any MNW allocation is EFX.
Proof.
Let and consider any value instance in which for every and . Let and be any two agents who are given the sets of goods and in an MNW allocation . We say that a good is of type if and have values and for good , respectively; so there are four different types of goods: , , and . If or , then is EFX towards since is EF1 towards (Caragiannis et al., 2019b) and the two notions coincide in this case for the pair . Therefore, from now on, we will assume that and , which implies that and includes at least one good of type or .
Case I: There is at least one good of type in .
Subcase (a): does not include any good of type . Assume, towards a contradiction, that is not EFX towards : . Since for all , we have that . We now define a new allocation by moving a good of type from to . In this new allocation, the product of the values of and is
Since the allocation of all other agents has not been changed, the new allocation achieves a strictly larger Nash welfare than , yielding a contradiction.
Subcase (b): includes at least one good of type . We will argue about the structure of set . If includes any good of type , or , then by exchanging with , we obtain an allocation with strictly higher Nash welfare, contradicting the choice of . For example, if is of type , then in the new allocation (after swapping and ) agent has exactly the same value, but agent ’s value has strictly increased by an amount . One can verify that the same holds for the other two types. Hence, must include only goods of type , which implies that .
Towards a contradiction, assume that is not EFX towards . If , since includes some good for which , we have that
i.e., agent is EFX towards . So, it must be . We create a new allocation by moving a good from to . The product of the values of and then becomes
Since and , we have that
Since the bundles of the other agents have not been changed, we have that the new allocation has strictly larger Nash welfare than , contradicting its choice.
Case II: There are no goods of type in .
Then includes at least one good of type . If includes at least one good of type , then, as we argued in Case I(b) above, in order for to be an MNW allocation, cannot include any goods of type , or . As a result, includes only goods of type and by reproducing the analysis used in Case I(b) it follows that is EFX.
So, we may assume that includes goods of type and only. This implies that . Assume towards a contradiction that is not EFX towards : . Since contains at least one good that values as , we also have that Combining the last two expressions, we obtain that
Now, consider the allocation that is obtained from by moving a good of type from to . We know that such an item exists since . By using the last inequality, the product of the values of and in the new allocation is
which combined with the fact that the bundles of the other agents have not been changed, contradicts the choice of .
In any case, we conclude that must be EFX. ∎
Caragiannis et al. (2019a) presented a value instance in which no MNW allocation is EFX. For completeness, we include here a simpler such instance, which further shows that the implication is no longer true even for intervalvalue instances in which the length of the interval is almost zero. Let be a small positive constant and consider an instance with two agents and three goods with values as shown in in the table:



agent  
agent 
This is a value instance with values . Clearly, it is also an intervalvalue instance with interval of length , which can be arbitrarily close to zero by selecting to be extremely small. It is easy to verify that there are exactly two allocations achieving the maximum Nash welfare of : and . The Nash welfare of any other allocation is either or . Now, for , observe that in agent is not EFX towards the other agent since she envies her even after the removal of .
3.2 On the complexity of maximizing the Nash welfare
We now turn our attention to the complexity of computing a maximum Nash welfare allocation. This problem is already known to be hard for many domain restrictions, and easy for only a few special cases. Nevertheless, its complexity for value instances with has been open. Here we make significant progress towards settling these cases. We again start with the binary case.
Theorem 3.3.
For binary instances, computing an MNW allocation (and thus an allocation) can be done in polynomial time.
Proof.
Consider any binary instance and let be the subinstance consisting only of the goods that are positively valued by some agent. Given the MNW allocation for , we can obtain the MNW allocation for by augmenting so that all the zerovalued goods are given to the agent with minimum value according to . So, it remains to compute in .
To do this, we use the greedy algorithm AlgBinary of Barman et al. (2018c) which outputs an allocation maximizing the Nash welfare for the binary instance. Let be the allocation that AlgBinary outputs when given as input . If , then is also by Theorem 3.1. However, if , in which case all allocations have zero Nash welfare, might not be an MNW allocation in our sense, i.e., an allocation that maximizes the number of agents with positive value and then the product of their values. Hence, may not be . To circumvent this, we define a bipartite graph consisting of nodes corresponding to the agents on the left and nodes corresponding to the goods on the right, while an edge between an agent and a good exists if the agent has value for the good. By computing a maximum bipartite matching on this graph, it is guaranteed that the number of agents with positive value is maximized. Then, we run AlgBinary on the restricted subinstance of where the set of agents includes only the ones that participate in the maximum matching, so that the product of their values (which now is going to be positive) is also maximized. This yields the desired allocation with maximum Nash welfare for in which the agents that did not participate in the maximum matching get an empty set. ∎
For general value instances we were unable to resolve the complexity of computing an MNW allocation, but we show that the problem is NPhard for value instances. This extends the hardness aspect (but not the inapproximability) of the result of Lee (2017) for value instances.
Theorem 3.4.
Computing an MNW allocation is NPhard, even for value instances.
Proof.
We will prove that the problem of deciding whether there exists an allocation that achieves Nash welfare at least some value is NPcomplete. Given an allocation, it is trivial to check whether its Nash welfare is at least . For the hardness, we give a reduction from a special version of 3SAT, known as 2P2N3SAT, where every variable appears twice as a positive literal and twice as a negative literal. This problem is known to be NPcomplete (Yoshinaka, 2005; Berman et al., 2003).
Consider an instance of 2P2N3SAT, in which the set of variables is }, and the set of clauses is . We will now describe how to construct a value instance with goods and agents, where the set of values consists of , and , where .
For each variable , introduce two variableagents , as well as variablegoods, denoted as . The values of the variableagents for the variablegoods are:

: both and have value for it; the value of all other variableagents is .

and : has value for each of them; the value of all other variableagents is .

and : has value for each of them; the value of all other variableagents is .
For each clause ), where , and are the three literals in the clause, introduce three clauseagents and two clausegoods . The values of the clauseagents for all goods as well as the values of the variableagents for the clausegoods are as follows:

Both and are valued as by the three corresponding clauseagents and , and as by all other (variable and clause) agents.

For every , the clauseagent , has value for all other goods, besides one:

If , then has value for one of two variablegoods (whichever is not valued by some other clauseagent).

If , then has value for one of the two variablegoods (whichever is not valued by some other clauseagent).

Note that since there are exactly two occurrences of and in the 2P2N3SAT instance, each of the variablegoods is valued by exactly two agents (and one of them is always or ).
Given a satisfying assignment for the 2P2N3SAT instance, we define the following allocation with Nash welfare at least :

Variables: If , then we allocate to (for value ) and to (for value ). Otherwise (), we allocate to (for value ) and to (for value ).

Clauses: Let . Since is satisfied, at least one of , or is true; without loss of generality, assume that is true. Then, we allocate to (for value ), and to (again for value ). Note that there is now exactly one good valued by that is still unallocated. If , then this good is one of or , while if , then this good is one of or . In any case, we allocate this good to .

We allocate any remaining goods arbitrarily.
Now observe that for any variable the product of the values of the two variableagents and is at least , and for any clause the product of the values of the three clauseagents , and is at least . Consequently, the Nash welfare of the resulting allocation is at least .
Conversely, we will now show that given any allocation with Nash welfare at least , we can obtain a satisfying assignment for the 2P2N3SAT instance. Without loss of generality, we can assume that every good has been allocated to some agent that has positive value for it. Otherwise, we can modify the allocation so that this holds and the Nash welfare will not decrease. In particular, in any clause , the goods and will be allocated to the agents .
More specifically, we can assume that and have been allocated to distinct clauseagents. Suppose otherwise that and have both been allocated to the same agent, say . If one of or has value (and hence the Nash welfare is ), then by allocating to that agent instead the Nash welfare will not decrease. If both and have positive value, then this must be equal to . Reallocating to (say) will not decrease the Nash welfare. Indeed, before the modification the product of values was at most and after it is at least . By our choice of , we have , so the Nash welfare cannot decrease as a result of this modification.
By the observation above, we can assume that has been allocated to or . If it has been allocated to , then we can also assume that goods and have not been allocated to , but instead that they have each been allocated to the unique other agent that values them. Let us show this for (the other case is identical). Assume that has been allocated to and let be the unique other agent that values it. By the above discussion, has obtained at most one of and . If has value , it is easy to see that allocating to does not decrease the Nash welfare. If has positive value, then this must be equal to . Now if has utility , then by allocating to instead, the product of values increases from to . On the other hand, if has utility , then by allocating to instead, the product of values remains the same (it goes from to ). Similarly, if good has been allocated to , we can assume that goods and have not been allocated to , but instead that they have each been allocated to the unique other agent that values them.
We now construct an assignment for the variables as follows:

If has obtained , then we set .

If has obtained , then we set .
We say that the allocation satisfies the consistency property, if the agent in that has not obtained , has obtained all other goods which she values for a total value of .
Let us first show that if the allocation satisfies the consistency property, the assignment satisfies the 2P2N3SAT instance. Observe that for every clause , one of the three agents , or will not obtain one of the two clausegoods which they all value as . Thus, this agent has to obtain the single other variablegood which she positively values, otherwise the Nash welfare would be . By the consistency property, it follows that the literal associated to this agent must be satisfied. Thus, the clause is satisfied.
Finally, let us show that if the Nash welfare of the allocation is at least , then the consistency property holds. Assume that there exists an such that the agent in that has not obtained , has value strictly less than , i.e. at most . Thus, the product of the values of and is at most . For any other , the product of the values of and is at most . For any clause , the product of the values of the three corresponding clauseagents is at most . Thus, altogether the Nash welfare is at most . By our choice of , we have ensured that , and so the Nash welfare is indeed strictly less than . ∎
4 Computing EFX Allocations for Restricted Domains
Even though we showed that any MNW allocation is also for agents with value valuation functions, it remains an open question whether there exists a polynomialtime algorithm for computing such allocations beyond the binary case. In this section, we try to circumvent this and aim to design efficient algorithms for computing allocations (which might not maximize the Nash welfare) for value instances and intervalvalue instances.
4.1 2value instances
We begin with considering value instances with values such that . Our algorithm, which we call Match&Freeze, proceeds in rounds and maintains a set of active agents , initially containing everyone. In each round, every active agent is given exactly one of the remaining goods, with the possible exception of the last round in which there might not be enough goods left for all agents. The algorithm terminates when all goods have been allocated.
To determine which good each active agent gets during a round, we create a bipartite graph with nodes corresponding to the active agents on one side and to the remaining goods on the other. An edge between an active agent and a good exists if and only if . We first compute a maximum matching on this graph. Then each agent gets the good to which she is matched. If there are agents who are not matched to any good and there are still available goods, the unmatched agents receive one arbitrary available good each (subject to availability).
There are two possible reasons why an agent is not matched to any good in a round: (1) she does not have value for any good (only ), or (2) the maximum matching is such that all goods for which her value is are given to other agents. Case (1) does not affect whether the final allocation will be , but case (2) is crucial. This is because agent might now have much smaller value for her own bundle compared to her value for the bundles of some agents that just received one good each that values as . Let be the set of these agents. To make up the distance, agent should possibly receive multiple goods of value while all agents in must freeze for a number of subsequent rounds depending on the ratio .
We define the set of agents that need to freeze at the end of round to consist of all those agents who must become inactive because they have obtained too much value from the perspective of other agents (similarly to Case (2) above). Formally, for every active agent , let be the good she gets in round . We begin by setting . Then, iteratively, as long as there is an agent such that there exists with , we also add to . Each agent in will remain frozen for the next rounds. In the case , we use the interpretation in which case agents in remain frozen forever. Exploiting the properties of the maximum matchings used to allocate goods we can prove that no agent in will become envious while frozen, and that is always a strict subset of . The latter means that there is at least one (nonfrozen) active agent at any time, and thus the algorithm will terminate after at most rounds.
Theorem 4.1.
For any value instance, Match&Freeze computes an allocation in polynomial time.
Proof.
Let be the allocation outputted by Match&Freeze when given as input a value instance such that , , for every and . For any agent , let be the round in which the last goods of value for agent were allocated. We will need the following two lemmas.
Lemma 4.2.
For every agent , it holds that:

She was allocated a good for which she has value in each of the rounds .

She can freeze only at the end of round , and only if during that round she got a good for which she has value .

She can freeze at most once. After freezing, she has value for each of the remaining goods.
Proof of Lemma 4.2.
For the first part of the lemma, assume that agent was allocated a good she values as in some round . This would mean that agent was left unmatched in round . However, in round there were still goods that values as available. Consequently, agent could also have been matched in round , which means that we did not use a maximum matching, a contradiction.
For the second and third part of the lemma, consider an agent that got frozen at the end of some round . Since agent got frozen, there exist distinct agents () such that for , and . Note that agent was not matched in round . Let us now show that the following cases are impossible: