We consider the task of dividing indivisible goods among a set of agents in a fair manner. More precisely, we consider the following scenario. We have distinct goods. Goods are available in several copies or items; there are items of good . The agents have decreasing utilities for the different items of a good, i.e., for all and
An allocation assigns the items to the agents. For an allocation , denotes the multi-set of items assigned to agent , and denotes the multiplicity of good in . Of course, for all . The total utility of bundle for agent is given by
Each agent has a utility cap . The capped utility of bundle for agent is defined as
Our notion of fairness is Nash social welfare () , i.e., the goal is to maximize the geometric mean
of the capped utilities. All utilities and caps are assumed to be integers. We give a polynomial-time approximation algorithm with approximation guarantee for any positive .
The problem has a long history. For divisible goods, maximizing Nash Social Welfare (NSW) for any set of valuation functions can be expressed via an Eisenberg-Gale program . Notably, for additive valuations ( for each agent and for each good ) this is equivalent to a Fisher market with identical budgets. In this way, maximizing NSW is achieved via the well-known fairness notion of competitive equilibrium with equal incomes (CEEI) .
For indivisible goods, the problem is NP-complete  and APX-hard . Several constant-factor approximation algorithms are known for the case of additive valuations. They use different approaches.
The first one was pioneered by Cole and Gkatzelis  and uses spending-restricted Fisher markets. Each agent comes with one unit of money to the market. Spending is restricted in the sense that no seller wants to earn more than one unit of money. If the price of a good is higher than one in equilibrium, only a fraction of the good is sold. Cole and Gkatzelis showed how to compute a spending restricted equilibrium in polynomial time and how to round its allocation to an integral allocation with good NSW. In the original paper they obtained an approximation ratio of . Subsequent work  improved the ratio to .
The second approach is via stable polynomials. Anari et al.  obtained an approximation factor of .
The third approach is via integral allocations that are Pareto-optimal and envy-free up to one good. It was introduced by Barman et al. . An allocation is envy-free up to one good if for any two agents and there is a good such that , i.e., after removal of one good from ’s bundle its utility for is no larger than the utility of ’s bundle for . Caragiannis et al. 
have shown that an allocation maximizing NSW is Pareto-optimal and envy-free up to one good. For a price vectorfor the goods, the price of a bundle is the sum of the prices of the goods in the bundle. An allocation is almost price-envy-free up to one good (--EF1) if for all agents and and some good , where is an approximation parameter. An allocation is MBB (maximum bang per buck) if implies for all and . Barman et al.  studied allocations that are Pareto-optimal, almost price-envy-free up to one good, and MBB. They showed that such allocations are almost envy-free up to one good111Consider two bundles and and assume for some . Let . Then . and approximate NSW up to a factor . They also showed how to compute such an allocation in polynomial time.
There are also constant-factor approximation algorithms beyond additive utilities.
Garg et al.  studied budget-additive utilities ( for all goods and arbitrary ). They showed how to generalize the Fisher market approach and obtained an -approximation.
Anari et al.  investigated multi-item concave utilities ( for all and arbitrary). They generalized the Fisher market and the stable polynomial approach and obtained approximation factors of and , respectively.
We show that the price-envy-free allocation approach can handle both generalizations combined. We obtain an approximation ratio of . The allocation computed by our algorithm is Pareto-optimal and guarantees for any two agents and , i.e., it approximates envy-freeness up to one item up to a factor of essentially two. The approach via price-envy-freeness does not only yield better approximation ratios, it is, in our opinion, also simpler to state and simpler to analyze.
The paper is structured as follows. In Section 2 we give the algorithm and analyze its approximation ratio (Section 2.3), guarantee to individual agents (Section 2.4), and running time (Section 2.5). In Section 3 we show that the analysis is essential tight by establishing a lower bound of 1.44 on the approximation ratio of the algorithm, in Section 4 we discuss certification of the approximation ratio, and in Section 5 we show that for the multi-copy case and the capped case optimal allocations are not necessarily envy-free up to one good.
2 Algorithm and Analysis
Let us recall the setting. Items are indivisible. There are agents and goods. There are items or copies of good . Let be the total number of items. The agents have decreasing utilities for the different items of a good, i.e., for all and
For an allocation , denotes the multi-set of items assigned to agent , and denotes the multiplicity of good in . The total utility of bundle for agent is given by
Each agent has a utility cap . The capped utility of bundle for agent is defined as
Following , we assume w.l.o.g. for all , , and . In the algorithm, we ensure this assumption by capping every at . All utilities and caps are assumed to be integers.
2.1 A Reduction to Rounded Utilities and Caps
Let . For every non-zero utility let be the next larger power of . For zero utilities and agree. Similarly, for let be the next larger power of . It is well-known that it suffices to solve the rounded problem with a good approximation guarantee.
Let approximate the NSW for the rounded problem up to a factor of . Then approximates the NSW for the original problem up to a factor .
Let be an optimal allocation for the original problem. Let us write for the Nash social welfare of the allocation with respect to the utilities and caps . Define , , and analogously. We need to upper bound . Since and componentwise, . Since approximates the NSW for the rounded problem up to a factor , . Since and componentwise, . Thus
2.2 The Algorithm
Barman et al.  gave a highly elegant approximation algorithm for the case of a single copy per good and no utility caps. We generalize their approach. The algorithm uses an approximation parameter . Let . The nonzero utilities are assumed to be powers of .
The algorithm maintains an integral assignment , a price for each good, and an MBB-ratio222In the case of one copy per good, whenever (the single copy of) good is assigned to and for all goods . Thus is the maximum utility per unit of money (maximum bang per buck (MBB)) that agent can get. for each agent. Of course, for each good . The prices, MBB-ratios, and multiplicity of goods in bundles are related through the following inequalities:
i.e., if , then at least copies of are allocated to agent and if , then less than copies of are allocated to agent . If no copy of good is assigned to , the upper bound for is infinity. If all copies of good are assigned to , the lower bound for is zero. Note that if is equal to its upper bound in (1), we may take one copy of away from without violating the inequality as the upper bound becomes the new lower bound. Similarly, if is equal to its lower bound in (1), we may assign an additional copy of to without violating the inequality as the lower bound becomes the new upper bound. Since (1) must hold for every good , must lie in the intersection of the intervals for the different goods , i.e.,
The value of bundle for is given by333In the case of one copy per good, is the total price of the goods in the bundle. We reuse the letter for the value of a bundle, although is no longer the total price of the goods in the bundle.
Definitions (1) and (2) are inspired by Anari et al . We say that is equal to the upper bound for the pair if is equal to its upper bound in (1) and that is equal to the lower bound for the pair if is equal to its lower bound in (1).
An agent is capped if and is uncapped otherwise.
The algorithm starts with a greedy assignment. For each good , it assigns each copy to the agent that values it most. The price of each good is set to the utility of the assignment of its last copy and all MBB-values are set to one. Note that this setting guarantees (1) for every pair . Also, all initial prices and MBB-values are powers of . It is an invariant of the algorithm that prices are powers of . Only the final price increase in the main-loop may destroy this invariant.
After initialization, the algorithm enters a loop. We need some more definitions. An agent is a least spending uncapped agent if it is uncapped and for every other uncapped agent . An agent --envies agent up to one item if for every good . Recall that is a multi-set. In the multi-set , the number of copies of good is reduced by one, i.e., . Therefore . An allocation is --envy free up to one item (--EF1) if for every uncapped agent and every other agent there is a good such that .
We also need the notion of the tight graph. It is a directed bipartite graph with the agents on one side and the goods on the other side. We have a directed edge from agent to good if , i.e., is at its lower bound for the pair . We have a directed edge from good to agent if , i.e., is at its upper bound for the pair . Note that necessarily in the latter case, since otherwise good does not impose an upper bound for .
An improving path starting at an agent is a simple path in the tight graph starting at and ending at another agent such that and for .
Let be the least spending uncapped agent. We perform a breadth-first search in the tight graph starting at . If the BFS discovers an improving path starting at , we use the shortest such path to improve the allocation. Note that if --envies some node that is reachable from in the tight graph then the BFS will discover an improving path.
In the main loop, we distinguish cases according to whether BFS discovers an improving path starting at or not.
Assume first that BFS discovers the improving path . We take away from and assign it to . If we now have we stop. Otherwise, we take away from and assign it to . If we now have we stop. Otherwise, …. We continue in this way until we stop or assign to . In other words, let be maximum such that . If exists, then we take a copy of away from and assign it to for . If does not exist, we do so for . Let us call the above a sequence of swaps.
Consider an execution of lines (1) to (1) and let be the final value of (this agrees with the definition of in the preceding paragraph). Let be the resulting allocation. Then for , , for , and . Also,
and for .
Immediate from the above.∎
If is still the least spending uncapped agent after an execution of lines (1) to (1), we search for another improving path starting from . We will show below that can stay the least spending agent for at most iterations. Intuitively this holds because for any agent (factor ) and any fixed length shortest improving path (factor ), we can have at most iterations for which the shortest improving path ends in this particular agent.
We come to the else-case, i.e., BFS does not discover an improving path starting at . This implies that does not --envy any agent that it can reach in the tight graph. We then increase some prices and decrease some MBB-values. Let be the set of agents and goods that can be reached from in the tight graph.
If a good belongs to and is at its upper bound for the pair , then belongs to . If an agent belongs to and is at its lower bound for the pair , then belongs to .
Consider any good . Since belongs to , there is an alternating path starting in and ending in . If the path contains , belongs to . If the path does not contain , we can extend the path by . In either case, belongs to .
Consider any agent . Since belongs to , there is an alternating path starting in and ending in . If the path contains , belongs to . If the path does not contain , we can extend the path by . In either case, belongs to . ∎
We multiply all prices of goods in and divide all MBB-values of agents in by a common factor . What is the effect?
Let be the inequality (1) for the pair . The endpoints do not move if and are divided by for . Similarly, does not move if and are divided by if . So in order to preserve the inequality, we must have: If is equal to the upper endpoint and moves, i.e., , then must also move. If is equal to the lower endpoint and moves then must also move. Both conditions are guaranteed by Lemma 2.2.
If and are both in , then and the endpoints of the interval for move in sync. So agents and goods reachable from in the tight graph, stay reachable.
If , there might be a such that becomes equal to the right endpoint of the interval for . Then is added to .
If , there might be a such that becomes equal to the left endpoint of the interval for . Then is added to .
For agents in , is multiplied by . For agents outside , stays unchanged.
How is the common factor chosen? There are four limiting events. Either grows and this may happen by the addition of a good (factor ) or an agent (factor ); or comes close to the largest value of for any other agent (factor ), or becomes larger than for some uncapped agent outside (factor ). Since we want prices to stay powers of , is chosen as a power of . The factor might be smaller than one. Since we never want to decrease prices, we take the maximum of and .
Prices and MBB-values are powers of , except maybe at termination.
This is true initially, since prices are utility values and utility values are assumed to be powers of and since MBB-values are equal to one. If prices and MBB-values are powers of before a price update, , , and are powers of . Thus prices and MBB-values are after the price update, except maybe when the algorithm terminates. ∎
We next show that the algorithm terminates with an allocation that is almost price-envy-free up to one item.
Assume . When the algorithm terminates, is a --EF1 allocation.
Let be the price vector after the price increase and let be the least spending uncapped agent after the increase; is possible. We first show that that . This is certainly true if . If , since the price increase is limited by , we have
So in either case, we have . Moreover, because is a least spending uncapped agent after the price increase.
If the algorithm terminates, we have . Consider any agent . Then, for ,
|and, for ,|
Thus we are returning an allocation that is --EF1. Finally, note that for . ∎
Remark: We want to point out the differences to the algorithm by Barman et al. Our definition of alternating path is more general than theirs since it needs to take into account that the number of items of a particular good assigned to an agent may change. For this reason, we need to maintain the MBB-ratio explicitly. In the algorithm by Barman et al. the MBB ratio of agent is equal to the maximum utility to price ratio and only MBB goods can be assigned to an agent. As a consequence, if a good belongs to , the agent owning it also belongs to . In price changes, there is no need for the quantity . In the definition of , we added an additional factor in the denominator. We cannot prove polynomial running time without this factor. Finally, we start the search for an improving path from the least uncapped agent and not from the least agent.
2.3 Analysis of the Approximation Factor
The analysis refines the analysis given by Barman et al. Let denote the allocation and price and MBB vector returned by the algorithm. Recall that is --EF1 with with respect to and (1) holds for every . We scale all the utilities of agent and its utility cap by , i.e., we replace by and by and use and also for the scaled utilities and scaled utility cap. The scaling does not change the integral allocation maximizing Nash Social Welfare. Inequality (1) becomes
i.e., the items allocated to have a utility to price ratio of one or more and the items that are not allocated to have a ratio of one or less. Also, the value of bundle for is now equal to its utility for and is given by
All are at most .
Let and be the set of capped and uncapped agents in , let and be their cardinalities. We number the uncapped agents such that . Let be the minimum utility of a bundle assigned to an uncapped agent. The capped agents are numbered to . Let be an integral allocation maximizing Nash social welfare.
We define an auxiliary problem with goods and one copy of each good. The goods are denoted by triples , where . The utility of good is uniform for all agents and is equal to . Formally,
where is the utility function for the auxiliary problem. The cap of agent is . Since is uniform, we can write instead of . The capped utility of for agent is . Note that is uniform, but is not. Let be an optimal allocation for the auxiliary problem.
We can obtain from by moving copies of goods.
Set . Consider any good . As long as the multiplicities of in the bundles of and are not the same, identify two agents and , where contains more copies of than and contains fewer copies of than , and move a copy of from to . Each copy taken away has a utility of at least , each copy assigned additionally has a utility of at most . Thus the total utility cannot go up by reassigning. This proves (a).
For part (b), we interpret as an allocation for the auxiliary problem; goods with are allocated to agent . We then move goods exactly as in (a). We obtain an allocation for the auxiliary problem with for all .
For part (c), assume that is not Pareto-optimal. Then there is an integral allocation with for all and at least one strict inequality. These inequalities are not affected by our scaling of the utilties. However, the reasoning of part (a) applied to and shows for all for the scaled utilities. ∎
We stress that Lemma 2.3 refers to the scaled utilities. For the scaled utilities maximizes social welfare. It does not do so for the unscaled utilities.
For any agent , let be such that . Note that . Let be the goods in the auxiliary problem corresponding to the ’s. We now consider allocations for the auxiliary problem that are allowed to be partially fractional. We require that the goods in are allocated integrally and allow all other goods to be assigned fractionally. For convenience of notation, let . The following lemma is crucial for the analysis.
There is an optimal allocation for the relaxed auxiliary problem in which good is allocated to agent .
Assume otherwise. Among the allocations maximizing Nash social welfare for the relaxed auxiliary problem, let be the one that maximizes the number of agents that are allocated their own good .
Assume first that there is an agent to which no good in is allocated. Then is allocated to some agent different from . Since , . The inequality holds since utilities are capped at during initialization. We move from to and value from to . This is possible since only divisible goods are allocated to . If we move from to , the NSW does not change. If and hence , the product changes from
The arguments of the min in the lower line are componentwise larger than those of the min in the upper line. We have now modified such that the NSW did not decrease and the number of agents owning their own good increased. The above applies as long as there is an agent owning no good in .
So assume every agent owns a good in , but not necessarily . Let be such that is largest among all goods that are not allocated to their . Then is allocated to some agent different from . The value of the good allocated to is at most since and by the choice of . We move from to and value from to . This is possible since and all other goods assigned to are divisible. We have now modified such that the NSW did not decrease and the number of agents owning their own good increased. We continue in this way until is allocated to for every . ∎
Let be an optimal allocation for the relaxed auxiliary problem in which good is contained in the bundle for every . Let be such that
is the minimum value of any agent that is uncapped in