A Discrete and Bounded Envy-Free Cake Cutting Protocol for Any Number of Agents

Haris Aziz, Simon Mackenzie

Introduction

“Despite intense efforts over decades, up to this date no one has succeeded in finding a finite bounded cake cutting protocol that guarantees envy-freeness for any number of players.”— Lindner and Rothe .

The existence of a discrete and bounded envy-free cake cutting protocol has remained a major open problem for at least two decades. In this paper, we settle the problem by presenting a general discrete envy-free protocol for any number of agents. The protocol is for the cake cutting setting that is a versatile mathematical model for allocation of a heterogeneous divisible good among multiple agents with possibly different preferences over different parts of the cake. The main applications of cake cutting are fair scheduling, resource allocation, and conflict resolution . Cake cutting has been extensively studied within computer science and the social sciences . Since various important divisible resources such as time and land can be captured by cake cutting, the problem of fairly dividing the cake is a fundamental one within the area of fair division and multiagent resource allocation .

A cake is represented by an interval $andeachoftheand each of thenagentshasavaluationfunctionoverpiecesofthecakethatspecifieshowmuchthatagentvaluesaparticularsubinterval.Themaingoalistodividethecakefairly.Amongvariousfairnessconceptsproposedbysocialscientists,aprominentoneisenvy−freeness.Anallocationisenvy−freeifnoagentwouldprefertotakeanotheragent’sallocationinsteadofhisown.Althoughanenvy−freeallocationisguaranteedtoexistevenwithagents has a valuation function over pieces of the cake that specifies how much that agent values a particular subinterval. The main goal is to divide the cake fairly. Among various fairness concepts proposed by social scientists, a prominent one is envy-freeness. An allocation is envy-free if no agent would prefer to take another agent’s allocation instead of his own. Although an envy-free allocation is guaranteed to exist even withn-1$ cuts Su pointed out that the existence of an envy-free cake allocation can be shown via an interesting connection with Sperner’s Lemma., finding an envy-free allocation is a challenging problem which has been termed “one of the most important open problems in 20th century mathematics” by Garfunkel .

Since the valuations of agents over the cake can be complex, eliciting each agent’s complete valuations function over the cake is computationally infeasible. A natural approach in cake cutting protocols is to query agents about their valuations of different portions of the cake and based on these queries propose an allocation. A cake cutting protocol is envy-free if each agent is guaranteed to be non-envious if he reports his real valuations. If a protocol is envy-free, then an honest agent will not be envious even if other agents misreport their valuations. For the case of two agents, the problem has a well known solution in the form of the Divide and Choose protocol: one agent is asked to cut the cake into equally preferred pieces and the other agent is asked to choose the preferred piece. For the case of three agents, an elegant and bounded protocol was independently discovered by John L. Selfridge and John H. Conway around 1960 . Since then, an efficient general envy-free protocol for any number of agents has eluded mathematicians, economists, and computer scientists.

In 1995, Brams and Taylor made a breakthrough by presenting an envy-free protocol for any number of agents . Although the protocol is guaranteed to terminate in finite time, there is one drawback of the protocol: the running time or number of queries and even the number of cuts required is unbounded even for four agents. In other words, the number of queries required to identify an envy-free allocation can be arbitrarily large for certain valuations functions. Procaccia terms unboundedness as a “serious flaw”. Brams and Taylor were cognizant of their protocol’s drawback and explicitly mentioned the problem of proposing a bounded envy-free protocol even for n=4n=4. Lindner and Rothe write that “the development of finite bounded envy-free cake cutting protocols still appears to be out of reach, and a big challenge for future research.” The problem has remained open and has been highlighted in several works . Saberi and Wang term the problem as “one of the most important open problems in the field”. Procaccia goes one step further and calls it an interesting challenge within theoretical computer science: “Since the 1940s, the computation of envy-free cake divisions has baffled many great minds across multiple disciplines. Settling this problem once and for all is an important challenge for theoretical computer science.” In recent work, Aziz and Mackenzie proposed a bounded and discrete envy-free protocol for n=4n=4. Despite this progress, the general problem for any number of agents had remained unaddressed.

In this paper, we present a discrete envy-free protocol for any number of agents that requires a bounded number of queries and hence a bounded numbers of cuts of the cake thereby closing the central open problem in the field of cake cutting. The bound for the number of queries is nnnnnnn^{n^{n^{n^{n^{n}}}}}. Previously, no discrete protocol was known that even uses a bounded number of cuts. Apart from using some classic ideas in cake-cutting, our protocol requires some radically different techniques. Since only three general finite and discrete cake cutting protocols have been presented in the literature , our protocol is another addition to the list of finite envy-free protocols and is of interest even if boundedness is not a critical property. More generally, the protocol provides a new constructive argument for existence of envy-free allocations. Our result is surprising because leading experts in the area have conjectured that a bounded and discrete envy-free protocol does not exist: “It is natural to ask whether the envy-free cake cutting problem is inherently difficult: Is it provably impossible to design a bounded envy-free cake cutting algorithm?”. Previously, mathematician Ian Stewart had commented that “However, no discrete procedure with a bounded number cuts (however large) is known for four players, and such schemes probably don’t exist”.

We additionally show that even if we do not run our protocol to completion, it can find in at most n3(n2)nn^{3}{(n^{2})}^{n} queries a partial allocation of the cake that achieves proportionality (with respect to the whole cake) and envy-freeness. Finally, we show that even if we do not run our protocol to completion, it can be tweaked to find in at most n3(n2)nn^{3}{(n^{2})}^{n} queries an envy-free partial allocation of the cake in which each agent gets a connected piece that gives the agent \nicefrac13n\nicefrac{{1}}{{3n}} of the value of the whole cake. For the additional two results, we only need one of our subprotocols called the SubCore Protocol that we define later.

Apart from introducing new techniques, our protocol relies on some ideas from previous protocols. At the heart of our protocol is the idea of domination or ‘irrevocable advantage’ . An agent ii dominates another agent jj if he is not envious of jj even if the unallocated cake is given to jj. Note that if agents in subset S⊂NS\subset N dominate all the agents in N∖SN\setminus S, then agents in SS can simply let the agents in N∖SN\setminus S worry about the remaining cake since they will not be envious if a single agent in N∖SN\setminus S got all the remaining unallocated cake. Our protocol uses some high level ideas from our previous protocol for 4 agents: (i) We use a ‘Core Protocol’ over the unallocated cake (aka residue) with one agent as the specified cutter that results in an envy-free partial allocation and a smaller residue. The Core Protocol is called repeatedly on the latest residue so as to make the residue even smaller. As the new calls to the Core Protocol are made, the partial allocation remains envy-free. (ii) Every time agents make trims or evaluate pieces of cake, we do not lose such information and in fact keep track of it. (iii) We make agents exchange some parts of their already allocated pieces to obtain new dominations. The exchange was referred to as a permutation in . In some steps, our protocol also uses a simple fact: envy-freeness implies proportionality with respect to the allocated cake (i.e., each agent gets at least \nicefrac1n\nicefrac{{1}}{{n}} value of the allocated cake).

Throughout the overall protocol, we have cake that has been allocated and some cake that is the unallocated residue. During the protocol, we ensure that the cake that has been allocated to the agents has been done so in an envy-free manner. Overall, our envy-free protocol (Main Protocol) takes as input the cake and a set of agents and returns an envy-free allocation of the whole cake. In order to obtain the envy-free allocation, the Main Protocol calls three other protocols. It repeatedly calls the Core Protocol a bounded number of times. The Core Protocol is the work-horse of the overall protocol that is called repeatedly to further allocate unallocated cake in any envy-free manner. The other protocols—GoLeft and Discrepancy are used to make one set of agents dominate the others so that the problem reduces to finding an envy-free allocation for fewer agents and the Main Protocol can be called again for this sub-problem.

After calling the Core Protocol many times, if there is still some unallocated cake and there is sufficient difference in the estimation of the value of a cake piece between some agents, then the Discrepancy Protocol is called by the Main Protocol. The goal of the Discrepancy Protocol is to either exploit the difference in valuations or else to ensure that on a very rough scale, agents have similar valuations. If after calling the Discrepancy Protocol, the cake still has not been allocated in an envy-free way, the GoLeft Protocol is called by the Main Protocol. The GoLeft Protocol is used to reallocate pieces of the cake among the agents after additionally adding some crumbs from the residue. The reallocation is useful to obtain new dominations until one set of agents dominate the remaining agents which means that we have reduced the problem to allocating the remainder of the cake among the dominated agents. The different protocols that we present are summarized in Figure 1.

Next, we informally summarize what input each protocol takes as a blackbox and then what it outputs.

Output: An envy-free allocation that completely allocates RR among agents in NN.

Input: Specified cutter agent, agent set NN and unallocated cake RR.

Output: An envy-free allocation of cake R′⊂RR^{\prime}\subset R for agents in NN and updated unallocated cake R∖R′R\setminus R^{\prime}.

Input: Cake RR cut into nn pieces to be allocated among agents in set N′⊂NN^{\prime}\subset N with n′=∣N′∣n^{\prime}=|N^{\prime}|. Additionally, each agent i∈N′i\in N^{\prime} has a benchmark value bib_{i}.

Output: An envy-free partial allocation of RR for agents in N′N^{\prime} in which each agent j∈N′j\in N^{\prime} gets a piece of value at least bjb_{j}.

Input: Residue RR, a specific piece in RR, a specific value given by agent uu, a set of pieces of cake other than RR, and a set of agents NN.

Output: Possibly modified residue RR, a Boolean value called DISCREPANCY, and a partition of NN into sets D′D^{\prime} and D′′D^{\prime\prime}.

Input: A set NN, a set of ‘snapshots’ (disjoint envy-free allocation for the agents), a set of corresponding ‘extracted pieces’ for each piece in the disjoint allocations, and residue RR.

Output: A set of agents A⊂NA\subset N such that all agents in N∖AN\setminus A dominate all agents in AA.

Despite some high level similarities with the approach of the recent protocol for four agents , our general protocol requires a number of new concepts and techniques. These concepts and techniques will be formalized and explained in the later sections but we mention them briefly and informally.

We define the notion of a significant advantage or bonus that informally means that an agent ii feels his absolute advantage over another agent is of a high enough fraction of his value of the unallocated cake. We then make use of our Core Protocol that not only reduces the size of the unallocated residue but also guarantees that a given agent has a significant advantage over someone else. The Core Protocol can be used to further allocate the residue so that an agent’s significant advantage over another agent translates into dominance in a bounded number steps. This approach is one of the key ideas for obtaining a bounded protocol rather than simply a finite protocol.

We rely on a notion of discrepancy that is based on the idea of how differently agents view a piece of cake. It is well known in fair division that the more different the agents’ valuations are, the easier it is to achieve fairness. We try to use the structure of agents that have similar valuations at a very coarse level. In case they have high enough discrepancy in valuations over two parts of the unallocated cake, then we simply break the problem into two subproblems where we divide each part in any envy-free manner among those agents who value it highly compared to the other part.

Another key idea to achieve a bounded protocol is that we run the Core Protocol enough times to ensure there are a sufficient number of Core Protocol allocation snapshots (allocation outcomes of various calls of the Core Protocol) that are isomorphic.The notion of isomorphic snapshots will be defined later. We will keep track of these snapshots to later make more agents dominate each other.

Further operations such as exchanges of allocated pieces are then implemented on such isomorphic Core snapshots by exploiting their structure. In order to achieve boundedness of the protocol, we also define and work with four carefully chosen bounds that are functions of the number of agents. The biggest of the four bounds is the maximal number of query operations required to complete the protocol.

We use a new technique called extraction whereby part of the residue is systematically trimmed off so that it can potentially be combined with some agent’s allocation in the Core Protocol. When a particular extracted piece of cake is given to an agent in addition to his allocated piece in a single snapshot of the Core Protocol, we refer to this as attachment. Attachment is helpful to systematically enable more agents to exchange each others’ pieces in snapshots of the Core Protocol without causing any agent to be envious. The exchange of pieces consequently allows for ‘permutations’ and helps achieve agents dominate each other.

In order to methodically track the possible permutations/exchanges, we keep track of a permutation graph in which nodes correspond to agents and an agent ii points to agent jj if ii is willing to replace his allocation in a subset of isomorphic snapshots of the Core Protocol with jj’s allocated piece plus a tiny bit more cake without causing envy. The tiny bit more cake to attract agent ii can in principle cause agents to be envious so we have to compensate the other agents elsewhere so that envy is not introduced. The attachments and exchanges take place in the GoLeft Protocol. The interplay between the permutation graph and the working set of isomorphic Core snapshots is technically one of the most interesting parts of the overall protocol and is the central part of the GoLeft Protocol.

Cake cutting problems originated in the 1940’s when famous mathematicians such as Banach, Knaster, and Steinhaus initiated serious mathematical work on the topic of fair division.Hugo Steinhaus presented the cake cutting problems to the mathematical and social science communities on Sep. 17, 1947, at a meeting of the Econometric Society in Washington, D.C. . Since then, the theory of cake cutting algorithms has become a full-fledged field with at least three books written on the topic . The central problem within cake cutting is finding an envy-free allocation .

Since the earliest works, mathematicians have been interested in the complexity of cake cutting. Steinhaus wrote that “Interesting mathematical problems arise if we are to determine the minimal number of cuts necessary for fair division.” When formulating efficient cake cutting protocols, a typical goal is to minimize the number of cuts while ignoring the number of valuations queried from the agents. In principle, the actual complexity of a problem or a protocol depends on the number of queries. When considering how efficient a protocol is, it is useful to have a formal query model for cake cutting protocols. Robertson and Webb formalized a simple query model in which there are two kinds of queries: Evaluation and Cut. In an Evaluation query, an agent is asked how much he values a subinterval. In a Cut query, an agent is asked to identify an interval, with a fixed left endpoint, of a particular value. Although, the query model of Robertson and Webb is very simple, it is general enough to capture all known protocols in the literature. Note that if the number of queries is bounded, it implies that the number of cuts is bounded in the Robertson and Webb model. The protocol that we present in this paper uses a bounded number of queries in the Robertson and Webb model.

There are various notions of fairness in the cake-cutting literature. Two of the most prominent ones are envy-freeness and proportionality. Proportionality requires that each agent gets at least \nicefrac1n\nicefrac{{1}}{{n}} value of the whole cake. An envy-free allocation of the whole cake also satisfies proportionality. Finding a proportional allocation is an easier task than finding an envy-free allocation. There exists a general discrete protocol for finding a proportional allocation with connected pieces that takes O(nlog⁡n)O(n\log n) queries .

There is not too much known about the existence of a bounded envy-free protocol for general nn except that any envy-free cake cutting algorithm requires Ω(n2)\Omega(n^{2}) queries in the Robertson-Webb model . Also, for n≥3n\geq 3, there exists no finite envy-free cake cutting algorithm that outputs contiguous allocations in which each agent gets a connected piece with no gaps . Brams et al. and Barbanel and Brams presented envy-free protocols for four agents that require 13 and 5 cuts respectively. However, the protocols are not only unbounded but also not finite since they are continuous protocols that require the notion of a moving knife. An alternative approach is to consider known bounded protocols and see how well they perform in terms of envy-freeness . Apart from the unbounded Brams and Taylor envy-free protocol for nn agents, there are other general envy-free protocols by Robertson and Webb and Pikhurko that are also unbounded. Gasarch compared the complexity of the three general unbounded envy-free protocols in the literature. Aziz and Mackenzie proposed a bounded and discrete envy-free protocol for n=4n=4. We use similar ideas but generalizing to the case of any number of agents requires novel subroutines and significantly more abstract arguments.

There are positive algorithmic results concerning envy-free cake cutting when agents have restricted valuations functions or when some part of the cake is left unallocated . There has also been work on strategyproof cake cutting protocols for restricted valuation functions as well as strategic aspects of protocols .

Preliminaries

We consider a cake which is represented by the interval .Apieceofcakeisafiniteunionofdisjointsubintervalsof. A piece of cake is a finite union of disjoint subintervals of. We will assume the standard assumptions in cake cutting. Each agent in the set of agents N={1,…,n}N=\{1,\ldots,n\} has his own valuation over subintervals of the interval $.Wedenoteby. We denote byV_{i}(x,y)thevalueagentthe value agentihasforintervalhas for interval[x,y].Thevaluationsare(i)non−negative:. The valuations are (i) non-negative:V_{i}(Y)\geq 0foranysubintervalfor any subintervalY;(ii)additive:foralldisjointsubintervals; (ii) additive: for all disjoint subintervalsY,Y^{\prime},,V_{i}(Y\cup Y^{\prime})=V_{i}(Y)+V_{i}(Y^{\prime});and(iii)divisible,i.e.,foreverysubinterval; and (iii) divisible, i.e., for every subintervalYandand0\leq\lambda\leq 1,thereexists, there existsY^{\prime}\subseteq YwithwithV_{i}(Y^{\prime})=\lambda{V_{i}(Y)}.Itfollowsfromthedivisibilitypropertythatthevaluationsarenon−atomici.e.,. It follows from the divisibility property that the valuations are non-atomic i.e.,V_{i}(x,x)=0$.

We will typically denote an allocation by X=(X1,…,Xn)X=(X_{1},\ldots,X_{n}) where XiX_{i} is the cake allocated to agent ii. Two main criteria of fairness are envy-freeness and proportionality.

An allocation X=(X1,…,Xn)X=(X_{1},\ldots,X_{n}) is envy-free if Vi(Xi)≥Vi(Xj)V_{i}(X_{i})\geq V_{i}(X_{j}) for each i,j∈Ni,j\in N.

An allocation X=(X1,…,Xn)X=(X_{1},\ldots,X_{n}) is proportional if Vi(Xi)≥1nVi()V_{i}(X_{i})\geq\frac{1}{n}V_{i}() for each i∈Ni\in N.

We now define some terms and conventions that we will use in the paper. An allocation is partial if it does not necessarily allocate the whole cake. Given an envy-free partial allocation XX of the cake and an unallocated residue RR, we say that agent ii dominates agent jj if ii does not become envious of jj even if all of RR were to be allocated to jj:

We say that an agent gets a piece partially, if he does not necessarily get it completely. In the cake cutting protocols that we will describe, an agent may be asked to trim a piece of cake so that its value equals the value of a less valuable piece. Agents will be asked to trim various pieces of the cake to make a given piece equal to the value of another piece. In Figure 2, we outline the idea of trimming a piece to equal the value of another piece. When an agent trims a piece of cake, he will trim it from the left side: the main piece (albeit trimmed) will be on the right side. The piece minus the trim will be called the partial main piece. When we say that an agent is guaranteed to get his second/third/etc. most favoured piece, this guarantee is based on the ordinal preferences of the agents over the pieces. By ordinal, we mean that agents simply give a weak ordering over the pieces but do not tell the exact cardinal utility difference between two pieces. If an agent is indifferent between the top three pieces, then we will still say that the agent is guaranteed to get his third most valued piece.

The Protocol

The overall protocol we present is essentially the Main Protocol that calls other protocols. Some protocols such as the SubCore Protocol and the Main Protocol recursively call themselves. The overall idea of the protocol is as follows. We make an agent (the cutter) divide the cake into nn equally preferred pieces. The cake is then allocated to the agents with each agent getting a part of one of the pieces. The subroutine will be referred to as the Core Protocol. The Core Protocol itself relies on recursively applying the SubCore Protocol. When running the Core Protocol, if all the cake is already allocated, we are done. Otherwise, the Core Protocol is run repeatedly on the left-over cake. If some cake is still unallocated, we repeat it with another agent as cutter. After the Core Protocol has been run repeatedly, it is checked whether agents have discrepancy on a part of the cake. Discrepancy implies that agents have radically different valuations over two segments of the cake. This works to our advantage because we can run the Discrepancy Protocol in which we let the differing agents concentrate on the segments they prefer much more which reduces our problem to envy-free cake cutting for a smaller number of agents. Otherwise, we exchange some parts of the cake that certain agents hold using the GoLeft Protocol in a systematic way to obtain further dominations between agents. After the GoLeft Protocol has been implemented, some agents dominate all other agents. At this point, we have decomposed the problem into a smaller problem with less number of agents. Hence the envy-free algorithm can be called recursively on the unallocated cake to divide the cake among the specified subset of agents. We first present the Core Protocol that is the work-horse of the overall Main Protocol.

We first present the Core Protocol that calls the SubCore Protocol. The Core Protocol is helpful in allocating additional residue in an envy-free manner. The main challenge is that just by running the Core Protocol repeatedly on the residue, there is no guarantee that the cake will be allocated completely in a bounded or even finite number of steps. Hence, we will introduce other protocols in addition to the Core protocol that help us allocate the whole cake in an envy-free manner.

The Core Protocol asks a specified agent termed as the cutter to cut the unallocated cake into nn equally preferred pieces. It then calls the SubCore Protocol that allocates to each of the agents one of the pieces (possibly partially) in an envy-free manner. No agent is given cake from any other piece.

The name of the protocol is the same as the Core Protocol used by Aziz and Mackenzie for the case of 4 agents which returns an envy-free partial allocation in which one agent cuts the cake into four equally preferred pieces and the cutter as well as at least one other agent gets one of these four pieces. The new Core Protocol can be considered as a useful generalization of Core Protocol for the four-agent algorithm of Aziz and Mackenzie . Unlike the Core Protocol for the four-agent case, the new Core Protocol requires a more sophisticated recursive SubCore Protocol. The SubCore Protocol results in an allocation that satisfies some ‘neat’ properties.

Consider a cake divided into nn pieces and m<nm<n agents. An allocation of the cake into mm agents is neat if (i) each agent’s allocation is a (not necessarily whole) part of one of the pieces; (ii) at least one piece is unallocated; (iii) no agent prefers an unallocated piece over his allocation; and (iv) no agent prefers another agent’s allocation over his allocation.

We can prove that the Core Protocol results in an envy-free partial allocation in which the cutter cuts the cake into nn pieces, each agent gets a part of exactly one of the pieces, at least one non-cutter agent gets a complete piece and at least one piece is unallocated which no non-cutter agent envies over his allocation (Lemma 4.13). Since two agents get full pieces, from the cutter’s perspective, at least 2/n2/n of the cake is allocated after an iteration of the Core Protocol.

Most of the technical work in the Core Protocol is done when it calls the SubCore Protocol. The SubCore Protocol takes as input agents and pieces of cake where the number of pieces is at least as much as the number of agents. Each agent is given a part of exactly one piece. The SubCore Protocol also takes as input the benchmark value for each agent. When we call SubCore for the first time during the Core Protocol, the benchmark value of each agent is zero. The benchmark value of an agent indicates the minimum value an agent expects in an envy-free allocation returned by the SubCore Protocol.

In the SubCore Protocol, the main idea is that we start from a single agent and gradually grow the number of agents in a specified order while making sure that a neat allocation exists for the growing set of agents {1,…,m}\{1,\ldots,m\} in which at least one agent gets a full piece. We denote {1,…,m}\{1,\ldots,m\} by [m][m]. All the allocations encountered during the course of the SubCore Protocol are considered tentative until the final step. If the next agent mm in the specified order most prefers a piece that is not currently (tentatively) allocated, we can easily handle the new agent as he can get the unallocated piece without causing envy for anyone. Otherwise, we have to do more work to ensure that the previously handled agents as well as the new agent can simultaneously get a neat allocation in which at least one agent gets a full piece. This includes calling the SubCore Protocol recursively for a smaller number of agents.

In the SubCore Protocol, if the mm-th agent is also interested in one of the m−1m-1 tentatively assigned pieces, we refer to the m−1m-1 allocated pieces as the contested pieces. Each agent in [m][m] is asked to trim pieces among the m−1m-1 contested pieces that are of higher value than his most preferred piece outside the m−1m-1 allocated pieces so that the value of the former is the same as the value of the latter. The value is referred to as the benchmark value of the agent. The rationale for asking all the mm agents to trim up to their benchmark value is as follows. If m−1m-1 agents each get a part of a contested piece, then one of the mm agents who does not get a contested piece can get a most preferred uncontested piece. By asking all agents to place trims according to their benchmark values, the agent jj who is forced to get an uncontested piece will not be envious of other agents because each other agent gets a piece to the right of jj’s trim on that piece. Note that in order to set the benchmark value of an agent we not only consider the uncontested pieces in that call of the SubCore but also implicitly consider other pieces that were part of the input of the root call to the SubCore. This ensures that agents are not envious or interested in pieces that are unallocated. The set of agents who have the rightmost trim in some piece is referred to as WW. Note that WW is the set of agents who are guaranteed to have an envy-free allocation where each agent gets a piece that he trimmed most. If ∣W∣=m−1|W|=m-1, then if agents are given the piece they win up till their trim, then the corresponding allocation is envy-free for agents in WW and gives each agent in WW their benchmark value. Nonetheless, we call SubCore recursively on WW and the contested pieces with the left aside of trim the agent in [m]∖W[m]\setminus W ignored. Doing this ensures that agents in WW get as much of the contested pieces as possible without causing envy. The remaining agent in [m]∖W[m]\setminus W is considered to be ‘kicked out’ of the contested pieces and has to make do with a piece outside the contested pieces. He is given the most preferred uncontested piece.

We may not be lucky and the number of agents who win some piece may not be m−1m-1, i.e., some agent may have the rightmost trim in multiple contested pieces. The protocol then increases the size of WW one by one. WW is expanded as follows. The previous trims of agents in WW are ignored. The SubCore Protocol is called recursively with WW as the target set of agents and for each piece, the left side of the right-most trim by an agent in [m]∖W[m]\setminus W is ignored. Note that by ignoring the trims of agents in WW, we have more cake that could potentially be allocated than the allocation where the trims of agents in WW are not ignored but each agent in WW gets the right hand side of the piece where he had the rightmost trim. In case ∣W∣<m−1|W|<m-1, we can continue increasing the size of WW while ensuring that agents in WW can get an envy-free allocation by getting a partial piece each from among the contested pieces. Take any unallocated contested piece aa for which the current left margin (beyond which the piece is ignored) is by agent i∈[m]∖Wi\in[m]\setminus W. We can add such an ii to WW. As we increase the size of WW, we are able to clear more space for some piece since the non-winner because of which we were ignoring the left part of some piece is now a winner, so we an ignore his previous trim. When ∣W∣=m−1|W|=m-1, we have ensured that all the contested pieces have been partially allocated to one agent each from WW. In that case the remaining agent in [m]∖W[m]\setminus W can then be given the most preferred uncontested piece.

Note that for n=2n=2, the Core Protocol coincides with the well-known Divide and Choose protocol. Next, we further explain the SubCore Protocol with the help of an example.

In order to illustrate how the SubCore Protocol works, let us explain the SubCore Protocol when n′=3n^{\prime}=3 and there are n=4n=4 pieces a,b,c,da,b,c,d.

In the for loop, when m=2m=2, if agent 22 has the same most preferred piece as agent 11’s tentative piece aa, then piece aa is the contested piece. Both agents place trim on that piece to equal the value of the second most preferred piece. Let us assume that 2’s trim is to the right of 1’s trim. In that case the cake in aa to the left of 11’s trim is ignored temporarily as if the cake to the left did not exist. Agent 11 can take a full unallocated piece bb that is at least as preferred by him as 22’s tentative piece. Agent 1 is considered being kicked out of his piece and gets a piece of exactly his benchmark value. Since there is exactly one contested piece and the piece is ‘won’ by agent 22, we call SubCore on piece aa and agent 22 with the cake to the left of aa’s trim ignored. Hence agent 22 gets aa up till 11’s trim.

We now increment mm to handle agent 33. If agent 33’s most preferred piece among the four pieces is not one currently held (even partially) by 1 and 2, then we can simply give 3 that piece. Otherwise, all agents 1,2,31,2,3 are asked to place a trim over the contested pieces among {a,b}\{a,b\} to make the value equal to the most preferred piece among cc and dd. Let us assume that 33 places the rightmost trim over bb and over aa. In that case, W={3}W=\{3\}. The fact that 33 is in WW means that there exists a neat allocation for the agent in W={3}W=\{3\} where he can get one of the pieces which are contested. We now ignore the trims of agent 33 on pieces aa and bb and ignore the left side of the rightmost trim by agents in {1,2}\{1,2\}. We call SubCore Protocol on the pieces a,ba,b with the left side of 11 and 22’s trims ignored and with agent W={3}W=\{3\} as input. It returns a neat allocation (with respect to the current left margins on pieces beyond which they are ignored) for agent 33 where 33 will be assigned one of the pieces aa or bb up to the non-winner (not in WW) agent’s rightmost trim. Let us say 33 gets piece aa. Since the allocation is neat (with respect to the current left margins), 33 does not envy any of the other pieces up to the non-winner’s trims, meaning a new agent can be allocated a contested piece. Let us say this agent is agent 11, and that 11 is now the rightmost trimmer of piece bb and his trim coincided with the current left margin of bb beyond which bb is ignored. 11 is added to WW and 11 is allocated bb up till the current left margin. Since now ∣W∣=m−1|W|=m-1, we can make one last recursive call for agents 11 and 33 with the left part of the trims by agent 2 is ignored. This allocates piece aa to 33 and piece bb to 11. The uncontested pieces cc and dd are untrimmed. Agent 22 can be seen as having been ‘kicked out’ of the contest, and therefore is left with his most preferred uncontested ‘benchmark’ piece, let us say cc. Piece dd has remained unallocated and untrimmed. At this point the allocation of the SubCore Protocol is returned.

To avoid having to mention the special case of ties in each argument concerning the Core/SubCore protocol, we will deal with them in a modular way.

To this end we introduce what we will call imaginary values. Each agent has a list of such values. Each agent’s values are on a different scale (for example agent 22’s values are much smaller than agent 11’s). Our aim is to define those values so that no agent is indifferent between 22 pieces, and so that agents never place trims on the exact same location (where locations with different imaginary values are distinct). We do so whilst ensuring that when agents equalise pieces of cake, they still prefer the pieces that were trimmed to the one they used as a benchmark to equalise.

To do so generate for each agent jj E=n3(n2)nE=n^{3}{(n^{2})}^{n} values ϵ1j,ϵ2j…ϵEj\epsilon^{j}_{1},\epsilon^{j}_{2}\ldots\epsilon^{j}_{E} with the properties that ϵij<<E×ϵi+1j\epsilon^{j}_{i}<<E\times\epsilon^{j}_{i+1} and ϵEj<<E×ϵ1j+1\epsilon^{j}_{E}<<E\times\epsilon^{j+1}_{1}. Let LjL_{j} be jj’s list of these epsilon values ordered from largest to smallest.

The protocol now internally represents each piece of cake as a number with a physical part and imaginary part. All the cuts that are actually made on the cake are in reality only dependent on the physical part of the value. The imaginary part is used internally by the protocol to break ties in a consistent way. Agents only look at the imaginary value of a piece of cake when required to break a tie on the physical part. Agents do not disagree on the imaginary value of a piece. This means that if we query agent ll and jj on a piece, they might disagree on the physical value of the piece, but will agree on the imaginary value.

Let us now explain how those imaginary values are associated with the pieces generated by the protocol. When the Core protocol asks the cutter to cut nn equal pieces, the cutter will add the ϵ\epsilon from the top of his list LL every-time he creates a new piece and then discard that ϵ\epsilon from LL. Every other agent also adds ϵ\epsilon values to the pieces. In the SubCore protocol, agents generate new pieces of cake when placing trims on larger pieces to make them equal to a smaller piece. When an agent is asked to make larger pieces equal to a smaller piece bb, he will add the epsilon value at the top of his list LL to the piece he least preferred before the trim (excluding bb), then discard that value from LL. He then proceeds to add the second value to the second least preferred piece, and so on until he reaches the most preferred piece that he trimmed. This ensures that while the physical value of the pieces becomes the same from the agent’s perspective, the actual order of the pieces remains unchanged.

Agents have a strict order on the pieces that were generated by the cutter. The order between two pieces a>iba>_{i}b can only change if ii’s valuation of the physical part of aa becomes strictly less than his valuation of the physical part of bb.

New pieces are generated in the SubCore protocol when an agent jj is asked to equalise pieces c1…clc_{1}\ldots c_{l} to a piece czc_{z}. The pieces will now have equal physical value from the perspective of agent jj but since the former larger pieces are allocated bigger imaginary values, the order is preserved.

When taking into account both the physical and imaginary part of the valuation of pieces an agent cannot have the same value for 22 pieces. Moreover, 22 agents cannot place a trim on the same point (they may place on the same physical point but the imaginary value breaks the tie). In other words, with imaginary values taken into account, ties do not happen in the protocol.

Each ϵ\epsilon value is unique and cannot be obtained by recombining the others through addition and subtraction, which are the only operations available to the protocol.

Imagine that agent jj is asked to equalise piece aa to equal bb. Let us have vj(a)=0.2v_{j}(a)=0.2 and vj(a)=0.1+0.001iv_{j}(a)=0.1+0.001i where ii just represents the fact that it is an imaginary value. jj will trim aa so that it is equal to 0.1+0.001i0.1+0.001i, then add the next ϵ\epsilon value ϵl\epsilon_{l} on top of its list to piece aa so that vj(a)=0.1+(0.001+ϵl)iv_{j}(a)=0.1+(0.001+\epsilon_{l})i.

When we run the Core Protocol we end up with an envy-free partial allocation of the cake and a residue. We call the partial allocation a snapshot or a core snapshot.

The algorithm will keep track of certain snapshots which we will label pjp_{j} with j∈{1,…,C′}j\in\{1,\ldots,C^{\prime}\}. The pieces allocated in each snapshot pjp_{j} are labelled cjkc_{jk} where k∈{1,…,n}k\in\{1,\ldots,n\} indicates which agent got the piece. Since the allocation in each snapshot is envy-free, each agent thinks he got at least as much value for his piece as any other allocated piece. Therefore each agent thinks he has some (possible zero or more) bonus value over another agent in the Core snapshot. Our protocol will make use of these bonuses. In our protocol, we repeatedly call the Core Protocol over the resultant residue thereby making the residue smaller until the set of snapshots have enough structure that we will exploit later.

2 Groundwork for the Main Protocol

We will use four parameters to represent the bounds we work with. These are

These are constant once nn is fixed, however they are dependent on nn. Since the Main Protocol calls itself on a strict subset of the agents, we will use the notation Bn−1′B^{\prime}_{n-1} to label the bound on the Main Protocol run on n−1n-1 agents. The bounds correspond to the following concepts.

C′C^{\prime} is the number of snapshots generated by the main algorithm that we label and keep track of. All subsequent partial allocations generated by runs of the Core Protocol simply serve the purpose of making the residue smaller from the cutter’s perspective. Once the main algorithm has extracted all the pieces it needs from the residue and if a discrepancy has not been successfully exploited, the GoLeft Protocol will be run.

When we run GoLeft we look at a subset of CC isomorphic snapshots from the C′C^{\prime} total snapshots.

The value B′B^{\prime} corresponds to the total number of queries required to run the whole protocol.

BB is used to define what we call significant pieces or values. Running the Core Protocol guarantees that a piece of cake is made smaller from the perspective of the cutter. The value BB is a bound on the number of times the algorithm allows us to run the Core Protocol to make the residue smaller.

For the sake of achieving our boundedness results, the following values of the parameters work. (i) C=nnnC=n^{n^{n}} (ii) C′=nnnnC^{\prime}=n^{n^{n^{n}}} (iii) B=nnnnnB=n^{n^{n^{n^{n}}}} (iv) B′=nnnnnnB^{\prime}=n^{n^{n^{n^{n^{n}}}}}. We have not optimized the values of the bounds so we expect that our general algorithmic approach works for better bounds.

In the protocol we often want to make a piece of cake (the residue) smaller. To do so we run the Core Protocol on it. To make descriptions more succinct we define a function which converts the number of times we run the Core Protocol on a piece of cake to how much smaller it is from the cutter’s perspective. Note that when the Core Protocol is run, at least 2/n2/n value of the cake is allocated to the agents because the cutter cuts the cake into nn equally preferred pieces and at least two pieces are fully allocated. By running the Core Protocol BB times with the same cutter, the cutter thinks only f(B)=(n−2n)Bf(B)={(\frac{n-2}{n})}^{B} value of the cake is unallocated.

For any piece of cake cc in a given snapshot, each agent has a bonus value which corresponds to how much more cake he thinks he got in that snapshot than he would have got had he been allocated cc instead.

An agent ii’s bonus value on piece of cake cjkc_{jk} in snapshot pjp_{j} is the value Vi(cji)−Vi(cjk)V_{i}(c_{ji})-V_{i}(c_{jk}), where cjic_{ji} is the piece that was allocated to agent ii in pjp_{j} by the Core Protocol.

In a Core snapshot, a bonus value is significant for an agent if we can make the residue smaller than that value from the agent’s perspective in a bounded number of steps. Note that the significance of a piece of cake does not depend on the absolute value that an agent ascribes to it but it is relative to the value of the unallocated cake (residue).

An agent ii thinks a value is significant if the value is more than or equal to Vi(R)f(B)V_{i}(R)f(B) where RR is the unallocated residue. A piece is significant for an agent if it has significant value for him.

Note that if an agent ii finds a piece of cake significant, he will still find it significant if the residue becomes smaller than before. We also observe the following about the Core Protocol and the cutter getting a significant advantage over at least one other agent.

Note that when the Core Protocol is run once, the cutter has a significant bonus over at least one agent (the agent who gets the smallest valued piece from the cutter’s perspective). This bonus results in a domination of the cutter over the agent in k=(log⁡n)(n−2n)+1k=({\log n})(\frac{n-2}{n})+1 iterations of the Core Protocol on the residue with same cutter. The reason is that the cutter ii has advantage at least Vi(R)/(n−2)V_{i}(R)/(n-2) over the agent who gets the smallest valued piece from ii’s perspective. This is the worst case when equal value of residue comes from each of the maximum of n−2n-2 trimmed off pieces. In kk iterations of the Core Protocol with ii as cutter, agent ii’s value of the residue is Vi(R)(n−2n)kV_{i}(R){(\frac{n-2}{n})}^{k} which is less than Vi(R)/(n−2)V_{i}(R)/(n-2).

If we run the Core Protocol repeatedly with the same agent as cutter and we are lucky that the cutter has a significant advantage over each agent in some snapshot, then in (log⁡n)(n−2n)+1({\log n})(\frac{n-2}{n})+1 extra iterations of the Core Protocol with the same cutter, we can make the cutter dominate each agent. This simplifies our problem, because we now only need to allocate the remaining cake among the dominated agents in an envy-free manner. In general, we may not be so lucky that the cutter dominates all other agent due to which we have to do more work to ensure that a set of agents dominates the other agents. In this additional work, the process of extraction is crucial:

For each piece allocated in each of the Core snapshots and for each agent, the Main Protocol tries to associate a piece of the cake extracted from the residue. For the C′C^{\prime} snapshots, there are C′nC^{\prime}n pieces allocated to the agents. For each of the pieces, other agents who do not get the piece extract corresponding pieces from the residue that is the unallocated cake. Take for example, a piece cc allocated to some agent (say agent 11) in a snapshot. In the snapshot in which cc is allocated to 11, each agent ii gets a piece that is of value (according to ii) at least as much as cc. In the residue, each agent ii is asked to put a trim so that the cake from the left extreme of the residue to the trim is of value equal to ii’s value of his piece minus his value for cc. The trims of the agents on the residue give rise to pieces of cake corresponding to the agents’ bonus value over piece cc. These pieces are extracted (cut away from the residue) and associated with cc (kept in consideration with piece cc). When agents make trim marks on the residue in accordance with their bonus (over a piece in a snapshot), each pair of successive trim marks gives rise to a separate piece that can be extracted. For piece cjkc_{jk} in snapshot pjp_{j}, we will denote by ejk1,ejk2,…,ejkl′e_{jk1},e_{jk2},\ldots,e_{jkl^{\prime}} the set of pieces that are extracted in the same order with ejk1e_{jk1} extracted first (see Figure 3). We say that a piece ejkle_{jkl} is extracted by agent ii if the right hand extreme of the piece coincided with the trim of agent ii on the residue. Note that l′≤n−1l^{\prime}\leq n-1 because for each allocated piece in a snapshot, at most n−1n-1 other agents can put trim marks on the residue so as to obtain at most n−1n-1 extracted pieces. Each extracted piece has a clear corresponding allocated piece in a Core snapshot with which it is associated. Note that it can be the case that not all n−1n-1 agents place a trim we allow extraction only for agents whose bonus values are not significant.

In our protocol, pieces are extracted from the residue only if each agent finds the pieces not significant. The reason is that we want to keep sufficient residue to do further extractions on the residue as well as maintain structure.

Figure 4 illustrates the process of extraction and association. We focus on a single Core snapshot in which each of the four agents are allocated a piece. Since the Core allocation is envy-free, each of agents 2,3,42,3,4 think they got at least as much value as the piece that 1 got. Now agents 2,3,2,3, and 44 are asked to place a trim mark each on the residue to indicate that the residue to the left of their trim mark is equal to their advantage over agent 1. The trim marks result in three slices of cake that are extracted. Among the extractions, since 2 has the leftmost trim, his piece is extracted first, then 44 and then 33. The extracted pieces are associated with 11’s allocated piece in the snapshot. In case the pieces will be added to 11’s piece, the piece extracted by agent 22 will be attached first, then the piece by agent 44 and then 33.

Later on, the extracted pieces may be attached to cc so that piece cc is now attractive to other agents because of the additional extracted pieces combined with cc. We clarify that when pieces are extracted and associated with a given piece in a Core snapshot, such extracted pieces have not yet been allocated to any particular agent. Extracted pieces can only be allocated after they are officially attached to their associated piece.

For the protocol we need to restrict our focus on a subset of the snapshots where the same set of agents extracted pieces in the same order:

We call two snapshots pjp_{j} and pj′p_{j^{\prime}} isomorphic to each other if for each agent i∈Ni\in N and for any two pieces cjic_{ji} and cj′ic_{j^{\prime}i} allocated to agent ii in the corresponding snapshots pjp_{j} and pj′p_{j^{\prime}}, the set of agents who extracted cake from the residue and associated to cjic_{ji} and cj′ic_{j^{\prime}i} is the same and the agents in the set extracted pieces in the same order.

We extend this notion to allocated pieces in snapshots. Two allocated pieces of cake belonging to two isomorphic snapshots are isomorphic if they were allocated to the same agent.

We also extend the notion of isomorphism to extracted pieces. We say that for two isomorphic snapshots pjp_{j} and pj′p_{j^{\prime}}, two extracted pieces ejkle_{jkl} and ej′kle_{j^{\prime}kl} are isomorphic if they are associated respectively to isomorphic pieces cjkc_{jk} and cj′kc_{j^{\prime}k} and that ejkle_{jkl} and ej′kle_{j^{\prime}kl} were extracted by the same agent.

In Figure 5, we illustrate isomorphic snapshots.

Our protocol will keep track of a set of isomorphic snapshots, progressively discarding (not changing) some so that we can make manipulations on the ones we keep in an envy-free way. The pieces of cake we are working with are labelled cjkc_{jk} for allocated pieces or ejkle_{jkl} for extracted pieces. Suppose that the given set of snapshots is SS. We use the notation ck,Sc_{k},S and ekl,Se_{kl},S to denote the set of pieces of cake cjkc_{jk} or ejkle_{jkl} in snapshots in SS. Abusing the notation, we will simply say ckc_{k} or ekle_{kl} to mean the set of pieces which are in the snapshots we are working with. Note that we will generally use index jj for the snapshot number, kk for the piece number in a given snapshot, and ll for the ll-th extracted piece.

3 The Main Protocol

The Main Protocol is the engine which runs our overall envy-free protocol. It is responsible for allocating the whole cake among all the agents in an envy-free manner. The Main Protocol works recursively. If the number of agents is four or less, a previously known bounded envy-free algorithm can directly be called. Otherwise, the Main Protocol divides part of the cake in an envy-free manner and identifies a set of agents N∖AN\setminus A that all dominate agents in AA with respect to the cake that is unallocated. The Main Protocol then recursively calls itself to divide the remaining cake among agents in AA.

If the number of agents is more than four, the Main Protocol (Algorithm 3) calls the Core Protocol sequentially on the updated residue so that the residue becomes smaller than before after each call of the Core Protocol. The repeated calls of the Core Protocol help generate a number of snapshots each containing nn pieces of cake. In each snapshot, each agent has been allocated a piece of cake. Envy-freeness is maintained throughout for the allocated cake, and in the Core Protocol each agent thinks he got the highest value piece.

When we call the Core Protocol nn times each time with a different cutter, we argue that we get an envy-free allocation in which agents get at least \nicefrac1n\nicefrac{{1}}{{n}} value of the original cake.

Suppose an agent ii is the cutter is the j≤nj\leq n-th call of the Core Protocol. Then in the first j−1j-1 calls of the Core Protocol, ii gets 1/n1/n value of the allocated cake. This follows from the envy-freeness of the allocated cake. For the remaining cake, ii again gets 1/n1/n value of the unallocated cake in the jj-th call because ii is the cutter. Hence ii gets 1/n1/n value of the original cake. Since the cake is always allocated via Core, it is allocated in an envy-free manner. Hence after the Main Protocol has made the first nn calls of the Core Protocol, we have an envy-free allocation in which agents get at least \nicefrac1n\nicefrac{{1}}{{n}} value of the original cake.

After the first nn calls to the Core Protocol, the Main Protocol does not stop making calls to the Core Protocol if there is still some unallocated cake. After calling the Core Protocol C′C^{\prime} times, C′C^{\prime} Core snapshots are obtained. The Core Protocol may be further called (in the while loop in step 13) to make the residue even smaller. This ensures that each agent considers each piece in the first C′C^{\prime} snapshots significant or smaller than significant by a large factor dependent on our bound BB.

For each piece of cake cc in the C′C^{\prime} snapshots, agents can ascribe what we refer to as a bonus value, which corresponds to how much more value they got in that snapshot than their value for piece cc. In the Main Protocol, for each piece of cake cc in the snapshots, we ask all agents with a non-significant bonus value to make a cut on the residue equal to their bonus value. The pieces obtained from these cuts are then taken from the residue and associated (but not yet attached) to piece of cake cc. We refer to this process as extraction. A piece is extracted only if all agents find it insignificant. The extracted pieces will potentially be attached to their associated piece of cake cc in the GoLeft Protocol. Most of them however will be sent back to the residue or shared amongst a subset of agents in an envy-free way. The process of attaching the extracted pieces to their associated piece in the GoLeft Protocol is designed to make that piece desirable to the agent whose bonus value was used to extract the piece from the residue. The Main Protocol also calls the Discrepancy Protocol in case there is some piece in consideration for extraction that some agents consider significant and others do not. The goal of the Discrepancy Protocol is to exploit any such discrepancy and to ensure that when the GoLeft Protocol is called by the Main Protocol, then there is no discrepancy in how the extracted pieces are viewed, i.e., no actually extracted piece is considered significant by some agent.

4 Discrepancy Protocol

When pieces are being extracted from the residue during the Main Protocol, it may be the case that one of the pieces ejkle_{jkl} in consideration for extraction is significant for some agent. In that case, the piece is not extracted and the Discrepancy Protocol (Algorithm 4) is called in line 40 that either exploits or ‘eliminates’ this discrepancy. The discrepant piece ejkle_{jkl} is kept aside from the residue. On the other hand, all previously extracted pieces are added back to the residue. Since the difference between a piece that is just above significant or just below significant can be arbitrarily small, the Core Protocol is used to create a gap so that the discrepant piece either has value at least Vi(R)nV_{i}(R)n or value at most Vi(R)/nV_{i}(R)/n. This gap is highly useful because the goal of the Discrepancy Protocol is to either ensure that (1) everyone thinks that the discrepant piece is significant or (2) the problem of finding an envy-free allocation can be broken into two sub-problems where some agents DD are allocated the discrepant piece and the rest D′D^{\prime} are allocated the residue. In this, we use the fact mentioned earlier that envy-freeness implies proportionality.

In case of (1), the process of extraction in the Main Protocol is reset and the discrepant piece as well as all the pieces that had been extracted are sent back to the residue. This may appear to be a waste of work but when we do this, we have ensured that at least one agent has significant advantage over another’s piece for a given snapshot. This ‘setback’ can only happen C′n2C^{\prime}n^{2} times before each agent dominates each other agent in which case the remaining cake can be allocated arbitrarily without causing envy.

We note that Discrepancy makes the residue smaller as it calls the Core Protocol. When the residue becomes smaller, it may be that a piece of cake that was not significant for an agent becomes significant because significance is defined with respect to the residue. Hence any agent ii who thinks that Vi(R)n≤Vi(ejkl)≤Vi(R)n\frac{V_{i}(R)}{n}\leq V_{i}(e_{jkl})\leq V_{i}(R)n will eventually think that Vi(ejkl)≥Vi(R)nV_{i}(e_{jkl})\geq V_{i}(R)n when the Core Protocol has been run to reduce the residue.

5 Groundwork for the GoLeft Protocol

The GoLeft Protocol is the heart of our overall protocol and is crucial to allocate the cake that is still not allocated. All the other steps in the Main Protocol can be viewed as preparing the ground for the GoLeft Protocol to work. By calling the Core Protocol a sufficient number of times in the Main Protocol, enough C′C^{\prime} Core snapshots are obtained that are helpful to identify CC isomorphic snapshots in the GoLeft Protocol (these isomorphic snapshots constitute the working set of snapshots over which the GoLeft Protocol operates). Moreover, by calling Discrepancy before GoLeft, it is ensured that all agents are on the same page: all agents consider all the extracted pieces as insignificant.

The GoLeft Protocol (Algorithm 5) is called by the Main Protocol. The goal of the GoLeft Protocol is to identify a set of agents N∖AN\setminus A that dominate agents in AA. This means that the remaining residue can be allocated among agents in AA in an envy-free manner without worrying about agents in N∖AN\setminus A envying them. The goal of the GoLeft protocol is achieved by attaching extracted pieces to the pieces in the working set of snapshots in a methodical manner while maintaining envy-freeness of the allocated cake. In order to maintain envy-freeness, the working set of snapshots is modified in various ways. When all extracted pieces for the working set of snapshots have been attached, we will show that we obtain a set of agents that all dominate the other agents. For example, if we end up with Core snapshots in which for one isomorphic allocated piece, there are a total of less than n−1n-1 extracted pieces that have all been attached and are held by a certain agent ii, then agents who did not manage to extract pieces corresponding to the main piece have a significant advantage over ii as well as all other agents who extracted pieces before ii for that main piece. This significant advantage translates into dominance.

The GoLeft protocol operates on a working set of isomorphic snapshots. The main operations of the GoLeft Protocol are to attach extracted pieces to the Core snapshot allocation and to implement exchanges in which there is a sequence of agents ao,a1,…,ak−1a_{o},a_{1},\ldots,a_{k-1} where each agent aia_{i} in the sequence gets the pieces of agent ai+1mod  ka_{i+1\mod k}. When operations such as attachments and exchanges happen, the isomorphic snapshots change but remain isomorphic nonetheless.

Before we give an overview of the steps of the GoLeft Protocol, we establish some concepts and mathematical structures we will work with. The two key structures are the working set SS of isomorphic snapshots and the permutation graph that is defined with respect to the working set of isomorphic snapshots. During the GoLeft Protocol, each structure gets updated based on the information on the other structure. The algorithm makes progress when agents exchange their pieces with each other.

During the course of the GoLeft Protocol, the isomorphic snapshots in SS get changed in the following way: (1) some subset of SS is removed from SS (2) agents exchange their pieces and (3) extracted pieces are attached to pieces in the snapshots in SS.

When we update SS, we maintain isomorphism and other invariant properties as follows. If an agent holds a piece cjkc_{jk}, he holds the whole set ckc_{k} of isomorphic pieces in set of snapshots SS. Note that we are abusing notation here as ckc_{k} refers to a set of pieces allocated to agent kk in the working set of snapshots SS. If an agent holds an extracted piece ejkle_{jkl}, he holds the whole set ekle_{kl} of isomorphic extracted pieces associated with SS as well. When we implement an exchange, we are essentially making ∣S∣|S| exchanges – one in each of the snapshots. These are exchanges that not only involve the pieces in the snapshots but also involve those extracted pieces that have been attached to the pieces. When we attach an extraction to a piece in a snapshot in SS, we simultaneously attach isomorphic extractions to the corresponding isomorphic allocated piece in each of the snapshots.

We also ensure that the extracted pieces are attached in the appropriate order so that each associated piece gets attached after the previous associated pieces have been attached. For example, if we were focussing on snapshot in Figure 4, the extracted associated piece due to agent 33 will get attached after the extracted associated piece due to agent 44. Note that if we attach an extracted piece ejkle_{jkl} to an allocated piece cjkc_{jk} (along with its previously attached extracted pieces) in a snapshot in the working set SS, we perform a similar attachment for all such isomorphic extracted pieces in the set ekle_{kl} to their corresponding pieces in set ckc_{k}. Also, if an agent ii currently holds an extracted piece, he also holds all earlier extracted pieces as well.

We make a crucial point about a consistency condition that we enforce.

We enforce a consistency condition whereby an agent cannot hold extracted pieces beyond the extraction he himself made. Therefore, when we attach an extracted piece to agent jj’s piece in a snapshot to attract agent ii to it, agent jj does not actually hold the latest attachment because it is beyond jj’s extraction. However in an exchange, if ii were to get jj’s piece along with its attachments, then ii will also get the latest attachments that were originally extracted by ii himself.

In the GoLeft Protocol, we operate on an increasingly small set of isomorphic snapshots. The goal is to reach a set of isomorphic snapshots that can be used to find a set of agents who all dominate other agents. As the GoLeft Protocol proceeds, we discard snapshots to allow us to focus on others where extracted pieces from EE have been ‘attached’ in an envy-free way to the allocated pieces in CC to which they were associated. The set of isomorphic snapshots SS becomes smaller when a set of isomorphic extractions ek(l+1)e_{k(l+1)} are attached to set of isomorphic pieces ckc_{k} in the snapshots SS with each particular extracted piece in ek(l+1)e_{k(l+1)} getting attached to its corresponding piece in eke_{k}. By discarding a set of Core snapshots, we mean that these snapshots and their allocations are not further worked upon and their associated unattached extracted pieces are sent back to the residue. Intuitively, the purpose of discarding snapshots will be to preserve the remaining advantages of agents over other agents.

The GoLeft procedure gradually attaches the extracted pieces to the allocated pieces in the working set of snapshots. The reason we call the protocol ‘go left’ is because we can visualize that for each piece in the set of snapshots we work with, we want to add the next extracted pieces to the isomorphic allocated pieces that are kept to the left of the isomorphic allocated pieces (see Figure 6). By attaching the next extracted pieces, we are ‘going left’.

How do we know which set of isomorphic pieces in SS can have their next extraction? Which set of agents can exchange their currently held isomorphic pieces along with their current attachments? For this we work in tandem with the permutation graph.

The permutation graph keeps track of which agent is willing to move to which piece in the snapshots. The high level idea is that nodes of the permutation graph correspond to the agents and an agent ii points to another agent jj if he will be as happy taking jj’s allocated pieces along with the attachments on those pieces.

The permutation graph is a directed graph where the set of nodes correspond to the set of agents. Hence when we refer to the graph, we will use agents and nodes interchangeably. The arcs of the permutation graph depend on the current state of the working set of isomorphic snapshots SS. In particular, they depend on which extracted pieces have been attached to the originally allocated pieces in the isomorphic snapshots in SS. Agent ii points to agent jj if jj holds isomorphic pieces in SS that have had all attachments up till ii’s extracted pieces. We build the initial permutation graph with each node pointing only to itself. Throughout the protocol, we ensure that each node in the permutation graph has in-degree at least one.

The permutation graph itself gets updated when isomorphic extractions are attached to a isomorphic pieces in SS. The process of extracted pieces being attached to an allocated piece results in the aggregated piece becoming attractive to a new agent who then wants to point to the agent holding that piece (see Figures 7 and 8).

The permutation graph also suggests a natural way to exchange pieces. It has a similar idea as the trading graph used in top trading cycles algorithm for housing markets. If there is a cycle in the graph, we have the possibility of exchanging the allocations of agents in the cycle by giving an agent the piece of the agent he points to . The permutation graph is more intricate because updates on the permutation graph reflect simultaneous updates on the working set of isomorphic snapshots SS. Also by Remark 3.14, an agent in an exchange does not offer what he holds but can offer more because of the additional attachments beyond his own extraction.

6 The GoLeft Protocol

Now that we have established the important ideas in the GoLeft Protocol, let us tie up the ideas and give an overview of how the protocol works. When the GoLeft Protocol starts, it first identifies a working set SS of CC Core snapshots from out of the C′C^{\prime} Core snapshot that we focus on. The protocol then constructs a permutation graph corresponding to the working set of isomorphic snapshots.

In the permutation graph, each node ii corresponds to an agent ii who holds a set of isomorphic pieces along with their attached extracted pieces in the working set of isomorphic snapshots SS. We divide the nodes of the permutation graph into sets TT and T′T^{\prime}. Set TT is the set of nodes/agents such that the isomorphic pieces held by them in SS have not had n−1n-1 attachments). T′T^{\prime} is the set of nodes/agents such that the isomorphic pieces held by them in SS have had n−1n-1 attachments.

The protocol identifies a cycle in the permutation graph that includes at least one node ii from TT. Such a cycle always exists. In each of the working set SS of isomorphic snapshots, we implement an exchange of pieces held by agents in the cycle: each agent in the cycle is given the piece corresponding to the node that the agent points to in the cycle. After implementing the exchange, the permutation graph is updated to reflect the exchange. If in the exchange, if an agent gets an inferior piece, he always gets the additional extracted pieces associated with the inferior piece up till the agent’s extractions. Hence in each snapshot in SS, each agent’s value from his allocation in the snapshot is preserved even if he gets a different piece than in the original Core snapshot. For any agent ii, as long as no agent gets extracted pieces beyond ii’s extraction, ii will not be envious. In the GoLeft protocol, it can be the case that some agent jj gets extracted pieces beyond ii’s extracted pieces but before any such attachments in the last part of the GoLeft protocol, we ensure that no envy arises.

After implementing the cycle, we focus on a node i∈Ti\in T that was in the cycle. For agent/node ii we know that for all snapshots in the working set SS, agent ii has been allocated the original isomorphic pieces ckc_{k} as well as all associated pieces up till ii’s extracted piece. If the piece of cake agent ii is currently allocated in the snapshots SS has no more extracted pieces left to attach to it, but it has not had n−1n-1 attachments, this means that all agents who have not had their corresponding piece extracted/attached have a significant advantage over agents who have had an extracted piece attached. In this case, the GoLeft Protocol returns the set of dominated agents to the Main Protocol and we are left with a smaller envy-free allocation problem because it involves less number of agents.

In case node ii does not lead to an exit from the GoLeft Protocol, we know that there are associated pieces that can still be attached to the isomorphic pieces held by ii in the working set of Core snapshots SS. We focus on the next set of associated pieces ek(l+1)e_{k(l+1)} that we are interested to attach to the pieces ckc_{k} that have already had associated pieces ek2,ek3,…,ekle_{k2},e_{k_{3}},\ldots,e_{kl} attached in their corresponding main pieces ckc_{k}. Additionally attaching pieces ek(l+1)e_{k(l+1)} to pieces ckc_{k} is useful in making the agent who extracted them, interested in the pieces ckc_{k} because of the additional ek(l+1)e_{k(l+1)} as well as the previous attachments. However, naively attaching the pieces can be problematic and spoil the envy-freeness of the allocation that we maintain. We deal with the issue as follows.

The agents who did not extract pieces associated with the ckc_{k} pieces as well as agents who extracted pieces that have not been attached are asked to ‘reserve’ a big enough subset S′⊂SS^{\prime}\subset S of snapshots in which they value the difference between their bonus value for ckc_{k} and the extracted pieces currently attached to ckc_{k} the most. These snapshots S′S^{\prime} are removed from SS and their remaining unattached associated pieces sent back to the residue. By maintaining the advantages in the snapshots S′S^{\prime}, such agents will not be envious even if some agent in {1,…,l}\{1,\ldots,l\} additionally gets all other extracted pieces ek(l+1)e_{k(l+1)} in the remaining snapshots in SS. The advantages reserved due to the discarded snapshots in S′S^{\prime} are crucial for the next phase where agents in {1,…,l}\{1,\ldots,l\} get extracted pieces ek(l+1)e_{k(l+1)} from subset S′′S^{\prime\prime} of the working set.

The agents indexed from 1 to ll who have all already had their extracted pieces attached to ckc_{k} are asked to choose a high enough fraction of the snapshots in SS in which they value the ek(l+1)e_{k(l+1)} pieces. We call these snapshots S′′S^{\prime\prime}. The ek(l+1)e_{k(l+1)} pieces from S′′S^{\prime\prime} are bunched together and the Main Protocol is called to divide this cake in an envy-free way among the agents indexed from 11 to ll where ll is strictly less than nn. Since envy-freeness implies proportionality, they derive enough value that they will not be envious if the agent indexed l+1l+1 gets all other pieces in set ek(l+1)e_{k(l+1)}. The corresponding set of snapshots S′′S^{\prime\prime} are then discarded.

Hence each time we attach isomorphic extracted pieces ek(l+1)e_{k(l+1)} to isomorphic pieces ckc_{k}, we discard snapshots S′∪S′′S^{\prime}\cup S^{\prime\prime} from the working set SS and still maintain an envy-free allocation. Note that in the snapshots that remain in SS, agents may currently hold a different isomorphic piece than they previously did, but since they also hold the corresponding attachments associated with the isomorphic piece, each agent’s total value in each isomorphic snapshot in SS stays the same. In Figure 9, we show the states of the permutation graph and the corresponding representative Core snapshot as well as the corresponding extracted pieces.

When the protocol attaches extracted pieces ek(l+1)e_{k(l+1)} to allocated pieces ckc_{k} currently held by agent ll, it deletes the incoming edge of node/agent ll and replaces it by an edge coming from agent l+1l+1 who extracted pieces in ek(l+1)e_{k(l+1)}. Intuitively, l+1l+1 is now willing to be allocated cc and its attached pieces instead of his current pieces in SS. We delete previous edges to ensure that until termination, nodes in TT have in-degree strictly 11 which guarantees that no matter the cycle involving a node in TT found by the protocol, we will make progress towards termination. By attaching enough extracted pieces in the appropriate order, the GoLeft Protocol finally arrives at a point, where there is some isomorphic set of pieces ckc_{k} in the set SS for which all possible associate pieces have been attached but there is some set of agents N∖AN\setminus A who do not have associated pieces. The reason agents in N∖AN\setminus A could not extract such pieces is because they had a unanimous significant advantage over the agent indexed 11 who got the pieces ckc_{k}. By gradually attaching (unanimously insignificant) associated piece to pieces ckc_{k} and ensuring that all agents who did extract corresponding pieces do get some isomorphic piece in ckc_{k} (along with the associated insignificant attachments), we make sure that agents in N∖AN\setminus A now dominate agents in AA. At this point, we can return from the GoLeft Protocol.

In Figure 9, we demonstrate how the permutation graph along with the working set of isomorphic snapshots changes in the GoLeft Protocol. Note that even when the representative snapshot changes, there still exist snapshots isomorphic to the previous representative snapshots but these snapshots have been discarded from the working set of snapshots. The coloured/shaded pieces represent the pieces given by the Core Protocol to each player. The small pieces on the left of the coloured pieces are extracted pieces, each labelled by the agent who extracted it. At first the extracted pieces are associated with a specific allocated piece. Then they are attached to it (represented by the dotted lines). Finally, when a coloured/shaded piece is reallocated to a new agent, the extracted pieces attached to it are also allocated to the new agent (in the diagram we now aggregate the extracted piece to the main piece). In the second state of the isomorphic snapshot, agent 22 points to agent 11 because the piece extracted by agent 22 has been attached to 11’s held piece. In the third state of the isomorphic snapshot, agent 33 points to agent 22 because the piece extracted by agent 33 has been attached to 22’s held piece. In the fourth state of the isomorphic snapshot, agent 11 points to agent 33 because the piece extracted by agent 11 has been attached to 33’s held piece. In the fifth state, the agents 1,2,31,2,3 exchange their currently held piece and are allocated cake up to their extracted piece. In the fifth (last) state of the isomorphic snapshot, agent 11 holds a piece up till his extraction but neither agent 22 or 44 extracted pieces for the piece that agent 11 holds. This means that agents 22 and 44 have a significant advantage over agent 11. Initially the piece was held by 33 and still is in discarded isomorphic snapshots. This implies significant advantage of 22 and 44 over 33. Therefore agent 22 and 44 can be made to dominate 11 and 33.

Argument for Boundedness and Envy-freeness

In the previous section, we presented the Main Protocol that relies on a few other protocols. We will now argue why it is bounded and envy-free.

We first show that the Main Protocol is bounded.

The Core Protocol is bounded by (n2)n+1{(n^{2})}^{n+1}.

The protocol can execute each of the steps without encountering a problem. In the Core Protocol, the cutter makes n−1n-1 trims, and the other agents are asked to make at most one trim on the pieces. This takes n2n^{2} queries. The most costly procedure is having to call at most 2n2n times the SubCore Protocol for less than nn number of agents. The recursion tree has at most n2n^{2} branches and a depth of nn. Hence there are at most n(n2)nn{(n^{2})}^{n} nodes in the tree with each node requiring n2n^{2} steps. Hence the overall time of the Core Protocol is bounded by n3(n2)nn^{3}{(n^{2})}^{n}.

The Discrepancy Protocol is bounded by Bn×n3(n2)nBn\times n^{3}{(n^{2})}^{n}.

The Discrepancy Protocol can execute each of its steps without encountering a problem. Since at least one agent finds the discrepant piece significant and since we call the Core Protocol BB times before the while loop with each agent as cutter, at least one agent ii thinks that the discrepant piece is of at least as much value as RR. Hence after the while loop, such an agent ii thinks that the discrepant piece is of value at least nn times the value of RR. The while loop from line 6 to line 8 will run at most once for each agent. If an agent values the piece within the gap delimited by the inequality, running the Core Protocol with the agent as cutter BB times will ensure that the residue is small enough for the piece to be on the right hand side of the inequality. Therefore the while loop is bounded by Bn×CoreBn\times Core where CoreCore is the number of operations required to run the Core Protocol. The rest of the Discrepancy Protocol does not make any queries. The Discrepancy Protocol is therefore bounded by Bn×n3(n2)nBn\times n^{3}{(n^{2})}^{n} where n3(n2)nn^{3}{(n^{2})}^{n} is the bound on the Core protocol as proved by Lemma 4.1.

The GoLeft Protocol is bounded by Bn−1′+2Cn3+2n2+C′B^{\prime}_{n-1}+2Cn^{3}+2n^{2}+C^{\prime}.

First let us show that the GoLeft Protocol can execute all steps. The two steps which might be problematic are finding isomorphic snapshots in line 4 and finding a cycle in line 12. We handle the two cases by a couple of claims.

Out of the C′C^{\prime} snapshots generated, the GoLeft procedure can find CC isomorphic snapshots in line 4.

For this we use a simple counting argument. The isomorphism is entirely dependent on the order and existence of the extracted pieces. For each allocated piece of cake , there could be up to n−1n-1 extracted pieces. Each extracted piece might be extracted by any agent or not exist. This gives us (n+1)n−1(n+1)^{n-1} possibilities for each allocated piece. Since a snapshot has nn allocated pieces, this gives (n+1)n2−n(n+1)^{n^{2}-n} different possible configurations. We are given nnnnn^{n^{n^{n}}} snapshots and desire to find nnnn^{n^{n}} isomorphic snapshots. For n>4n>4 we have nnnn>(n+1)n−1nnnn^{n^{n^{n}}}>(n+1)^{n-1}n^{n^{n}}, which implies we can find a set of isomorphic snapshots of size CC.

Therefore isomorphic snapshots can always be found.

We now argue that a cycle in line 12 can be found.

In the permutation graph, at each step of the GoLeft Protocol, there exists a cycle containing at least one node from TT.

We observe that the permutation graph always contains a cycle since each node has in-degree at least 11. For each node ss we can travel to the node tt pointing to it. This process of backtracking can occur at most as many times as the number of nodes until we cycle.

We now show that it always contains a cycle with at least one node from TT. Recall that each node in the graph points to nodes in T′T^{\prime} if T′T^{\prime} is non-empty. Each node in TT has in-degree exactly 1 whereas each node in T′T^{\prime} has in-degree n−1n-1. We start from any node in TT and backtrack according to the incoming arc. In case we only encounter nodes from TT, we will eventually cycle so that we have found a cycle consisting of nodes only from TT. Otherwise, we may reach a node t′t^{\prime} from T′T^{\prime}. Since the node t∈Tt\in T from which we started backtracking points to each node in T′T^{\prime} and hence to t′t^{\prime}, we have again found a cycle consisting of node t∈Tt\in T.

Now that we handled the two possibly problematic parts of the GoLeft Protocol, let us go over the other steps. The isomorphic snapshots can be found in C′C^{\prime} steps. The while loop from line 8 to line 54 runs until a node in TT is found such that it has had less than n−1n-1 attachments but has no extracted pieces to be attached (the if condition in step 19 is true). To make sure this happens, we require that there always be a node in TT so that either we make progress in terms of attaching new sets of extractions or we already encounter the separation condition (Step 19). We prove this as follows:

A node being in T′T^{\prime} means the agent associated with the node holds a piece of cake with no significant bonus. At least one piece of cake must have a significant bonus from the cutter’s perspective (see e.g., Remark 3.10).

Each time the loop runs, either we get a separation of the agents given that the if condition in step 19 is true or a new set of extracted pieces is attached to a set of allocated pieces. There are only Cn2Cn^{2} extracted pieces in the isomorphic snapshots that we are considering.

The for loop ranging from line 32 to line 35 just goes through a subset of the agents and therefore cannot run more than nn times.

The for loop ranging from line 40 to line 43 also goes through a subset of the agents and therefore cannot run more than nn times.

The while loop contains the two for loops and therefore its overall complexity is (Cn2+n)×2n(Cn^{2}+n)\times 2n.

Finally the call to the Main Protocol in line 46 calls the Main Protocol on a strict subset of the agents and is therefore bounded by Bn−1′B^{\prime}_{n-1}.

This gives an overall complexity of (Cn2+n)×2n+Bn−1′+C′(Cn^{2}+n)\times 2n+B^{\prime}_{n-1}+C^{\prime}.∎

The Main Protocol is bounded by B′=nnnnnnB^{\prime}=n^{n^{n^{n^{n^{n}}}}} Robertson and Webb operations.

When the agents are asked to place a trim on the residue in line 28, they are always asked to delimit a value which is (much) smaller than their valuation of the residue.

For the first extractions this is straightforward, seeing as we only ask an agent to place a trim if he thinks his bonus value is not significant. However as we extract pieces, the residue could become much smaller. This does not happen due to the bounds set in place. A non-significant piece of cake is valued to be less than (n−2n)B(\frac{n-2}{n})^{B} of the residue. We extract for C′C^{\prime} snapshots and there are only C′n2C^{\prime}n^{2} pieces that could potentially be extracted. C′n2(n−2n)B≪1C^{\prime}n^{2}(\frac{n-2}{n})^{B}\ll 1, hence extracting the pieces barely affects the residue, and we can therefore always extract a non-significant value from it.

The protocol can therefore always execute line 28.

The initial statement in line 13 runs the Core Protocol C′C^{\prime} times. It is therefore upper bounded by C′×n3(n2)nC^{\prime}\times n^{3}{(n^{2})}^{n} where n3(n2)nn^{3}{(n^{2})}^{n} is the complexity of the Core Protocol, as proved by Lemma 4.1.

The while loop from line 13 to 15 checks that each agent values a piece outside a certain gap. The gap is based on the residue and if an agent values a piece within that gap, by running the Core Protocol BB times with the agent as cutter we can ensure that the piece will never be in that gap again. The while loop will therefore run a maximum of BnC′nBnC^{\prime}n times. Its complexity is therefore bounded by BnC′n×n3(n2)nBnC^{\prime}n\times n^{3}{(n^{2})}^{n}.

The while loop from line 23 to 51 runs at most once for each bonus value piece since every time it repeats it labels a new bonus value as significant and a value can never be made to no longer be significant. Therefore the number of times it runs is bounded by C′n2C^{\prime}n^{2}.

The for loop going from line 25 to 50 simply goes through all the pieces of cake and therefore runs C′nC^{\prime}n times. The for loop from line 26 to 30 goes through all the agents and therefore runs nn times. The for loop from line 32 to 49 goes through all the agents and therefore runs nn times. The statement of line 40 is bounded by the complexity of the Discrepancy Protocol which according to Lemma 4.3 is bounded by Bn×n3(n2)nBn\times n^{3}{(n^{2})}^{n}.

The Main Protocol calls in line 42 and in line 43 each are on a strict subset of the agents and by assumption are bounded by Bn−1′B^{\prime}_{n-1}.

We therefore have a while loop running C′n2C^{\prime}n^{2} with each run of the loop taking C′n×(n+n×(Bn×n3(n2)n+Bn−1′))C^{\prime}n\times(n+n\times(Bn\times n^{3}{(n^{2})}^{n}+B^{\prime}_{n-1})) steps, upper bounding the complexity of that while loop by C′n2×(C′n×(n+n×(Bn×n3(n2)n+Bn−1′)))C^{\prime}n^{2}\times(C^{\prime}n\times(n+n\times(Bn\times n^{3}{(n^{2})}^{n}+B^{\prime}_{n-1})))

The call to GoLeft in line 55 is bounded by the complexity of the GoLeft Protocol which by Lemma 4.5 is bounded by Bn−1′+2Cn3+2n2B^{\prime}_{n-1}+2Cn^{3}+2n^{2}. The call to the Main Protocol in line 62 is on a strict subset of the agents and therefore is bounded by Bn−1′B^{\prime}_{n-1}. This gives us an overall complexity of C′×n3(n2)n+BnC′n×n3(n2)n+C′n2×(C′n×(n+n×(Bn×n3(n2)n+Bn−1′)))+Bn−1′+2Cn3+2n2+Bn−1′C^{\prime}\times n^{3}{(n^{2})}^{n}+BnC^{\prime}n\times n^{3}{(n^{2})}^{n}+C^{\prime}n^{2}\times(C^{\prime}n\times(n+n\times(Bn\times n^{3}{(n^{2})}^{n}+B^{\prime}_{n-1})))+B^{\prime}_{n-1}+2Cn^{3}+2n^{2}+B^{\prime}_{n-1} which for n>4n>4 can be verified to be less than B′B^{\prime}.∎

2 Argument for Envy-freeness

The Core Protocol results in an envy-free partial allocation in which the cutter cuts the cake into nn pieces, each agent gets a part of one of the pieces, and the cutter as well as at least one non-cutter agent gets a complete piece.

It is sufficient to prove that the SubCore for n−1n-1 agents results in a neat allocation in which one agent gets a full piece. The cutter can take the last unallocated piece. No non-cutter agent ii is envious of a cutter agent because ii’s piece is at least as preferred as any unallocated piece. The cutter is indifferent among all pieces so is not envious of any non-cutter agent.

In order to prove the statement, it is sufficient to prove by induction the following statement. Suppose there are mm agents and at least m+1m+1 pieces and there exists an envy-free allocation of the mm agents where each agent partially gets one of the pieces giving him at least the specified benchmark value, then the SubCore will find a neat allocation for mm agents where at least one of the mm agents gets a full piece. When we call the SubCore for the first time, the benchmark values are zero, so there does exist an envy-free allocation in which each agent ii gets a piece of value at least bib_{i}.

Base Case. If there is exactly one agent, he can be given the most preferred piece among the pieces. If there are multiple most preferred pieces, he is given the most preferred piece with the lowest index. The value achieved by the agent is at least bib_{i}.

Induction. Suppose we get a neat allocation for m−1m-1 agents where one agent gets a full piece. If the mm-th agent most prefers an unallocated piece, then we are already done. No agent is envious of another. Since the first m−1m-1 agents already achieved their benchmark values, they still achieve their benchmark value. As for agent mm, he gets a most preferred piece so he trivially achieves his benchmark value because the benchmark value of an agent is either zero or a value of the one of the pieces.

If agent mm is not interested in any of the contested pieces, the induction follows easily. This is because mm’s most preferred piece is outside of the allocated pieces so far, and by giving mm his most preferred piece we preserve neatness and the condition that one agent gets a full piece.

Now suppose that agent mm is also interested in one of the m−1m-1 contested pieces. In that case, each agent in [m][m] is asked to trim the highly valued contested pieces to equal the value of the most preferred uncontested piece (this value is kept track of by bj′b_{j}^{\prime}). Thus for each agent in [m][m] the most preferred uncontested piece provides a benchmark value that they expect to get in any envy-free allocation of the agents in [m][m].

We first claim that each of the m−1m-1 contested pieces has at least one trim even if the trim is on the extreme left margin. Suppose a contested piece aa has no trim not even on the left margin. This means that each agent in [m][m] considers some uncontested piece more preferred than piece aa. But this contradicts our hypothesis that the allocation for agents [m−1][m-1] agents is neat.

When each agent in [m][m] is asked to trim the contested pieces to the value of his most preferred uncontested piece, we distinguish between two cases: (1) we do not get multiple winners in WW i.e., each contested piece has one designated winner and the the number of designated winners for the contested pieces is n−1n-1 and (2) some agent in WW is a multiple winner, i.e., he is the designated winner with the rightmost trim on more than one contested piece. We can ensure thanks to claim 2 that each piece has exactly one designated winner.

We first deal with (1) which is the easier case. Suppose we do not get multiple winners so that ∣W∣=m−1|W|=m-1. Each agent in WW gets the benchmark value if he gets the piece where he had the rightmost trim. The allocation is also envy-free for agents in WW. Nonetheless we call SubCore recursively on agents in WW and the contested pieces. By the induction hypothesis, we get an envy-free allocation in which each agent in WW gets a piece of at least benchmark value. The only remaining agent in [m]∖W[m]\setminus W can be given a most preferred uncontested piece which is a full piece because it was never trimmed. All the agents get their benchmark value so the value achieved is at least bib_{i}.

No agent ii who is a winner of a contested piece envies another winner jj of a contested piece because ii’s trim on jj’s piece is not on the right of jj’s trim on jj’s piece. No agent ii who is a winner of a contested piece envies any uncontested piece because ii’s benchmark value was exactly the value of the most preferred uncontested piece. Finally agent jj who is given an uncontested piece is not envious of any winner ii of a contested piece because jj’s trim on ii’s piece is not on the right of ii’s trim on ii’s piece. Also jj is not envious of an unallocated uncontested piece because jj got a most preferred uncontested piece.

We now deal with (2). Suppose there is at least one agent who wins multiple pieces. In that case ∣W∣<m−1|W|<m-1. Note that if an agent in WW gets the right side of the piece where he trimmed the most, he gets his benchmark value — the value of his most preferred uncontested piece. Since the agents in [m][m] were asked to trim the contested pieces, agents in WW only have trims on the contested pieces.

We now show that when ∣W∣<m−1|W|<m-1, we can always increase WW by one by adding an agent ii from [m]∖W[m]\setminus W and still ensure that W∪{i}W\cup\{i\} admits a neat allocation (with respect to the current left margins) in which each agent gets a partial contested piece. When ∣W∣|W| becomes m−1m-1, we give the remaining agent in [m]∖W[m]\setminus W the most preferred uncontested piece.

Suppose that ∣W∣<m−1|W|<m-1 which means that there are multi-winners from WW in the contested pieces.

The SubCore protocol run on the contested pieces with the set of contested pieces, agents in WW and values bj′b_{j}^{\prime} as input will return a neat allocation where each agent jj in WW gets at least value bj′b_{j}^{\prime}

The SubCore protocol would fail to run only if an agent cannot get a piece of value equal to his benchmark value. However we know from the previous tentative allocation that as long as each agent gets at least his benchmark value, they all have a piece they are guaranteed to get in an envy-free manner.

Since ∣W∣≤m−1|W|\leq m-1, by the induction hypothesis, the SubCore will result in a neat allocation (with respect to the current left margins beyond which the left part of the piece is ignored) of the contested pieces. Since the allocation is neat (with respect to the current left margins), this means the current left margin coincides with a trim of some non-winner.

Each of the agents in WW got a contested piece because SubCore was only called on WW and the contested pieces. We now argue the following claim

After we run SubCore on line 12, an additional agent from [m]∖W[m]\setminus W can be added to WW.

We focus on an arbitrary unallocated contested piece aa. We only consider that part of aa that can be allocated and not the left part which is supposed to be ignored left of the rightmost non-winner’s trim mark.

Contested unallocated piece aa has a marginal trim (on the current left margin) by a non-winner i∈[m]∖Wi\in[m]\setminus W. In that case ii can be given aa. We add ii to WW and WW will still admit a neat (with respect to the current left margins) allocation in which each agent gets a contested piece.

Contested unallocated piece aa has no marginal trim (on the current left margin) by a non-winner.

Let us refer to the current call of the SubCore protocol as SubC. We want to show that Case 22 cannot happen when we call a new SubCore protocol referred to as Sub1 on a set of contested pieces C1C_{1} and agents W1W_{1}. Let aa be the contested piece satisfying the conditions of Case 22. Since aa is in C1C_{1} either aa is one of the agents in W1W_{1}’s most preferred piece or at some previous call of the SubCore protocol ii was ‘kicked out’ from contested pieces and given piece aa, thus making aa a contested piece. Let us call this previous call Sub2. Let us say that Sub2 was called on agents W2W_{2} and contested pieces C2C_{2} such that a∉C2⊂C1a\not\in C_{2}\subset C_{1}. We will now argue that in Sub1 ii must get piece aa, showing that Case 22 cannot happen. First observe that for any piece bb in C1C_{1} but not in C2C_{2}, agent ii prefers aa to bb. This follows from him being kicked out to aa rather than bb. Therefore Sub1 will not allocate bb to ii. For any remaining piece cc both in C1C_{1} and C2C_{2}, we will now show that ii cannot get cc. To show this, look at the agent j0j_{0} who got cc in Sub2. When we call Sub1, either j0j_{0} is in W1W_{1} or is not. If he is not, then he is a non-winner, and has placed a trim on cc which must be to the right of or on the part of cc he was allocated in Sub2. This follows from the fact that if j0j_{0} is a non-winner he is asked to equalise cc to his most preferred uncontested piece, which will be worse than the part of cc j0j_{0} got in Sub2 (else neatness breaks). Agent ii was not envious of the lesser trimmed cc when allocated aa, and if indifferent ties were broken in favour of aa through the placement of the imaginary values. This means that if he is allocated cc in Sub1, he would rather get aa. Finally, let us imagine j0j_{0} is in W1W_{1}. For ii to get cc, j0j_{0} must get a different piece. If j0j_{0} gets a piece outside of C2C_{2}, then this is a contradiction since previously his most preferred piece outside of C2C_{2} caused j0j_{0} to place a trim on cc that was to the right of ii’s trim corresponding to ii’s valuation of aa. If j0j_{0} is getting a piece in C2C_{2}, he must be taking the piece that was allocated to another agent j1j_{1} in Sub2. This is only possible if j1j_{1} is in W1W_{1}. This means that in Sub1, j1j_{1} must be getting another piece. We can continue this argument until we reach an agent jkj_{k} who gets a piece outside of C2C_{2}, and therefore must have been kicked out by agent jk−1j_{k-1} placing their trim the same place or to the left of where it was in Sub2. This is a contradiction since in Sub2, jkj_{k} got the aforementioned piece trimmed to the left of his most preferred piece outside of C2C_{2}. This concludes the argument that ii cannot get a piece cc in C2C_{2}. Since ii also cannot get a piece bb different from aa outside of C2C_{2}, ii must get allocated aa by Sub1.

Hence, we can always grow the set WW until its size is m−1m-1. Previously we were maintaining a set WW that had a neat envy-free allocation with respect to the current left margins and with respect to the contested pieces. The allocation was not necessarily a globally neat allocation because we were ignoring the left-side of the rightmost non-winner’s trims and also uncontested pieces. However, when ∣W∣|W| becomes m−1m-1, the contested pieces have all been allocated so there is no unallocated piece for which some left part is ignored. The agents who get contested pieces get at least their benchmark value which is the value of the most preferred uncontested piece. Hence the agents who get contested pieces are not envious of any uncontested piece. The only remaining agent in [m]∖W[m]\setminus W can be given the highest value uncontested piece that also happens to be a full piece because uncontested pieces remain untrimmed.

We will now walk through the critical part of the SubCore protocol to convey the structure of the proof and make the intuition clearer. Imagine that we have 55 agents. A cutter agent has cut the cake into 55 pieces. The SubCore protocol iteratively introduces each agent with the for loop line 1, until all agents have been allocated a piece and the allocation is neat. We will show through this example how introducing a new agent works. Let us say that so far 33 agents have been introduced and a neat allocation computed for them. We are now adding a 4th4^{th}. The situation can be visualised in Figure 10.

Each agent trims most the piece that they are tentatively holding. In the diagram the trims are of the colour of the agent who placed them. We now query agent 44 as to which piece he prefers. The easy case is if he prefers piece dd or ee since then we could give him that piece and neatness would still be satisfied. We therefore dwell on the case where he prefers either aa, bb or cc. In such a scenario, aa, bb and cc will be referred to as the contested pieces. As we will see each, one agent will get ‘kicked out’ of these pieces and be forced to pick either dd or ee. However, since only one is kicked out , all agents are guaranteed to get their full preferred piece out of {d,e}\{d,e\}. This gives us a lower bound (as long as the assumption made above that only one agent gets kicked out holds) for the value each agent is guaranteed to get. The value an agent is guaranteed jj to get is kept track of by the variable bj′b_{j}^{\prime} in the protocol. In line • ‣ 4, we ask each agent to place a trim on the contested pieces so that they are equal to this lower bound. This may look as so as in Figure 11.

In this diagram all the trims have been placed, and the agents who placed the rightmost trims are said to ‘win’ the piece. Their trims are highlighted in the diagram. These agents are added to the set WW in line 5. If each trim had been won by a separate agent, we end up in an easy case of the protocol since each agent except one wins a separate piece, and the one who does not gets kicked out. However, in the situation depicted by the diagram, agent 11 has won both pieces aa and bb and agent 44 won cc. We therefore do not know who gets kicked out between 22 and 33. However we do know that if we were to continuously make agent 11 and 44’s trims move left in an envy-free way, we could eventually ensure that a piece is won by someone new. Of course the protocol cannot move the trims continuously, but it is nonetheless possible to ensure that a new agent gets a contested piece. This is done in line 8 when we call the protocol recursively. This is what the recursive call would look like in the following situation (Figure 12):

The greyed out pieces of cake are not called as part of the input. Only the winner agents are called as part of the input (agent 11 and 44). We keep track of the value they are guaranteed to get through the inputs b1b_{1} and b4b_{4}. This is important since pieces dd and ee are no longer part of the input. Now there are two concerns which we may have from this recursive call: 1) Does it actually manage to return a neat allocation, 2) Does the allocation returned allow us to expand the set WW of winners. 1) is addressed by Claim 7. 2) is addressed by claim 8. Once the protocol returns, the situation may look like (Figure 13).

The recursive call allocated aa to 11 and cc to 44, leaving bb unallocated and with agent 22’s trim to the right of agent 11’s updated bi′b_{i}^{\prime} value. This means that we can now add agent 22 to the set of winners.

Assuming envy-freeness is preserved the Core Protocol, envy-freeness is preserved in the Discrepancy Protocol.

Discrepancy does not make allocations but simply distinguishes between 22 cases. Therefore as long as envy-freeness is preserved in the Core Protocol it is also preserved in the Discrepancy Protocol.

Assuming envy-freeness is preserved in the Core Protocol and the Main Protocol with n−1n-1 or less agents, envy-freeness is preserved in the GoLeft Protocol.

GoLeft performs a series of operations allowing us to attach a set of extracted piece ekle_{kl} to a set of allocated piece ckc_{k} in a subset SS (which gets smaller and smaller as the algorithm progresses) of the snapshots and then permutes the allocation on these snapshots. The first part of the protocol uses the permutation graph to find what permutation is permissible in an envy-free way, and what extracted piece to attach next to allow further permutations. It updates the permutation graph to reflect what permutations will be allowed and desirable after the operation of attaching ekle_{kl} to ckc_{k} has been executed. Let us first show that the operations to attach the extracted piece to the allocated piece do not break envy-freeness, and second that the permutation graph is correct, that is that on the subset of snapshots where the piece was attached, we can permute agents in a cycle of the permutation graph without breaking envy-freeness.

Assume we are trying to attach pieces ek(l+1)e_{k(l+1)} to the corresponding pieces in ckc_{k} which implies that pieces ekme_{km} with m≤lm\leq l have already been attached to ckc_{k}. To do this we take the following two steps.

Make sure that for each agent o∈{l+1,…,n}o\in\{l+1,\ldots,n\}, even if all remaining extraction up till oo’s extractions ek(l+1),…,ekoe_{k(l+1)},\ldots,e_{ko} are given to some agent z∈{1,…,l+1}z\in\{1,\ldots,l+1\}, oo will not be envious of zz. We do so in phase ‘Attachment — making it agreeable for agents from l+1l+1 to nn’ of the GoLeft Protocol.

Note that if all el(l+1)e_{l(l+1)} pieces are given to agent l+1l+1, agents in {l+2,…,n}\{l+2,\ldots,n\} will not be envious of l+1l+1 in any case because the pieces reflect a part of their advantage over l+1l+1. Essentially, we want to ensure something weaker: that agent o∈{l+1,…,n}o\in\{l+1,\ldots,n\} will not be envious if the remaining el(l+1)e_{l(l+1)} pieces are given to some agent z∈{1,…,l}z\in\{1,\ldots,l\}.

We achieve the above goal by asking all agents oo to choose ∣S∣n−l+1\frac{|S|}{n-l+1} snapshots where they value the difference between their bonus value and the extracted pieces which have so far been attached to ckc_{k} (let us call this value bb) most. This leaves ∣S∣n−l+1\frac{|S|}{n-l+1} in S∖S′S\setminus S^{\prime}(which is relabelled SS). In any snapshot jj and piece of cake cjkc_{jk}, for any agent oo, bb is greater than the sum of all Vo(ejkp)V_{o}(e_{jkp}) with p∈{l+1,…,o}p\in\{l+1,\ldots,o\}. Since we ask agent oo to discard as many snapshots with highest value bb as are snapshots left in S∖S′S\setminus S^{\prime} , the advantage accumulated in the discarded snapshots amounts to more than the sum of all extracted pieces ekpe_{kp} in the remaining snapshots. Hence, even if some agent z∈{1,…,l}z\in\{1,\ldots,l\} takes all the ek(l+1)e_{k(l+1)} pieces, the discarding agent will not be envious.

Ensure that for each agent r∈{1,…,l}r\in\{1,\ldots,l\}, even if the remaining pieces in the set of pieces ek(l+1)e_{k(l+1)} are given to some agent z∈{l+1,…,n}z\in\{l+1,\ldots,n\}, rr will not be envious of zz. We do so in phase ‘Attachment — making it agreeable for agents from 11 to ll’ of the GoLeft Protocol. To do this we ask rr to choose ∣S∣nln+1\frac{|S|n}{ln+1} snapshots jj for which Vj(ek(l+1))V_{j}(e_{k(l+1)}) is greatest and add them to a piece aa which will then be shared amongst all agents in {1,…,l}\{1,\ldots,l\}. This is possible in an envy-free way because agents in {l+1,…,n}\{l+1,\ldots,n\} are willing to give all pieces ek(l+1)e_{k(l+1)} to agent rr due to the above argument. These snapshots are discarded and once all agents in {1,…,l}\{1,\ldots,l\} have chosen we are left with ∣S∣ln+1\frac{|S|}{ln+1} snapshots in S∖S′′S\setminus S^{\prime\prime}. Since rr gets at least \nicefrac1n\nicefrac{{1}}{{n}} value of piece aa, and that the ejk(l+1)e_{jk(l+1)} pieces he values most were added in aa, even if agent l+1l+1 gets all pieces ek(l+1)e_{k(l+1)} in S∖S′′S\setminus S^{\prime\prime}, rr will not be envious of him as these do not sum up to what he got from aa. This means we can attach ek(l+1)e_{k(l+1)} to ckc_{k} and that agent l+1l+1 can be allocated ckc_{k} in the snapshots in S∖S′′S\setminus S^{\prime\prime}(which will be relabelled SS) without envy-freeness being broken. When ek(l+1)e_{k(l+1)} pieces are attached to ckc_{k}, then ckc_{k} is equally desirable to l+1l+1 as l+1l+1’s current allocation in SS.

Each edge in the permutation graph corresponds to moving some agent ii from ckc_{k} to ck′c_{k}^{\prime} without changing his value in any of the isomorphic snapshots in SS. Hence, when an exchange happens, each agent in the cycle gets exactly as good an allocation as before. Some agent jj may possibly get envious because some other agent got extra attached pieces beyond jj’s extraction. However, we have already argued above why agents are not envious because of additional extractions that are attached.

These arguments ensure that we end up with snapshots where some extracted pieces have been attached or shared by a subset of agents and for which agents’ allocations have been shifted around, but for which envy-freeness is always preserved.

The subset of agents AA returned by GoLeft can be made to be dominated with respect to RR by agents in N∖AN\setminus A in 2B2B steps.

In order to prove the lemma, we prove a couple of claims.

For any agent ii, once the residue has reached a value RR, the protocol will never add cake to the residue in such a way that it becomes of value bigger than (1+1n)R(1+\frac{1}{n})R.

All extracted pieces which are attached to a piece of cake in one of the snapshots are seen as non-significant by all agents. This means that for all agents ii and each extracted piece ejkle_{jkl}, we have vi(ejkl)≤f(B)vi(R)v_{i}(e_{jkl})\leq f(B)v_{i}(R). In the protocol, once the residue is made smaller (either through discrepancy or in the main protocol after running GoLeft), all pieces that had previously been extracted from it can no longer be reattached to it (in the case of discrepancy they are reattached before making the residue smaller, and in the second case the protocol no longer reattaches anything extracted from the residue). This means that when pieces that were extracted from the residue are reattached to it, each agent considers the pieces to satisfy the above inequality. Since there are at most Cn3Cn^{3} such pieces, then for each agent ii, ∑ejklvi(ejkl)≤f(B)vi(R)Cn3≤vi(R)n\sum_{e_{jkl}}{v_{i}(e_{jkl})}\leq f(B)v_{i}(R)Cn^{3}\leq\frac{v_{i}(R)}{n}.

Once an agent ii has been allocated a piece cjkc_{jk} by the GoLeft procedure, agents with a significant bonus value on cjkc_{jk} can be made to dominate ii with respect to RR in 2B2B calls to the Core protocol.

In other words the significant advantage obtained is maintained.

Before the GoLeft procedure works on the working set of isomorphic snapshots they are all envy-free. When the GoLeft procedure gives some of the extracted cake to an agent (either by attaching it to an allocated piece of cake (line 51) or by sharing it amongst a subset of agents (line 46), the extra amount of cake given to the agent is much smaller than a significant value from the perspective of all agents (line 13 in the Main Protocol). The values are such that when an agent has a significant bonus value over another, no matter what happens in the GoLeft procedure, the significant bonus cannot be diminished enough for the protocol to not be capable of making the residue smaller than that value in 2B2B calls to the Core protocol. To be more precise, the gap enforced by line 13 ensures that the following inequality holds: nn(extracted pieces)≤nVi(R)f(B)2<Vi(R)f(B)12≤\leq nV_{i}(R)f(B)^{2}<V_{i}(R)f(B)^{\frac{1}{2}}\leq significant bonus.∎

The GoLeft routine terminates when the permutation graph is deleted. This means that there exists a set of isomorphic pieces of cake ckc_{k} such that all agents who extracted a piece from the residue and attached it to ckc_{k} have been allocated an element of ckc_{k} at least once, whilst at least one other agent had a significant bonus on ckc_{k}. According to Lemma 10, the agents with a significant bonus on elements of ckc_{k} can be made to dominate any agent having been allocated a member of ckc_{k} in 2B2B steps.∎

Assuming the Main Protocol with n−1n-1 or less agents is envy-free, that the Core protocol, the Discrepancy Protocol and the GoLeft Protocol are envy-free, envy-freeness is preserved in the Main Protocol.

The Main Protocol does not make allocations without calling a sub-protocol. Assuming that all the sub-protocols it calls are envy-free, the fact that it calls them on all agents preserves overall envy-freeness. The Main Protocol also calls itself on a subset of the agents sharing either the residue or some discrepant piece. The two possible instances where this may occur are

The GoLeft Protocol has terminated, the Core Protocol has been run enough times to ensure that significant bonus values have been converted into domination on the residue RR, and a subset of agents N∖AN\setminus A dominate agents in subset AA with respect to the residue RR. We then run the Main Protocol with the residue and AA as input. Since according to Lemma 4.22 agents in N∖AN\setminus A dominate agents in AA, they are willing to give all the residue to either agents in AA, therefore no matter how agents in AA share RR, agents in N∖AN\setminus A will not be envious.

The Discrepancy Protocol has been called and a discrepant piece can be exploited. In that case the Main Protocol will call 22 instances of itself. First on the discrepant pieces and agents who think it is significant (set DD). Second on the residue and agents who think the discrepant piece is small (set D′D^{\prime}). Each agent i∈Di\in D thinks that the discrepant piece ejkle_{jkl} is at least nn times bigger than RR. This means that if they think an agent ss gets all of RR but none of ejkle_{jkl}, they will not be envious of him since ii is guaranteed 1n\frac{1}{n} value of ejkle_{jkl}. Therefore the agents sharing ejkle_{jkl} are not envious of those sharing RR. The same argument applies the other way around.

Based on the lemmata above, we have given the overall argument for envy-freeness. In each recursive call of the Main Protocol, the number of agents among which the cake is to be allocated decreases by at least one. Hence when the number of agents is four or less, we can use a known bounded envy-free protocol to allocate the residue in an envy-free manner.

The Main Protocol allocates all the cake in an envy-free manner.

Partial allocations

In Remark 3.13, we gave an argument that the first nn calls of the Core Protocol in the Main Protocol ensure that we obtain a partial allocation that is envy-free and gives each agent \nicefrac1n\nicefrac{{1}}{{n}} value of the whole cake. As a result we answer an open problem posed by Segal-Halevi et al. whether there exists a bounded algorithm that returns a proportional and envy-free partial allocation. We also note the following.

If the SubCore Protocol runs in time f(n)f(n), then there exists an algorithm that returns a proportional and envy-free partial allocation, and takes O(nf(n))O(nf(n)) time.

Note that the partial allocation may give disconnected pieces to the agents. We now give an additional result concerning partial allocation of the cake in which agents get connected pieces.

It is possible to use the SubCore Protocol to obtain envy-free partial allocations guaranteeing that each agent receives a connected piece of value \nicefrac13n\nicefrac{{1}}{{3n}} of the original cake. We specify Algorithm 6 that achieves this objective. Previously, Segal-Halevi et al. showed that in bounded time, one can obtain an envy-free partial allocation in which each agent gets a connected piece of value 1/2n−11/2^{n-1} of the whole cake. Note that our guarantee of O(\nicefrac1n)O(\nicefrac{{1}}{{n}}) is optimal up to a constant factor.

In each iteration of the for loop in the algorithm, at least one agent who was not holding any piece now holds a piece. In particular agent ii who is asked to make divisions of value \nicefrac13n\nicefrac{{1}}{{3n}} can get one of the pieces. At any point in the algorithm we should view the cake as having at most k<nk<n gaps or discontinuities as a result of kk agents holding connected pieces from the cake. When a new agent ii makes trims to create pieces of value \nicefrac13n\nicefrac{{1}}{{3n}}, this does not change the cake or the gaps in it. The algorithm has nn calls of the SubCore Protocol.

We observe that for any agent holding a piece of cake, he already gets value \nicefrac13n\nicefrac{{1}}{{3n}} of the original cake. For any agent not holding a piece of cake, he thinks that no agent who is holding a piece has a piece of value \nicefrac13n\nicefrac{{1}}{{3n}}. Hence, he thinks that at least \nicefrac23\nicefrac{{2}}{{3}} value of the cake is unallocated.

The ConnectedPieces Protocol allocates the cake partially in an envy-free way such that each agent has a connected piece of value at least \nicefrac13n\nicefrac{{1}}{{3n}} of the original cake.

We show that the algorithm proceeds correctly and terminates with each agent holding one connected piece. The algorithm iteratively calls SubCore with nn pieces created by each agent. The only reason why the algorithm may not proceed is if an agent ii cannot produce nn divisions of value \nicefrac13n\nicefrac{{1}}{{3n}} of the original cake. When a new agent ii is asked to make nn divisions of value exactly \nicefrac13n\nicefrac{{1}}{{3n}}, we want to show he can make these divisions by appropriate trim marks. Assume that at this point kk agents are holding a piece of cake which means that there are kk gaps (discontinuities) in the cake. So for an agent ii who wants to create divisions of value \nicefrac13n\nicefrac{{1}}{{3n}}, there can be two problems: (1) too much value of the cake is allocated and (2) the pieces that are allocated lead to discontinuities which prevents the agent from creating nn divisions of value \nicefrac13n\nicefrac{{1}}{{3n}}. For the first case, less than \nicefrack3n\nicefrac{{k}}{{3n}} value of the cake is allocated from i′si^{\prime}s perspective. Hence at least \nicefrac23\nicefrac{{2}}{{3}} value of the cake is still unallocated for ii. This means that there is enough cake to generate nn pieces of value \nicefrac13n\nicefrac{{1}}{{3n}}. For the second case, the discontinuities result in at most \nicefrack+13n\nicefrac{{k+1}}{{3n}} of the cake not being used. This is because the kk gaps divide RR into at most k+1k+1 pieces and less than \nicefrac13n\nicefrac{{1}}{{3n}} of cake can be lost per piece due to non-divisibility by \nicefrac13n\nicefrac{{1}}{{3n}} of the value of each connected piece. This means that there is still more than \nicefrac13\nicefrac{{1}}{{3}} of the cake that can be used for the divisions. Since we require nn divisions each of value \nicefrac13n\nicefrac{{1}}{{3n}}, there is enough cake to obtain these divisions.

We now argue that the final allocation is envy-free. At some point an agent ii gets a piece to hold. He thinks this piece is strictly more preferred than any piece that was held in previous iterations by any agent. In the same iteration ii thinks he got at least as valuable a piece as any piece allocated in the iteration because of envy-freeness of SubCore. So ii thinks he has a best piece. In case at a latter iteration, he thinks someone got a better piece than his own currently held piece, then due to envy-freeness of SubCore, ii can get at least preferred a piece as well.

If the SubCore Protocol runs in time f(n)f(n), then there exists an algorithm that takes O(nf(n))O(nf(n)) time and allocates the cake partially in an envy-free way such that each agent has a connected piece of value at least \nicefrac13n\nicefrac{{1}}{{3n}} of the original cake.

Discussion

In this paper we presented the first general discrete and bounded envy-free protocol. Now that boundedness has been established, the paper opens the door to new work on finding the optimal bound. Getting a clearer understanding of the complexity of envy-freeness in terms of the number of queries is an interesting direction for future work.

The Core Protocol we defined can be used as an oracle in other envy-free protocols that allocate a large enough part of the cake. If the Core Protocol is called nn times on the updated residue each time with a different agent as cutter, then we obtain an envy-free allocation in which each agent gets \nicefrac1n\nicefrac{{1}}{{n}} of the total value of the cake. Hence, after the first nn calls of the Core Protocol, our Main Protocol already identifies an allocation that satisfies proportionality (with respect to the whole cake) and envy-freeness. If the Main Protocol is taking too much time, it can be timed out and still give an envy-free allocation with the proportionality guarantee.

It will also be interesting to use the new techniques presented in the paper for finding fair allocations for other notions of fairness.

Acknowledgments

The authors thank Sajid Aziz, Simina Brânzei, Omer Lev, Abdallah Saffidine, Erel Segal-Halevi, Xin Huang, Jade Tan-Holmes, Tommaso Urli, and the reviewers of FOCS 2016 for comments. They also thank Steven Brams and Ariel Procaccia for pointers to the literature. Haris Aziz is supported by a Julius Career Award. He thanks Ulle Endriss for introducing the subject to him at the COST-ADT Doctoral School on Computational Social Choice, Estoril, 2010.

References