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 $andnormalizetheagents’valuationssothateachagenthasvalueand normalize the agents’ valuations so that each agent has value1fortheentireinterval.OurfirstalgorithmworksforgeneralvaluationsundertheRobertson−Webbmodelandproducesacontiguousallocationinwhichanyagenthasenvynomorethanfor the entire interval. Our first algorithm works for general valuations under the Robertson-Webb model and produces a contiguous allocation in which any agent has envy no more than1/3towardsanyotheragent.Ontheotherhand,oursecondalgorithmisspecifictovaluationswhereeachagentonlydesiresasinglesubintervalandhasauniformvalueoverthatinterval—forsuchvaluations,thealgorithmproducesacontiguousallocationwithalowerenvyofatmosttowards any other agent. On the other hand, our second algorithm is specific to valuations where each agent only desires a single subinterval and has a uniform value over that interval—for such valuations, the algorithm produces a contiguous allocation with a lower envy of at most1/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 11. 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 33. 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 1/41/4 for her own piece and 3/43/4 for another agent’s piece—this corresponds to an additive envy of 1/21/2. 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 nn, let [n]={1,2,…,n}[n]=\{1,2,\dots,n\}. In our cake cutting setting, we consider the cake as the interval $.Thereare. There arenagentswhosepreferencesoverthecakearerepresentedbyvaluationfunctionsagents whose preferences over the cake are represented by valuation functionsv_{1},\dots,v_{n}.Assumethatthesevaluationfunctionsarenon−negativedensityfunctionsover. Assume that these valuation functions are non-negative density functions over.Weabusenotationandlet. We abuse notation and letv_{i}(a,b)=v_{i}([a,b])=\int_{a}^{b}v_{i}(x)dxforfor0\leq a\leq b\leq 1.Itfollowsthatthevaluationsarenon−negative,additive,andnon−atomic(i.e.,. It follows that the valuations are non-negative, additive, and non-atomic (i.e.,v_{i}(a,a)=0).Weassumefurtherthatthevaluationsarenormalizedsothat). We assume further that the valuations are normalized so thatv_{i}(0,1)=1foreveryfor everyi\in[n]$.

A contiguous allocation of the cake is a partition of $intointon(possiblyempty)intervals,alongwithanassignmentofeachintervaltoanagent,sothateveryagentgetsexactlyoneinterval.Notethatthismeansthatwecutthecakeusing(possibly empty) intervals, along with an assignment of each interval to an agent, so that every agent gets exactly one interval. Note that this means that we cut the cake usingn-1cuts.Formally,acontiguousallocationisrepresentedbythecutpositionscuts. Formally, a contiguous allocation is represented by the cut positions0\leq x_{1}\leq x_{2}\leq\dots\leq x_{n-1}\leq 1andapermutationand a permutation\pi:[n]\to[n]thatassignstheintervalstotheagentssothatagentthat assigns the intervals to the agents so that agentireceivestheintervalreceives the interval[x_{\pi(i)-1},x_{\pi(i)}],wherewedefine, where we definex_{0}=0andandx_{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 (x,π)(x,\pi) is envy-free if for all i,j∈[n]i,j\in[n], we have vi(xπ(i)−1,xπ(i))≥vi(xj−1,xj)v_{i}(x_{\pi(i)-1},x_{\pi(i)})\geq v_{i}(x_{j-1},x_{j}). In some cases we will be interested in finding a contiguous allocation that is only approximately envy-free. For ε∈\varepsilon\in, the contiguous allocation (x,π)(x,\pi) is ε\varepsilon-envy-free if for all i,j∈[n]i,j\in[n], we have vi(xπ(i)−1,xπ(i))≥vi(xj−1,xj)−εv_{i}(x_{\pi(i)-1},x_{\pi(i)})\geq v_{i}(x_{j-1},x_{j})-\varepsilon. In other words, any agent has envy that is at most a fraction ε\varepsilon 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 x,yx,y and asks agent ii to return the value vi(x,y)v_{i}(x,y)—and cut queries—where it specifies x,αx,\alpha and asks agent ii to return the leftmost point yy such that vi(x,y)=αv_{i}(x,y)=\alpha (or say that no such yy 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 $,i.e.,astepfunction.Thisclassofvaluationscanbeexplicitlyrepresentedaspartoftheinput.Asubclassofpiecewiseconstantvaluationsistheclassofpiecewiseuniformvaluations,wherethedensityfunctionofagent, i.e., a step function. This class of valuations can be explicitly represented as part of the input. A subclass of piecewise constant valuations is the class of piecewise uniform valuations, where the density function of agentiiseithersomefixedrationalconstantis either some fixed rational constantc_{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 1/31/3-envy-free allocation. On the other hand, Algorithm 2 can be used for piecewise uniform valuations with a single value-block and outputs a 1/41/4-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 1/31/3 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 nn agents with arbitrary valuations, Algorithm 1 returns a contiguous 1/31/3-envy-free allocation and runs in time polynomial in nn 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 ε>0\varepsilon>0, a contiguous ε\varepsilon-envy-free allocation can be found using O(n/ε)O(n/\varepsilon) queries, which is polynomial in nn for constant ε\varepsilon. Their algorithm works by cutting the cake into pieces of size 1/ε1/\varepsilon 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 ε\varepsilon). By contrast, in the absence of the contiguity constraint, Procaccia (2016, p. 323) gave a simple polynomial-time algorithm that computes an ε\varepsilon-envy-free allocation for any constant ε\varepsilon. His algorithm also starts by cutting the cake into pieces of size 1/ε1/\varepsilon 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 1/31/3 in our approximation can be improved under the computational efficiency requirement,For the case n=3n=3, Deng et al. (2012) gave a fully polynomial-time approximation scheme that computes a contiguous ε\varepsilon-envy-free allocation for any ε>0\varepsilon>0. 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 1/41/4. Alijani et al. (2017) showed that if the valuations are as described and moreover the nn 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 1/41/4 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 2n−12n-1 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 1/41/4 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 1/41/4 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 1/41/4 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 nn agents with piecewise uniform valuations such that each agent only values a single interval, Algorithm 2 returns a contiguous 1/41/4-envy-free allocation and runs in time polynomial in nn.

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 i,ji,j, agent ii has envy at most 1/41/4 towards agent jj. For the purpose of this proof, when we refer to an interval MiM_{i}, 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 Mi+M_{i}^{+} the corresponding extended interval that is returned by the algorithm. For any agent ii and any interval II, the ii-value of II is the value of II for agent ii, i.e., vi(I)v_{i}(I).

When agent ii’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, MiM_{i} 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 MqM_{q} and MrM_{r} that are adjacent before the extension phase begins, and thus every interval MiM_{i} will be extended in a single direction.

It is clear that vi(Mj+)≥vi(Mj)v_{i}(M_{j}^{+})\geq v_{i}(M_{j}) for all i,ji,j. Furthermore, in all four cases it holds that agent ii is allocated an interval of value at most 1/41/4, i.e., vi(Mi)≤1/4v_{i}(M_{i})\leq 1/4 for all ii. Since Mi⊆RiM_{i}\subseteq R_{i} and because of the way the agents are ordered, it follows that

We now show that any agent ii has envy at most 1/41/4 at the end of the algorithm. Namely, we prove that for any agents i,ji,j we have vi(Mj+)≤vi(Mi+)+1/4v_{i}(M_{j}^{+})\leq v_{i}(M_{i}^{+})+1/4. We treat the four different cases that can occur during agent ii’s turn.

Cases 11 and 22. In both cases, MiM_{i} contains mid(i)\text{mid}(i) and has ii-value 1/41/4. This also holds for Mi+⊇MiM_{i}^{+}\supseteq M_{i}. Since the midpoint of RiR_{i} is contained in Mi+M_{i}^{+}, any other interval Mj+M_{j}^{+} has ii-value at most 1/21/2. Thus, agent ii has envy at most 1/41/4.

Case 44. First, suppose that vi(Mi)<1/4v_{i}(M_{i})<1/4. This means that MiM_{i} was a largest available interval in RiR_{i}. It follows that any agent j>ij>i can obtain an interval of ii-value at most vi(Mi)v_{i}(M_{i}), since it is processed after ii. For j<ij<i, since agent ii is in Case 4, the SDE property holds. Thus, MjM_{j} can be extended by at most vi(Mi)v_{i}(M_{i}), i.e., vi(Mj+)≤vi(Mj)+vi(Mi)v_{i}(M_{j}^{+})\leq v_{i}(M_{j})+v_{i}(M_{i}) for all jj. With (1) it follows that the envy is at most 1/41/4.

Now, consider the case where vi(Mi)=1/4v_{i}(M_{i})=1/4. Any agent j>ij>i can obtain ii-value no more than 1/21/2—otherwise, agent ii would have fallen in Case 1 or 2. Consider any j<ij<i:

if mid(i)∈Mj\text{mid}(i)\in M_{j}, then both on the left and right side of MjM_{j} the space available has ii-value <1/4<1/4 (otherwise agent ii would be in Case 1 or 3). Since the SDE property holds, it follows that vi(Mj+)≤vi(Mj)+1/4≤1/2v_{i}(M_{j}^{+})\leq v_{i}(M_{j})+1/4\leq 1/2 with (1).

if mid(i)∉Mj\text{mid}(i)\notin M_{j}, then vi(Mj+)<1/2v_{i}(M_{j}^{+})<1/2. Otherwise, it means that MjM_{j} is extended in a single direction (SDE property) and takes over an interval of ii-value at least 1/41/4 that contains mid(i)\text{mid}(i). But then, agent ii 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 11 obtains the leftmost piece?

Does there exist an envy-free allocation in which the pieces are allocated to the nn agents in the order 1,2,…,n1,2,\dots,n?

Does there exist an envy-free allocation such that there is a cut at position xx, for xx given in the input?

These problems remain NP-hard if we replace envy-freeness by ε\varepsilon-envy-freeness for any sufficiently small constant ε\varepsilon.

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 n−1n-1 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 C1C_{1}, then C2C_{2}, and so on until CmC_{m}, and then the Variable-Gadget for x1x_{1}, then x2x_{2}, and so on until xnx_{n}. 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 11 gets the leftmost piece?

Does there exist an envy-free allocation in which agents 1,2,…,k1,2,\dots,k get the kk leftmost pieces, in that order? (for any constant k≥1k\geq 1)

Does there exist an envy-free allocation in which all the agents 1,2,…,n1,2,\dots,n 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 xx? (xx given in the input)

Does there exist an envy-free allocation such that the leftmost cut is at position xx? (xx given in the input)

Does there exist an envy-free allocation such that there are cuts at positions x1x_{1}, …\dots, xkx_{k}? (x1x_{1}, …\dots, xkx_{k} given in the input, kk any constant)

The problems remain NP-hard if we replace envy-freeness by ε\varepsilon-envy-freeness for any ε≤0.01\varepsilon\leq 0.01.

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 11 gets the kkth piece from the left (k≥1k\geq 1 constant)” or to “the kk leftmost cuts are at positions x1x_{1}, …\dots, xkx_{k}”.

Let II be an instance of 33-sat with mm clauses C1,…,CmC_{1},\dots,C_{m}, where each clause is made out of 33 literals using the variables x1,…,xnx_{1},\dots,x_{n} and their negations. Note that mm is polynomial in nn and thus we can use nn as the complexity parameter for the instance. Let ε≤0.01\varepsilon\leq 0.01 be arbitrary.

We will construct an instance where the cake is the interval [0,p(n)][0,p(n)] (for some polynomial pp), instead of the usual .Thisisjustforconvenienceasitiseasytoobtainacompletelyequivalentinstanceon. This is just for convenience as it is easy to obtain a completely equivalent instance on in polynomial time. Indeed, it suffices to divide the position of every block by p(n)p(n) and multiply its height by p(n)p(n). 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 $).Allthevaluationsweconstructwillbepiecewiseuniform,andinfactallblocksofallagentswillhaveheight). All the valuations we construct will be piecewise uniform, and in fact all blocks of all agents will have height1(beforescalingthecaketo(before scaling the cake to$), but variable length. Furthermore, value-blocks of different agents will not overlap.

Clause-Gadget. Consider any clause CiC_{i} in the instance II. CiC_{i} will be represented by a Clause-Gadget in the cake cutting instance. The Clause-Gadget for CiC_{i} requires an interval of length 99 on the cake, say [ai,ai+9][a_{i},a_{i}+9], where only three specific agents are allowed to have any value. These agents are denoted by Ci1C_{i}^{1}, Ci2C_{i}^{2} and Ci3C_{i}^{3}. The interpretation is that Ci1C_{i}^{1} corresponds to the first literal appearing in the clause CiC_{i}, Ci2C_{i}^{2} to the second one, and Ci3C_{i}^{3} to the third one. The valuation of agent Ci1C_{i}^{1} contains three blocks of value in the interval [ai,ai+9][a_{i},a_{i}+9]: one in each of the subintervals [ai,ai+1][a_{i},a_{i}+1], [ai+3,ai+4][a_{i}+3,a_{i}+4] and [ai+6,ai+7][a_{i}+6,a_{i}+7]. Each of these blocks has value 0.240.24 (i.e., length 0.240.24 and height 11). Agents Ci2C_{i}^{2} and Ci3C_{i}^{3} have the same blocks as Ci1C_{i}^{1}, but shifted by 11 and 22 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 0.720.72 inside the Clause-Gadget. The remaining 0.280.28 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 33 after every gadget. Then, position all the Variable-Gadgets one after the other, again leaving an interval of length 33 after every gadget. Thus, the cake is the interval [0,12m+7n][0,12m+7n], where the first Clause-Gadget occupies the interval $,andthefirstVariable−Gadgetoccupiestheinterval, and the first Variable-Gadget occupies the interval[12m,12m+4].Thereare. There are3m+2nagentssofar.Notethatadjacentgadgetsareseparatedbyintervalsoflengthagents so far. Note that adjacent gadgets are separated by intervals of length3thatwecallIsolatingIntervals.Thereareexactlythat we call Isolating Intervals. There are exactlym+n-1$ Isolating Intervals.

The kkth Isolating Interval from the left is denoted IkI_{k}. The Isolating Interval Ik=[a,a+3]I_{k}=[a,a+3] is divided into three subintervals: Ik=[a,a+1]I_{k}=[a,a+1], Ik=[a+1,a+2]I_{k}=[a+1,a+2] and Ik=[a+2,a+3]I_{k}=[a+2,a+3]. Furthermore, we also add an interval of length 3 on the left end of the cake: the Initiation Interval. We denote it by I0I_{0} and it is similarly subdivided into I0I_{0}, I0I_{0} and I0I_{0}. The cake is now represented by the interval [0,12m+7n+3][0,12m+7n+3].

We add two new agents S0S_{0} and S0′S_{0}^{\prime}. Agent S0S_{0} has a block of value 1/71/7 in I0I_{0}, a block of value 2/72/7 in each of I0I_{0}, I1I_{1} and I1I_{1}. Agent S0′S_{0}^{\prime} has a block of value 11 in I0I_{0}. For k∈[m+n−2]k\in[m+n-2] we define an agent SkS_{k} that has a block of value 0.20.2 in IkI_{k} and a block of value 0.40.4 in each of Ik+1I_{k+1} and Ik+1I_{k+1}. We also define an agent Sm+n−1S_{m+n-1} that has a block of value 11 in Im+n−1I_{m+n-1}. Figure 3 shows the valuations of the agents in I0I_{0}, I1I_{1} and I2I_{2}. The total number of agents is (3m+2n)+(m+n+1)=4m+3n+1(3m+2n)+(m+n+1)=4m+3n+1, so there are 4m+3n4m+3n cuts in any solution.

Let ε=0.01\varepsilon=0.01. Since an envy-free allocation always exists, the cake-cutting instance we have constructed admits an envy-free allocation (in particular also ε\varepsilon-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 ε\varepsilon-envy-free allocation is said to satisfy the Isolation property if together all the Clause- and Variable-Gadgets contain at most 2m+n2m+n cuts strictly within them.

Any ε\varepsilon-envy-free allocation that satisfies the Isolation property yields a satisfying assignment for the 3-sat formula.

Consider any ε\varepsilon-envy-free allocation. If there is at most one cut strictly inside the Clause-Gadget of CiC_{i}, then there is an agent CikC_{i}^{k} (k∈{1,2,3}k\in\{1,2,3\}) who does not obtain any of its value from this Clause-Gadget. Thus, agent CikC_{i}^{k} gets value at most 0.280.28 (from its corresponding Variable-Gadget). However, since the Clause-Gadget of CiC_{i} is divided into at most two parts, some agent gets at least 0.72/2=0.360.72/2=0.36 according to agent CikC_{i}^{k}’s valuation, which contradicts ε\varepsilon-envy-freeness. Thus, every Clause-Gadget contains at least two cuts strictly within them.

If the Variable-Gadget for xjx_{j} does not strictly contain any cut, then all of it is allocated to a single agent. Necessarily, agent LjL_{j} or RjR_{j} would have envy 1>ε1>\varepsilon. Thus, every Variable-Gadget strictly contains at least one cut.

Now consider an ε\varepsilon-envy-free allocation that also satisfies the Isolation property. Since the property permits at most 2m+n2m+n 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 xjx_{j}, the two resulting parts must go to agents LjL_{j} and RjR_{j}. Indeed, if one of these two agents does not get one of the two parts, then the agent would have envy at least 1/2>ε1/2>\varepsilon. Similarly, since there are exactly two cuts strictly inside the Clause-Gadget of CiC_{i}, the three resulting parts must go to agents Ci1C_{i}^{1}, Ci2C_{i}^{2} and Ci3C_{i}^{3}. 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 0.24>ε0.24>\varepsilon.

We now show how such a solution yields a satisfying assignment to the 3-sat instance. Consider the Clause-Gadget of CiC_{i}. As we showed above, there are exactly two cuts strictly inside the gadget and the three resulting parts go to the agents Ci1C_{i}^{1}, Ci2C_{i}^{2} and Ci3C_{i}^{3}. Any of these three agents who obtains at most 0.240.24 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 Ci1C_{i}^{1} 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 11. Thus, if CikC_{i}^{k} is sad, this means that we set the literal corresponding to CikC_{i}^{k} to have the value 11.

In any ε\varepsilon-envy-free allocation for this instance, every agent obtains a nonzero value.

If there exists an ε\varepsilon-envy-free allocation in which agent S0S_{0} gets the leftmost piece, then the 3-sat formula is satisfiable.

In any ε\varepsilon-envy-free allocation in which agent S0S_{0} gets the leftmost piece, the piece allocated to S0S_{0} will be a strict prefix of I0∪I0=I_{0}\cup I_{0}=. Indeed, if S0S_{0} were allocated all of $,thenagent, then agentS_{0}^{\prime}wouldhaveenvywould have envy1.Itfollowsthatagent. It follows that agentS_{0}willobtainvalueatmostwill obtain value at most1/7.Asaresult,thethreeblocksofvalue. As a result, the three blocks of value2/7ofofS_{0}musteachcontainatleastonecut.Also,notethattheInitiationIntervalmust each contain at least one cut. Also, note that the Initiation IntervalI_{0}$ contains at least two cuts.

We now know that the two blocks of value of S0S_{0} in I1I_{1} and I1I_{1} must each contain a cut. We show that agent S1S_{1} must be allocated some interval in I1I_{1}. Suppose for the sake of contradiction that this is not the case. Then, some agent X0X_{0} must be allocated an interval in I1I_{1}, since there are at least two cuts inside I1I_{1}. But this agent cannot be S0S_{0} or S1S_{1}, so it will obtain value . However, by Claim 1, this is impossible.

Thus, S1S_{1} must be allocated some interval in I1I_{1}. It follows that S1S_{1} obtains value at most 0.20.2. This, in turn, implies that the two blocks of value 0.40.4 of S1S_{1} in I2I_{2} must each contain a cut. This means that we can repeat the argument above to show that S2S_{2} must be allocated an interval in I2I_{2}. By induction it follows that every Isolating Interval contains at least 22 cuts. Thus, we have shown that at least 2+2(m+n−1)=2m+2n2+2(m+n-1)=2m+2n cuts do not lie inside any Clause- or Variable-Gadget. This means that at most (4m+3n)−(2m+2n)=2m+n(4m+3n)-(2m+2n)=2m+n cuts lie strictly inside a Clause- or Variable-Gadget, and so the Isolation property holds. By Lemma 4.2, any ε\varepsilon-envy-free allocation in which S0S_{0} 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 S0S_{0} and the second piece to S0′S_{0}^{\prime}. 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 IkI_{k} as a gadget with corresponding agent SkS_{k}. Within the Clause-Gadget for CiC_{i}, the corresponding agents appear in the order Ci1C_{i}^{1}, Ci2C_{i}^{2}, Ci3C_{i}^{3}. Within the Variable-Gadget for xjx_{j}, the corresponding agents appear in the order LjL_{j}, RjR_{j}. 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 11 and through the middle of every block of S0S_{0} of value 2/72/7. Also place a cut through the middle of every block of value 0.40.4 of SkS_{k}, 1≤k≤m+n−21\leq k\leq m+n-2. Allocate the leftmost piece to S0S_{0} and the next piece to S0′S_{0}^{\prime}. Allocate the piece between the two cuts in the Isolating interval IkI_{k} to agent SkS_{k}. Note that no matter how we allocate the remaining parts of the cake, the agents S0′S_{0}^{\prime}, S0S_{0}, S1S_{1}, …\dots, Sm+n−1S_{m+n-1} will definitely be envy-free. S0′S_{0}^{\prime} and Sm+n−1S_{m+n-1} have obtained all of their value. S0S_{0} has obtained value 1/71/7, but its three blocks of value 2/72/7 have all been cut in half. Finally, for 1≤k≤m+n−21\leq k\leq m+n-2, SkS_{k} has obtained value 0.20.2, but its two blocks of value 0.40.4 have also been cut in half. Figure 3 shows the positions of the cuts in I0I_{0}, I1I_{1} and I2I_{2}.

Depending on whether xj=1x_{j}=1 or x‾j=1\overline{x}_{j}=1 place a cut in the middle of the region corresponding to xjx_{j} or x‾j\overline{x}_{j} respectively inside the Variable-Gadget of xjx_{j}. Allocate the left piece to LjL_{j} and the right piece to RjR_{j}. Note that LjL_{j} and RjR_{j} obtain all of their value.

Finally, for every clause CiC_{i} pick one of its literals that is 11 and let CikC_{i}^{k} be the associated agent. We position two cuts inside the gadget such that CikC_{i}^{k} 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 CikC_{i}^{k} 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 Ci1,Ci2,Ci3C_{i}^{1},C_{i}^{2},C_{i}^{3} in that order from left to right. CikC_{i}^{k} has thus obtained value 0.240.24 and its two other 0.240.24-blocks have been allocated to two distinct agents. The last remaining block, which has value 0.280.28 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, CikC_{i}^{k} is envy-free. Now consider any of the two other agents of this Clause-Gadget. Such an agent has obtained 0.480.48 of its value. 0.240.24 of its value has been allocated to other agents in this Clause-Gadget, and 0.280.28 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 ε\varepsilon-envy-freeness).

Fixing cuts.

In any ε\varepsilon-envy-free allocation in which there is a cut at position 11, the leftmost piece must be assigned to agent S0S_{0}.

Since there is a cut at position 11, the leftmost piece can only contain value for agent S0S_{0}. 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 11. 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 ε\varepsilon-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 1/n1/n 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 11. 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 ∅≠X⊆F\emptyset\neq X\subseteq F. Deciding whether an instance with indivisible items on a line admits a contiguous allocation satisfying all properties in XX 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 II be an instance of 3-SAT with mm clauses C1,…CmC_{1},\dots C_{m} using the variables x1,…,xnx_{1},\dots,x_{n} and their negations. We create the following gadgets.

We combine these gadgets to create the instance RR as follows. Starting from the left, construct the Clause-Gadget for each clause CiC_{i}. Then, construct the Variable-Gadget for each variable xjx_{j}. Thus, we obtain an instance with 3m+2n3m+2n agents and 4m+(5n+6m)=5n+10m4m+(5n+6m)=5n+10m items.

Any contiguous allocation in RR where every agent gets at least two items they value yields a satisfying assignment for II. This holds even if the allocation is partial, i.e., some items are not allocated.

Any satisfying assignment for II yields a contiguous envy-free allocation in RR 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 3m+2n+73m+2n+7 new agents. We denote the set of these new agents by NN. The gadget consists of 2(3m+2n)+14=6m+4n+142(3m+2n)+14=6m+4n+14 new items. These items are valued by all agents in NN. For every i∈[m]i\in[m] and k∈k\in, CikC_{i}^{k} values all new items except the rightmost six. For every j∈[n]j\in[n], XjX_{j} and X‾j\overline{X}_{j} value all new items except the rightmost four.

The Special-Gadget is added to the right end of RR and yields the final instance R′R^{\prime}. Note that in R′R^{\prime} there are 6m+4n+76m+4n+7 agents and every agent values exactly 6m+4n+146m+4n+14 items. Now consider any contiguous allocation for R′R^{\prime}.

If the allocation is proportional, then every agent gets at least ⌈(6m+4n+14)/(6m+4n+7)⌉=2\lceil(6m+4n+14)/(6m+4n+7)\rceil=2 items they value. It follows that the agents in NN get all the new items, because 2∣N∣=2(3m+2n+7)=6m+4n+142|N|=2(3m+2n+7)=6m+4n+14. This means that the other agents get at least two items they value in RR. By the claim above, we obtain a satisfying assignment.

If the allocation is equitable, then all agents get exactly ss items they value, for some s≥0s\geq 0. The Special-Gadget contains an item (in fact, many) that is valued by all agents. Since this item will be allocated to someone, s=0s=0 is not possible. Also s≥3s\geq 3 is not possible, because the 3m+2n+73m+2n+7 agents in NN all like the exact same 2(3m+2n+7)2(3m+2n+7) items. Now, since all 6m+4n+76m+4n+7 agents value the first (6m+4n+14)−6=6m+4n+8(6m+4n+14)-6=6m+4n+8 items in the Special-Gadget, at least one of them will be allocated to two of those (by the pigeonhole principle). It follows that s=1s=1 is also impossible. Thus, only s=2s=2 remains, and we again obtain a satisfying assignment by the claim.

Since envy-freeness implies proportionality, it follows that any XX-allocation for R′R^{\prime} yields a satisfying assignment for the 3-SAT instance II, for any non-empty X⊆{X\subseteq\{envy-free, proportional, equitable}\}. On the other hand, any satisfying assignment for the 3-SAT instance yields an envy-free and equitable allocation for R′R^{\prime}, by assigning two contiguous Special-Gadget items to each agent in NN 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 3n3n positive integers x1,…,x3nx_{1},\dots,x_{3n} with sum nBnB, and the goal is to partition them into nn sets of size three each so that the three numbers in each set sum to BB. The problem is NP-hard, and remains so when B/4<xi<B/2B/4<x_{i}<B/2 for all ii (Garey and Johnson, 1979).

Given an instance of 3-partition, we create an instance of our problem as follows. There are m:=n(B+1)+4nk2m:=n(B+1)+4nk^{2} items on the line, where k=4Bk=4B. Each item belongs to one of the three types: special, normal, and dummy. From left to right, the last 4nk24nk^{2} items are dummy items. The remaining n(B+1)n(B+1) items are partitioned into nn blocks of size B+1B+1—the leftmost item of each block is a special item (so nn special items in total), and the remaining BB items of the block are normal items (so nBnB normal items in total). There are n′:=4n(k+1)n^{\prime}:=4n(k+1) agents: nn special, 3n3n normal, and 4nk4nk dummy. Each of the nn special agents values a distinct special item and nothing else. Each dummy agent values all dummy items and nothing else. For 1≤i≤3n1\leq i\leq 3n, the iith normal agent values the leftmost n′xin^{\prime}x_{i} items. Note that this is well-defined because n′xi<2n(k+1)B<4nkB=nk2<mn^{\prime}x_{i}<2n(k+1)B<4nkB=nk^{2}<m. Moreover, n′xi>n(k+1)B>2nB>n(B+1)n^{\prime}x_{i}>n(k+1)B>2nB>n(B+1), 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 kk consecutive dummy items. For each part {xa1,xa2,xa3}\{x_{a_{1}},x_{a_{2}},x_{a_{3}}\} in the solution to the 3-partition instance, we pick a block of BB normal items and give xaix_{a_{i}} consecutive items to the aia_{i}th normal agent. One can check that the resulting allocation is proportional; in particular, each dummy agent needs at least ⌈4nk2n′⌉=⌈4nk24n(k+1)⌉=k\left\lceil\frac{4nk^{2}}{n^{\prime}}\right\rceil=\left\lceil\frac{4nk^{2}}{4n(k+1)}\right\rceil=k 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 kk valued items. Since there are 4nk4nk dummy agents and they value the same 4nk24nk^{2} items, each dummy agent must receive exactly kk valued items. This leaves only the nBnB normal items to be allocated to the 3n3n normal agents. Normal agent ii needs to get at least xix_{i} items, so given that ∑i=13nxi=nB\sum_{i=1}^{3n}x_{i}=nB, all normal items must be allocated to the normal agents, and normal agent ii must receive exactly xix_{i} items. Finally, since B/4<xi<B/2B/4<x_{i}<B/2 for all ii, each block of BB 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 ii values xix_{i} items, she has value 1/xi1/x_{i} of each of them (so her total value is 11).

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 xi>nx_{i}>n for all ii. Note that we can ensure that this is the case by multiplying all xix_{i} and BB by nn.

Let K=nBK=nB. The main building block of this reduction is a KK-block: KK consecutive items with KK agents who only value these KK items. The instance is constructed as follows. Starting from the left end of the line, there are BB consecutive KK-blocks. Note that each KK-block has its own KK agents. We call this the “left region” of the instance. The “right region” of the instance consists of nn blocks of K+BK+B items each. The leftmost KK items of such a block form a KK-block, and there are BB items to the right of that KK-block. Finally, we introduce new agents a1,…,a3na_{1},\dots,a_{3n}. For each i∈[3n]i\in[3n], agent aia_{i} values the KxiKx_{i} rightmost items on the line. Note that this is well-defined, since there are BK+n(K+B)≥BK≥KxiBK+n(K+B)\geq BK\geq Kx_{i} items overall. Furthermore, agent aia_{i} values all items in the right region, because Kxi≥n(K+B)Kx_{i}\geq n(K+B) (since K=nBK=nB and xi>nx_{i}>n). 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 KK-block. Since its KK agents only value these KK items, it follows that they each obtain exactly one. Thus, they each get value exactly 1/K1/K, and all other agents in the instance must also get value exactly 1/K1/K. This means that agent aia_{i} must obtain exactly xix_{i} of its valued items. Since B/4<xi<B/2B/4<x_{i}<B/2 for all ii, each block of BB items in the right region are allocated to exactly three agents aia_{i}. 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 1/K1/K and there are more than KK 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 ε\varepsilon, deciding whether there exists an ε\varepsilon-envy-free allocation is NP-hard; this holds even if we restrict the valuation functions as in Theorem 5.1.

For any ε<1/13\varepsilon<1/13, deciding whether a contiguous ε\varepsilon-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 mm clauses C1,…,CmC_{1},\dots,C_{m} using the variables x1,…,xnx_{1},\dots,x_{n} and their negations. We will make use of the following gadgets:

Isolation-Gadget: An Isolation-Gadget consists of 1313 items and 55 agents. The 55 agents value each of the 1313 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 C1C_{1}, then for C2C_{2}, and so on up to CmC_{m}. Then, we construct the Variable-Gadget for x1x_{1}, for x2x_{2}, and so on up to xnx_{n}. Finally, we introduce an Isolation-Gadget between any two adjacent gadgets. Thus, there are m+n−1m+n-1 Isolation-Gadgets, and the instance has 3m+2n+5(m+n−1)=8m+7n−53m+2n+5(m+n-1)=8m+7n-5 agents.

Note that in this construction every agent values exactly 1313 items. Since all of the valuations are binary, this means that for the normalized valuations, any ε\varepsilon-envy-free allocation with ε<1/13\varepsilon<1/13 must actually be (exactly) envy-free.

Finally, any Isolation-Gadget must strictly contain at least 66 cuts. It is easy to see that it must contain at least 44 cuts, so that each of the 55 agents that values all of the 1313 items can obtain something. However, 44 cuts are not enough, because the 55 resulting pieces cannot contain exactly the same number of items and thus one of the 55 agents would not be envy-free. It turns out that 55 cuts are also not enough. Indeed, in that case there are 66 pieces and 55 of those must be given to the 55 agents of the gadget. However, it is impossible to divide 1313 items into 66 pieces in such a way that 55 of the pieces contain the same number of items and the 66th piece contains at most that many items.

Since the instance has 8m+7n−58m+7n-5 agents, there are 8m+7n−68m+7n-6 cuts. With the arguments above we have accounted for exactly 2m+n+6(m+n−1)=8m+7n−62m+n+6(m+n-1)=8m+7n-6 cuts. It follows that every Clause-Gadget strictly contains exactly 22 cuts and every Variable-Gadget strictly contains exactly 11 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 66 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 55 central pieces of size 22 to the 55 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 ε\varepsilon-envy-free allocation for a sufficiently small ε\varepsilon (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 v1,…,vnv_{1},\dots,v_{n} be (explicit, normalized) piecewise constant valuations, and M≥3M\geq 3 and kk be positive integers such that

for all i∈[n]i\in[n], all of the numbers in the explicit description of viv_{i} (i.e., the step heights and step change positions) have numerator and denominator at most MM;

for all i∈[n]i\in[n], viv_{i} has at most kk value-blocks.

Then from any M−20knM^{-20kn}-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 x1,…,xn−1,zx_{1},\dots,x_{n-1},z:

Clearly, (x^,ε)(\hat{x},\varepsilon) is a feasible solution of the LP. For now assume that we know that the LP has an optimal (rational) solution (x∗,z∗)(x^{*},z^{*}) such that all denominators are bounded by some positive integer dd (that only depends on MM, kk and nn). Then, if we pick ε<1/d\varepsilon<1/d, it will follow that z∗<1/dz^{*}<1/d, which implies that z∗=0z^{*}=0 (z∗≥0z^{*}\geq 0 is implicitly forced by the constraints). Thus, solving the LP will give us a contiguous envy-free allocation.

It remains to find a bound dd such that the LP is guaranteed to have an optimal solution with all denominators bounded by dd. The LP must have a solution (x∗,z∗)(x^{*},z^{*}) that is a vertex of the feasible polytope—the polytope defined by the constraints. Note that for (x∗,z∗)(x^{*},z^{*}), at least nn constraints must be tight, i.e., satisfied with equality. Furthermore, (x∗,z∗)(x^{*},z^{*}) 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 y=(x∗,z∗)y=(x^{*},z^{*}) is the unique solution of a linear system Ay=bAy=b with nn variables and nn equations.

It follows that there exists some integer Cm≤M4⋅M6k+8=M6k+12C_{m}\leq M^{4}\cdot M^{6k+8}=M^{6k+12} such that multiplying the mmth line of the linear system by CmC_{m} makes the coefficients integral. Doing this for every line yields an equivalent linear system A′y=b′A^{\prime}y=b^{\prime} that is integral. Notice that A′A^{\prime} has at most 5 non-zero entries per line and each of these values is bounded (in absolute value) by M6k+13M^{6k+13}. Cramer’s rule tells us that z∗=det⁡(C)det⁡(A′)z^{*}=\frac{\det(C)}{\det(A^{\prime})}, where CC is the matrix A′A^{\prime} with the last column replaced by b′b^{\prime}. Since det⁡(C)\det(C) is an integer, it suffices to bound ∣det⁡(A′)∣|\det(A^{\prime})| in order to bound the denominator of z∗z^{*}.

Using Hadamard’s inequality, we get that ∣det⁡(A′)∣≤∏m=1n∥Am′∥2|\det(A^{\prime})|\leq\prod_{m=1}^{n}\|A^{\prime}_{m}\|_{2}, where Am′A^{\prime}_{m} is the mmth line (i.e., row) of A′A^{\prime}. It follows that ∥Am′∥2≤5M6k+13≤M6k+14\|A^{\prime}_{m}\|_{2}\leq\sqrt{5}M^{6k+13}\leq M^{6k+14} (since M≥3M\geq 3). Thus, we get that z∗z^{*} has denominator at most d:=M(6k+14)n≤M20knd:=M^{(6k+14)n}\leq M^{20kn}. ∎

The same proof also yields the following result: If for all i∈[n]i\in[n], all numbers in the description of viv_{i} have denominator exactly MM, then from any M−4nM^{-4n}-envy-free solution, we can efficiently obtain an envy-free solution. Indeed, in this case bmb_{m} has denominator M2M^{2}, so we get Cm=M2C_{m}=M^{2} and ∥Am′∥2≤M4\|A^{\prime}_{m}\|_{2}\leq M^{4} for every mm.

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-ε\varepsilon-EF-Cake-Cutting is defined as: given ε>0\varepsilon>0 (in unary) and (explicit, normalized) piecewise constant valuations v1,…,vnv_{1},\dots,v_{n} on $,findacontiguous, find a contiguous\varepsilon−envy−freeallocation-envy-free allocation(x,\pi)$.

This corresponds to the standard contiguous ε\varepsilon-envy-free cake-cutting problem with piecewise constant valuations, except that ε\varepsilon is provided in unary representation. This means that ε\varepsilon 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-ε\varepsilon-EF-Cake-Cutting is defined exactly as unary-ε\varepsilon-EF-Cake-Cutting, except that we are also given some positive integer MM (in unary) and for all i∈[n]i\in[n] we have that the piecewise constant valuation viv_{i} satisfies:

all heights of value-blocks of viv_{i} are integral;

the height of viv_{i} can only change at points of the form k/Mk/M where k∈[M]k\in[M].

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 v1,…,vnv_{1},\dots,v_{n} 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 v1,…,vnv_{1},\dots,v_{n} 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) →\rightarrow (1) and (4) →\rightarrow (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-ε\varepsilon-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 ε\varepsilon-Consensus-Halving reduces to Necklace-Splitting when ε\varepsilon is given in unary representation (i.e., it is inversely polynomial).

Let mm denote the maximum number of value-blocks in the piecewise constant valuation of any agent 1≤i≤n1\leq i\leq n. Since the piecewise constant valuations are provided explicitly in the input, it follows that mm is bounded by the size of the input. Let δ≤ε/(m+2)\delta\leq\varepsilon/(m+2) be such that 1/δ1/\delta is integral.

For each agent ii and each value-block of viv_{i} we do the following. Let [a,b][a,b] denote the subinterval covered by the block and let hh be its height. We divide the block into sub-blocks of value δ\delta each, starting from the left. Namely, the first sub-block covers [a,a+δ/h][a,a+\delta/h], the second sub-block covers [a+δ/h,a+2δ/h][a+\delta/h,a+2\delta/h], and so on. If (b−a)h/δ(b-a)h/\delta is not an integer, then the last sub-block will be incomplete and we will ignore it. Thus, we have obtained ⌊(b−a)h/δ⌋\lfloor(b-a)h/\delta\rfloor complete sub-blocks. For each such sub-block, we compute its midpoint and place an item valued by agent ii 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 1/δ1/\delta items. However, since every agent has at most mm blocks of value, she can have at most mm incomplete sub-blocks. Thus, every agent values at least 1/δ−m1/\delta-m items. Now, for any agent that values strictly more than 1/δ−m1/\delta-m items, we remove items from the instance until she values exactly 1/δ−m1/\delta-m 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 1/δ−m1/\delta-m items. In particular, exactly mδm\delta 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 .Notethatitispossiblethatitemshavetheexactsamepositionin. Note that it is possible that items have the exact same position in—in that case, we resolve the tie arbitrarily. Every item is valued 1/(1/δ−m)1/(1/\delta-m) 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 ε\varepsilon-approximate solution to the unary-ε\varepsilon-EF-Cake-Cutting instance. Let vijv_{ij} denote the ii-value (i.e., the value for agent ii) of the interval assigned to agent jj. Let VijV_{ij} denote the value for agent ii of the items assigned to agent jj in the discretized instance, but where we let every item have value δ\delta (instead of 1/(1/δ−m)1/(1/\delta-m)). Then, we have Vii≥VijV_{ii}\geq V_{ij} for all i,ji,j. Consider the interval assigned to agent ii and compare it to the items assigned to agent ii. It is possible that even though an item was assigned to agent ii, the cut in the continuous instance cuts through the corresponding sub-block of value δ\delta. However, in that case agent ii gets at least δ/2\delta/2 from that sub-block, i.e., she lost at most δ/2\delta/2. Since this can happen at both extremities of the interval assigned to agent ii, we get vii≥Vii−δv_{ii}\geq V_{ii}-\delta. Now consider the ii-value of the interval assigned to agent jj. The same idea as above about the extremities of the interval means that the continuous allocation might increase the ii-value by δ\delta with respect to the discrete allocation. Furthermore, there is also mδm\delta of agent ii’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 jj. Thus, we obtain vij≤Vij+δ+mδv_{ij}\leq V_{ij}+\delta+m\delta. Putting everything together, we then get vii≥vij−(m+2)δ≥vij−εv_{ii}\geq v_{ij}-(m+2)\delta\geq v_{ij}-\varepsilon. ∎

Disjoint-Discrete-EF-Cake-Cutting reduces to simple-ε\varepsilon-EF-Cake-Cutting.

Consider an instance of Disjoint-Discrete-EF-Cake-Cutting with mm items and nn agents with disjoint binary valuations v1,…,vnv_{1},\dots,v_{n}. For i∈[n]i\in[n], let mim_{i} denote the number of items that agent ii values. Note that the valuations are provided explicitly in the input, so nn, mm, and the mim_{i}’s are bounded by the size of the input. We start by providing a reduction to unary-ε\varepsilon-EF-Cake-Cutting.

We construct a continuous cake-cutting instance as follows. Divide the continuous cake $intointomregionsofsizeregions of size1/m,i.e.,, i.e.,I_{j}=[(j-1)/m,j/m]forforj\in[m].Ifitem. If itemj\in[m]isvaluedbyagentis valued by agenti,thenputablockoflength, then put a block of length1/mandheightand heightm/m_{i}inintervalin intervalI_{j}ofthevaluationof the valuationw_{i}.Thisyieldspiecewiseconstantvaluations. This yields piecewise constant valuationsw_{1},\dots,w_{n}ononthatarenormalized.Finally,setthat are normalized. Finally, set\varepsilon:=\min_{i}1/(nm_{i}).Notethat. Note that\varepsilon$ can be efficiently represented in unary.

Let (x,π)(x,\pi) be a contiguous ε\varepsilon-envy-free allocation for this continuous cake-cutting instance. For i∈[n]i\in[n], let AiA_{i} denote the interval allocated to agent ii. We now provide a rounding procedure to turn this ε\varepsilon-envy-free allocation into an envy-free allocation where all cuts lie on points of the form j/mj/m with j∈[m]j\in[m]. 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 ⋅/m\cdot/m value). With this rounding, agent ii would have envy strictly less than 1/mi1/m_{i}, and thus envy . However, we only have an ε\varepsilon-envy-free allocation, so we need to do come up with a more involved rounding scheme. We now show how to round all ii-cuts; the same procedure can be applied for every i∈[n]i\in[n].

We have shown a reduction to unary-ε\varepsilon-EF-Cake-Cutting. In order to obtain a reduction to simple-ε\varepsilon-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 mi=mjm_{i}=m_{j} for all i,j∈[n]i,j\in[n]. By adding additional items that are not valued by anyone, we can also ensure that the number of items mm is a multiple of mim_{i}. Applying the same reduction described in the first part of this proof to this instance yields an instance of simple-ε\varepsilon-EF-Cake-Cutting with M=mM=m. ∎

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 1/31/3-envy-free algorithm (Algorithm 1) is simple, lowering the envy to 1/41/4 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.

References