Contiguous Cake Cutting: Hardness Results and Approximation Algorithms
Paul W. Goldberg, Alexandros Hollender, Warut Suksompong
Introduction
We consider the classical cake cutting problem, where we wish to divide a cake among a set of agents with different preferences over different parts of the cake. The cake serves as a metaphor for any divisible resource such as time or land, and our aim is to perform the division in a fair manner. This problem has a long and storied history that dates back over 70 years (Brams and Taylor, 1996; Robertson and Webb, 1998; Procaccia, 2016) and has received considerable attention in the past decade (Caragiannis et al., 2011; Bei et al., 2012; Aumann et al., 2013; Balkanski et al., 2014; Brânzei and Miltersen, 2015; Alijani et al., 2017; Menon and Larson, 2017; Bei et al., 2018; Segal-Halevi, 2018).
In order to reason about fairness, we need to specify when a division is considered to be fair. One of the most commonly used definitions is envy-freeness, which means that no agent envies another with respect to the division. In other words, among the pieces in the division, every agent receives their first choice. An early result by Dubins and Spanier (1961) shows that an envy-free allocation always exists for arbitrary valuations of the agents. However, as Stromquist (1980) noted, this result depends on a liberal definition of what constitutes a piece of cake, and an agent “who hopes only for a modest interval of cake may be presented instead with a countable union of crumbs.”
In light of this concern, Stromquist (1980) strengthened the result of Dubins and Spanier by showing that it is possible to guarantee an envy-free allocation in which every agent receives a contiguous piece of the cake. Stromquist’s result, together with its topological proof, is widely regarded as a cornerstone of the cake-cutting literature. Nevertheless, since the result focuses only on the existence of a contiguous envy-free allocation, it leaves open the question of how to compute such an allocation. Almost 30 years later, Stromquist himself addressed this question and showed that under the Robertson-Webb model, where an algorithm is allowed to discover the agents’ valuations through cut and evaluate queries, no finite algorithm can compute a contiguous envy-free allocation when there are at least three agents (Stromquist, 2008).For two agents, the well-known cut-and-choose protocol, which lets the first agent cut the cake into two equal pieces and lets the second agent choose the piece that she prefers, computes a contiguous envy-free allocation.
Although Stromquist’s later result rules out the possibility of computing contiguous envy-free allocations in general, several important questions still remain. For instance, can we compute a contiguous allocation with low envy between the agents, and if so, how efficiently? How does the answer change if we know that the agents’ valuations belong to a restricted class? What happens if we add extra requirements on the allocation, such as fixing a desired ordering of the agents or constraining the positions of certain cuts? The goal of this paper is to shed light on the complexity of contiguous cake cutting by addressing these questions.
First, in Section 3 we present two algorithms that compute an allocation with low envy in polynomial time. As is standard in the cake-cutting literature, we represent the cake by the interval $11/31/4$.
Next, in Section 4 we consider variants of the cake-cutting problem where we impose constraints on the desired allocation. We show that for several natural variants, the decision problem of whether there exists a contiguous envy-free allocation satisfying the corresponding constraints is NP-hard. In particular, this holds for the variants where (i) a certain agent must be allocated the leftmost piece; (ii) the ordering of the agents is fixed; and (iii) one of the cuts must fall at a given position. Fixing the ordering of the agents is relevant when there is a temporal ordering in which the agents must be served, e.g., due to notions of seniority or the ease of switching from one agent to another in the service. Likewise, fixing a cut point is applicable when we divide a parcel of land and there is a road crossing the parcel, so we cannot allocate a piece that lies on both sides of the road. Moreover, our construction serves as a general framework that can be used to obtain hardness results for other related variants.
In Section 5 we investigate a discrete analog of cake cutting, where there are indivisible items on a line and each agent is to be allocated a contiguous block of items. The discrete setting can be viewed as a type of restriction for the continuous setting, where cuts must be placed between discrete items. In addition to envy-freeness, we work with two other well-studied fairness notions: proportionality and equitability.See the definitions in Section 5. Using a single reduction, we show that deciding whether there exists a contiguous fair allocation is NP-hard for each of the three fairness notions as well as any combination of them; our result holds even when all agents have binary valuationsThat is, the valuations are additive and each agent values each item either or . and moreover value the same number of items. This significantly strengthens a result of Bouveret et al. (2017), who established the hardness for proportionality and envy-freeness using additive but non-binary valuations. Moreover, we show that even if we consider approximate envy-freeness instead of exact, the decision problem remains NP-hard for binary valuations. We also prove that when the valuations are binary and every agent values a contiguous block of items, deciding whether a contiguous proportional allocation exists is NP-hard.
Finally, in Section 6 we present a number of connections between approximate and exact envy-freeness, as well as between the continuous and discrete settings. First, we prove that for piecewise constant valuations, finding an approximately envy-free allocation is as hard as finding an exactly envy-free allocation. Then, we reveal some relationships between continuous and discrete cake cutting—among other things, we show that a special case of the continuous problem for piecewise constant valuations is computationally equivalent to a discrete cake-cutting problem where every item is positively valued by at most one agent. This means that any algorithm or hardness result for one problem will immediately transfer over to the other.
2 Further Related Work
Since the seminal work of Stromquist (1980, 2008), a number of researchers have studied cake cutting in view of the contiguity condition. Su (1999) proved the existence of contiguous envy-free allocations using Sperner’s lemma arguments. Deng et al. (2012) showed that contiguous envy-free cake cutting is PPAD-complete; however, the result requires non-standard (e.g., non-additive, non-monotone) preference functions. Aumann et al. (2013) considered the problem of maximizing social welfare with contiguous pieces, while Bei et al. (2012) tackled the same problem with the added requirement of proportionality. Cechlárová and Pillárová (2012) and Cechlárová et al. (2013) examined the existence and computation of contiguous equitable allocations—among other things, they showed that such an allocation is guaranteed to exist even if we fix the ordering of the agents. Aumann and Dombb (2015) analyzed the trade-off between fairness and social welfare in contiguous cake cutting. Segal-Halevi et al. (2016) circumvented Stromquist (1980)’s impossibility result by presenting bounded-time contiguous envy-free algorithms that may not allocate the entire cake but guarantee every agent a certain positive fraction of their value.Without this guarantee, it would be much easier to find a contiguous envy-free allocation—just don’t allocate any of the cake!
The contiguity requirement has also been considered in the context of indivisible items. Marenco and Tetzlaff (2014) proved that if the items lie on a line and every item is positively valued by at most one agent, a contiguous envy-free allocation is guaranteed to exist. When each item can yield positive value to any number of agents, Barrera et al. (2015), Bilò et al. (2019), and Suksompong (2019) showed that various relaxations of envy-freeness can be fulfilled. In addition, contiguity has been studied in the more general model where the items lie on an arbitrary graph (Bouveret et al., 2017; Igarashi and Peters, 2019; Bei et al., 2019). Like us, Igarashi and Peters (2019) also showed hardness results for binary valuations.
Recently, Arunachaleswaran et al. (2019) developed an efficient algorithm that computes a contiguous cake division with multiplicatively bounded envy—in particular, each agent’s envy is bounded by a multiplicative factor of . We remark that our approximation algorithms are incomparable to their result. On the one hand, their algorithm may return an allocation wherein an agent has value for her own piece and for another agent’s piece—this corresponds to an additive envy of . On the other hand, our algorithms may leave some agents empty-handed, leading to unbounded multiplicative envy. We also note that additive envy is the more commonly considered form of approximation, both for cake cutting (Deng et al., 2012; Brânzei and Nisan, 2017, 2019) and for indivisible items (Lipton et al., 2004; Caragiannis et al., 2016).
Preliminaries
For any positive integer , let . In our cake cutting setting, we consider the cake as the interval $nv_{1},\dots,v_{n}v_{i}(a,b)=v_{i}([a,b])=\int_{a}^{b}v_{i}(x)dx0\leq a\leq b\leq 1v_{i}(a,a)=0v_{i}(0,1)=1i\in[n]$.
A contiguous allocation of the cake is a partition of $nn-10\leq x_{1}\leq x_{2}\leq\dots\leq x_{n-1}\leq 1\pi:[n]\to[n]i[x_{\pi(i)-1},x_{\pi(i)}]x_{0}=0x_{n}=1$ for convenience.
We are interested in finding a contiguous allocation that is envy-free, i.e., no agent thinks that another agent gets a better interval. Formally, the contiguous allocation is envy-free if for all , we have . In some cases we will be interested in finding a contiguous allocation that is only approximately envy-free. For , the contiguous allocation is -envy-free if for all , we have . In other words, any agent has envy that is at most a fraction of her value for the whole cake.
A typical way for an algorithm to access the valuation functions is through queries in the Robertson-Webb model: the algorithm can make evaluate queries—where it specifies and asks agent to return the value —and cut queries—where it specifies and asks agent to return the leftmost point such that (or say that no such exists). A more restrictive class of valuations is that of piecewise constant valuations. A piecewise constant valuation function is defined by a piecewise constant density function on $ic_{i}$ or .
Approximation Algorithms
In this section, we present two algorithms for approximate envy-free cake cutting. Algorithm 1 works for arbitrary valuations and returns a -envy-free allocation. On the other hand, Algorithm 2 can be used for piecewise uniform valuations with a single value-block and outputs a -envy-free allocation. Note that such valuations are relevant, for example, when the agents are dividing machine processing time: each agent has a release date and a deadline for her job, so she would like to maximize the processing time she obtains after the release date and before the deadline.
While Algorithm 1 can be implemented for general valuations under the Robertson-Webb model, it also allows a simple interpretation as a moving-knife algorithm. In this interpretation, the algorithm works by moving a knife over the cake from left to right. Whenever the current piece has value to at least one remaining agent, the piece is allocated to one such agent. If the knife reaches the right end of the cake, then the piece is allocated to an arbitrary remaining agent if there is at least one remaining agent, and to the agent who received the last piece otherwise.
For agents with arbitrary valuations, Algorithm 1 returns a contiguous -envy-free allocation and runs in time polynomial in assuming that it makes queries in the Robertson-Webb model.
Note that if we are only interested in having an algorithm that makes a polynomial number of queries, Brânzei and Nisan (2017) showed that for any , a contiguous -envy-free allocation can be found using queries, which is polynomial in for constant . Their algorithm works by cutting the cake into pieces of size and performing a brute-force search over the space of all contiguous allocations with respect to these cuts; this algorithm therefore has exponential computational complexity (even for constant ). By contrast, in the absence of the contiguity constraint, Procaccia (2016, p. 323) gave a simple polynomial-time algorithm that computes an -envy-free allocation for any constant . His algorithm also starts by cutting the cake into pieces of size and then lets agents choose their favorite pieces in a round-robin manner; consequently, the resulting allocation can be highly non-contiguous.
While we do not know whether the bound in our approximation can be improved under the computational efficiency requirement,For the case , Deng et al. (2012) gave a fully polynomial-time approximation scheme that computes a contiguous -envy-free allocation for any . we show next that if the agents have piecewise uniform valuations and each agent only values a single interval, the envy can be reduced to . Alijani et al. (2017) showed that if the valuations are as described and moreover the valued intervals satisfy an “ordering property”, meaning that no interval is a strict subinterval of another interval, then a contiguous envy-free allocation can be computed efficiently. Nevertheless, the ordering property is a very strong assumption, and indeed reducing the envy to without this assumption already requires significant care in assigning the pieces.Alijani et al. (2017) also showed that for piecewise uniform valuations where each agent only values a single interval (without the ordering property assumption), one can efficiently compute an envy-free allocation with at most intervals in total. Moreover, they showed that for a constant number of agents with piecewise constant valuations, a contiguous envy-free allocation can be computed efficiently.
At a high level, Algorithm 2 first orders the agents from shortest to longest desired interval, breaking ties arbitrarily. For each agent in the ordering, if an interval of value containing the midpoint of her valued interval (perhaps at the edge of the former interval) has not been taken, the agent takes one such interval. Else, if an interval of value is available somewhere, the agent takes one such interval; here, if there are choices on both sides of the midpoint, the agent may need to be careful to pick the “correct” one. Otherwise, if no interval of value is available, the agent takes a largest available interval. At the end of this process, part of the cake may remain unallocated. If some pair of assigned intervals are adjacent, pick one such pair, and allocate the remaining cake by extending pieces away from the border between this pair. Else, extend the pieces arbitrarily to cover the remaining cake.
For agents with piecewise uniform valuations such that each agent only values a single interval, Algorithm 2 returns a contiguous -envy-free allocation and runs in time polynomial in .
One can check that Algorithm 2 assigns a single interval to every agent and can be implemented in polynomial time. It remains to show that the algorithm returns an allocation such that for any two agents , agent has envy at most towards agent . For the purpose of this proof, when we refer to an interval , we mean the interval before it is extended in the final phase of the algorithm (the extension phase starting at line 18). We denote by the corresponding extended interval that is returned by the algorithm. For any agent and any interval , the -value of is the value of for agent , i.e., .
When agent ’s turn comes in the for-loop, it falls into exactly one of four possible cases: Case 1 (line 8), Case 2 (line 10), Case 3 (line 14) or Case 4 (line 16). Depending on which case applies, is chosen accordingly. We say that the single-direction extension (SDE) property holds if at least one agent does not fall into Case 2. It is easy to check that if the SDE property holds, then there are at least two allocated intervals and that are adjacent before the extension phase begins, and thus every interval will be extended in a single direction.
It is clear that for all . Furthermore, in all four cases it holds that agent is allocated an interval of value at most , i.e., for all . Since and because of the way the agents are ordered, it follows that
We now show that any agent has envy at most at the end of the algorithm. Namely, we prove that for any agents we have . We treat the four different cases that can occur during agent ’s turn.
Cases and . In both cases, contains and has -value . This also holds for . Since the midpoint of is contained in , any other interval has -value at most . Thus, agent has envy at most .
Case . First, suppose that . This means that was a largest available interval in . It follows that any agent can obtain an interval of -value at most , since it is processed after . For , since agent is in Case 4, the SDE property holds. Thus, can be extended by at most , i.e., for all . With (1) it follows that the envy is at most .
Now, consider the case where . Any agent can obtain -value no more than —otherwise, agent would have fallen in Case 1 or 2. Consider any :
if , then both on the left and right side of the space available has -value (otherwise agent would be in Case 1 or 3). Since the SDE property holds, it follows that with (1).
if , then . Otherwise, it means that is extended in a single direction (SDE property) and takes over an interval of -value at least that contains . But then, agent would be in Case 1 or 2.
Hardness for Cake-Cutting Variants
In this section, we establish hardness results for a number of decision problems on the existence of contiguous envy-free allocations.
The following decision problems are NP-hard for contiguous cake cutting, even if we restrict the valuations to be piecewise uniform:
Does there exist an envy-free allocation in which agent obtains the leftmost piece?
Does there exist an envy-free allocation in which the pieces are allocated to the agents in the order ?
Does there exist an envy-free allocation such that there is a cut at position , for given in the input?
These problems remain NP-hard if we replace envy-freeness by -envy-freeness for any sufficiently small constant .
This list is not exhaustive: additional results of the same flavor can be found in the full proof (Section 4.1).However, if we fix all cuts, the problem becomes solvable in polynomial time. Indeed, with all the cuts fixed, the resulting pieces are also all fixed. We can therefore construct a bipartite graph with the agents on one side and the pieces on the other side, where there is an edge between an agent and a piece exactly when receiving the piece would make the agent envy-free. The problem of determining whether an envy-free allocation exists therefore reduces to deciding the existence of a perfect matching, which can be done in polynomial time. The following proof sketch conveys the main ideas behind these results.
In order to prove that these decision problems are NP-hard, we reduce from 3-sat. Namely, given a 3-sat formula, we construct a cake-cutting instance such that the answer to the decision problem is “Yes” if and only if the 3-sat formula is satisfiable. A bonus of our proof is that we construct a single cake-cutting instance that works for all of the decision problems mentioned in the theorem statement and even a few more.
The instance is constructed by positioning the gadgets one after the other on the cake. Starting from the left and moving to the right, we first put the Clause-Gadget for , then , and so on until , and then the Variable-Gadget for , then , and so on until . Between adjacent gadgets we introduce a small interval without any value-blocks. We say that an envy-free allocation is nice if all the gadgets operate correctly.
Conversely, given a satisfying assignment for the 3-sat formula, it is not too hard to construct a nice envy-free allocation. This proves NP-hardness for the decision problem “Does there exist a nice envy-free allocation?”. In order to prove the result for the more natural decision problems stated in Theorem 4.1, the construction has to be extended with some additional work. ∎
We provide a full proof of NP-hardness for the following decision problems:
Does there exist an envy-free allocation in which agent gets the leftmost piece?
Does there exist an envy-free allocation in which agents get the leftmost pieces, in that order? (for any constant )
Does there exist an envy-free allocation in which all the agents are assigned pieces in that order from left to right?
Does there exist an envy-free allocation such that there is a cut at position ? ( given in the input)
Does there exist an envy-free allocation such that the leftmost cut is at position ? ( given in the input)
Does there exist an envy-free allocation such that there are cuts at positions , , ? (, , given in the input, any constant)
The problems remain NP-hard if we replace envy-freeness by -envy-freeness for any .
The list of NP-hard problems that we have provided is by no means exhaustive. The construction we provide below should be viewed as a framework for obtaining these kinds of results. Indeed, with some simple modifications, one can prove additional results of the same general flavor. In particular, one can change the constraint to “agent gets the th piece from the left ( constant)” or to “the leftmost cuts are at positions , , ”.
Let be an instance of -sat with clauses , where each clause is made out of literals using the variables and their negations. Note that is polynomial in and thus we can use as the complexity parameter for the instance. Let be arbitrary.
We will construct an instance where the cake is the interval (for some polynomial ), instead of the usual in polynomial time. Indeed, it suffices to divide the position of every block by and multiply its height by . Note that our construction also gives NP-hardness if the valuations are given in unary representation, since the positions and heights of blocks will have numerator and denominator bounded by some polynomial (even after we scale down to $1$), but variable length. Furthermore, value-blocks of different agents will not overlap.
Clause-Gadget. Consider any clause in the instance . will be represented by a Clause-Gadget in the cake cutting instance. The Clause-Gadget for requires an interval of length on the cake, say , where only three specific agents are allowed to have any value. These agents are denoted by , and . The interpretation is that corresponds to the first literal appearing in the clause , to the second one, and to the third one. The valuation of agent contains three blocks of value in the interval : one in each of the subintervals , and . Each of these blocks has value (i.e., length and height ). Agents and have the same blocks as , but shifted by and to the right respectively. The valuations of the three agents inside the Clause-Gadget are shown in Figure 1.
Note that each of the three agents has value inside the Clause-Gadget. The remaining value will be situated in a different gadget that we introduce next.
Instance. Now consider the cake-cutting instance constructed as follows: starting from the left, position all the Clause-Gadgets one after the other, leaving an interval of length after every gadget. Then, position all the Variable-Gadgets one after the other, again leaving an interval of length after every gadget. Thus, the cake is the interval , where the first Clause-Gadget occupies the interval $[12m,12m+4]3m+2n3m+n-1$ Isolating Intervals.
The th Isolating Interval from the left is denoted . The Isolating Interval is divided into three subintervals: , and . Furthermore, we also add an interval of length 3 on the left end of the cake: the Initiation Interval. We denote it by and it is similarly subdivided into , and . The cake is now represented by the interval .
We add two new agents and . Agent has a block of value in , a block of value in each of , and . Agent has a block of value in . For we define an agent that has a block of value in and a block of value in each of and . We also define an agent that has a block of value in . Figure 3 shows the valuations of the agents in , and . The total number of agents is , so there are cuts in any solution.
Let . Since an envy-free allocation always exists, the cake-cutting instance we have constructed admits an envy-free allocation (in particular also -envy-free). In order to ensure that a solution only exists if the 3-sat formula is satisfiable, we have to add an additional constraint. An -envy-free allocation is said to satisfy the Isolation property if together all the Clause- and Variable-Gadgets contain at most cuts strictly within them.
Any -envy-free allocation that satisfies the Isolation property yields a satisfying assignment for the 3-sat formula.
Consider any -envy-free allocation. If there is at most one cut strictly inside the Clause-Gadget of , then there is an agent () who does not obtain any of its value from this Clause-Gadget. Thus, agent gets value at most (from its corresponding Variable-Gadget). However, since the Clause-Gadget of is divided into at most two parts, some agent gets at least according to agent ’s valuation, which contradicts -envy-freeness. Thus, every Clause-Gadget contains at least two cuts strictly within them.
If the Variable-Gadget for does not strictly contain any cut, then all of it is allocated to a single agent. Necessarily, agent or would have envy . Thus, every Variable-Gadget strictly contains at least one cut.
Now consider an -envy-free allocation that also satisfies the Isolation property. Since the property permits at most cuts strictly inside gadgets, we get that these lower bounds on the number of cuts inside gadgets are actually tight. Thus, there are exactly two cuts strictly inside every Clause-Gadget and exactly one cut strictly inside every Variable-Gadget.
Since there is exactly one cut strictly inside the Variable-Gadget of , the two resulting parts must go to agents and . Indeed, if one of these two agents does not get one of the two parts, then the agent would have envy at least . Similarly, since there are exactly two cuts strictly inside the Clause-Gadget of , the three resulting parts must go to agents , and . Indeed, if one of these three agents does not get one of the three parts, the agent would have value (as she cannot get any value from the corresponding variable gadget) and therefore have envy at least .
We now show how such a solution yields a satisfying assignment to the 3-sat instance. Consider the Clause-Gadget of . As we showed above, there are exactly two cuts strictly inside the gadget and the three resulting parts go to the agents , and . Any of these three agents who obtains at most of its own value is called sad. By inspection of the construction of the Clause-Gadget it follows that at least one of the three agents must be sad. Indeed, it is easy to check that if is not sad, then at least one of the other two must be. The fact that any Clause-Gadget must have at least one sad agent will be used to encode the fact that any clause of the 3-sat instance must have at least one literal set to . Thus, if is sad, this means that we set the literal corresponding to to have the value .
In any -envy-free allocation for this instance, every agent obtains a nonzero value.
If there exists an -envy-free allocation in which agent gets the leftmost piece, then the 3-sat formula is satisfiable.
In any -envy-free allocation in which agent gets the leftmost piece, the piece allocated to will be a strict prefix of . Indeed, if were allocated all of $S_{0}^{\prime}1S_{0}1/72/7S_{0}I_{0}$ contains at least two cuts.
We now know that the two blocks of value of in and must each contain a cut. We show that agent must be allocated some interval in . Suppose for the sake of contradiction that this is not the case. Then, some agent must be allocated an interval in , since there are at least two cuts inside . But this agent cannot be or , so it will obtain value . However, by Claim 1, this is impossible.
Thus, must be allocated some interval in . It follows that obtains value at most . This, in turn, implies that the two blocks of value of in must each contain a cut. This means that we can repeat the argument above to show that must be allocated an interval in . By induction it follows that every Isolating Interval contains at least cuts. Thus, we have shown that at least cuts do not lie inside any Clause- or Variable-Gadget. This means that at most cuts lie strictly inside a Clause- or Variable-Gadget, and so the Isolation property holds. By Lemma 4.2, any -envy-free allocation in which gets the leftmost piece will yield a satisfying assignment to the 3-sat instance. ∎
We define the standard ordering of allocation as follows. Starting from the left, the first piece goes to agent and the second piece to . The rest of the agents are ordered according to the order of appearance of their gadget in the instance. For this purpose, we treat every Isolating interval as a gadget with corresponding agent . Within the Clause-Gadget for , the corresponding agents appear in the order , , . Within the Variable-Gadget for , the corresponding agents appear in the order , . This yields a unique full ordering of all the agents in the instance.
If the 3-sat formula is satisfiable, then there exists an envy-free allocation in which the pieces are allocated to the agents according to the standard ordering.
Given a satisfying assignment, we show how to construct an envy-free allocation such that the pieces are allocated to the agents according to the standard ordering. Place a cut at position and through the middle of every block of of value . Also place a cut through the middle of every block of value of , . Allocate the leftmost piece to and the next piece to . Allocate the piece between the two cuts in the Isolating interval to agent . Note that no matter how we allocate the remaining parts of the cake, the agents , , , , will definitely be envy-free. and have obtained all of their value. has obtained value , but its three blocks of value have all been cut in half. Finally, for , has obtained value , but its two blocks of value have also been cut in half. Figure 3 shows the positions of the cuts in , and .
Depending on whether or place a cut in the middle of the region corresponding to or respectively inside the Variable-Gadget of . Allocate the left piece to and the right piece to . Note that and obtain all of their value.
Finally, for every clause pick one of its literals that is and let be the associated agent. We position two cuts inside the gadget such that gets one block of its own value, and the other two Clause-Gadget agents each get two blocks of their own value. While doing so, we also ensure that these other two agents each get one of the two remaining blocks of inside the gadget. Note that this is always possible and in fact we can also ensure that the three pieces are allocated to the agents in that order from left to right. has thus obtained value and its two other -blocks have been allocated to two distinct agents. The last remaining block, which has value and lies in the corresponding Variable-Gadget, has been cut in half according to the procedure above describing how to place the cut in a Variable-Gadget. Thus, is envy-free. Now consider any of the two other agents of this Clause-Gadget. Such an agent has obtained of its value. of its value has been allocated to other agents in this Clause-Gadget, and of its value has been allocated to Variable-Gadget agents. Thus, this agent is also envy-free. ∎
Using these two claims we immediately obtain that the decision problems 1, 2, and 3 are NP-hard (with envy-freeness or -envy-freeness).
Fixing cuts.
In any -envy-free allocation in which there is a cut at position , the leftmost piece must be assigned to agent .
Since there is a cut at position , the leftmost piece can only contain value for agent . Thus, by Claim 1 it cannot be allocated to any other agent. ∎
On the other hand, given a satisfying assignment for the 3-sat formula, we can always ensure that the corresponding envy-free allocation that we construct has a cut at position . In fact, there are many more cuts that are fixed (and do not depend on what the satisfying assignment is), namely, the two cuts in each Isolating interval.
Using this observation along with the claim above, we get that the decision problems 4, 5, and 6 are NP-hard (with envy-freeness or -envy-freeness).
Hardness for Indivisible Items
We now turn to a discrete analog of cake cutting, where we wish to allocate a set of indivisible items that lie on a line subject to the requirement that each agent must receive a contiguous block. As in cake cutting, we assume that the valuations of the agents over the items are additive, and that all items must be allocated. Besides envy-freeness, we consider the classical fairness notions of proportionality and equitability. An allocation is proportional if every agent receives value at least times her value for the whole set of items, and equitable if all agents receive the same value.
Unlike in cake cutting, for indivisible items there may be no allocation satisfying any of the three fairness properties, e.g., when two agents try to divide a single item. Bouveret et al. (2017) showed that deciding whether an envy-free allocation exists is NP-hard for additive valuations, and the same is true for proportionality; they did not consider equitability. In this section, we extend and strengthen their results in several ways. We consider binary valuations, which are additive valuations such that the value of each agent for each item is either or . In other words, an agent either “wants” an item or not. Even though binary valuations are much more restricted than additive valuations, as we will see, several problems still remain hard even for this smaller class.
First, we show that deciding whether a fair allocation exists is NP-hard for each of the three fairness notions mentioned. This hardness result holds for any non-empty combination of the three notions and even if all agents want the same number of items. Moreover, we present a reduction that establishes the hardness for all combinations in one fell swoop. We remark that the techniques of Bouveret et al. (2017) do not extend to the binary domain because each agent can have different values for different items in their construction. One may try to fix this by breaking items into smaller items to obtain a binary valuation, but each agent will require a different way of breaking items, and moreover there will be allocations in the new instance that cannot be mapped back to those in the original instance.
and let . Deciding whether an instance with indivisible items on a line admits a contiguous allocation satisfying all properties in is NP-hard, even if all agents have binary valuations and value the same number of items.
We prove this result with a single reduction. Let be an instance of 3-SAT with clauses using the variables and their negations. We create the following gadgets.
We combine these gadgets to create the instance as follows. Starting from the left, construct the Clause-Gadget for each clause . Then, construct the Variable-Gadget for each variable . Thus, we obtain an instance with agents and items.
Any contiguous allocation in where every agent gets at least two items they value yields a satisfying assignment for . This holds even if the allocation is partial, i.e., some items are not allocated.
Any satisfying assignment for yields a contiguous envy-free allocation in where every agent gets exactly two items they value.
The final step of the proof is to introduce one last gadget. The Special-Gadget creates new agents. We denote the set of these new agents by . The gadget consists of new items. These items are valued by all agents in . For every and , values all new items except the rightmost six. For every , and value all new items except the rightmost four.
The Special-Gadget is added to the right end of and yields the final instance . Note that in there are agents and every agent values exactly items. Now consider any contiguous allocation for .
If the allocation is proportional, then every agent gets at least items they value. It follows that the agents in get all the new items, because . This means that the other agents get at least two items they value in . By the claim above, we obtain a satisfying assignment.
If the allocation is equitable, then all agents get exactly items they value, for some . The Special-Gadget contains an item (in fact, many) that is valued by all agents. Since this item will be allocated to someone, is not possible. Also is not possible, because the agents in all like the exact same items. Now, since all agents value the first items in the Special-Gadget, at least one of them will be allocated to two of those (by the pigeonhole principle). It follows that is also impossible. Thus, only remains, and we again obtain a satisfying assignment by the claim.
Since envy-freeness implies proportionality, it follows that any -allocation for yields a satisfying assignment for the 3-SAT instance , for any non-empty envy-free, proportional, equitable. On the other hand, any satisfying assignment for the 3-SAT instance yields an envy-free and equitable allocation for , by assigning two contiguous Special-Gadget items to each agent in and then using the claim. ∎
In the construction used for our proof of Theorem 5.1, each agent values at most four contiguous block of items. In light of this result, one may naturally wonder whether the hardness continues to hold if, for example, every agent values a single block of items. We show that this is the case for proportionality, provided that we drop the requirement that all agents value the same number of items. Note that if each agent values a contiguous block of items and all agents value the same number of items, deciding whether a proportional allocation exists can in fact be done in polynomial time. Indeed, we can view the problem as a scheduling problem on a single machine, with each agent having a task to be completed by a machine. For a given task, its release time is where the corresponding agent’s valued block starts, its deadline is where the block ends, and its length is the number of items that we need to give the agent in order to satisfy proportionality. When all tasks have the same length, which is true in our setting, polynomial-time algorithms have been proposed by Simons (1978) and Garey et al. (1981).
Deciding whether an instance with indivisible items on a line admits a contiguous proportional allocation is NP-hard, even if the valuations are binary and every agent values a contiguous block of items.
We reduce from the 3-partition problem. An instance of the 3-partition problem consists of positive integers with sum , and the goal is to partition them into sets of size three each so that the three numbers in each set sum to . The problem is NP-hard, and remains so when for all (Garey and Johnson, 1979).
Given an instance of 3-partition, we create an instance of our problem as follows. There are items on the line, where . Each item belongs to one of the three types: special, normal, and dummy. From left to right, the last items are dummy items. The remaining items are partitioned into blocks of size —the leftmost item of each block is a special item (so special items in total), and the remaining items of the block are normal items (so normal items in total). There are agents: special, normal, and dummy. Each of the special agents values a distinct special item and nothing else. Each dummy agent values all dummy items and nothing else. For , the th normal agent values the leftmost items. Note that this is well-defined because . Moreover, , so each normal agent values all normal items (along with other items).
First, suppose that there is a valid solution to the 3-partition instance. We construct a proportional allocation. Give each special agent her valued item, and each dummy agent consecutive dummy items. For each part in the solution to the 3-partition instance, we pick a block of normal items and give consecutive items to the th normal agent. One can check that the resulting allocation is proportional; in particular, each dummy agent needs at least valued items, and that is exactly what they get.
Conversely, suppose that our construction admits a proportional allocation. In this allocation, each special agent must get her valued item and, as above, each dummy agent needs at least valued items. Since there are dummy agents and they value the same items, each dummy agent must receive exactly valued items. This leaves only the normal items to be allocated to the normal agents. Normal agent needs to get at least items, so given that , all normal items must be allocated to the normal agents, and normal agent must receive exactly items. Finally, since for all , each block of normal items is allocated to exactly three agents. Hence the allocation yields a valid solution to the 3-partition instance, as desired. ∎
Next, we show that under the same conditions as Theorem 5.2, deciding whether there exists a proportional and equitable allocation, or an equitable allocation that gives the agents positive value, are both computationally hard. Since agents do not all value the same number of items (unlike in Theorem 5.1), we normalize the valuations so that if agent values items, she has value of each of them (so her total value is ).
Deciding whether an instance with indivisible items on a line admits
a contiguous allocation that is both proportional and equitable;
a contiguous equitable allocation in which the agents receive positive value
are both NP-hard, even if the valuations are binary and every agent values a contiguous block of items.
The reduction is similar to the one in Theorem 5.2. We again reduce from 3-partition, but this time we also assume that for all . Note that we can ensure that this is the case by multiplying all and by .
Let . The main building block of this reduction is a -block: consecutive items with agents who only value these items. The instance is constructed as follows. Starting from the left end of the line, there are consecutive -blocks. Note that each -block has its own agents. We call this the “left region” of the instance. The “right region” of the instance consists of blocks of items each. The leftmost items of such a block form a -block, and there are items to the right of that -block. Finally, we introduce new agents . For each , agent values the rightmost items on the line. Note that this is well-defined, since there are items overall. Furthermore, agent values all items in the right region, because (since and ). Note that every agent values a contiguous block of items.
Now consider any equitable allocation in which the agents receive positive value. Every agent must get at least one item that they value. Consider any -block. Since its agents only value these items, it follows that they each obtain exactly one. Thus, they each get value exactly , and all other agents in the instance must also get value exactly . This means that agent must obtain exactly of its valued items. Since for all , each block of items in the right region are allocated to exactly three agents . Hence, we obtain a solution to the 3-partition instance. Note that a proportional and equitable allocation yields positive value to the agents, so it also gives rise to a solution to the 3-partition instance.
Conversely, given a solution to the 3-partition instance, one can construct an equitable allocation in which the agents receive positive value by following the previous paragraph. Note that this allocation is also proportional, since each agent receives value and there are more than agents. This completes the proof. ∎
Finally, we consider approximate envy-freeness for the discrete setting as well. We show that for a sufficiently small constant , deciding whether there exists an -envy-free allocation is NP-hard; this holds even if we restrict the valuation functions as in Theorem 5.1.
For any , deciding whether a contiguous -envy-free allocation exists is NP-hard, even if all agents have binary valuations and value the same number of items.
Consider an instance of 3-SAT with clauses using the variables and their negations. We will make use of the following gadgets:
Isolation-Gadget: An Isolation-Gadget consists of items and agents. The agents value each of the items and no other items in the instance.
The instance is then constructed as follows. Starting from the left, we construct the Clause-Gadget for , then for , and so on up to . Then, we construct the Variable-Gadget for , for , and so on up to . Finally, we introduce an Isolation-Gadget between any two adjacent gadgets. Thus, there are Isolation-Gadgets, and the instance has agents.
Note that in this construction every agent values exactly items. Since all of the valuations are binary, this means that for the normalized valuations, any -envy-free allocation with must actually be (exactly) envy-free.
Finally, any Isolation-Gadget must strictly contain at least cuts. It is easy to see that it must contain at least cuts, so that each of the agents that values all of the items can obtain something. However, cuts are not enough, because the resulting pieces cannot contain exactly the same number of items and thus one of the agents would not be envy-free. It turns out that cuts are also not enough. Indeed, in that case there are pieces and of those must be given to the agents of the gadget. However, it is impossible to divide items into pieces in such a way that of the pieces contain the same number of items and the th piece contains at most that many items.
Since the instance has agents, there are cuts. With the arguments above we have accounted for exactly cuts. It follows that every Clause-Gadget strictly contains exactly cuts and every Variable-Gadget strictly contains exactly cut. Thus, similarly to the divisible case, we have ensured that a certain Isolation property holds. The proof that this allocation yields a satisfying assignment for the 3-SAT instance is analogous to the divisible case (Lemma 4.2).
Conversely, given a satisfying assignment of the 3-SAT instance, it is not hard to construct an envy-free contiguous allocation for the instance. In fact, the only difference from the divisible case is with respect to the Isolation-Gadgets. Here, the cuts inside every Isolation-Gadget are placed as follows: place a cut after the first item, then a cut every two items, and give the central pieces of size to the agents of the gadget. ∎
Connections Between Various Cake-Cutting Problems
In this section, we uncover several new connections between different cake-cutting settings. In particular, in Section 6.1 we show that for piecewise constant valuations, finding an approximate envy-free allocation is as hard as finding an exact one. Then, in Section 6.2 we exhibit connections between a number of continuous and discrete cake-cutting problems.
We begin by proving the following result, which relates approximate and exact envy-freeness for a restricted yet quite expressive class of valuations.
For piecewise constant valuations, computing a contiguous envy-free allocation reduces to computing a contiguous -envy-free allocation for a sufficiently small (which may depend on the number of agents and the valuations).
In particular, this means that for such valuations there always exists a contiguous envy-free allocation in which all cut points are rational.This is not the case for more general valuations (Stromquist, 2008). Theorem 6.1 is implied by the following result:
Let be (explicit, normalized) piecewise constant valuations, and and be positive integers such that
for all , all of the numbers in the explicit description of (i.e., the step heights and step change positions) have numerator and denominator at most ;
for all , has at most value-blocks.
Then from any -envy-free solution, we can efficiently obtain an envy-free solution.
We apply the technique that was used by Etessami and Yannakakis (2010) to show that finding an exact fixed point of a LinearFIXP circuit reduces to finding a (sufficiently good) approximate fixed point.
We solve the following linear program (LP) with variables :
Clearly, is a feasible solution of the LP. For now assume that we know that the LP has an optimal (rational) solution such that all denominators are bounded by some positive integer (that only depends on , and ). Then, if we pick , it will follow that , which implies that ( is implicitly forced by the constraints). Thus, solving the LP will give us a contiguous envy-free allocation.
It remains to find a bound such that the LP is guaranteed to have an optimal solution with all denominators bounded by . The LP must have a solution that is a vertex of the feasible polytope—the polytope defined by the constraints. Note that for , at least constraints must be tight, i.e., satisfied with equality. Furthermore, must be the unique point that satisfies all these tight constraints with equality (otherwise, it would not be a vertex of the feasible polytope). Thus, by picking a linearly independent subset of these tight constraints, we get that is the unique solution of a linear system with variables and equations.
It follows that there exists some integer such that multiplying the th line of the linear system by makes the coefficients integral. Doing this for every line yields an equivalent linear system that is integral. Notice that has at most 5 non-zero entries per line and each of these values is bounded (in absolute value) by . Cramer’s rule tells us that , where is the matrix with the last column replaced by . Since is an integer, it suffices to bound in order to bound the denominator of .
Using Hadamard’s inequality, we get that , where is the th line (i.e., row) of . It follows that (since ). Thus, we get that has denominator at most . ∎
The same proof also yields the following result: If for all , all numbers in the description of have denominator exactly , then from any -envy-free solution, we can efficiently obtain an envy-free solution. Indeed, in this case has denominator , so we get and for every .
2 Continuous and Discrete Cake Cutting
We now establish the computational equivalence between some continuous and discrete cake-cutting problems. Let us start by defining the computational problems that we will consider.
The problem unary--EF-Cake-Cutting is defined as: given (in unary) and (explicit, normalized) piecewise constant valuations on $\varepsilon(x,\pi)$.
This corresponds to the standard contiguous -envy-free cake-cutting problem with piecewise constant valuations, except that is provided in unary representation. This means that can no longer have exponential precision with respect to the size of the input. We also define a (seemingly) more restricted version of this problem.
The problem simple--EF-Cake-Cutting is defined exactly as unary--EF-Cake-Cutting, except that we are also given some positive integer (in unary) and for all we have that the piecewise constant valuation satisfies:
all heights of value-blocks of are integral;
the height of can only change at points of the form where .
Next, we consider discrete cake cutting. While an envy-free allocation is not guaranteed to exist in this setting (cf. Section 5), such an allocation always exists for some restricted classes of valuations. We say that indivisible item valuations are disjoint if every item is valued by at most one agent. Marenco and Tetzlaff (2014) proved that if the valuations are disjoint, then an envy-free allocation necessarily exists. We define a computational search problem based on this existence theorem, where we restrict ourselves to the binary valuation case. Note that binary valuations correspond to piecewise uniform valuations once normalized (i.e., if an item is valued by an agent, then it is valued the same as any other item valued by that agent).
The problem Disjoint-Discrete-EF-Cake-Cutting is defined as: given disjoint binary valuations on a discrete cake, find a contiguous envy-free allocation.
Perhaps surprisingly, it turns out that all of these problems are computationally equivalent. Thus, any algorithm or hardness result for one of them would immediately extend to all of them.
The following problems are polynomial time equivalent:
Disjoint-Discrete-EF-Cake-Cutting, where all agents value the same number of items.
The rest of this section is devoted to proving this theorem. The reductions (2) (1) and (4) (3) are trivial, because we are reducing from a special case of a problem to a more general case. Thus, in order to establish the theorem, it remains to show that (1) reduces to (4) (Proposition 6.7), and that (3) reduces to (2) (Proposition 6.8).
unary--EF-Cake-Cutting reduces to Disjoint-Discrete-EF-Cake-Cutting where all agents value the same number of items.
We follow the same idea that was used by Filos-Ratsikas and Goldberg (2018) to show that -Consensus-Halving reduces to Necklace-Splitting when is given in unary representation (i.e., it is inversely polynomial).
Let denote the maximum number of value-blocks in the piecewise constant valuation of any agent . Since the piecewise constant valuations are provided explicitly in the input, it follows that is bounded by the size of the input. Let be such that is integral.
For each agent and each value-block of we do the following. Let denote the subinterval covered by the block and let be its height. We divide the block into sub-blocks of value each, starting from the left. Namely, the first sub-block covers , the second sub-block covers , and so on. If is not an integer, then the last sub-block will be incomplete and we will ignore it. Thus, we have obtained complete sub-blocks. For each such sub-block, we compute its midpoint and place an item valued by agent at that position in $$.
After we have done this for every block of every agent, we perform some post-processing. Note that all agents might not value the same number of items. Indeed, since incomplete sub-blocks are dropped, an agent might value less than items. However, since every agent has at most blocks of value, she can have at most incomplete sub-blocks. Thus, every agent values at least items. Now, for any agent that values strictly more than items, we remove items from the instance until she values exactly items. The items to be removed are picked arbitrarily—since every item is valued by exactly one agent, this is straightforward to do. After this is done, every agent values exactly items. In particular, exactly of every agent’s original value is unaccounted for by the discretized instance.
From here we obtain an instance of Disjoint-Discrete-EF-Cake-Cutting by simply arranging the items in the order in which they appear in the interval —in that case, we resolve the tie arbitrarily. Every item is valued by exactly one agent, and by all other agents.
Consider any solution of this Disjoint-Discrete-EF-Cake-Cutting instance. This allocation of the items gives rise to an allocation of the cake: for every cut in the discretized version, we place the corresponding cut in the continuous version between the positions of the items on either side of the cut (e.g., halfway between the positions of the two items). In particular, if the two items share the same position in $$, then the cut is placed at that same position.
We now argue that the resulting allocation is an -approximate solution to the unary--EF-Cake-Cutting instance. Let denote the -value (i.e., the value for agent ) of the interval assigned to agent . Let denote the value for agent of the items assigned to agent in the discretized instance, but where we let every item have value (instead of ). Then, we have for all . Consider the interval assigned to agent and compare it to the items assigned to agent . It is possible that even though an item was assigned to agent , the cut in the continuous instance cuts through the corresponding sub-block of value . However, in that case agent gets at least from that sub-block, i.e., she lost at most . Since this can happen at both extremities of the interval assigned to agent , we get . Now consider the -value of the interval assigned to agent . The same idea as above about the extremities of the interval means that the continuous allocation might increase the -value by with respect to the discrete allocation. Furthermore, there is also of agent ’s available value that is unaccounted for in the discrete allocation. In the worst case, all of it lies in the interval allocated to agent . Thus, we obtain . Putting everything together, we then get . ∎
Disjoint-Discrete-EF-Cake-Cutting reduces to simple--EF-Cake-Cutting.
Consider an instance of Disjoint-Discrete-EF-Cake-Cutting with items and agents with disjoint binary valuations . For , let denote the number of items that agent values. Note that the valuations are provided explicitly in the input, so , , and the ’s are bounded by the size of the input. We start by providing a reduction to unary--EF-Cake-Cutting.
We construct a continuous cake-cutting instance as follows. Divide the continuous cake $m1/mI_{j}=[(j-1)/m,j/m]j\in[m]j\in[m]i1/mm/m_{i}I_{j}w_{i}w_{1},\dots,w_{n}\varepsilon:=\min_{i}1/(nm_{i})\varepsilon$ can be efficiently represented in unary.
Let be a contiguous -envy-free allocation for this continuous cake-cutting instance. For , let denote the interval allocated to agent . We now provide a rounding procedure to turn this -envy-free allocation into an envy-free allocation where all cuts lie on points of the form with . It is easy to see that this yields a solution to the Disjoint-Discrete-EF-Cake-Cutting instance.
If we had an envy-free allocation, then the rest of the rounding would be straightforward: simply round every remaining bad cut to the right (or alternatively round every bad cut to the nearest value). With this rounding, agent would have envy strictly less than , and thus envy . However, we only have an -envy-free allocation, so we need to do come up with a more involved rounding scheme. We now show how to round all -cuts; the same procedure can be applied for every .
We have shown a reduction to unary--EF-Cake-Cutting. In order to obtain a reduction to simple--EF-Cake-Cutting, we combine this reduction with Proposition 6.7. Indeed, this yields a reduction from Disjoint-Discrete-EF-Cake-Cutting to Disjoint-Discrete-EF-Cake-Cutting where all agents value the same number of items. This means that we now have for all . By adding additional items that are not valued by anyone, we can also ensure that the number of items is a multiple of . Applying the same reduction described in the first part of this proof to this instance yields an instance of simple--EF-Cake-Cutting with . ∎
Conclusion
In this paper, we study the classical cake cutting problem with the contiguity constraint and establish several hardness results and approximation algorithms for this setting. It is worth noting that while our -envy-free algorithm (Algorithm 1) is simple, lowering the envy to for the restricted class of uniform single-interval valuations (Algorithm 2) already requires significantly more work. Pushing the approximation factor down further even for this class or the class of piecewise uniform valuations while maintaining computational efficiency is therefore a challenging direction. Of course, it is possible that there are hardness results for sufficiently small constants—this is not implied by the work of Deng et al. (2012), as their PPAD-completeness result relies on more complex preference functions.
On the hardness front, we provide constructions that serve as frameworks for deriving NP-hardness results for both cake cutting and indivisible items. Nevertheless, our frameworks do not cover questions related to the utilities of the agents, for instance whether there exists a contiguous envy-free allocation of the cake in which the first agent receives at least a certain level of utility. Extending or modifying our constructions to deal with such questions is an intriguing direction for future research.
Finally, while we have established a number of connections between continuous and discrete cake-cutting in this paper, much still remains to be explored. For example, Suksompong (2019) showed in the discrete setting that if the valuations are binary, then an “envy-free up to one item” allocation is guaranteed to exist. Similarly, for additive (and even monotonic) valuations, Bilò et al. (2019) proved the existence of an allocation that is envy-free up to two items. It would be interesting to see how these problems can be related to the continuous setting.
Acknowledgments
This work was partially supported by the European Research Council (ERC) under grant number 639945 (ACCORD) and by an EPSRC doctoral studentship (Reference 1892947). We would like to thank the anonymous reviewers of the 34th AAAI Conference on Artificial Intelligence (AAAI 2020) for their valuable comments.