Introduction
“Since the 1940s, the computation of envy-free cake divisions has baffled many great minds across multiple disciplines.” — Procaccia [2013, p. 83]
Suppose agents must divide a heterogeneous, divisible good, such as a plot of land, a stretch of broadcast time or a cake. Agents may value the same piece differently, and each should value her own share at least as highly as anyone else’s. This requirement is envy-freeness . How many questions about their values suffice to divide the whole cake in this way?
A protocol learns about values only by asking agents questions, or queries, in the standard model of Robertson and Webb [1998]. An evaluation query asks an agent for her value of an interval. A cut query asks her to mark where, starting from a given point, the cake reaches a given value to her. For two agents a few queries suffice: one agent cuts the cake into two pieces she values equally, and the other takes the piece she prefers. Gamow and Stern [ [16 ] asked whether a cake can always be divided without envy among any number of agents. For three agents, Selfridge and Conway found a protocol with a bounded number of cuts [Robertson and Webb, 1998].
For an arbitrary number of agents, it took over twenty years to pass from a finite protocol [7 ] to one whose number of queries is bounded by a function of n n n alone [4 ] , and that bound was a tower of six n n n ’s. At that time, Procaccia [2020, p. 118] observed the astronomical bound and wrote that “this begs the question of whether there exists a cake-cutting protocol that is both envy free and computationally efficient. ” By 2026, the deterministic bound had come down to single exponential [Ye and Bai, 2026]. In this paper, our goal is to obtain a polynomial-query envy-free protocol. Following Edmonds [ [12 ] , who singled out polynomial (as opposed to exponential) growth as the mark of a ‘good’ algorithm, we seek protocols whose number of queries is polynomial in the number of agents. Mackenzie and Suzuki [17 p. 1] write, “Whether polynomially many queries suffice is a central open question in fair division. ” This paper solves the open question. Algorithm 1 gives the following guarantee.1
Theorem 1. For n ≥ 2 n \ge2 n ≥ 2 agents with finite, nonnegative, nonatomic, additive valuations, a deterministic protocol returns a complete, exactly envy-free cake allocation in finite unions of intervals using O ( n 7 log n ) O(n^7 \log n) O ( n 7 log n ) Robertson–Webb queries. The bound holds for every choice of valid cut answers.
The protocol can be implemented within the same query bound using only queries on single intervals whose endpoints are 0, 1, or points returned by earlier cut queries (Appendix § 17 ). Appendix § 18 gives a variant that batches calls to the same cutter. It makes only O ( n ) O(n) O ( n ) calls to certified trimming and uses O ( n 6 log n ) O(n^6 \log n) O ( n 6 log n ) Robertson–Webb queries in total.
For complete envy-free chore allocation with arbitrary finite, nonnegative, nonatomic costs, the worst-case query bound is O ( n 7 log n ) O(n^7 \log n) O ( n 7 log n ) . Appendix § 16 explains how to use the trimming and repair bounds in the chore protocol of Aziz [ [3 ] .
Envy-freeness and domination. Envy-freeness is easy to maintain for partial allocations. Giving everyone nothing is envy-free, and adding to each agent’s bundle her part of an envy-free division of some of the remaining cake keeps the allocation envy-free, because values are additive. The difficulty is the cake not yet allocated, the residue. Careful division steps tend to leave some of it, and the last of it must also be allocated. The classical way out is an irrevocable advantage [4 , 7 ] . Write v a ( B ) v_a(B) v a ( B ) for agent a a a ’s value of a piece B B B . Agent a a a ’s advantage over agent b b b is v a ( X a ) − v a ( X b ) v_a(X_a)-v_a(X_b) v a ( X a ) − v a ( X b ) , the amount by which she values her own bundle X a X_a X a above b b b ’s bundle X b X_b X b ; envy-freeness says exactly that every advantage is nonnegative. We say that a a a dominates b b b when this advantage is at least her value of the whole residue. Then b b b could receive all of the residue and a a a would still not envy her, however the rest is divided. Once everyone outside a nonempty proper group of agents dominates everyone inside it, the residue can be divided among the group’s members alone, recursively. The outsiders do not mind what the members receive, and the members only gain. A protocol therefore aims to create dominations, one at a time, while keeping its allocation envy-free.
The protocol in brief. Our protocol keeps one envy-free partial allocation and repeats a round of four steps (Figure 1 ) until a dominated group appears.
Figure 1. The main loop of Divide (Algorithm 1), with the step numbers used throughout. The allocation stays envy-free after every step except the reassignment 3, and Repair 4 restores it. Table 2 states what each step guarantees.
In Core, a fixed agent, the cutter, divides the residue into n n n pieces she values equally, and a trimming routine gives each agent the end part of a different piece without envy. One piece stays whole, and the cutter’s share is worth exactly one piece to her. If she values the new residue positively, she has a strict advantage over the holder of some trimmed piece.
If everyone outside some group now dominates everyone inside it, the group’s members carry their current bundles into the recursive call and divide the residue (step 5).
Otherwise the cutter may already dominate that holder, and her advantage is then wasted. We look for an advantage of some agent over a bundle she does not yet dominate. If necessary, we pass the suffixes that Core has just allocated around a cycle of agents: every agent keeps her earlier bundle and receives one of the new suffixes on top of it. This may create a little envy.
Repair puts n − 1 n-1 n − 1 small buffers in front of each bundle and a large share of the residue behind it. The target for each addition is a fraction of each agent’s own value of the residue. Trim then gives each agent a suffix of a different one of these pieces without envy. One piece stays whole. If a cut entered a bundle, there would be too few other pieces to realize every intermediate buffer level. Each original owner would be the missing level would strictly prefer the suffix on her label to every suffix below it, leaving too few agents to witness the trims below the gap (§ 7.4 ). Thus the cuts consume only buffers. The advantage found
in step 3 survives with only a small loss, while the residue shrinks below it. The agent now dominates whoever holds that bundle.
Old dominations follow their bundles even when the holders change, and each round that proceeds past step 2 increases the number of dominated pairs. Keeping the current bundles when the group shrinks preserves these dominations. There are at most n 2 n^2 n 2 ordered pairs in the original population, so at most n 2 n^2 n 2 rounds require repair over the entire execution.
Trimming is the bottleneck. Every round calls the trimming routine in Core. A round that reaches Repair calls it a second time. The other steps use polynomially many queries. The cutter makes n − 1 n-1 n − 1 cuts, the reassignment only reads values already recorded, and repair, apart from its call to Trim, needs a number of queries logarithmic in its precision. Trimming is therefore the step that decides whether the whole protocol is polynomial. A call to Trim receives n n n ordered pieces, cuts some of them from the front, and gives each agent the remaining suffix of a different piece, so that nobody envies anybody. Giving everyone an empty suffix would be envy-free but useless, so every trim must be justified: in a chain starting at a whole piece, each trimmed suffix is valued by an earlier holder exactly as much as her own (Figure 2 ). Earlier protocols find such a certified allocation by searching over orders of agents and pieces, using exponentially many queries in the worst case [4 , 5 ] (Psomas 2026).
Figure 2. The running example. Left: each agent’s value of each third, spread evenly within it. Right: the allocation Y Y Y computed by Core in the first round, with agent 1 as the cutter. Agents 1 and 2 hold P 1 P_1 P 1 and P 2 P_2 P 2 whole, and agent 3 holds the last half of P 3 P_3 P 3 . The arrow is the tie that justifies the trim (§ 5.1 ), pointing from an earlier holder to the trimmed suffix that she values exactly as much as her own piece. The hatched half forms the residue U U U .
Finding the trim with medians. Suppose the input pieces consist of intervals of positive length and every agent assigns positive value to every interval of positive length. Then all certified allocations retain the same suffixes. On every piece these are the longest suffixes possible in any envy-free suffix allocation (Proposition 1). Knowing one supporting assignment , which gives the holders in some certified allocation, would suffice to recover these suffixes. Start with an infinite upper bound on each agent’s value. Repeatedly cut each piece to the longest suffix, up to the whole piece, that no agent values above her current bound, and lower the bound of the piece’s assigned holder to her value of what is left. Much as in the Bellman–Ford shortest-path algorithm, the bounds settle at the true values within n n n rounds.
We do not know a supporting assignment, so we run this relaxation for all n ! n! n ! candidate assignments simultaneously, and then discard candidates in bulk. Three observations make this possible with polynomially many queries (Figure 5 ).
Figure 5. The end of a failed phase of Algorithm 2, seen on the agent k k k named by the matching test. Each point is one candidate assignment’s estimate of her value; squares are supporting candidates. Supporting candidates never fall below the true value x k ∗ x_k^* x k ∗ , and at least five eighths of the pool end at or below it (Lemma 8 ), so the lower median y k y_k y k is at most x k ∗ x_k^* x k ∗ . When the test reports y k < x k ∗ y_k < x_k^* y k < x k ∗ , no candidate with estimate at most y k y_k y k is supporting, and these candidates make up at least half of the pool.
of the candidates’ current bounds, so that one table of O ( n 3 ) O(n^3) O ( n 3 ) queries answers the whole pool in each round, however many candidates remain. Rounding up only weakens an upper bound, so supporting candidates never fall below the truth.
The median is a lower bound. The ties that justify the true allocation pull down the bounds of every candidate, supporting or not: in each round, until all of them get there, at least one more of a candidate’s bounds reaches the true value or falls below it. Rounding can stall this progress, when an agent’s value estimate rounds above her true value or a piece’s length estimate rounds above its true length. At each threshold only estimates in the grid gap containing it can cross. After 4 n 4n 4 n rounds a majority of the candidates are at or below the truth on every coordinate, so on each coordinate the lower median of the candidates’ bounds is at most the true value.
A matching test names a coordinate to filter. At the median values, a bipartite matching computation either certifies that they are the true values, or names an agent whose median value is strictly too low. Supporting candidates bound this agent’s value from above, so their bounds lie strictly above the median, whereas at least half of the candidates have bounds at or below it. Those are discarded.
Each phase uses O ( n 3 ) O(n^3) O ( n 3 ) queries, however close the candidates’ values are. Each failed test eliminates at least half the pool, so 1 + log 2 ( n ! ) = O ( n log n ) 1+\log_2(n!)=O(n\log n) 1 + log 2 ( n !) = O ( n log n ) phases suffice. This gives O ( n 5 log n ) O(n^5\log n) O ( n 5 log n ) queries per trim. Repair has the same query bound per round, and Algorithm 1 uses O ( n 2 ) O(n^2) O ( n 2 ) rounds in total (§ 4.4 ).
Repairing envy cheaply. The other new ingredient concerns Repair, which gives each bundle a large share of the residue that every agent values nearly the same, with small buffers placed in front. A second call to Trim can then remove a small envy by consuming buffers while leaving every bundle intact. Only buffers and a small rounding error remain unallocated, so a single repair shrinks the residue enough for an advantage to become a domination. To build the shares, we adapt the offline ε \varepsilon ε -consensus splitting algorithm of Alon and Graur [ [2 ] . It divides an interval into k k k parts, each worth nearly 1 / k 1/k 1/ k of each of t t t measures, using O ( t k log ( k / ε ) ) O(tk\log(k/\varepsilon)) O ( t k log ( k / ε )) cuts. Their algorithm can query the sum of the measures. Here we have access only to individual agents’ Robertson–Webb queries. We refine only the cells of the residue that are still split between several shares, and we cut each such cell at a weighted median of the agents’ half-value marks. One cut then reduces the cell’s total normalized value by a constant factor on both sides, so the cost is logarithmic in the required precision.
Organization. § 2 discusses related work, and § 3 sets up the model and domination. § 4 presents the whole protocol and proves Theorem 1, taking as given one lemma for each of its three subroutines. § 5 –§ 7 prove these lemmas in the order in which the steps run. § 5 gives the median algorithm for trimming and the cutter’s guarantee. § 6 and § 7 cover reassignment and repair. A three-agent example runs throughout. Appendix § 11 proves the matching test, and Appendix § 12 handles zero values and empty pieces. Appendix § 13 states the median algorithm for general curves. Appendix § 14 relates certified cake trimming to chore trimming and minimum-price equilibrium. Appendix § 15 applies the median algorithm to assignment markets with nonlinear utilities. Appendix § 16 carries the trimming and repair bounds over to chores. Appendix § 17 gives the interval implementation, and Appendix § 18 proves the sharper query bound for cake.
Related Work
Worst-case bounds for cake. The three-agent procedure of Selfridge and Conway uses only a bounded number of cuts [Robertson and Webb, 1998]. For an arbitrary number of agents, the 1995 protocol of Brams and Taylor [ [7 ] terminates on every input, with no uniform bound for a fixed number of agents. In 2009, Procaccia [2009] proved a general Ω ( n 2 ) \Omega(n^2) Ω ( n 2 ) query lower bound. In 2016, Aziz and Mackenzie [ [4 ] gave the first bounded discrete protocol for all n n n , with an upper bound that is a tower of six n n n ’s. In 2023, Sokolov [2023] modified and reanalyzed that protocol to obtain n 8 n 2 ( 1 + o ( 1 ) ) n^{8n^2(1+o(1))} n 8 n 2 ( 1 + o ( 1 )) queries. In September 2026, Ye and Bai [2026] reduced the bound to n O ( 1 ) 2 n n^{O(1)2^n} n O ( 1 ) 2 n by pruning partial allocations and making polynomially many calls to their variant of SubCore, the trimming subroutine of Aziz and Mackenzie [ [4 ] . The elementary protocol of Psomas [2026], posted in October, uses 2 O ( n log n ) 2^{O(n\log n)} 2 O ( n l o g n ) queries and organizes the construction around trimming, repair and domination. Theorem 1 gives a deterministic bound on every transcript. Bundles can be disconnected throughout. If each agent must receive a single interval, then for three or more agents no finite protocol guarantees a connected envy-free cake allocation [Stromquist, 2008].
The parallel history for chores. Oskui’s three-person procedures are described by Robertson and Webb [1998], and Peterson and Su [ [19 ] gave a four-person moving-knife procedure. Peterson and Su [ [20 ] used irrevocable advantages and reserves to obtain an unbounded discrete procedure for any n n n , and Dehghani et al. [ [10 ] gave the first bounded one. Farhadi and Hajiaghayi [ [14 ] proved an Ω ( n log n ) \Omega(n\log n) Ω ( n log n ) lower bound already for proportional chore allocation. Concurrently, the November 2026 revision of Farhadi and Hajiaghayi [ [15 ] adds a deterministic 2 n log 2 n + O ( n ) 2^{n\log_2 n+O(n)} 2 n l o g 2 n + O ( n ) chore protocol based on deferred compensation, and Aziz [ [3 ] proposes a single-exponential one. Appendix § 16 shows that our trimming and repair bounds give an O ( n 7 log n ) O(n^7\log n) O ( n 7 log n ) query bound in the chore protocol of Aziz [ [3 ] .
Probabilistic bounds and the lower bound. Chèze [2026] proved a polynomial bound with high probability over a distribution of preference profiles. In October 2026, Mackenzie and Suzuki [ [17 ] gave a randomized exact protocol for every profile with O ~ ( n 30 ) \widetilde{O}(n^{30}) O ( n 30 ) expected queries. Their research note of 12 November reports an improved bound of O ~ ( n 5 ) \widetilde{O}(n^5) O ( n 5 ) expected queries. In November, Farhadi and Hajiaghayi [ [15 ] obtained O ( n 12 log n ) O(n^{12}\log n) O ( n 12 log n ) expected queries for both cake and chores. They also proved a quadratic expected-query lower bound for protocols with fixed positive success probability, even when output endpoints can be chosen freely.
Origins of the protocol. Table 1 summarizes which ingredients come from earlier work. The framework is that of Aziz and Mackenzie [ [4 , 5 ] : a cutter divides the residue into equal pieces, trimming allocates part of it and leaves some piece whole, domination measures progress, and a dominated group takes the residue recursively. We follow Psomas [2026] in organizing a round into trimming, reassignment and repair. Our repair differs in two ways: a single call protects the existing bundles and shrinks the residue enough to preserve the advantage just created, and its cost is logarithmic rather than linear in the inverse tolerance. For this we adapt the fractional rounding method of Alon and Graur [ [2 ] to prescribed shares and cut shared cells at weighted medians. The trimming routine is new. Its matching formulation is closely related to the extremal competitive equilibria of Alaei et al. [ [1 ] (Appendix § 14 .§ 2 ). We compute the extremal solution with polynomially many queries by sharing grid queries among candidate assignments and filtering them with medians.
Medians in voting, facility location and division. For single-peaked preferences on a line and an odd electorate, the median peak is a majority winner [6 ] . Choosing a median reported location for one facility on a line is strategyproof and minimizes total distance [18 ] (Procaccia and Tennenholtz 2009). In proportional cake cutting, Even and Paz [ [13 ] split the agents at a median cut mark, and Cseh and Fleiner [ [9 ] cut at a weighted median of near-half marks, weighted by the agents’ entitlements. Trimming ranks value estimates from candidate assignments. Repair weights cut marks by each agent’s normalized value of the cell.
Table 1. Ingredients and their use in this paper.
Preliminaries
An instance is a tuple ( N , C , ( v i ) i ∈ N ) (N,C, (v_i)_{i\in N}) ( N , C , ( v i ) i ∈ N ) , where N = [ n ] N=[n] N = [ n ] is a finite set of agents, C = [ 0 , 1 ] C=[0,1] C = [ 0 , 1 ] is the cake, and each v i v_i v i is a finite, nonnegative, nonatomic, additive value measure. A nonnegative integrable value density is a special case. A piece is a finite union of intervals. Values need not be normalized. Multiplying an agent’s values by a positive constant preserves all her comparisons. Within a recursive call, n n n denotes the number of participating agents, relabeled as [ n ] [n] [ n ] . Its input cake may be disconnected. We state asymptotic query bounds for n ≥ 2 n \ge2 n ≥ 2 . With one agent, division and trimming both give her the whole piece.
An allocation X = ( X i ) i ∈ N X=(X_i)_{i\in N} X = ( X i ) i ∈ N consists of pairwise disjoint pieces, one per agent. Its residue is R = C ∖ ⋃ i X i R=C\setminus\bigcup_i X_i R = C ∖ ⋃ i X i . The allocation is complete if the residue is empty. The empty piece is permitted in a partial allocation. We consistently assign endpoints using half-open intervals, except for the right endpoint of the cake. Nonatomicity makes these endpoint choices irrelevant to values. An allocation X X X is envy-free if v i ( X i ) ≥ v i ( X j ) v_i(X_i)\ge v_i(X_j) v i ( X i ) ≥ v i ( X j ) for all agents i , j ∈ N i,j\in N i , j ∈ N . Thus each agent receives a bundle she values most. Envy-freeness compares allocated bundles and places no restriction on how agents value the residue. For partial allocations X X X and Y Y Y on disjoint parts of the cake, write X ⊕ Y X\oplus Y X ⊕ Y for the allocation giving X i ∪ Y i X_i\cup Y_i X i ∪ Y i to each agent. Additivity implies that the union of two envy-free allocations for the same agents is envy-free.
Domination. We measure progress by domination [4 , 5 ] , a form of irrevocable advantage [7 ] . In any envy-free partial allocation X X X with residue R R R , agent i i i dominates agent j j j if v i ( X i ) − v i ( X j ) ≥ v i ( R ) v_i(X_i)-v_i(X_j)\ge v_i(R) v i ( X i ) − v i ( X j ) ≥ v i ( R ) . A dominated group is a set ∅ ≠ G ⊆ N \varnothing\ne G\subseteq N ∅ = G ⊆ N such that every agent outside G G G dominates every member of G G G .
If i i i dominates j j j , giving the whole residue to j j j still creates no envy from i i i . Domination is also permanent under the operations we use. Adding an envy-free allocation Y Y Y of part of the residue preserves every existing domination: i i i ’s advantage over j j j changes by v i ( Y i ) − v i ( Y j ) ≥ 0 v_i(Y_i)-v_i(Y_j)\ge0 v i ( Y i ) − v i ( Y j ) ≥ 0 , while her value of the residue can only fall. § 4 shows that domination also survives when bundles change holders. Once a dominated group is found, the residue can be divided recursively among its members.
Queries and ordered pieces. An evaluation query returns v i ( [ x , y ] ) v_i([x,y]) v i ([ x , y ]) . A cut query specifies an agent i i i , a starting point x x x , and a feasible value w w w , and returns any y ≥ x y\ge x y ≥ x with v i ( [ x , y ] ) = w v_i([x,y])=w v i ([ x , y ]) = w [Robertson and Webb, 1998. All computation uses exact arithmetic on query answers. Ties in choices made by the protocol follow fixed orders.
A piece is an ordered list of disjoint component intervals. A prefix follows this order and a suffix is what remains after removing a prefix. The order may differ from the physical order on [ 0 , 1 ] [0,1] [ 0 , 1 ] . We write P + + Q P ++ Q P + + Q for concatenation. This lets Repair place buffers before a bundle, wherever those pieces lie physically. To cut a prefix with specified value, locate its component from the values already recorded. If the target is at an endpoint, we may select that endpoint. In particular, if the cutter assigns zero mass to her whole residue, she can take the first n − 1 n-1 n − 1 pieces empty and the last piece equal to the residue. Otherwise one ordinary cut within the component suffices. A suffix mark can be found in the same way by subtracting the target from the total value.
The protocol records every active agent’s value of each component interval, starting with at most n n n evaluations for the initial totals. At each new cut to be retained, one evaluation per agent gives the value of one part, and subtraction gives the other. Including the cut itself costs at most n + 1 n+1 n + 1 queries. During Trim, the input records stay fixed. Each trial suffix needs at most one query on its boundary component, and only the returned suffix boundaries enter the records for later calls.
The Protocol at a Glance
This section presents the whole protocol and proves Theorem 1. It treats the three subroutines Core, Reassign and Repair as black boxes. Each is described by a lemma stating exactly what the next step needs, and § 5 –§ 7 prove these lemmas. Table 2 summarizes one round, and Table 4 collects the main notation.
Table 4. Notation for one round of Divide and for certified trimming.
The main loop
Divide (Algorithm 1) starts with empty bundles and residue C C C . When a dominated group takes over the residue, its members carry their current bundles and component records into the recursive call. Everyone outside the group keeps her bundle. With one or two agents, the call divides the residue directly and adds the shares to their bundles. A larger group fixes a cutter for the call and repeats the steps of Figure 1 .
Labels and holders. Inside Core, a piece label j j j names the cutter’s piece P j P_j P j . Across a round of Divide, a bundle label j j j follows the old bundle X j X_j X j of agent j j j , even if it changes hands. Write σ ( j ) \sigma(j) σ ( j ) for its final holder. The two additions to that bundle are
X j → add Y π ( j ) D j = X j ∪ Y π ( j ) → add Z j W σ ( j ) = D j ∪ Z j . (1) X_j \xrightarrow{\text{add }Y_{\pi(j)}} D_j = X_j \cup Y_{\pi(j)} \xrightarrow{\text{add }Z_j} W_{\sigma(j)} = D_j \cup Z_j . \tag*{(1)} X j add Y π ( j ) D j = X j ∪ Y π ( j ) add Z j W σ ( j ) = D j ∪ Z j . (1)
Here Y i Y_i Y i is the suffix that Core gives agent i i i . Reassignment sends Y π ( j ) Y_{\pi(j)} Y π ( j ) to bundle label j j j , and Repair adds Z j Z_j Z j to it. At the next round the bundles are relabeled by their current holders.
What each step guarantees
Step ❶: the cutter. Core is the Core protocol (Aziz and Mackenzie, [4 , 5 ] ), with our trimming routine in place of SubCore. In Core(r , N , C r,N,C r , N , C ), agent r r r cuts C C C into n n n pieces of equal value to her, and Trim gives each agent a suffix of a different piece without envy (§ 5 ). Trim uses O ( n 5 log n ) O(n^5 \log n) O ( n 5 log n ) queries (Lemma 7 ). A certified trim keeps some piece whole, though not necessarily the cutter’s. That piece is worth v r ( C ) / n v_r(C)/n v r ( C ) / n to her and no suffix is worth more, so by envy-freeness her own suffix is worth exactly v r ( C ) / n v_r(C)/n v r ( C ) / n . Her advantage over the holder of any other piece is therefore her value of what was trimmed off that piece. These trimmed-off parts make up the residue U U U , so if v r ( U ) > 0 v_r(U)>0 v r ( U ) > 0 she has an advantage of at least v r ( U ) / ( n − 1 ) v_r(U)/(n-1) v r ( U ) / ( n − 1 ) over some holder of a trimmed piece.
Lemma 1 (Cutter’s advantage; proved in Section 5.6). For every agent r r r and piece C C C , Core(r , N , C r,N,C r , N , C ) returns an envy-free allocation Y Y Y of parts of C C C , with residue U ⊆ C U \subseteq C U ⊆ C , using one
ALGORITHM 1: Divide(N N N , R R R , X X X )
Input: A nonempty agent set N N N , an ordered residue R R R and current envy-free bundles X X X . Initially R = C R = C R = C and all bundles are empty.
Output: A complete envy-free allocation of R ∪ ⋃ i ∈ N X i R \cup\bigcup_{i\in N} X_i R ∪ ⋃ i ∈ N X i among N N N .
if ∣ N ∣ = 1 |N| = 1 ∣ N ∣ = 1 then return the sole bundle with R R R added
if ∣ N ∣ = 2 |N| = 2 ∣ N ∣ = 2 then
Divide R R R by cut-and-choose. return X X X with each share added to its recipient’s bundle
Choose a cutter r ∈ N r \in N r ∈ N using the fixed agent order
while true do
① ( Y , U ) ← Core ( r , N , R ) (Y,U) \leftarrow\operatorname{Core}(r,N,R) ( Y , U ) ← Core ( r , N , R ) ▹ Lemma 1
② if ( X ⊕ Y , U ) (X \oplus Y,U) ( X ⊕ Y , U ) has a dominated group G G G then ▹ graph search, § 4.2
⑤ Set V ← X ⊕ Y V \leftarrow X \oplus Y V ← X ⊕ Y and W ← Divide ( G , U , V ∣ G ) W \leftarrow\operatorname{Divide}(G,U,V|_G) W ← Divide ( G , U , V ∣ G )
return W W W on G G G and V V V on N ∖ G N \setminus G N ∖ G
③ ( a , b , π , α ) ← Reassign ( r , X , Y , U ) (a,b,\pi,\alpha) \leftarrow\operatorname{Reassign}(r,X,Y,U) ( a , b , π , α ) ← Reassign ( r , X , Y , U ) , and set D i ← X i ∪ Y π ( i ) D_i \leftarrow X_i \cup Y_{\pi(i)} D i ← X i ∪ Y π ( i ) for every i i i ▹ Lemma 2
④ ( W , σ , R ′ ) ← Repair ( N , D , U , α ) (W,\sigma,R') \leftarrow\operatorname{Repair}(N,D,U,\alpha) ( W , σ , R ′ ) ← Repair ( N , D , U , α ) , and set ( X , R ) ← ( W , R ′ ) (X,R) \leftarrow(W,R') ( X , R ) ← ( W , R ′ ) ▹ Lemmas 3 and 5
Table 2. One round of Divide. The column “afterwards” lists everything that the next step relies on.
call to Trim and O ( n 2 ) O(n^2) O ( n 2 ) other queries, so O ( n 5 log n ) O(n^5 \log n) O ( n 5 log n ) queries in all. The cutter’s suffix satisfies v r ( Y r ) = v r ( C ) / n v_r(Y_r)=v_r(C)/n v r ( Y r ) = v r ( C ) / n . If v r ( U ) > 0 v_r(U)>0 v r ( U ) > 0 , then v r ( Y r ) − v r ( Y h ) ≥ v r ( U ) / ( n − 1 ) v_r(Y_r)-v_r(Y_h)\ge v_r(U)/(n-1) v r ( Y r ) − v r ( Y h ) ≥ v r ( U ) / ( n − 1 ) for some agent h ≠ r h\ne r h = r .
Step ②: testing for a dominated group. The non-domination graph Γ \Gamma Γ of an envy-free allocation has an arc i → j i \to j i → j whenever i ≠ j i \ne j i = j and i i i does not dominate $j (it is the complement of the domination graph of Aziz and Mackenzie [5 ] , Fig. 4). A proper source strongly connected component of Γ \Gamma Γ is a dominated group, because no arc enters it. Conversely, a dominated group has no incoming arc, so Γ \Gamma Γ cannot be strongly connected. We can therefore find such a group, or establish that none exists, using a standard graph search. If none exists, every agent values the residue positively. Indeed, an agent with zero value for it dominates everyone else, and the other agents then form a dominated group.
Step ③: a new advantage. The cutter’s advantage may be useless for progress, because she may already dominate the agent h h h of Lemma 1. Step ③ finds an advantage of some agent a a a over the bundle on a label b b b that she does not yet dominate. It may pass the new suffixes around a cycle to do so, at the price of a little envy, measured by a tolerance α \alpha α . With K = 4 n 2 K = 4n^2 K = 4 n 2 , the advantage is at least K − 1 K - 1 K − 1 times this envy, which is what step ④ needs.
Lemma 2 (A useful reassignment; proved in Section 6). Let ( X , R ) (X,R) ( X , R ) be envy-free and let ( Y , U ) = Core ( r , N , R ) (Y,U) = \operatorname{Core}(r,N,R) ( Y , U ) = Core ( r , N , R ) . If ( X ⊕ Y , U ) (X \oplus Y,U) ( X ⊕ Y , U ) has no dominated group, then v i ( U ) > 0 v_i(U) > 0 v i ( U ) > 0 for every i i i , and Reassign, using only recorded values, finds agents a , b a,b a , b with a a a not dominating b b b in ( X , R ) (X,R) ( X , R ) , a permutation π \pi π , and K − ( n + 1 ) ≤ α ≤ K − 2 K^{-(n+1)} \le\alpha\le K^{-2} K − ( n + 1 ) ≤ α ≤ K − 2 such that the bundles D i = X i ∪ Y π ( i ) D_i = X_i \cup Y_{\pi(i)} D i = X i ∪ Y π ( i ) satisfy
v i ( D i ) ≥ v i ( D j ) − α v i ( U ) ( i , j ∈ N ) , v a ( D a ) − v a ( D b ) ≥ ( K − 1 ) α v a ( U ) . (2) \begin{aligned}
v_i(D_i) &\ge v_i(D_j) - \alpha v_i(U) \qquad(i,j \in N),\\
v_a(D_a) - v_a(D_b) &\ge(K-1)\alpha v_a(U). \tag*{(2)}
\end{aligned} v i ( D i ) v a ( D a ) − v a ( D b ) ≥ v i ( D j ) − α v i ( U ) ( i , j ∈ N ) , ≥ ( K − 1 ) α v a ( U ) . (2)
Step ④: repair. Repair receives the slightly envious bundles D j D_j D j and the residue U U U . It removes the envy without cutting into any D j D_j D j , and allocates nearly all of U U U , adding nearly the same value to every bundle in every agent’s eyes. Its output may move a bundle to a new holder.
Lemma 3 (Repair; proved in Section 7). Let D D D be a partial allocation with residue U U U , and let 0 < α ≤ 1 / ( 8 n 2 ) 0 < \alpha\le1/(8n^2) 0 < α ≤ 1/ ( 8 n 2 ) . Suppose v i ( U ) > 0 v_i(U) > 0 v i ( U ) > 0 and v i ( D i ) ≥ v i ( D j ) − α v i ( U ) v_i(D_i) \ge v_i(D_j)-\alpha v_i(U) v i ( D i ) ≥ v i ( D j ) − α v i ( U ) for all i , j i,j i , j . Then Repair( N , D , U , α ) (N,D,U,\alpha) ( N , D , U , α ) returns an envy-free allocation W W W , a bijection σ \sigma σ from labels to final holders, and disjoint additions Z j ⊆ U Z_j \subseteq U Z j ⊆ U such that W σ ( j ) = D j ∪ Z j W_{\sigma(j)} = D_j \cup Z_j W σ ( j ) = D j ∪ Z j . Its residue R ′ R' R ′ satisfies, for every agent i i i and labels j , l j,l j , l ,
v i ( R ′ ) ≤ 2 n 2 α v i ( U ) , ∣ v i ( Z j ) − v i ( Z l ) ∣ ≤ 2 n α v i ( U ) . v_i(R') \le2n^2\alpha v_i(U), \qquad\lvert v_i(Z_j)-v_i(Z_l)\rvert\le2n\alpha v_i(U). v i ( R ′ ) ≤ 2 n 2 α v i ( U ) , ∣ v i ( Z j ) − v i ( Z l )∣ ≤ 2 n α v i ( U ) .
The procedure uses one call to Trim and O ( n 4 log ( n 4 / α ) ) O(n^4\log(n^4/\alpha)) O ( n 4 log ( n 4 / α )) other queries.
Domination follows its label
The same agent need not keep a bundle throughout the protocol. We therefore follow the label of each old bundle when counting progress. The next lemma shows that a domination of a bundle passes to whoever holds it next, as long as the bundle only grows by cake taken from the residue.
Lemma 4 (Domination follows its label). Let ( X , R ) (X,R) ( X , R ) be envy-free, and let W W W be an envy-free allocation with residue R ′ ⊆ R R' \subseteq R R ′ ⊆ R . Suppose that, for a bijection σ \sigma σ , each bundle W σ ( j ) W_{\sigma(j)} W σ ( j ) consists of X j X_j X j and pieces of R ∖ R ′ R \setminus R' R ∖ R ′ . If agent i i i dominates j j j in ( X , R ) (X,R) ( X , R ) , then i i i dominates σ ( j ) \sigma(j) σ ( j ) in ( W , R ′ ) (W,R') ( W , R ′ ) .
Proof. Envy-freeness and the inclusion X i ⊆ W σ ( i ) X_i \subseteq W_{\sigma(i)} X i ⊆ W σ ( i ) give v i ( W i ) ≥ v i ( W σ ( i ) ) ≥ v i ( X i ) v_i(W_i) \ge v_i(W_{\sigma(i)}) \ge v_i(X_i) v i ( W i ) ≥ v i ( W σ ( i ) ) ≥ v i ( X i ) . Since W σ ( j ) W_{\sigma(j)} W σ ( j ) consists of X j X_j X j and pieces of R ∖ R ′ R \setminus R' R ∖ R ′ , we obtain
v i ( W i ) − v i ( W σ ( j ) ) ≥ v i ( X i ) − v i ( W σ ( j ) ) ≥ v i ( X i ) − v i ( X j ) − v i ( R ∖ R ′ ) . v_i(W_i)-v_i(W_{\sigma(j)}) \ge v_i(X_i)-v_i(W_{\sigma(j)}) \ge v_i(X_i)-v_i(X_j)-v_i(R \setminus R'). v i ( W i ) − v i ( W σ ( j ) ) ≥ v i ( X i ) − v i ( W σ ( j ) ) ≥ v i ( X i ) − v i ( X j ) − v i ( R ∖ R ′ ) .
If i i i dominates j j j in ( X , R ) (X,R) ( X , R ) , the right-hand side is at least v i ( R ) − v i ( R ∖ R ′ ) = v i ( R ′ ) v_i(R)-v_i(R \setminus R') = v_i(R') v i ( R ) − v i ( R ∖ R ′ ) = v i ( R ′ ) .
Distinct labels have distinct holders, so no agent’s number of dominated agents decreases when bundles change hands.
Progress, and the proof of Theorem 1
Each round turns the advantage from step ③ into a domination. The choice K = 4 n 2 K = 4n^2 K = 4 n 2 leaves enough of the advantage to cover the final residue. From agent a a a ’s perspective, in units of α v a ( U ) \alpha v_a(U) α v a ( U ) , the bounds of Lemmas 2 and 3 are
Table 1 (PDF p. 10).
Since K − 1 − 2 n ≥ 2 n 2 K-1-2n \ge2n^2 K − 1 − 2 n ≥ 2 n 2 for n ≥ 2 n \ge2 n ≥ 2 , the advantage becomes a domination. We count it alongside the dominations inherited by the final holders of the old bundles.
Lemma 5 (Progress in one round). Every iteration of Divide that proceeds past step ② preserves envy-freeness and strictly increases the number of dominated pairs
Φ ( X , R ) = ∣ { ( i , j ) ∈ N 2 : v i ( X i ) − v i ( X j ) ≥ v i ( R ) } ∣ . \Phi(X,R)=\left|\left\{(i,j)\in N^2:v_i(X_i)-v_i(X_j)\ge v_i(R)\right\}\right|. Φ ( X , R ) = { ( i , j ) ∈ N 2 : v i ( X i ) − v i ( X j ) ≥ v i ( R ) } . Consequently, before recursing, Divide makes O ( n 2 ) O(n^2) O ( n 2 ) calls each to Core and Repair.
Proof. Repair applies and restores envy-freeness. Lemma 2 gives exactly the input envy bound of Lemma 3, with the same α \alpha α . It also gives v i ( U ) > 0 v_i(U)>0 v i ( U ) > 0 and α ≤ K − 2 ≤ 1 / ( 8 n 2 ) \alpha\le K^{-2}\le1/(8n^2) α ≤ K − 2 ≤ 1/ ( 8 n 2 ) . Thus repair returns an envy-free allocation W W W with residue R ′ R' R ′ and keeps each old bundle on its label, as in (1).
The surviving advantage creates a new domination. Let σ ( j ) \sigma(j) σ ( j ) be the final holder of label j j j . Agent a a a may change labels, but envy-freeness gives v a ( W a ) ≥ v a ( W σ ( a ) ) v_a(W_a)\ge v_a(W_{\sigma(a)}) v a ( W a ) ≥ v a ( W σ ( a ) ) . Hence Lemmas 2 and 3 imply
v a ( W a ) − v a ( W σ ( b ) ) ≥ v a ( D a ) − v a ( D b ) + v a ( Z a ) − v a ( Z b ) ≥ ( K − 1 − 2 n ) α v a ( U ) ≥ 2 n 2 α v a ( U ) ≥ v a ( R ′ ) . \begin{aligned}
v_a(W_a)-v_a(W_{\sigma(b)}) &\ge v_a(D_a)-v_a(D_b)+v_a(Z_a)-v_a(Z_b)\\
&\ge(K-1-2n)\alpha v_a(U)\\
&\ge2n^2\alpha v_a(U)\ge v_a(R').
\end{aligned} v a ( W a ) − v a ( W σ ( b ) ) ≥ v a ( D a ) − v a ( D b ) + v a ( Z a ) − v a ( Z b ) ≥ ( K − 1 − 2 n ) α v a ( U ) ≥ 2 n 2 α v a ( U ) ≥ v a ( R ′ ) .
Agent a a a therefore dominates the final holder of label b b b , although she did not dominate b b b in ( X , R ) (X,R) ( X , R ) .
The domination count increases. Each final bundle W σ ( j ) = X j ∪ Y π ( j ) ∪ Z j W_{\sigma(j)}=X_j\cup Y_{\pi(j)}\cup Z_j W σ ( j ) = X j ∪ Y π ( j ) ∪ Z j consists of X j X_j X j and pieces of R ∖ R ′ R\setminus R' R ∖ R ′ . By Lemma 4, the map ( i , j ) ↦ ( i , σ ( j ) ) (i,j)\mapsto(i,\sigma(j)) ( i , j ) ↦ ( i , σ ( j )) sends old dominated pairs to final dominated pairs. It is injective because σ \sigma σ is a bijection. The final pair ( a , σ ( b ) ) (a,\sigma(b)) ( a , σ ( b )) lies outside its image, since its only possible preimage is ( a , b ) (a,b) ( a , b ) and a a a did not dominate b b b in ( X , R ) (X,R) ( X , R ) . Hence Φ ( W , R ′ ) ≥ Φ ( X , R ) + 1 \Phi(W,R')\ge\Phi(X,R)+1 Φ ( W , R ′ ) ≥ Φ ( X , R ) + 1 . The count includes self-pairs and is at most n 2 n^2 n 2 . Each iteration that proceeds past step ② calls each subroutine once, and the returning iteration makes one final Core call. □
Proof of Theorem 1. Call an agent frozen once a recursive call proceeds without her. We show that the full allocation is envy-free and every frozen agent dominates every active agent after each completed update. Initially all bundles are empty and all agents are active. Write X , R X,R X , R and W , R ′ W,R' W , R ′ for the full allocations and residues before and after an update. By (1), each active label j j j passes to a holder σ ( j ) \sigma(j) σ ( j ) with W σ ( j ) = X j ∪ B j W_{\sigma(j)}=X_j\cup B_j W σ ( j ) = X j ∪ B j for some B j ⊆ R ∖ R ′ B_j\subseteq R\setminus R' B j ⊆ R ∖ R ′ . For a Core step alone or the final division, take σ \sigma σ to be the identity. Among the active agents, adding the envy-free shares from Core or the final division preserves envy-freeness by additivity, and Lemma 3 gives it after a repaired round. Hence v i ( W i ) ≥ v i ( W σ ( i ) ) ≥ v i ( X i ) v_i(W_i)\ge v_i(W_{\sigma(i)})\ge v_i(X_i) v i ( W i ) ≥ v i ( W σ ( i ) ) ≥ v i ( X i ) , so an active agent i i i still prefers her bundle weakly to every frozen bundle. For a frozen agent f f f and an active label j j j , prior domination gives
v f ( W f ) − v f ( W σ ( j ) ) = v f ( X f ) − v f ( X j ) − v f ( B j ) ≥ v f ( R ) − v f ( B j ) ≥ v f ( R ′ ) . v_f(W_f)-v_f(W_{\sigma(j)})=v_f(X_f)-v_f(X_j)-v_f(B_j)\ge v_f(R)-v_f(B_j)\ge v_f(R'). v f ( W f ) − v f ( W σ ( j ) ) = v f ( X f ) − v f ( X j ) − v f ( B j ) ≥ v f ( R ) − v f ( B j ) ≥ v f ( R ′ ) .
When the active set shrinks, the group test gives the same domination for each newly frozen agent. Comparisons between frozen agents stay fixed. The final one- or two-agent call allocates the entire residue.
Let Φ \Phi Φ count dominated pairs among the original n n n agents throughout, as in Lemma 5 . Extend σ \sigma σ by the identity on frozen agents. Lemma 4 maps old dominated pairs injectively to final ones by ( i , j ) ↦ ( i , σ ( j ) ) (i,j)\mapsto(i,\sigma(j)) ( i , j ) ↦ ( i , σ ( j )) . Each repaired round adds the pair ( a , σ ( b ) ) (a,\sigma(b)) ( a , σ ( b )) outside this image, by the proof of Lemma 5 on the active set. A round that shrinks the active set cannot decrease Φ \Phi Φ . Thus there are at most n 2 n^2 n 2 repaired rounds in total and at most n − 1 n-1 n − 1 rounds that shrink the active set.
Counting queries. In a round with m ≥ 3 m \ge3 m ≥ 3 active agents, Lemma 2 gives log ( 1 / α ) ≤ ( m + 1 ) log ( 4 m 2 ) \log(1/\alpha) \le(m+1)\log(4m^2) log ( 1/ α ) ≤ ( m + 1 ) log ( 4 m 2 ) . The cutter uses one certified trim and O ( m 2 ) O(m^2) O ( m 2 ) queries for its cuts and records. Repair uses one certified trim and O ( m 4 log ( m 4 / α ) ) O(m^4\log(m^4/\alpha)) O ( m 4 log ( m 4 / α )) other queries by Lemma 3. A round thus costs O ( m 5 log m ) O(m^5\log m) O ( m 5 log m ) queries, including evaluations of its retained boundaries. Reassignment, the domination test and cycle searches use the recorded table. The base cases use the component records and at most a constant number of additional queries. Including the O ( n ) O(n) O ( n ) initial evaluations, the overall bound is
O ( n ) + ( n 2 + n − 1 ) O ( n 5 log n ) = O ( n 7 log n ) . O(n) + (n^2+n-1)O(n^5\log n)=O(n^7\log n). O ( n ) + ( n 2 + n − 1 ) O ( n 5 log n ) = O ( n 7 log n ) .
Only retained boundaries enter later calls (§ 3 ), so there are polynomially many physical interval records. The direct trimming implementation contributes at most n ! n O ( 1 ) n!n^{O(1)} n ! n O ( 1 ) exact operations over the full protocol, and all remaining arithmetic is polynomial in the records and n n n . □
The running example, one round
Three agents divide C = [ 0 , 1 ] C=[0,1] C = [ 0 , 1 ] , with values spread evenly within each third and totals as in Figure 2 . We follow the first round, step by step.
Agent 1 is the cutter, and her equal-value pieces are the thirds P 1 P_1 P 1 , P 2 P_2 P 2 , P 3 P_3 P 3 . Agents 2 and 3 both value P 3 P_3 P 3 most, so no allocation of whole thirds is envy-free. Core keeps P 1 P_1 P 1 and P 2 P_2 P 2 whole and the last half of P 3 P_3 P 3 (Figure 2 ; § 5 shows how Trim finds this). The residue U U U is the first half of P 3 P_3 P 3 , worth 1 / 2 1/2 1/2 , 2 2 2 and 5 / 2 5/2 5/2 to the three agents. Agent 1 values her own piece above agent 3’s half by 1 / 2 1/2 1/2 , twice the bound v 1 ( U ) / 2 v_1(U)/2 v 1 ( U ) /2 of Lemma 1.
Agent 1 dominates agent 3, since her advantage of 1 / 2 1/2 1/2 equals v 1 ( U ) v_1(U) v 1 ( U ) . Nobody else dominates anybody. For instance, agent 3’s largest advantage, 3 / 2 3/2 3/2 over agent 1, is below v 3 ( U ) = 5 / 2 v_3(U)=5/2 v 3 ( U ) = 5/2 , and agent 2’s, 1 1 1 over agent 1, is below v 2 ( U ) = 2 v_2(U)=2 v 2 ( U ) = 2 . So Γ \Gamma Γ has every arc except 1 → 3 1\to3 1 → 3 , and it is strongly connected through the cycle 1 → 2 → 3 → 1 1\to2\to3\to1 1 → 2 → 3 → 1 .
Here K = 36 K=36 K = 36 . The cutter’s advantage is over agent 3, whom she already dominates, so it cannot create a new domination. The arcs 2 → 1 2\to1 2 → 1 , 3 → 1 3\to1 3 → 1 and 3 → 2 3\to2 3 → 2 , however, carry large advantages, so Reassign moves nothing (case 1 in § 6 ). Taking the first arc in a fixed order, it selects a = 2 a=2 a = 2 , b = 1 b=1 b = 1 , the identity permutation and α = K − 2 = 1 / 1296 \alpha=K^{-2}=1/1296 α = K − 2 = 1/1296 ; the other two arcs would give the same permutation and tolerance. Thus D = Y D=Y D = Y : label 1 carries P 1 P_1 P 1 , label 2 carries P 2 P_2 P 2 , and label 3 carries agent 3’s half of P 3 P_3 P 3 .
Repair adds to each label a large share and two buffers, which together are worth nearly a third of each agent’s value of U U U (Figure 7 ). By Lemma 3, the additions differ by at most 2 n α = 1 / 216 2n\alpha=1/216 2 n α = 1/216 of each agent’s value of U U U , and the new residue is worth at most $2n^2\alpha=1/72
Figure 7. Repair in the running example (not to scale), in the first round, where D = Y D=Y D = Y . Label 1 carries agent 1’s piece D 1 = P 1 D_1=P_1 D 1 = P 1 , label 2 carries agent 2’s piece D 2 = P 2 D_2=P_2 D 2 = P 2 , and label 3 carries agent 3’s suffix D 3 D_3 D 3 (the last half of P 3 P_3 P 3 ). Left: each label carries two buffers Q j , 2 , Q j , 1 Q_{j,2},Q_{j,1} Q j , 2 , Q j , 1 , its input bundle D j D_j D j and a large share T j T_j T j . With exact common shares nothing would be trimmed. The cut shown, in an outer buffer, is one possible outcome of the rounding, and the level counts the whole buffers kept. In every outcome each protected part D j ∪ T j D_j\cup T_j D j ∪ T j survives. Right: in every outcome agents 2 and 3 both dominate agent 1, so { 1 } \{1\} { 1 } is a dominated group (§ 4.5 ). Here arrows show domination, unlike the arcs of the non-domination graph.
of that value. Since v 2 ( U ) = 2 v_2(U)=2 v 2 ( U ) = 2 , agent 2’s advantage of 1 over label 1 becomes a domination:
v 2 ( W 2 ) − v 2 ( W σ ( 1 ) ) ≥ 1 − 1 108 > 1 36 ≥ v 2 ( R ′ ) . v_2(W_2)-v_2(W_{\sigma(1)}) \ge1-\frac{1}{108}>\frac{1}{36}\ge v_2(R'). v 2 ( W 2 ) − v 2 ( W σ ( 1 ) ) ≥ 1 − 108 1 > 36 1 ≥ v 2 ( R ′ ) .
In units of v 3 ( U ) v_3(U) v 3 ( U ) , agent 3’s smaller advantage over labels 1 and 2 is ( 5 / 2 − 2 ) / ( 5 / 2 ) = 1 / 5 (5/2-2)/(5/2)=1/5 ( 5/2 − 2 ) / ( 5/2 ) = 1/5 . After repair, label 3 is still ahead of both by at least 1 / 5 − 1 / 216 > 1 / 72 1/5-1/216>1/72 1/5 − 1/216 > 1/72 . Envy-freeness therefore gives her label 3, and she dominates both other holders. The displayed inequality excludes agent 2 from label 1, so she holds label 2 and agent 1 holds label 1. Agent 1’s earlier domination of agent 3 persists by Lemma 4 applied to ( Y , U ) (Y,U) ( Y , U ) .
⑤ Hence { 1 } \{1\} { 1 } is a dominated group: agents 2 and 3 both dominate agent 1. Adding the envy-free allocation of the next Core call preserves these dominations, so the test in the second round finds a dominated group, and Divide recurses after that call.
Trimming and the Cutter
This section proves Lemma 1 (step ①). Its main part is the trimming routine Trim, which Core uses in step ① and Repair uses again in step ④. Trimming a piece of cake makes it less attractive to everyone. We therefore seek an envy-free allocation in which each trim is justified by an indifference: some earlier holder values the trimmed suffix exactly as much as her own.
The section is organized as follows. Section 5.1 defines certified allocations and gives a counting test for them, and Section 5.2 shows that their suffixes are unique on positive inputs. Section 5.3 turns the counting test into a matching condition by adding one extra node, the pin, that stands for “whole”. Section 5.4 restates this condition in terms of the agents’ values, and Section 5.5 computes the certified values with the median algorithm. Section 5.6 returns to the cutter.
Certified suffix allocations
A suffix allocation gives each agent a suffix of a different labeled piece. A label names the input piece, and its holder is the agent who receives the suffix. We index suffixes by label: S j S_j S j is the suffix on label j j j , and σ ( j ) \sigma(j) σ ( j ) is its holder, so agent σ ( j ) \sigma(j) σ ( j ) ’s bundle is S j S_j S j . A suffix is trimmed if some of its piece was cut off, and whole otherwise. The allocation is certified if it is envy-free and the holders can be ordered so that each receives a whole piece or a suffix that some earlier holder values exactly as much as the suffix held by that earlier holder. Following these indifferences backwards leads to a whole piece.
Running example. Inside Core, label j j j denotes the cutter’s j j j th piece. In Figure 2 this is the j j j th third, P j P_j P j . (Inside Repair, and in Section 4.5, labels are old bundles instead.) The certified allocation keeps P 1 P_1 P 1 and P 2 P_2 P 2 whole and the last half of P 3 P_3 P 3 . Agents 1 and 2 hold labels 1 and 2 whole. Agent 3 holds label 3, and agent 2 values its half exactly as much as P 2 P_2 P 2 . So the order 1, 2, 3 certifies the allocation.
A counting test. Whether an allocation is certified can be read off from the suffixes alone. For an envy-free suffix allocation S S S , let M i ( S ) \mathcal{M}_i(S) M i ( S ) be the set of labels j j j maximizing v i ( S j ) v_i(S_j) v i ( S j ) , agent i i i ’s favorite labels. The next lemma characterizes certified suffix allocations.
Lemma 6 (Certification test). An envy-free suffix allocation S S S is certified if and only if every nonempty set H H H of trimmed labels satisfies
∣ { i : M i ( S ) ∩ H ≠ ∅ } ∣ > ∣ H ∣ . (3) \left|\{i:\mathcal{M}_i(S)\cap H\ne\varnothing\}\right|>|H|. \tag*{(3)} ∣ { i : M i ( S ) ∩ H = ∅ } ∣ > ∣ H ∣. (3) In words, every set of trimmed labels contains a favorite label of more agents than it has labels.
Proof. Suppose S S S is certified, and fix H H H . By envy-freeness, the ∣ H ∣ |H| ∣ H ∣ holders of H H H -labels are counted on the left of (3) . In a certifying order, the earliest holder of an H H H -label holds a trimmed suffix, so an earlier holder values it as much as her own suffix, and it is one of her favorites. She holds a label outside H H H and is counted too, giving the strict inequality. Conversely, draw an arc from each holder to the holders of the labels she ties with her own. If some holders cannot be reached from a whole piece, their labels form a nonempty set H H H of trimmed labels that no arc enters. An agent with a favorite label in H H H must then hold a label in H H H , so only ∣ H ∣ |H| ∣ H ∣ agents are counted, contrary to (3) . Ordering holders by distance from a whole piece now gives a certificate.
If all n n n labels were trimmed, taking H H H to be all labels in (3) would require more than n n n agents. Thus at least one piece stays whole. In the running example, M 1 = { 1 , 2 } M_1 = \{1, 2\} M 1 = { 1 , 2 } , M 2 = { 2 , 3 } M_2 = \{2, 3\} M 2 = { 2 , 3 } and M 3 = { 3 } M_3 = \{3\} M 3 = { 3 } . The only nonempty set of trimmed labels is H = { 3 } H = \{3\} H = { 3 } , which contains a favorite label of agents 2 and 3: two agents for one label.
Lemma 7 (Polynomial-query certified trimming). Given each agent’s component values on n n n disjoint ordered pieces, Trim returns an envy-free suffix allocation and a certifying order in O ( n 5 log n ) O(n^5 \log n) O ( n 5 log n ) deterministic Robertson–Webb queries. The bound includes empty pieces and zero-valued intervals.
Call an input positive if each piece consists of one or more intervals of positive length and every agent assigns positive value to every interval of positive length. Each piece then has positive total interval length. We first prove the bound on these inputs. Appendix B handles general valuations and pieces, including isolated endpoint components, by running the algorithm on virtual positive curves and projecting its certificate back to the physical pieces.
Uniqueness of certified suffixes
On positive inputs, all certified allocations have the same suffixes, although two agents with the same values may exchange them, as in the example below. This gives the algorithm a single vector of suffixes to find. Without positivity this fails: if two identical agents value each of two pieces at one and a positive-length prefix of the second at zero, cuts at different points in that prefix give distinct suffixes, each worth exactly as much as the whole first piece to both agents.
Proposition 1 (Greatest suffixes). Assume positive inputs, and let S S S be a certified allocation. On every label, S S S has the longest suffix of any envy-free suffix allocation of the same pieces to the same agents, whoever holds it. Consequently, all certified allocations have the same suffixes, though possibly different holders.
Proof. Let S ′ S' S ′ be an envy-free suffix allocation, and let H H H be the set of labels whose suffixes are longer in S ′ S' S ′ than in S S S . If H H H is nonempty, all its labels are trimmed in S S S , so Lemma 6 gives more than ∣ H ∣ |H| ∣ H ∣ agents with a favorite label in H H H . For any such agent i i i , take a favorite k ∈ H k \in H k ∈ H . For every l ∉ H l \notin H l ∈ / H , strict growth gives
v i ( S k ′ ) > v i ( S k ) ≥ v i ( S l ) ≥ v i ( S l ′ ) . v_i(S'_k) > v_i(S_k) \ge v_i(S_l) \ge v_i(S'_l). v i ( S k ′ ) > v i ( S k ) ≥ v i ( S l ) ≥ v i ( S l ′ ) .
Envy-freeness of S ′ S' S ′ therefore requires each of these agents to hold a label in H H H , but there are only ∣ H ∣ |H| ∣ H ∣ such labels. Thus no suffix is longer in S ′ S' S ′ . Applying this conclusion in both directions to two certified allocations gives equality on every label.
Two agents. Restrict the running example to agents 2 and 3 and pieces P 1 , P 3 P_1, P_3 P 1 , P 3 . Both value P 3 P_3 P 3 most, so one takes P 1 P_1 P 1 whole and the other a suffix of P 3 P_3 P 3 that the first values exactly as much as P 1 P_1 P 1 : the last quarter if agent 2 holds P 1 P_1 P 1 , or the last fifth if agent 3 does. Only the quarter works: if agent 2 held the fifth, she would envy agent 3, since the fifth is worth 4 / 5 < 1 4/5 < 1 4/5 < 1 to her. The quarter is also the longer suffix, as Proposition 1 predicts. On P 1 , P 2 P_1, P_2 P 1 , P 2 instead, the two agents have the same values, so the last half of P 2 P_2 P 2 is worth exactly as much as P 1 P_1 P 1 to both, and either agent can hold either piece: two certified allocations with the same suffixes.
Certification as a matching condition
Lemma 6 is a counting condition of the kind that appears in Hall’s marriage theorem, and it becomes a matching condition once whole pieces are marked explicitly. Let S S S be an envy-free suffix allocation, and form its tie graph. This bipartite graph has a node for each label on one side and, on the other side, a node for each agent and one extra node o o o , the pin. Join label j j j to agent i i i if j j j is one of her favorite labels, and join j j j to the pin if S j S_j S j is whole. The holders form a perfect matching between labels and agents, which leaves the pin uncovered.
Now count neighbors in this graph. By Lemma 6, S S S is certified exactly when every nonempty set of trimmed labels has more neighbors than members. A set of labels that contains a whole label has this property anyway, since its neighbors include its holders and the pin. Thus S S S is certified exactly when every nonempty set of labels has more neighbors than members. By Hall’s theorem, this holds exactly when, for each node c c c among the agents and the pin, the labels can be matched to the other n n n nodes along edges of the tie graph. Indeed, the strict neighbor inequality survives the deletion of any one node as Hall’s weak inequality. Conversely, if such a matching exists after every deletion, choose one neighbor c c c of a fixed nonempty set of labels and apply Hall’s inequality after deleting c c c to recover the strict inequality.
Such matchings are certificates. Superpose the holders’ matching with a matching that leaves agent i i i uncovered, and alternate between the two, starting from i i i . Agent i i i ’s label is joined to a second agent, who values it exactly as much as her own suffix; that agent’s label is joined to a third, and so on, until we reach a label joined to the pin, that is, a whole piece. Read backwards, this alternating path is a chain of ties from a whole piece to i i i ’s suffix. Figure 3 shows the tie graph of the running example. The median algorithm searches for values of the agents at which a graph of this kind admits all of these matchings.
Figure 3. The tie graph of the certified allocation of the running example (Figure 2 ). Each piece is joined to the agents for whom it is a favorite and, if it is whole, to the pin o o o . (a) The holders (blue) form a perfect matching that leaves the pin uncovered; the values are the agents’ favorite values. (b) A matching (dashed red) that leaves agent 3 uncovered. With the holders’ edges it forms the alternating path 3, P 3 P_3 P 3 , 2, P 2 P_2 P 2 , o o o : agent 3’s half of P 3 P_3 P 3 is tied by agent 2, whose piece P 2 P_2 P 2 is whole. Read backwards, this is the certificate of agent 3’s trim. The allocation is certified exactly because such a matching exists for every agent and for the pin.
From suffixes to values
The median algorithm searches over the agents’ values rather than over suffixes, because values determine suffixes. Let V i j ( t ) V_{ij}(t) V ij ( t ) be agent i i i ’s value of the suffix of piece j j j that keeps the fraction t t t of the piece’s total interval length, so that t = 0 t=0 t = 0 is the empty suffix and t = 1 t=1 t = 1 is the whole piece. On positive inputs V i j V_{ij} V ij is continuous and strictly increasing. We extend it beyond t = 1 t=1 t = 1 with slope one, so that it becomes a continuous strictly increasing bijection of [ 0 , ∞ ) [0,\infty) [ 0 , ∞ ) onto itself. Agent i i i ’s mark on piece j j j at value u ≥ 0 u \ge0 u ≥ 0 is V i j − 1 ( u ) V_{ij}^{-1}(u) V ij − 1 ( u ) . A mark at most one is the length of a physical suffix worth u u u to her. A mark greater than one means that even the whole piece is worth less than u u u . A forward query returns V i j ( t ) V_{ij}(t) V ij ( t ) , and an inverse query returns a mark V i j − 1 ( u ) V_{ij}^{-1}(u) V ij − 1 ( u ) . Each costs at most one Robertson–Webb query, an evaluation or a cut: the recorded component values locate the boundary interval of the ordered piece, and the slope-one extension needs only arithmetic.
Lengths from values. A value vector x ∈ [ 0 , ∞ ) N x \in[0,\infty)^N x ∈ [ 0 , ∞ ) N proposes a value x i x_i x i for every agent i i i . If agent i i i is to receive x i x_i x i , she would envy anyone holding a suffix of piece j j j longer than her mark. So piece j j j can keep at most the shortest mark on it, and at most the whole piece:
t j ( x ) = min { 1 , min i ∈ N V i j − 1 ( x i ) } . (4) t_j(x)=\min\left\{1,\min_{i\in N}V_{ij}^{-1}(x_i)\right\}. \tag*{(4)} t j ( x ) = min { 1 , i ∈ N min V ij − 1 ( x i ) } . (4)
Agent i i i is tight on piece j j j at x x x if her mark attains this minimum, and piece j j j is whole at x x x if t j ( x ) = 1 t_j(x)=1 t j ( x ) = 1 . Since t j ( x ) t_j(x) t j ( x ) is at most every mark,
V i j ( t j ( x ) ) ≤ x i for every agent i and piece j , (5) V_{ij}(t_j(x)) \le x_i \quad\text{for every agent }i\text{ and piece }j, \tag*{(5)} V ij ( t j ( x )) ≤ x i for every agent i and piece j , (5)
with equality exactly when i i i is tight on j j j . As in § 5.3 , with labels now called pieces, the tie graph at x x x joins each piece to the agents tight on it and, if it is whole, to the pin o o o . In the running example, at x = ( 1 , 2 , 5 / 2 ) x=(1,2,5/2) x = ( 1 , 2 , 5/2 ) the marks on P 3 P_3 P 3 are 1 1 1 , 1 / 2 1/2 1/2 and 1 / 2 1/2 1/2 . So P 3 P_3 P 3 keeps its last half, and agents 2 and 3 are tight on it, while P 1 P_1 P 1 and P 2 P_2 P 2 stay whole.
Envy-free and fully exposable value vectors. An assignment is a bijection M : N → N M:N\to N M : N → N from piece labels to agents; M ( j ) M(j) M ( j ) is the agent assigned piece j j j . Call a value vector x x x envy-free if some assignment gives every piece to an agent tight on it. Giving each piece’s suffix of length t j ( x ) t_j(x) t j ( x ) to that agent is then an envy-free suffix allocation in which every agent i i i receives exactly x i x_i x i , by (5). Conversely, let S S S be an envy-free suffix allocation, and let x i x_i x i be agent i i i ’s value of her own suffix. Each holder’s mark on her piece is the length of its suffix, and envy-freeness makes every other mark on that piece at least as long. So every piece j j j has length t j ( x ) t_j(x) t j ( x ) in S S S , and x x x is envy-free through the holders of S S S .
Call x x x fully exposable if, for each node c c c among the agents and the pin, the tie graph at x x x matches all pieces to the other n n n nodes. (In matching terminology, a vertex that a matching leaves uncovered is exposed , hence the name.) Leaving the pin uncovered gives an assignment along tie-graph edges, so a fully exposable vector is envy-free. At a fully exposable x x x , any assignment that gives every piece to an agent tight on it is a supporting assignment .
Fully exposable means certified. Let x x x be envy-free through an assignment M M M , and let S S S be the resulting suffix allocation. By (5), agent i i i ’s favorite labels in S S S are exactly the pieces she is tight on, and S S S is whole exactly when piece j j j is whole at x x x . So the tie graph of S S S in § 5.3 is the tie graph at x x x , and S S S is certified exactly when x x x is fully exposable. Fully exposable vectors are therefore the value vectors of certified allocations, and their supporting assignments say who holds which piece. Exposing the pin gives the holders, and exposing an agent gives the chain of ties from a whole piece to her suffix.
Running example. At the values x ∗ = ( 1 , 2 , 5 / 2 ) x^*=(1,2,5/2) x ∗ = ( 1 , 2 , 5/2 ) of the certified trim of Figure 2 , the marks V i j − 1 ( x i ∗ ) V_{ij}^{-1}(x_i^*) V ij − 1 ( x i ∗ ) are as follows, using the slope-one extension beyond 1:
Table 5.
Bold marks attain the minimum, so they are the tight edges. Together with the edges from the whole pieces P 1 P_1 P 1 and P 2 P_2 P 2 to the pin, they form the tie graph of Figure 3 . The only assignment along tight edges is P j ↦ j P_j \mapsto j P j ↦ j , so it is the unique supporting assignment. Leaving agent 3 uncovered forces P 3 P_3 P 3 to agent 2; with P 2 P_2 P 2 on the pin, this is the chain of ties in Figure 3 (b).
The next proposition shows that a fully exposable vector exists, is unique, and is simultaneously the best envy-free value vector for every agent.
Proposition 2 (Certified values). Assume positive inputs. There is a unique fully exposable value vector x ∗ x^* x ∗ , and it is the coordinatewise greatest envy-free value vector. In every supporting assignment, each piece has a path of ties leading to a whole piece, in which the holder of each next piece is tight on the previous one.
Proof. Existence. Fix ε > 0 \varepsilon> 0 ε > 0 . Consider value vectors x x x together with assignments M M M such that, for every piece j j j ,
V M ( j ) j − 1 ( x M ( j ) ) ≤ min { 1 , ε + min i ∈ N V i j − 1 ( x i ) } . V^{-1}_{M(j)j}(x_{M(j)}) \le\min\left\{1,\ \varepsilon+ \min_{i \in N} V^{-1}_{ij}(x_i)\right\}. V M ( j ) j − 1 ( x M ( j ) ) ≤ min { 1 , ε + i ∈ N min V ij − 1 ( x i ) } .
Thus each piece’s assigned mark is at most the whole piece and at most ε \varepsilon ε longer than the shortest mark on it. Among these pairs, maximize the sum of the values, and among maximizers minimize the sum of the assigned marks. The zero vector is feasible, the piece assigned to agent i i i bounds her value by max j V i j ( 1 ) \max_j V_{ij}(1) max j V ij ( 1 ) , and the feasible set is a finite union of compact sets, so an optimum exists.
Draw an arrow from piece j j j to piece k k k if the agent assigned to k k k has a strictly shorter mark on j j j than the agent assigned to j j j . Giving each piece on a directed cycle to the agent of its successor would preserve feasibility and lower the sum of the assigned marks. Thus the graph is acyclic and every piece has a path to a sink. A sink j j j is already assigned an agent with a shortest mark on it, of length d d d , say. If d < 1 d < 1 d < 1 , continuity lets us raise that agent’s value so that her mark on j j j grows by less than min { ε , 1 − d } \min\{\varepsilon, 1-d\} min { ε , 1 − d } . The shortest mark on j j j is still at least d d d , so both the bound one and the ε \varepsilon ε allowance are respected. Every other piece keeps its assigned mark, and its shortest mark can only grow. This would increase the sum of the values, contradicting maximality. Each sink therefore has d = 1 d = 1 d = 1 .
Let ε \varepsilon ε tend to zero along a subsequence with a fixed assignment, a fixed arrow graph and convergent values. In the limit every piece’s assigned mark is a shortest mark on it, of length at most one, so its agent is tight on it. Each arrow from j j j to k k k becomes a tie, since its strict improvement was at most ε \varepsilon ε : the agent assigned to k k k is also tight on j j j . Each sink is whole. To leave a given agent i i i uncovered, start from the piece assigned to i i i , follow its path to a sink, give each piece on the path to the agent of its successor, and join the sink to the pin. The assignment itself leaves the pin uncovered. Thus the limit is fully exposable.
Greatestness and uniqueness. Let x ∗ x^* x ∗ be fully exposable and put t j ∗ = t j ( x ∗ ) t_j^* = t_j(x^*) t j ∗ = t j ( x ∗ ) . These lengths give a certified allocation. If x x x is any envy-free value vector and s j = t j ( x ) s_j = t_j(x) s j = t j ( x ) , Proposition 1 gives s j ≤ t j ∗ s_j \le t_j^* s j ≤ t j ∗ for every piece j j j . Each agent holds a favorite suffix in both allocations,
x i = max j V i j ( s j ) ≤ max j V i j ( t j ∗ ) = x i ∗ ( i ∈ N ) . x_i = \max_j V_{ij}(s_j) \le\max_j V_{ij}(t_j^*) = x_i^*
\qquad(i \in N). x i = j max V ij ( s j ) ≤ j max V ij ( t j ∗ ) = x i ∗ ( i ∈ N ) .
Thus x ∗ x^* x ∗ is greatest. Since any fully exposable vector is itself envy-free, applying this inequality in both directions to two such vectors proves uniqueness.
Matching properties. We record two matching properties used in the median algorithm. Write N x ( J ) N_x(J) N x ( J ) for the agents and the pin adjacent to at least one piece of J J J in the tie graph at x x x . At a fully exposable x x x ,
∣ N x ( J ) ∣ ≥ ∣ J ∣ + 1 ( ∅ ≠ J ) . (6) \lvert N_x(J) \rvert\ge\lvert J \rvert+ 1
\qquad(\varnothing\ne J). \tag*{(6)} ∣ N x ( J )∣ ≥ ∣ J ∣ + 1 ( ∅ = J ) . (6)
Indeed, we can leave any one neighbor of J J J uncovered and still match all of J J J . Likewise, a matching of all pieces can cover any proper subset of the agents and the pin, by leaving a node outside that subset uncovered. Finally, superpose any supporting assignment with a matching that leaves agent i i i uncovered. Their alternating path from i i i to the pin gives the asserted ties for the piece assigned to i i i . □
To compute a certified trim, it now suffices to find x ∗ x^* x ∗ and a supporting assignment. Equation (4) then gives the suffix lengths. Appendix C extends the argument to the general curves used for chores and assignment markets.
Computing the certified values by medians
We now compute x ∗ x^* x ∗ . Neither x ∗ x^* x ∗ nor its ties are known. What we do know is the finite set of n ! n! n ! assignments of pieces to agents, and Proposition 2 guarantees that one of them is supporting.
If a supporting assignment were known. Let M M M be an assignment. Start with estimates x ^ i = ∞ \hat{x}_i=\infty x ^ i = ∞ for every agent i i i , where an infinite estimate allows the whole piece. In each round, every piece is cut to the length allowed by the current estimates, and the estimate of its assigned agent drops to her value of what is left:
x ^ M ( j ) ← min { x ^ M ( j ) , V M ( j ) j ( t j ( x ^ ) ) } for all pieces j simultaneously. (7) \hat{x}_{M(j)} \leftarrow\min\left\{\hat{x}_{M(j)}, V_{M(j)j}\left(t_j(\hat{x})\right)\right\} \qquad\text{for all pieces }j\text{ simultaneously.} \tag*{(7)} x ^ M ( j ) ← min { x ^ M ( j ) , V M ( j ) j ( t j ( x ^ ) ) } for all pieces j simultaneously. (7)
That is, each piece is cut to the longest suffix, up to the whole piece, that no agent values above her current estimate. If M M M is supporting, each piece’s assigned agent is tight on it at x ∗ x^* x ∗ , and induction shows that the estimates never fall below x ∗ x^* x ∗ . On the other hand, the ties of x ∗ x^* x ∗ pull the estimates down. Let L L L consist of the pin and the agents whose estimates are already at most x ∗ x^* x ∗ . Since x ∗ x^* x ∗ is fully exposable, a matching of all pieces along tie-graph edges at x ∗ x^* x ∗ covers L L L whenever L L L misses some agent, and the pieces it uses push at least one further agent to x ∗ x^* x ∗ or below in every round (the proof of Lemma 8 gives the details). So after n n n rounds the estimates equal x ∗ x^* x ∗ , much as the distance estimates of the Bellman–Ford algorithm settle after a number of rounds linear in the number of vertices.
The downward pull does not depend on M M M being supporting: for every assignment, (7) brings all estimates to x ∗ x^* x ∗ or below within n n n rounds. Only supporting assignments are guaranteed to stay at or above x ∗ x^* x ∗ . If we could afford separate queries for each of the n ! n! n ! assignments, we could therefore read off x ∗ x^* x ∗ as the coordinatewise maximum of all their estimates after n n n rounds. We cannot, since different assignments query different points.
Sharing queries by rounding. We keep a pool A \mathcal{A} A of candidate assignments, initially all n ! n! n ! of them, with estimates x ^ M \hat{x}^M x ^ M for each M ∈ A M\in\mathcal{A} M ∈ A , and run (7) for all of them at once. To let the candidates share answers, we round every query point up to a common grid. For a list of a a a numbers, sorted with multiplicity, the grid of resolution γ \gamma γ consists of 0 , ∞ 0,\infty 0 , ∞ and the entries of ranks ⌈ h a / γ ⌉ \left\lceil ha/\gamma\right\rceil ⌈ ha / γ ⌉ for h = 1 , … , γ h=1,\ldots,\gamma h = 1 , … , γ . Round each entry to the smallest grid value weakly above it. An entry equal to a grid point stays there, even if it occurs several times (Figure 4 ). Each open gap between consecutive grid points contains at most a / γ a/\gamma a / γ entries of the list, because successive selected ranks skip at most ⌈ a / γ ⌉ − 1 \lceil a/\gamma\rceil-1 ⌈ a / γ ⌉ − 1 entries. For a grid G \mathcal{G} G write ⌈ u ⌉ G \lceil u\rceil_{\mathcal{G}} ⌈ u ⌉ G for the least grid point that is at least u u u . The values of every curve and every mark at 0 0 0 and ∞ \infty ∞ are known. The grid of agent i i i lists the lengths at which she is asked to mark every piece, and the grid of piece j j j lists the lengths at which every agent evaluates its suffix. Each candidate reads the answers at its own values and lengths, rounded up, so the number of queries depends on n n n and γ \gamma γ but not on the size of the pool.
Figure 4. A grid of resolution γ = 4 \gamma= 4 γ = 4 on a sorted list of a = 12 a = 12 a = 12 estimates w 1 ≤ ⋯ ≤ w 12 w_1 \le\cdots\le w_{12} w 1 ≤ ⋯ ≤ w 12 of agent i i i ’s value. The circles mark the finite grid points, namely 0 0 0 and the entries of ranks 3, 6, 9, 12. The grid also contains ∞ \infty ∞ , omitted from the drawing. Entries between grid points round up to the next one. An entry at or below the true value x i ∗ x_i^* x i ∗ is carried above it only if it lies in the open gap containing x i ∗ x_i^* x i ∗ (red arrows), so at most a / γ a/\gamma a / γ entries cross. Grids of lengths work in the same way.
Rounding up makes an upper estimate weaker but never wrong, so supporting candidates still stay at or above x ∗ x^* x ∗ . The price is that the coordinatewise maximum is no longer reliable: a candidate whose estimate is rounded past the true value may stay above it. The median, however, remains reliable, because, on each value or length grid, only entries in the open gap containing the true value or length can round past it (Figure 4 ). We call an agent k k k strictly short at y y y if y k < x k ∗ y_k<x_k^* y k < x k ∗ . Algorithm 2 works in phases. Each phase runs 4 n 4n 4 n shared rounds on a fixed pool, takes for each agent the lower median y i y_i y i of the candidates’ estimates of her value, and tests y y y by a matching computation. If the test fails, it names an agent, and comparing the candidates’ estimates of her value discards at least half of the pool (Figure 5 ).
Table 2 (PDF p. 18). ALGORITHM 2: The median algorithm for certified trimming
The two tables of each round are shared by the entire pool. All estimates become finite in the first round, since every length is at most one and each length grid contains its largest entry. The next lemma explains why the median can be used before we know which candidates are correct. The constants 4 n 4n 4 n and γ = 8 ( 2 n + 1 ) \gamma=8(2n+1) γ = 8 ( 2 n + 1 ) are chosen so that the stalled fraction of the pool, at most 1 / 4 + 1 / 8 1/4+1/8 1/4 + 1/8 , stays below one half.
Lemma 8 (The median is a lower bound). Throughout a phase , x ^ i M ≥ x i ∗ \hat{x}_i^M\ge x_i^* x ^ i M ≥ x i ∗ for every supporting M M M in the pool. After the 4 n 4n 4 n rounds of a phase, at least five eighths of the pool satisfy x ^ i M ≤ x i ∗ \hat{x}_i^M\le x_i^* x ^ i M ≤ x i ∗ for all agents simultaneously. In particular y i ≤ x i ∗ y_i\le x_i^* y i ≤ x i ∗ .
Proof. Write t j ∗ = t j ( x ∗ ) t_j^*=t_j(x^*) t j ∗ = t j ( x ∗ ) for the length of piece j j j at x ∗ x^* x ∗ .
Supporting candidates stay above. Let M M M be supporting. If x ^ i M ≥ x i ∗ \hat{x}_i^M\ge x_i^* x ^ i M ≥ x i ∗ , then rounding up gives t ^ j M ≥ t j ∗ \hat{t}_j^M\ge t_j^* t ^ j M ≥ t j ∗ for every piece j j j . Since agent M ( j ) M(j) M ( j ) is tight on j j j at x ∗ x^* x ∗ , we have V M ( j ) j ( t j ∗ ) = x M ( j ) ∗ V_{M(j)j}(t_j^*)=x_{M(j)}^* V M ( j ) j ( t j ∗ ) = x M ( j ) ∗ , so the update and the minimum with the old estimate preserve the inequality. Induction from the initialization proves the first claim.
Most candidates fall below. Give each candidate in the fixed pool equal weight; probabilities and expectations below are just proportions and averages over the pool, and all choices are deterministic. For a round s = 1 , … , 4 n s = 1, \ldots, 4n s = 1 , … , 4 n , let L s − 1 ( M ) L_{s-1}(M) L s − 1 ( M ) consist of the pin and the agents i i i with x ^ i M ≤ x i ∗ \hat{x}_i^M \le x_i^* x ^ i M ≤ x i ∗ before its update, so that L 0 ( M ) = { o } L_0(M) = \{o\} L 0 ( M ) = { o } , and let L 4 n ( M ) L_{4n}(M) L 4 n ( M ) be this set after the last round. These sets can only grow, since estimates never increase. In a given round, let e a g e n t ( M ) e^{\mathrm{agent}}(M) e agent ( M ) be the number of agents i i i with x ^ i M ≤ x i ∗ < ⌈ x ^ i M ⌉ G i \hat{x}_i^M \le x_i^* < \lceil\hat{x}_i^M\rceil_{G_i} x ^ i M ≤ x i ∗ < ⌈ x ^ i M ⌉ G i , whose estimate is carried above the true value by rounding, and let e p i e c e ( M ) e^{\mathrm{piece}}(M) e piece ( M ) be the number of pieces j j j with t ^ j M ≤ t j ∗ < ⌈ t ^ j M ⌉ G j \hat{t}_j^M \le t_j^* < \lceil\hat{t}_j^M\rceil_{G_j} t ^ j M ≤ t j ∗ < ⌈ t ^ j M ⌉ G j . A threshold that is a grid point cannot be crossed, and otherwise only the entries in the single open grid gap containing the threshold can cross (Figure 4 ). Summing their proportions over agents and over pieces gives, in every round,
E M e a g e n t ( M ) ≤ n / γ , E M e p i e c e ( M ) ≤ n / γ . \mathbb{E}_M e^{\mathrm{agent}}(M) \le n/\gamma,\qquad\mathbb{E}_M e^{\mathrm{piece}}(M) \le n/\gamma. E M e agent ( M ) ≤ n / γ , E M e piece ( M ) ≤ n / γ .
Fix M M M and a round in which L = L s − 1 ( M ) L = L_{s-1}(M) L = L s − 1 ( M ) misses some agent, and remove from L L L its crossing agents. A matching of all pieces along tie-graph edges at x ∗ x^* x ∗ covers L L L , so at least ∣ L ∣ − e a g e n t ( M ) |L| - e^{\mathrm{agent}}(M) ∣ L ∣ − e agent ( M ) distinct pieces are joined at x ∗ x^* x ∗ to a node of the remaining set. Each of them has t ^ j M ≤ t j ∗ \hat{t}_j^M \le t_j^* t ^ j M ≤ t j ∗ , and for all but at most e p i e c e ( M ) e^{\mathrm{piece}}(M) e piece ( M ) of them the rounded length also stays at most t j ∗ t_j^* t j ∗ . The assigned agents M ( j ) M(j) M ( j ) of these pieces end the round in L s ( M ) L_s(M) L s ( M ) , since V M ( j ) j ( t j ∗ ) ≤ x M ( j ) ∗ V_{M(j)j}(t_j^*) \le x_{M(j)}^* V M ( j ) j ( t j ∗ ) ≤ x M ( j ) ∗ by ((5) ). They are distinct agents, and the pin is an additional member. Hence the following bound holds, trivially so when L L L already contains every agent:
∣ L s ( M ) ∣ − ∣ L s − 1 ( M ) ∣ ≥ 1 { L s − 1 ( M ) ≠ N ∪ { o } } − e a g e n t ( M ) − e p i e c e ( M ) . |L_s(M)| - |L_{s-1}(M)| \ge\mathbf{1}_{\{L_{s-1}(M)\ne N\cup\{o\}\}} - e^{\mathrm{agent}}(M) - e^{\mathrm{piece}}(M). ∣ L s ( M ) ∣ − ∣ L s − 1 ( M ) ∣ ≥ 1 { L s − 1 ( M ) = N ∪ { o }} − e agent ( M ) − e piece ( M ) .
Let η s \eta_s η s be the proportion of the pool with L s ( M ) ≠ N ∪ { o } L_s(M) \ne N \cup\{o\} L s ( M ) = N ∪ { o } ; it is nonincreasing in s s s . Averaging the last inequality over the pool and summing over the 4 n 4n 4 n rounds gives
4 n η 4 n ≤ ∑ s = 0 4 n − 1 η s ≤ E M [ ∣ L 4 n ( M ) ∣ − ∣ L 0 ( M ) ∣ ] + 4 n ⋅ 2 n γ ≤ n + 8 n 2 γ . 4n\eta_{4n} \le\sum_{s=0}^{4n-1}\eta_s \le\mathbb{E}_M\left[|L_{4n}(M)|-|L_0(M)|\right] + \frac{4n\cdot2n}{\gamma} \le n+\frac{8n^2}{\gamma}. 4 n η 4 n ≤ s = 0 ∑ 4 n − 1 η s ≤ E M [ ∣ L 4 n ( M ) ∣ − ∣ L 0 ( M ) ∣ ] + γ 4 n ⋅ 2 n ≤ n + γ 8 n 2 .
With γ = 8 ( 2 n + 1 ) \gamma= 8(2n+1) γ = 8 ( 2 n + 1 ) this gives η 4 n ≤ 1 / 4 + 2 n / γ < 1 / 4 + 1 / 8 = 3 / 8 \eta_{4n} \le1/4 + 2n/\gamma< 1/4 + 1/8 = 3/8 η 4 n ≤ 1/4 + 2 n / γ < 1/4 + 1/8 = 3/8 . So at least five eighths of the pool have estimates at most x ∗ x^* x ∗ for every agent. For each agent, more than half of the entries are therefore at most her true value, so y ≤ x ∗ y \le x^* y ≤ x ∗ .
The matching test. The median y y y is a trial vector with y ≤ x ∗ y \le x^* y ≤ x ∗ . The matching test either finds a supporting assignment at y y y or identifies an agent whose value is strictly too low. Which search the test runs depends on whether the tie graph at y y y , with the pin deleted, has a perfect matching.
Lemma 9 (The matching test). Let y ≤ x ∗ y \le x^* y ≤ x ∗ . From the table of marks V i j − 1 ( y i ) V_{ij}^{-1}(y_i) V ij − 1 ( y i ) alone, one can either certify that y = x ∗ y=x^* y = x ∗ and obtain a supporting assignment, or identify an agent k k k with y k < x k ∗ y_k < x_k^* y k < x k ∗ .
The test uses only the table at y y y . Form the tie graph at y y y , then delete the pin and find a maximum matching of pieces to agents. If some piece is unmatched, search from it along tie-graph edges to agents and along matching edges back to pieces. Return any reached agent. At least one is reached, and each is strictly short. If the matching is perfect, restore the pin, which is now free, and search from it along tie-graph edges to pieces and along matching edges back to agents. The agents reached are exactly those i i i with y i = x i ∗ y_i=x_i^* y i = x i ∗ . Return the matching if every agent is reached, and otherwise any unreached agent. Fixed orders resolve every choice. Appendix § 11 proves these assertions using (6) .
An agent whose value is already exact can even be isolated when the matching is deficient. For example, suppose V i j ( t ) = t V_{ij}(t)=t V ij ( t ) = t for both agents on both pieces. Then x ∗ = ( 1 , 1 ) x^*=(1,1) x ∗ = ( 1 , 1 ) . At the trial vector y = ( 1 , 1 / 2 ) y=(1,1/2) y = ( 1 , 1/2 ) , both pieces are tight only for agent 2, although agent 1 already has her exact value. In either failure case the test names an agent k k k with y k < x k ∗ y_k<x_k^* y k < x k ∗ . The filter discards every candidate M M M with x k M ≤ y k x_k^M \le y_k x k M ≤ y k , and every supporting candidate survives because its estimate is at least x k ∗ x_k^* x k ∗ .
Theorem 2 (Query cost of the median algorithm). On positive inputs, Algorithm 2 computes x ∗ x^* x ∗ and a supporting assignment with O ( n 5 log n ) O(n^5\log n) O ( n 5 log n ) deterministic forward and inverse queries.
Proof. If a phase fails on agent k k k , every supporting candidate survives the filter, since x k M ≥ x k ∗ > y k x_k^M \ge x_k^*>y_k x k M ≥ x k ∗ > y k by Lemmas 8 and 9. By the definition of the lower median, at most ⌊ ∣ A ∣ / 2 ⌋ \lfloor|A|/2\rfloor ⌊ ∣ A ∣/2 ⌋ candidates have estimates strictly above y k y_k y k , so the pool shrinks by at least half. Initially the pool contains a supporting assignment by Proposition 2, and supporting assignments are never discarded, so within 1 + ⌊ log 2 ( n ! ) ⌋ 1+\lfloor\log_2(n!)\rfloor 1 + ⌊ log 2 ( n !)⌋ phases the test succeeds. Each round queries its two grids at O ( n 2 γ ) = O ( n 3 ) O(n^2\gamma)=O(n^3) O ( n 2 γ ) = O ( n 3 ) points, so the 4 n 4n 4 n rounds and the final O ( n 2 ) O(n^2) O ( n 2 ) queries cost O ( n 4 ) O(n^4) O ( n 4 ) queries per phase. Multiplying by the number of phases gives the bound. Sorting the lists, updating every candidate and computing the matchings costs n ! n O ( 1 ) n! \, n^{O(1)} n ! n O ( 1 ) exact arithmetic operations and comparisons in total. □ \square □
A two-piece calculation. Take agents 2 and 3 of the running example and the pieces P 1 , P 3 P_1,P_3 P 1 , P 3 , as in the two-agent example of § 5.2 . Here x ∗ x^* x ∗ gives agent 2 the value 1 and agent 3 the value 5 / 4 5/4 5/4 . There are two candidates. Candidate M 1 M_1 M 1 assigns P 1 P_1 P 1 to agent 2 and P 3 P_3 P 3 to agent 3, and M 2 M_2 M 2 does the reverse. With two candidates every grid contains all entries, so nothing is rounded. The table lists each candidate’s estimates for agents 2 and 3 after each round of the first phase.
Table 1 (PDF p. 20).
In the first round all estimates are infinite, so both pieces stay whole, and each candidate’s estimate for an agent is her value of the whole piece assigned to her. In the second round, under M 1 M_1 M 1 , P 3 P_3 P 3 finds that agent 2 already reaches her estimate 1 at its last quarter, so agent 3’s estimate drops to her value 5 / 4 5/4 5/4 of that quarter, and M 1 M_1 M 1 is then stable at x ∗ x^* x ∗ . Under M 2 M_2 M 2 , piece P 3 P_3 P 3 finds that agent 3 reaches her estimate 1 on its last fifth, so agent 2’s estimate drops to 4 / 5 4/5 4/5 . In the next round piece P 1 P_1 P 1 pulls agent 3 down to 4 / 5 4/5 4/5 , and so on. Candidate M 2 M_2 M 2 supports no positive values at all: for agent 2 to be tight on P 3 P_3 P 3 she would need x 2 ≤ 4 x 3 / 5 x_2 \le4x_3/5 x 2 ≤ 4 x 3 /5 , and for agent 3 to be tight on P 1 P_1 P 1 she would need x 3 ≤ x 2 x_3 \le x_2 x 3 ≤ x 2 . Its estimates instead shrink by a factor 4 / 5 4/5 4/5 every two rounds. After the 4 n = 8 4n=8 4 n = 8 rounds both candidates are at or below x ∗ x^* x ∗ , as Lemma 8 predicts; already after n = 2 n=2 n = 2 rounds, the larger of the two estimates of each agent’s value equals her value in x ∗ x^* x ∗ .
The lower median of two entries is the smaller one, so y = ( 256 / 625 , 64 / 125 ) y=(256/625,64/125) y = ( 256/625 , 64/125 ) . At y y y , agent 2 is the only agent tight on P 1 P_1 P 1 , and both agents are tight on P 3 P_3 P 3 , since they reach their values on the same suffix. The matching of pieces to agents is perfect, but no piece is whole, so the search from the free pin reaches neither agent: both values are strictly too low. The test names agent 2, the first in a fixed order. Candidate M 1 M_1 M 1 has estimate 1 > y 2 1>y_2 1 > y 2 and survives, while M 2 M_2 M 2 is discarded; naming agent 3 would have discarded M 2 M_2 M 2 as well. In the second phase the pool is { M 1 } \{M_1\} { M 1 } , and y = x ∗ y=x^* y = x ∗ . Now P 1 P_1 P 1 is whole and agent 2 is tight on it, and both agents are tight on P 3 P_3 P 3 , reaching their values on its last quarter. The search from the pin reaches P 1 P_1 P 1 , then agent 2 through the matching, then P 3 P_3 P 3 , then agent 3, so the test certifies y y y . The supporting assignment gives the whole of P 1 P_1 P 1 to agent 2 and the last quarter of P 3 P_3 P 3 to agent 3. Agent 2 values that quarter as highly as her whole piece and witnesses the trim.
Proof of Lemma 7. Apply Algorithm 2 to the n n n pieces. Theorem 2 counts all its forward and inverse queries, each of which costs at most one Robertson–Webb query (§ 5.4 ). Recover the physical suffixes by (4) . Evaluate each retained boundary for every agent; these O ( n 2 ) O(n^2) O ( n 2 ) evaluations both record the boundaries for later calls and determine every agent’s value of every returned suffix. A graph search then orders the holders by their distance from a whole piece, as in Lemma 6 . On general measures, Appendix § 12 runs these same steps on virtual positive curves, with at most one physical query per curve query. Its projection preserves the assignment, all weak comparisons, all witness ties and every whole piece. □
The cutter’s advantage
Core uses Trim in place of SubCore, the trimming routine of Aziz and Mackenzie [ [4 ] . In Core(r , N , C r,N,C r , N , C ), agent r r r cuts C C C into n n n pieces of equal value to her. We call Trim on those pieces and return its allocation Y Y Y , indexed by agent so that Y i Y_i Y i is agent i i i ’s suffix, together with its residue U U U .
Proof of Lemma 1. The allocation Y Y Y is envy-free by Lemma 7 . The cutter makes n − 1 n-1 n − 1 cuts, and recording a cut for every agent takes at most n + 1 n+1 n + 1 queries (§ 3 ), so Core uses O ( n 2 ) O(n^2) O ( n 2 ) queries besides its call to Trim.
Write τ = v r ( C ) / n \tau=v_r(C)/n τ = v r ( C ) / n . Some piece stays whole and is worth τ \tau τ to the cutter, and every suffix is worth at most τ \tau τ to her. By envy-freeness, v r ( Y r ) = τ v_r(Y_r)=\tau v r ( Y r ) = τ , which is exactly 1 / n 1/n 1/ n of her value of C C C , also when τ = 0 \tau=0 τ = 0 . Subtracting the values of all allocated suffixes from n τ n\tau n τ gives
∑ h ≠ r ( v r ( Y r ) − v r ( Y h ) ) = n τ − ∑ h v r ( Y h ) = v r ( U ) . \sum_{h\ne r}\left(v_r(Y_r)-v_r(Y_h)\right)=n\tau-\sum_h v_r(Y_h)=v_r(U). h = r ∑ ( v r ( Y r ) − v r ( Y h ) ) = n τ − h ∑ v r ( Y h ) = v r ( U ) .
These n − 1 n-1 n − 1 terms are nonnegative, so at least one of them is at least their average v r ( U ) / ( n − 1 ) v_r(U)/(n-1) v r ( U ) / ( n − 1 ) . If v r ( U ) > 0 v_r(U)>0 v r ( U ) > 0 , that term is positive, and its agent h ≠ r h\ne r h = r holds a trimmed piece. □
In the running example, τ = 1 \tau=1 τ = 1 , and the terms are 0 0 0 for agent 2 and 1 / 2 1/2 1/2 for agent 3, so h = 3 h=3 h = 3 (§ 4.5 ).
Calling Core once with each agent as the cutter already gives a fair partial allocation ([4 ] ).
Corollary 1 (Envy-free and proportional). Call Core n n n times on the successive residues, starting from the whole cake C C C , with each agent as the cutter exactly once. The union of the returned allocations is envy-free and gives every agent at least 1 / n 1/n 1/ n of her value of C C C . This takes O ( n 6 log n ) O(n^6\log n) O ( n 6 log n ) queries.
Proof. A union of envy-free allocations is envy-free. Fix an agent i i i , let A k A_k A k be the cake allocated by the k k k th call, let c c c be the call in which i i i cuts, and let R R R be the residue after the last call. In each call k ≠ c k \ne c k = c , envy-freeness gives i i i at least v i ( A k ) / n v_i(A_k)/n v i ( A k ) / n . In call c c c , Lemma 1 gives her exactly 1 / n 1/n 1/ n of the residue she cuts, whose value is ∑ k ≥ c v i ( A k ) + v i ( R ) \sum_{k \ge c} v_i(A_k) + v_i(R) ∑ k ≥ c v i ( A k ) + v i ( R ) . Dropping the calls after c c c from the first bound, she receives at least
1 n ( ∑ k < c v i ( A k ) + ∑ k ≥ c v i ( A k ) + v i ( R ) ) = v i ( C ) n . \frac{1}{n}\left(\sum_{k<c}v_i(A_k)+\sum_{k\ge c}v_i(A_k)+v_i(R)\right)=\frac{v_i(C)}{n}. n 1 ( k < c ∑ v i ( A k ) + k ≥ c ∑ v i ( A k ) + v i ( R ) ) = n v i ( C ) .
Each call uses O ( n 5 log n ) O(n^5\log n) O ( n 5 log n ) queries by Lemma 1.
Finding a New Advantage
This section proves Lemma 2 (step 3). Throughout, ( X , R ) (X,R) ( X , R ) is envy-free, ( Y , U ) = Core ( r , N , R ) (Y,U)=\operatorname{Core}(r,N,R) ( Y , U ) = Core ( r , N , R ) , and ( X ⊕ Y , U ) (X\oplus Y,U) ( X ⊕ Y , U ) has no dominated group, so its non-domination graph Γ \Gamma Γ is strongly connected (§ 4.2 ). We adapt the reassignment lemma of Psomas [2026, Lemma 5] and the cycle exchanges of the GoLeft protocol Aziz and Mackenzie, [5 ] .
What is needed, and why
Progress requires a domination that did not exist before. Core gives the cutter an advantage over the holder h h h of a trimmed piece (Lemma 1), but she may already dominate h h h , and then nothing is gained. The arcs of Γ \Gamma Γ show where dominations are missing. An arc a → b a\to b a → b means that a a a does not dominate b b b in ( X ⊕ Y , U ) (X\oplus Y,U) ( X ⊕ Y , U ) , and hence not in ( X , R ) (X,R) ( X , R ) either, since adding the envy-free allocation Y Y Y preserves domination. We therefore want an arc a → b a\to b a → b along which a a a has an advantage.
How large must this advantage be? It need not be large in absolute terms, only large compared with the envy we create to obtain it. Step 4 shrinks the residue to a small multiple of that envy, and changes a a a ’s advantage by at most another small multiple (Lemma 3). An advantage K = 4 n 2 K=4n^2 K = 4 n 2 times the envy survives both (§ 4.4 ). This relative requirement is what makes the step possible: if no arc of Γ \Gamma Γ carries a large advantage, then moving bundles along arcs is cheap.
Measuring in units of the residue. If an agent valued U U U at zero, she would dominate everyone else, and the others would form a dominated group. Thus v i ( U ) > 0 v_i(U)>0 v i ( U ) > 0 for every i i i , and the normalized gap
g i j = v i ( Y i ) − v i ( Y j ) v i ( U ) g_{ij}=\frac{v_i(Y_i)-v_i(Y_j)}{v_i(U)} g ij = v i ( U ) v i ( Y i ) − v i ( Y j )
is well defined, nonnegative by envy-freeness of Y Y Y , and zero when i = j i=j i = j . It is agent i i i ’s advantage from holding Y i Y_i Y i instead of Y j Y_j Y j , expressed as a fraction of her value of U U U . Only the new suffixes Y Y Y move; each old bundle X i X_i X i stays on label i i i . We look for an arc a → b a\to b a → b , a permutation π \pi π , where agent i i i receives Y π ( i ) Y_{\pi(i)} Y π ( i ) , and a tolerance α \alpha α such that
g i , π ( i ) ≤ α ( i ∈ N ) , g a , π ( b ) ≥ K α . (8) g_{i,\pi(i)}\le\alpha\quad(i\in N),\qquad g_{a,\pi(b)}\ge K\alpha. \tag*{(8)} g i , π ( i ) ≤ α ( i ∈ N ) , g a , π ( b ) ≥ K α . (8)
In words, each agent i i i gives up at most α v i ( U ) \alpha v_i(U) α v i ( U ) in moving from Y i Y_i Y i to Y π ( i ) Y_{\pi(i)} Y π ( i ) . Agent a a a values her original suffix Y a Y_a Y a at least K α v a ( U ) K\alpha v_a(U) K α v a ( U ) above the suffix now on label b b b .
The algorithm
Reassign (Algorithm 3) distinguishes two cases.
Case 1: use an existing advantage. If some arc a → b a\to b a → b already has a gap of at least K − n K^{-n} K − n , nothing needs to move. The tolerance α \alpha α is set so that the gap is at least K α K\alpha K α , and capped at K − 2 K^{-2} K − 2 so that Repair applies.
ALGORITHM 3: Reassign (r , X , Y , U r, X, Y, U r , X , Y , U )
Input: The cutter r r r , an envy-free X X X with residue R R R , and ( Y , U ) = Core ( r , N , R ) (Y, U) = \operatorname{Core}(r, N, R) ( Y , U ) = Core ( r , N , R ) , with no dominated group in ( X ⊕ Y , U ) (X \oplus Y, U) ( X ⊕ Y , U ) .
Output: An arc a → b a \to b a → b of Γ \Gamma Γ , a permutation π \pi π of the new suffixes, and a tolerance α \alpha α .
K ← 4 n 2 K \leftarrow4n^2 K ← 4 n 2 , and g i j ← v i ( Y i ) − v i ( Y j ) v i ( U ) g_{ij} \leftarrow\frac{v_i(Y_i)-v_i(Y_j)}{v_i(U)} g ij ← v i ( U ) v i ( Y i ) − v i ( Y j ) for all i , j i,j i , j
Γ ← \Gamma\leftarrow Γ ← the non-domination graph of ( X ⊕ Y , U ) (X \oplus Y, U) ( X ⊕ Y , U ) ▷ strongly connected
if some arc a → b a \to b a → b of Γ \Gamma Γ has g a b ≥ K − n g_{ab} \ge K^{-n} g ab ≥ K − n then ▷ case 1: a large gap; nothing moves
return a , b , π = id a,b,\pi=\operatorname{id} a , b , π = id , and α = min { K − 2 , g a b / K } \alpha=\min\{K^{-2},g_{ab}/K\} α = min { K − 2 , g ab / K }
▷ case 2: every arc of Γ \Gamma Γ has gap less than K − n K^{-n} K − n
Pick h h h with g r h ≥ 1 n − 1 g_{rh} \ge\frac{1}{n-1} g r h ≥ n − 1 1 ▷ exists by Lemma 1
Take a simple path r = u 0 , u 1 , … , u ℓ = h r=u_0,u_1,\ldots,u_\ell=h r = u 0 , u 1 , … , u ℓ = h in Γ \Gamma Γ
s ← s \leftarrow s ← the least index with g u s h ≤ K − ( s + 1 ) g_{u_s h} \le K^{-(s+1)} g u s h ≤ K − ( s + 1 ) ; set a ← u s − 1 a \leftarrow u_{s-1} a ← u s − 1 , b ← u s b \leftarrow u_s b ← u s , and α ← K − ( s + 1 ) \alpha\leftarrow K^{-(s+1)} α ← K − ( s + 1 )
Take a simple path h = v 0 , v 1 , … , v ℓ ′ = b h=v_0,v_1,\ldots,v_{\ell'}=b h = v 0 , v 1 , … , v ℓ ′ = b in Γ \Gamma Γ
Set π ( v ν ) ← v ν + 1 \pi(v_\nu) \leftarrow v_{\nu+1} π ( v ν ) ← v ν + 1 for ν < ℓ ′ \nu<\ell' ν < ℓ ′ , π ( b ) ← h \pi(b)\leftarrow h π ( b ) ← h , and π ( i ) ← i \pi(i)\leftarrow i π ( i ) ← i for every other agent ▷ rotate
return a , b , π , α a,b,\pi,\alpha a , b , π , α
Case 2: rotate along cheap moves. Otherwise every arc of Γ \Gamma Γ has a gap below K − n K^{-n} K − n . A small gap is a near-indifference, so passing a new suffix backwards along an arc loses its new holder very little. The cutter, however, has a large gap towards h h h . Walk along a path from r r r to h h h and compare each agent’s gap towards h h h with a threshold that shrinks by a factor K K K per step (Figure 6 ). The gap starts above its threshold and ends at g h h = 0 g_{hh}=0 g hh = 0 , so some arc a → b a \to b a → b straddles the thresholds: a a a values Y h Y_h Y h much less than her own suffix, while b b b would accept Y h Y_h Y h at little loss. Now take a path from h h h back to b b b . Each agent on it takes her successor’s suffix, and b b b takes Y h Y_h Y h . This closes a cycle. Every move loses its taker little, and a a a now values the suffix on label b b b much less than her own.
Figure 6. Case 2 of Reassign. Walking from the cutter r r r to h h h , the gap g u s h g_{u_s h} g u s h starts above its threshold K − ( s + 1 ) K^{-(s+1)} K − ( s + 1 ) and ends at 0, so some arc a → b a \to b a → b straddles the thresholds. Rotating the new suffixes around the cycle h → ⋯ → b → h h \to\cdots\to b \to h h → ⋯ → b → h hands Y h Y_h Y h to b b b . Every agent’s envy is at most α v i ( U ) \alpha v_i(U) α v i ( U ) , while a a a now values her own bundle above b b b ’s by at least ( K − 1 ) α v a ( U ) (K-1)\alpha v_a(U) ( K − 1 ) α v a ( U ) . Old bundles X i X_i X i never move.
Why the thresholds shrink geometrically. A fixed threshold would only give an arc from an agent above it to an agent below it, and the drop across that arc could be tiny. Thresholds that shrink by a factor K K K per step force a drop by a factor of more than K K K across a single arc: a a a ’s gap exceeds $K times what b b b is allowed. The path has at most n − 1 n-1 n − 1 arcs, so the tolerance never falls below K − n K^{-n} K − n in case 2, nor below K − ( n + 1 ) K^{-(n+1)} K − ( n + 1 ) overall.
When the cutter’s advantage is wasted. In the first round the cutter’s advantage over the holder of a trimmed piece is her value of its removed prefix. She therefore dominates h h h exactly when this prefix accounts for all her value of the residue. In the running example another arc supplies the advantage for case 1.
For an instance requiring case 2, let agent 1 cut the cake into thirds that she values at ( 1 , 1 , 1 ) (1,1,1) ( 1 , 1 , 1 ) and that each of agents 2 and 3 values at ( 1 , 1 , 4 ) (1,1,4) ( 1 , 1 , 4 ) , with values spread evenly within each third. A certified allocation gives agents 1 and 2 the first two thirds and agent 3 the last quarter of the third piece, so the cutter’s only positive gap is towards agent 3, whom she already dominates. Agents 2 and 3 are indifferent among all three suffixes, so every arc of Γ \Gamma Γ has gap zero, and swapping their suffixes gives the cutter an advantage of 3 / 4 3/4 3/4 over the previously undominated label 2.
Proof of Lemma 2
The non-domination graph Γ \Gamma Γ of ( X ⊕ Y , U ) (X\oplus Y,U) ( X ⊕ Y , U ) is strongly connected. Its arcs were also undominated in ( X , R ) (X,R) ( X , R ) , since adding an envy-free allocation preserves domination. We showed above that v i ( U ) > 0 v_i(U)>0 v i ( U ) > 0 for every i i i , so the gaps g i j g_{ij} g ij are well defined. We first establish (8) in each case.
Case 1. If some arc a → b a\to b a → b has g a b ≥ K − n g_{ab}\ge K^{-n} g ab ≥ K − n , take the identity permutation and α = min { K − 2 , g a b / K } \alpha=\min\{K^{-2},g_{ab}/K\} α = min { K − 2 , g ab / K } . Then g i , π ( i ) = 0 ≤ α g_{i,\pi(i)}=0\le\alpha g i , π ( i ) = 0 ≤ α and g a , π ( b ) = g a b ≥ K α g_{a,\pi(b)}=g_{ab}\ge K\alpha g a , π ( b ) = g ab ≥ K α , so (8) holds, and K − ( n + 1 ) ≤ α ≤ K − 2 K^{-(n+1)}\le\alpha\le K^{-2} K − ( n + 1 ) ≤ α ≤ K − 2 .
Case 2. Every arc now has gap less than K − n K^{-n} K − n . By Lemma 1, some holder h h h satisfies g r h ≥ 1 / ( n − 1 ) > 1 / K g_{rh}\ge1/(n-1)>1/K g r h ≥ 1/ ( n − 1 ) > 1/ K . Follow a simple path r = u 0 , … , u ℓ = h r=u_0,\ldots,u_\ell=h r = u 0 , … , u ℓ = h in Γ \Gamma Γ . Compare g u s h g_{u_s h} g u s h with K − ( s + 1 ) K^{-(s+1)} K − ( s + 1 ) : the gap starts above its threshold and ends at zero. At the first index s s s with g u s h ≤ K − ( s + 1 ) g_{u_s h}\le K^{-(s+1)} g u s h ≤ K − ( s + 1 ) , set
a = u s − 1 , b = u s , β = K − ( s + 1 ) . a=u_{s-1},\qquad b=u_s,\qquad\beta=K^{-(s+1)}. a = u s − 1 , b = u s , β = K − ( s + 1 ) .
Then a → b a\to b a → b is an arc, g a h > K β g_{ah}>K\beta g ah > K β , g b h ≤ β g_{bh}\le\beta g bh ≤ β , and K − n ≤ β ≤ K − 2 K^{-n}\le\beta\le K^{-2} K − n ≤ β ≤ K − 2 , since 1 ≤ s ≤ ℓ ≤ n − 1 1\le s\le\ell\le n-1 1 ≤ s ≤ ℓ ≤ n − 1 .
Take a simple return path from h h h to b b b . Give each path agent before b b b her successor’s suffix and give b b b the suffix Y h Y_h Y h , fixing everyone else. This is a cyclic permutation. Every move along the return path loses its taker less than K − n ≤ β K^{-n}\le\beta K − n ≤ β in relative units, and the closing move loses b b b at most β \beta β . Thus (8) holds with α = β \alpha=\beta α = β . All choices use recorded values.
Translate these bounds to the input of repair. Envy-freeness of X X X and Y Y Y gives v i ( D j ) ≤ v i ( X i ) + v i ( Y i ) v_i(D_j)\le v_i(X_i)+v_i(Y_i) v i ( D j ) ≤ v i ( X i ) + v i ( Y i ) for every j j j , whereas (8) gives v i ( D i ) ≥ v i ( X i ) + v i ( Y i ) − α v i ( U ) v_i(D_i)\ge v_i(X_i)+v_i(Y_i)-\alpha v_i(U) v i ( D i ) ≥ v i ( X i ) + v i ( Y i ) − α v i ( U ) . This proves the first inequality in (2) . Also, since v a ( X a ) ≥ v a ( X b ) v_a(X_a)\ge v_a(X_b) v a ( X a ) ≥ v a ( X b ) by envy-freeness of X X X ,
v a ( D a ) − v a ( D b ) ≥ ( g a , π ( b ) − g a , π ( a ) ) v a ( U ) ≥ ( K − 1 ) α v a ( U ) . v_a(D_a)-v_a(D_b)\ge(g_{a,\pi(b)}-g_{a,\pi(a)})v_a(U)\ge(K-1)\alpha v_a(U). v a ( D a ) − v a ( D b ) ≥ ( g a , π ( b ) − g a , π ( a ) ) v a ( U ) ≥ ( K − 1 ) α v a ( U ) .
The loss of one unit allows for a herself receiving a slightly less valuable suffix during the rotation. □ \square □
How small the tolerance can be. The tolerance α \alpha α may be as small as K − ( n + 1 ) = 2 − Θ ( n log n ) K^{-(n+1)}=2^{-\Theta(n\log n)} K − ( n + 1 ) = 2 − Θ ( n l o g n ) . This is why Lemma 3 depends only logarithmically on 1 / α 1/\alpha 1/ α : a repair whose cost grew linearly in 1 / α 1/\alpha 1/ α would by itself need 2 Θ ( n log n ) 2^{\Theta(n\log n)} 2 Θ ( n l o g n ) queries per call.
Repairing Envy and Shrinking the Residue
This section proves Lemma 3 (step ④). The input is an allocation D D D with residue U U U and a little envy: v i ( D i ) ≥ v i ( D j ) − α v i ( U ) v_i(D_i)\ge v_i(D_j)-\alpha v_i(U) v i ( D i ) ≥ v i ( D j ) − α v i ( U ) for all i , j i,j i , j , where 0 < α ≤ 1 / ( 8 n 2 ) 0<\alpha\le1/(8n^2) 0 < α ≤ 1/ ( 8 n 2 ) . Labels are named after the agents who own the input bundles, so label j j j carries D j D_j D j and agent j j j is its owner ; after repair its holder σ ( j ) \sigma(j) σ ( j ) may be someone else.
What repair must achieve
Repair must do four things at once:
remove the envy, so that the output is envy-free;
keep every input bundle D j D_j D j intact, so that old dominations survive (Lemma 4);
allocate almost all of U U U , so that the residue falls below agent a a a ’s advantage;
add nearly the same value to every bundle, in every agent’s eyes, so that the advantage itself survives.
Trimming removes envy, so (i) is easy on its own. But trimming the bundles D j D_j D j directly would cut into them and violate (ii). Adding an exactly equal-value share of U U U to every bundle would serve (iii) and (iv), since it preserves every value gap, but it would leave the envy in place. Repair does both. It attaches to every bundle a large share of U U U that every agent values nearly the same, places n − 1 n-1 n − 1 small buffers in front, and calls Trim once. Trimming removes a prefix, so it must consume buffers before it can reach a bundle, and § 7.4 shows that it never gets through. In the protocol of Aziz and Mackenzie [ [4 ] , further Core calls shrink the residue until an advantage becomes a domination [5 Sec. 3.2] . Repair achieves the required shrinkage in one call.
Example 1 (Why buffers are needed ). Let n = 3 n=3 n = 3 and α = 1 / ( 8 n 2 ) = 1 / 72 \alpha=1/(8n^2)=1/72 α = 1/ ( 8 n 2 ) = 1/72 , the largest tolerance allowed. The input bundles are three blocks D 1 , D 2 , D 3 D_1,D_2,D_3 D 1 , D 2 , D 3 , and the residue U U U is a block worth 72 to every agent. Each agent’s value is spread evenly within each block:
Table 1 (PDF p. 25).
So α v i ( U ) = 1 \alpha v_i(U)=1 α v i ( U ) = 1 . Agent 3 envies D 2 D_2 D 2 by exactly 1, and nobody else envies anybody. Suppose we give each bundle a third of U U U , placed behind it, and call Trim on the three resulting pieces. The equal thirds change no comparison, so agent 3 still envies label 2 by 1. Trim keeps labels 1 and 3 whole and trims the front of label 2 until agent 3, holding label 3, values it exactly as much as her own. The front of label 2 is D 2 D_2 D 2 , so a fifth of an input bundle returns to the residue. We return to this example with buffers in § 7.3 .
Nearly common shares
The construction needs large shares and small buffers whose values are close to prescribed targets for every agent. What matters is the total error over all shares, rather than the error of each one.
Lemma 10 (Approximate common shares). Let w 1 , … , w m ≥ 0 w_1,\ldots,w_m\ge0 w 1 , … , w m ≥ 0 sum to one, let 0 < δ < 1 0<\delta<1 0 < δ < 1 , and normalize v i ( U ) = 1 v_i(U)=1 v i ( U ) = 1 for all i i i . We can find disjoint pieces A q ⊆ U A_q\subseteq U A q ⊆ U with v i ( A q ) ≤ w q v_i(A_q)\le w_q v i ( A q ) ≤ w q for every i , q i,q i , q , leaving residue U 0 U_0 U 0 with v i ( U 0 ) ≤ δ v_i(U_0)\le\delta v i ( U 0 ) ≤ δ for every i i i . Equivalently, the total deficit is
∑ q = 1 m ( w q − v i ( A q ) ) = v i ( U 0 ) ≤ δ . \sum_{q=1}^{m}\left(w_q-v_i(A_q)\right)=v_i(U_0)\le\delta. q = 1 ∑ m ( w q − v i ( A q ) ) = v i ( U 0 ) ≤ δ . The procedure uses O ( n 2 m log ( n 2 m / δ ) ) O(n^2m\log(n^2m/\delta)) O ( n 2 m log ( n 2 m / δ )) queries and polynomially many exact arithmetic operations in the size of its interval records, n n n , m m m , and log ( 1 / δ ) \log(1/\delta) log ( 1/ δ ) .
ALGORITHM 4: Repair (N , D , U , α N,D,U,\alpha N , D , U , α )
Input: A partial allocation D D D with residue U U U and tolerance α \alpha α satisfying Lemma 3.
Output: An envy-free allocation W W W retaining every D j D_j D j intact, the holder map σ \sigma σ , and the residue R ′ R' R ′ .
For this call, scale each value measure so that v i ( U ) = 1 v_i(U)=1 v i ( U ) = 1 .
Set B ← n ( n − 1 ) B \leftarrow n(n-1) B ← n ( n − 1 ) , p ← 2 α p \leftarrow2\alpha p ← 2 α , t ← ( 1 − B p ) / n t \leftarrow(1-Bp)/n t ← ( 1 − B p ) / n , and δ ← α / 2 \delta\leftarrow\alpha/2 δ ← α /2 .
Use Lemma 10 to make n n n large shares T j T_j T j of target t t t and B B B buffers Q j , k Q_{j,k} Q j , k (j ∈ N j\in N j ∈ N , 1 ≤ k ≤ n − 1 1\leq k\leq n-1 1 ≤ k ≤ n − 1 ) of target p p p , with total deficit at most δ \delta δ .
For every label j j j , form P j ← Q j , n − 1 + + ⋯ + + Q j , 1 + + ( D j + + T j ) P_j\leftarrow Q_{j,n-1}++\cdots++Q_{j,1}++(D_j++T_j) P j ← Q j , n − 1 + + ⋯ + + Q j , 1 + + ( D j + + T j ) .
W ← Trim ( N , ( P j ) j ∈ N ) W\leftarrow\operatorname{Trim}(N,(P_j)_{j\in N}) W ← Trim ( N , ( P j ) j ∈ N ) , and let σ ( j ) \sigma(j) σ ( j ) be the holder of label j j j .
return W W W , σ \sigma σ , and R ′ ← ( U ∪ ⋃ j D j ) ∖ ⋃ i W i R'\leftarrow(U\cup\bigcup_jD_j)\setminus\bigcup_iW_i R ′ ← ( U ∪ ⋃ j D j ) ∖ ⋃ i W i .
We prove this lemma in § 7.5 . A consequence used below is that, for any set F F F of slots,
∑ q ∈ F w q − δ ≤ v i ( ⋃ q ∈ F A q ) ≤ ∑ q ∈ F w q . (9) \sum_{q\in F}w_q-\delta\leq v_i\left(\bigcup_{q\in F}A_q\right)\leq\sum_{q\in F}w_q. \tag*{(9)} q ∈ F ∑ w q − δ ≤ v i q ∈ F ⋃ A q ≤ q ∈ F ∑ w q . (9)
Thus a union of many shares still incurs a total error of at most δ \delta δ .
The construction
Repair (Algorithm 4) normalizes each agent’s value of U U U to 1 and cuts U U U into n 2 n^2 n 2 nearly common shares, with the targets in Table 3 . On label j j j it places n − 1 n-1 n − 1 buffers, then D j D_j D j , then a large share T j T_j T j . We call D j ∪ T j D_j\cup T_j D j ∪ T j the protected part of label $j (Figure 7 ). Since every agent values every buffer nearly the same, it does not matter which buffers go to which label.
Table 3. The parameters of Repair(N , D , U , α N,D,U,\alpha N , D , U , α ), in units where every agent’s value of U U U is 1.
How the envy is removed. Repair does not remove the envy itself. It arranges the pieces so that one call to Trim , which always returns an envy-free allocation, removes it safely. Trimming removes envy in two ways. A piece wanted by several agents can be trimmed from the front until one of them values it no more than another suffix, and because the buffers come first, this consumes buffer material. Or the envious agent can take the bundle she envied while its holder takes another, which is why the holder of a label may change.
Example 1, continued. Here p = 1 / 36 p=1/36 p = 1/36 and t = 5 / 18 t=5/18 t = 5/18 , so each buffer is worth 2 and each large share 20 to every agent. Every agent’s value is spread evenly on U U U , so blocks of the right lengths are exact common shares. Each label then carries 24 in addition to its input bundle, for every agent; write P j ′ P'_j P j ′ for the piece formed on label j j j :
Agent 3 still envies label 2 by 1. Trim now removes this envy by trimming half of the outer buffer of P 2 ′ P_2' P 2 ′ , worth 1 to everybody, so that agent 3 values label 2 at 28, as much as her own. Every input bundle is intact. Labels 1 and 3 have level 2 and label 2 has level 1, the additions are worth 24, 23 and 24, and the residue is half a buffer.
Why every input bundle survives
We now prove Lemma 3. Use the normalized values of Algorithm 4. Since n t + B p = 1 nt+B_p=1 n t + B p = 1 and B p ≤ 1 / 4 B_p\le1/4 B p ≤ 1/4 , the targets are valid. The output is envy-free by Lemma 7 . It remains to show that no protected part is cut, and to bound the unequal additions and the residue.
Levels. Let S j S_j S j be the returned suffix on label j j j , whoever holds it. Its level ℓ ( j ) \ell(j) ℓ ( j ) is − 1 -1 − 1 if it cuts into the protected part, and otherwise is the number of whole buffers it retains. A suffix of level λ ≥ 0 \lambda\ge0 λ ≥ 0 contains its protected part, λ \lambda λ whole buffers, and at most part of one more buffer. A whole piece has level n − 1 n-1 n − 1 . Repair succeeds exactly when no level is − 1 -1 − 1 .
Step 1: two levels apart means strictly more valuable. Let j j j and l l l be labels with ℓ ( j ) = λ \ell(j)=\lambda ℓ ( j ) = λ and ℓ ( l ) ≥ λ + 2 \ell(l)\ge\lambda+2 ℓ ( l ) ≥ λ + 2 , and look through the eyes of the owner l l l of the upper label l l l , who need not be its final holder. Label l l l carries at least one more whole buffer than label j j j could, even if S j S_j S j keeps part of its next buffer (Figure 8 ). By (9) ,
Figure 8. Step 1 of the proof, through the eyes of the owner l l l of the upper label l l l , with v l ( U ) = 1 v_l(U)=1 v l ( U ) = 1 . A suffix two or more levels higher carries at least one extra whole buffer (outlined), worth about p = 2 α p=2\alpha p = 2 α to her. This outweighs her input envy, v l ( D l ) ≥ v l ( D j ) − α v_l(D_l) \ge v_l(D_j)-\alpha v l ( D l ) ≥ v l ( D j ) − α , because by (9) all deficits together are worth at most δ = α / 2 \delta=\alpha/2 δ = α /2 to her.
v l ( S l ) ≥ v l ( D l ) + t + ( λ + 2 ) p − δ , v l ( S j ) ≤ v l ( D j ) + t + ( λ + 1 ) p . v_l(S_l)\ge v_l(D_l)+t+(\lambda+2)p-\delta,\qquad v_l(S_j)\le v_l(D_j)+t+(\lambda+1)p. v l ( S l ) ≥ v l ( D l ) + t + ( λ + 2 ) p − δ , v l ( S j ) ≤ v l ( D j ) + t + ( λ + 1 ) p .
The second bound holds also at λ = − 1 \lambda=-1 λ = − 1 , since that suffix lies inside its protected part. The input envy bound v l ( D l ) ≥ v l ( D j ) − α v_l(D_l)\ge v_l(D_j)-\alpha v l ( D l ) ≥ v l ( D j ) − α therefore gives
ℓ ( l ) ≥ ℓ ( j ) + 2 ⟹ v l ( S l ) − v l ( S j ) ≥ p − δ − α = α 2 > 0. (10) \ell(l)\ge\ell(j)+2\quad\Longrightarrow\quad v_l(S_l)-v_l(S_j)\ge p-\delta-\alpha=\frac{\alpha}{2}>0. \tag*{(10)} ℓ ( l ) ≥ ℓ ( j ) + 2 ⟹ v l ( S l ) − v l ( S j ) ≥ p − δ − α = 2 α > 0. (10)
In words: one extra buffer is worth p = 2 α p=2\alpha p = 2 α , which outweighs both the envy α \alpha α and the total rounding loss δ = α / 2 \delta=\alpha/2 δ = α /2 . Adjacent levels may differ by only part of a buffer, which is why two levels are needed.
Step 2: no protected part is cut. Suppose some protected part were cut, so that level − 1 -1 − 1 occurs. Level n − 1 n-1 n − 1 also occurs, since a certified allocation keeps some piece whole. With n n n labels and n + 1 n+1 n + 1 possible levels − 1 , 0 , … , n − 1 -1,0,\ldots,n-1 − 1 , 0 , … , n − 1 , some intermediate level μ \mu μ is missing. Let H = { j : ℓ ( j ) < μ } H=\{j:\ell(j)<\mu\} H = { j : ℓ ( j ) < μ } , the labels below the gap; it is nonempty. Every label outside H H H is at least two levels above every label in H H H . By (10) , the owner of each label outside H H H values her own label’s suffix strictly above every suffix in H H H , so none of her favorite labels lies in H H H . Only the ∣ H ∣ |H| ∣ H ∣ owners of labels in H H H can therefore have a favorite label in H H H , and every label in H H H is trimmed, since its level is below μ ≤ n − 2 \mu\le n-2 μ ≤ n − 2 . This contradicts the certification test, Lemma 6. Thus every protected part survives. The buffers are there exactly to make the owners above a gap strictly prefer their own side.
Step 3: only buffers and the rounding residue remain. Let σ ( j ) \sigma(j) σ ( j ) be the final holder of label j j j . We now have W σ ( j ) = S j = D j ∪ Z j W_{\sigma(j)}=S_j=D_j\cup Z_j W σ ( j ) = S j = D j ∪ Z j , where Z j Z_j Z j consists of T j T_j T j and the retained buffers and buffer parts. For every i , j i,j i , j ,
t − δ ≤ v i ( Z j ) ≤ t + ( n − 1 ) p . t-\delta\le v_i(Z_j) \le t+(n-1)p. t − δ ≤ v i ( Z j ) ≤ t + ( n − 1 ) p .
Hence ∣ v i ( Z j ) − v i ( Z l ) ∣ ≤ ( n − 1 ) p + δ ≤ 2 n α \lvert v_i(Z_j)-v_i(Z_l)\rvert\le(n-1)p+\delta\le2n\alpha ∣ v i ( Z j ) − v i ( Z l )∣ ≤ ( n − 1 ) p + δ ≤ 2 n α . The residue contains only discarded buffer parts and U 0 U_0 U 0 from Lemma 10, so v i ( R ′ ) ≤ B p + δ ≤ 2 n 2 α v_i(R') \le Bp+\delta\le2n^2\alpha v i ( R ′ ) ≤ B p + δ ≤ 2 n 2 α . Rescale to obtain the claims. There are n + B = n 2 n+B=n^2 n + B = n 2 slots, giving O ( n 4 log ( n 4 / α ) ) O(n^4\log(n^4/\alpha)) O ( n 4 log ( n 4 / α )) queries beyond the single call to Trim. This proves Lemma 3. □
Computing the common shares
It remains to prove Lemma 10. We adapt the fractional rounding method of Alon and Graur [ [2 ] , who split a necklace into equal shares between thieves; here the shares are prescribed and unequal, and cells are cut with Robertson–Webb queries. The idea has three steps. First, meet every target exactly with a fractional assignment, in which every agent values every slot at exactly its target. Second, make all but a few cells integral without breaking any target, using the fact that the number of split cells is bounded by the number of equations. Third, repeatedly refine only the split cells. Every child has at most three quarters of its parent’s aggregate mass. After d d d rounds, each still-shared cell therefore has aggregate mass at most n ( 3 / 4 ) d n(3/4)^d n ( 3/4 ) d . At most n m nm nm cells are still shared, so their total mass is at most n 2 m ( 3 / 4 ) d n^2m(3/4)^d n 2 m ( 3/4 ) d .
How should a split cell be refined? Halving every agent’s value of it separately would cut it at up to n n n places. A single cut suffices if it is placed well, at a weighted median of the agents’ half-value marks, much as Even and Paz [ [13 ] split a group of agents at a median mark.
Lemma 11 (One cut for a shared cell). Let the n n n normalized measures on an ordered cell E E E be μ i \mu_i μ i , and let W ( E ) = ∑ i μ i ( E ) > 0 W(E)=\sum_i\mu_i(E)>0 W ( E ) = ∑ i μ i ( E ) > 0 . In O ( n ) O(n) O ( n ) queries one can split E E E and record the two children so that each has aggregate mass (most) W ( E ) / 4 W(E)/4 W ( E ) /4 .
Proof. For each agent with w i = μ i ( E ) > 0 w_i=\mu_i(E)>0 w i = μ i ( E ) > 0 , obtain a mark for w i / 2 w_i/2 w i /2 from the front. Give it weight w i w_i w i and choose the first mark at which cumulative weight reaches W ( E ) / 2 W(E)/2 W ( E ) /2 . The marks weakly to either side have at least W ( E ) / 2 W(E)/2 W ( E ) /2 total weight. Each mark weakly to the left contributes at least half its owner’s mass to the left child, so that child has mass at least W ( E ) / 4 W(E)/4 W ( E ) /4 . The right child satisfies the same bound. Their sum is W ( E ) W(E) W ( E ) , giving the two upper bounds. Only the median mark is retained. Its location subdivides at most one physical component, and one evaluation per agent records the resulting masses by subtraction. The reasoning permits tied marks and zero-weight agents. □
Proof of Lemma 10. If m = 1 m = 1 m = 1 , assign all of U U U to the sole slot without queries. For m ≥ 2 m \ge2 m ≥ 2 , fractions are bookkeeping variables, not physical allocations. Think of each slot as a recipient with target w q w_q w q . Initially U U U is one cell, and its fraction in slot q q q is w q w_q w q .
Keep few split cells. For a cell E E E , denote its current fraction in slot q q q by x E q x_{Eq} x E q . Preserve the equations ∑ q x E q = 1 \sum_q x_{Eq} = 1 ∑ q x E q = 1 for every cell E E E and ∑ E v i ( E ) x E q = w q \sum_E v_i(E)x_{Eq} = w_q ∑ E v i ( E ) x E q = w q for every i , q i, q i , q . With κ \kappa κ cells there are at most κ + n m \kappa+ nm κ + nm constraints. If more than κ + n m \kappa+ nm κ + nm fractions are positive, the corresponding columns are linearly dependent. Move the fractions along a dependence until one becomes zero, keeping all fractions nonnegative. The dependence preserves each cell sum, so it has both signs. Only positive fractions are changed, and this ends with at most κ + n m \kappa+ nm κ + nm positive fractions. Cells assigned to one slot never change: their cell equation fixes their only positive fraction at one. As each cell needs at least one positive fraction, at most n m nm nm cells remain split between slots.
Refine the shared cells. Permanently assign each integral cell to its slot. A cell of zero aggregate mass can also be given outright to any slot. Split each remaining shared cell once by Lemma 11, give its children their parent’s fractions and eliminate dependent columns again. Any cell still shared after d d d rounds has descended through d d d splits, since integral cells never become shared again. The initial aggregate mass is n n n , so each surviving shared cell has aggregate mass at most n ( 3 / 4 ) d n(3/4)^d n ( 3/4 ) d . There are at most n m nm nm of them. Take
d = ⌈ log 4 / 3 ( n 2 m δ ) ⌉ . d = \left\lceil\log_{4/3}\left(\frac{n^2m}{\delta}\right) \right\rceil. d = ⌈ log 4/3 ( δ n 2 m ) ⌉ .
Leaving these cells in the residue loses at most n 2 m ( 3 / 4 ) d ≤ δ n^2m(3/4)^d \le\delta n 2 m ( 3/4 ) d ≤ δ aggregate mass, and hence at most δ \delta δ to any agent. The integral slots remain below their targets because all discarded fractions are nonnegative. At most n m nm nm cells cost O ( n ) O(n) O ( n ) queries each per round, including records. Elimination is polynomial in the number of cells, targets and rounds. Fixed pivot and mark orders make all choices deterministic. □
Conclusions
Envy-free cake cutting, posed by Gamow and Stern [ [16 ] , has a long history: it was solved for three agents by Selfridge and Conway, for any number of agents by the finite but unbounded protocol of Brams and Taylor [ [7 ] , and with a bounded number of queries by Aziz and Mackenzie [ [4 ] . Building on the domination framework of the latter, we have given a deterministic protocol that divides a heterogeneous cake completely and without envy among n n n agents using polynomially many Robertson–Webb queries, O ( n 6 log n ) O(n^6 \log n) O ( n 6 log n ) in our analysis. The main new ingredient is certified trimming when the supporting assignment is unknown: a shared table of queries serves all candidate assignments, the median of their estimates bounds each agent’s value from below, and each failed matching test rules out at least half of the remaining candidates. A second median, of the agents’ half-value marks, lets a single repair turn an advantage into a domination.
We expect these ideas to lead to simpler and faster protocols. Certified suffix allocations also seem to merit study in their own right: their structure connects naturally to competitive equilibria, auctions and stable matchings, and exploring these connections may yield new links between fair division and market design.
Development of This Work and Use of AI
The author used LLMs, specifically ChatGPT and Claude, for mathematical exploration and to help with the exposition. Like many follow-up works, the paper builds on the framework of Aziz and Mackenzie [ [4 , 5 ] . The effort focused on a polynomial reduction of the core protocol to computing a certified envy-free suffix allocation and on a formalization of structural properties of these allocations. Some of these properties were known in 2016 and went unused because the bottleneck in Aziz and Mackenzie [ [4 , 5 ] lay elsewhere. After identifying the new reduction and formalizing these structural properties, the author worked extensively with LLMs, guiding them to exploit these properties algorithmically, building on the idea of query-efficient medians, used both to filter candidate assignments and to cut shared pieces at weighted medians. The results emerged from an intensive human–AI collaboration.
Acknowledgments
The author thanks Sarmad Abbasi (for editorial feedback), Florian Brandl (for raising the question of restricting queries to intervals with established endpoints), and Ariel Procaccia (for a suggestion regarding a linear improvement in the bound). The argument in Appendix § 18 comes from a note shared by Procaccia. With a small polynomial upper bound now in place, several experts are now collaborating towards a final sprint towards a final resolution of the lower and upper query bound.
References
The matching test
This appendix proves Lemma 9 , which is used to filter candidates in Algorithm 2. Both searches use standard bipartite matching. We show what each one certifies about the trial values using only the table at y y y .
Proof of Lemma 9. For a piece j j j let N x ( j ) N_x(j) N x ( j ) be the set of nodes joined to j j j in the tie graph at x x x : the agents tight on j j j , and the pin if j j j is whole. Write N x ( J ) = ⋃ j ∈ J N x ( j ) N_x(J) = \bigcup_{j \in J} N_x(j) N x ( J ) = ⋃ j ∈ J N x ( j ) for a set J J J of pieces. We use the strict Hall inequality (6) at x ∗ x^* x ∗ .
Let E E E consist of the pin and the agents i i i with y i = x i ∗ y_i = x_i^* y i = x i ∗ , the nodes whose values are already exact. Since y ≤ x ∗ y \leq x^* y ≤ x ∗ , every piece is at most as long at y y y as at x ∗ x^* x ∗ . Whenever N y ( j ) N_y(j) N y ( j ) meets E E E , piece j j j therefore has the same length at x ∗ x^* x ∗ as at y y y , and strict monotonicity of the marks gives N x ∗ ( j ) = N y ( j ) ∩ E N_{x^*}(j)=N_y(j)\cap E N x ∗ ( j ) = N y ( j ) ∩ E . We use this observation in both cases.
Build the tie graph at y y y , delete the pin, and take a maximum matching of pieces to agents. All lengths are computed before the pin is deleted.
An unmatched piece remains. Search from one unmatched piece j 0 j_0 j 0 along tie-graph edges to agents and back along matching edges. Write J ′ J' J ′ and I ′ I' I ′ for the reached pieces and agents. Every agent in I ′ I' I ′ is matched, since a free reached agent would give an augmenting path. Also I ′ ≠ ∅ I'\ne\varnothing I ′ = ∅ : otherwise j 0 j_0 j 0 is joined only to the pin, and then N x ∗ ( j 0 ) = { o } N_{x^*}(j_0)=\{o\} N x ∗ ( j 0 ) = { o } , contradicting (6).
For ∅ ≠ T ⊆ I ′ \varnothing\ne T\subseteq I' ∅ = T ⊆ I ′ , let J T = { j ∈ J ′ : N y ( j ) ∩ T ≠ ∅ } J_T=\{j\in J':N_y(j)\cap T\ne\varnothing\} J T = { j ∈ J ′ : N y ( j ) ∩ T = ∅ } . The pieces matched to T T T already give ∣ T ∣ |T| ∣ T ∣ members. A search path entering T T T for the first time supplies one more, since the piece preceding its first agent in T T T is unmatched or matched to an agent outside T T T . Hence ∣ J T ∣ ≥ ∣ T ∣ + 1 |J_T|\ge|T|+1 ∣ J T ∣ ≥ ∣ T ∣ + 1 . Take T = I ′ ∩ E T=I'\cap E T = I ′ ∩ E . If it were nonempty, every piece in J T J_T J T would keep its length, and every agent tight on it at x ∗ x^* x ∗ would lie in T T T . Allowing for the pin, this would give
∣ J T ∣ + 1 ≤ ∣ N x ∗ ( J T ) ∣ ≤ ∣ T ∣ + 1 ≤ ∣ J T ∣ , |J_T|+1\le|N_{x^*}(J_T)|\le|T|+1\le|J_T|, ∣ J T ∣ + 1 ≤ ∣ N x ∗ ( J T ) ∣ ≤ ∣ T ∣ + 1 ≤ ∣ J T ∣ ,
where the first inequality is (6). Thus I ′ ∩ E = ∅ I'\cap E=\varnothing I ′ ∩ E = ∅ , and every k ∈ I ′ k\in I' k ∈ I ′ satisfies y k < x k ∗ y_k<x_k^* y k < x k ∗ .
All pieces are matched. Restore the pin, which is now free, and search from it along tie-graph edges to pieces and along matching edges back to agents. Let A A A consist of the pin and the reached agents. These are exactly the nodes that a matching of all pieces along tie-graph edges at y y y can leave uncovered. Switching the matching along a search path proves one direction, and superposing the current matching with a matching that leaves a given node uncovered proves the converse.
If such a matching left uncovered a node outside E E E , it would cover all ∣ E ∣ |E| ∣ E ∣ nodes of E E E . The pieces J J J matched to them would keep their lengths and satisfy N x ∗ ( J ) ⊆ E N_{x^*}(J)\subseteq E N x ∗ ( J ) ⊆ E , hence ∣ J ∣ + 1 ≤ ∣ N x ∗ ( J ) ∣ ≤ ∣ E ∣ = ∣ J ∣ |J|+1\le|N_{x^*}(J)|\le|E|=|J| ∣ J ∣ + 1 ≤ ∣ N x ∗ ( J ) ∣ ≤ ∣ E ∣ = ∣ J ∣ . This proves A ⊆ E A\subseteq E A ⊆ E . If T = E ∖ A T=E\setminus A T = E ∖ A were nonempty, let J J J be the ∣ T ∣ |T| ∣ T ∣ pieces matched to it. No such piece is joined at y y y to a node of A A A , since that edge would make its matched agent reachable. Each keeps its length through its matched agent in T T T , so N x ∗ ( J ) ⊆ T N_{x^*}(J)\subseteq T N x ∗ ( J ) ⊆ T , and again ∣ J ∣ + 1 ≤ ∣ N x ∗ ( J ) ∣ ≤ ∣ T ∣ = ∣ J ∣ |J|+1\le|N_{x^*}(J)|\le|T|=|J| ∣ J ∣ + 1 ≤ ∣ N x ∗ ( J ) ∣ ≤ ∣ T ∣ = ∣ J ∣ . Therefore A = E A=E A = E . If A A A contains every agent, then y = x ∗ y=x^* y = x ∗ and the current matching is a supporting assignment. Otherwise every agent k ∉ A k\notin A k ∈ / A satisfies y k < x k ∗ y_k<x_k^* y k < x k ∗ .
Zero-valued intervals and empty pieces
The positive solver uses the same suffix position for every agent and compares one agent’s values across pieces. On a zero-mass interval several positions can give the same value, so breaking ties independently on each agent–piece pair can destroy a comparison. We simulate the agents’ suffix curves V i j V_{ij} V ij themselves; the marks used by the median algorithm are their inverses. [Ye and Bai [2026]] also use ordered keys to break ties.
Lemma 12 (Realization and projection of a trimming transcript). Let F i j ( p ) F_{ij}(p) F ij ( p ) be agent i i i ’s mass of the suffix at physical position p p p on ordered piece j j j . As the suffix grows from empty to whole, F i j F_{ij} F ij is continuous and nondecreasing along every component. An empty piece has one position. An isolated endpoint component has positions before and after its inclusion, with equal mass. Given component records, each forward or inverse query to a virtual strictly increasing suffix curve costs at most one physical query. Every finite adaptive transcript is realized by a single positive profile. For a deterministic solver correct on positive inputs, registering its returned suffix lengths for all agents takes at most n 2 n^2 n 2 final evaluations. Its returned allocation then projects to a physical certified allocation with the same assignment and certifying order.
Proof. For each agent–piece pair ( i , j ) (i,j) ( i , j ) , let T i j T_{ij} T ij be the finite table of registered virtual length–amount pairs. The simulation maintains three invariants on the registered keys.
For each piece j j j , a single nondecreasing map ϕ j \phi_j ϕ j takes virtual lengths in [ 0 , 1 ] [0,1] [ 0 , 1 ] to physical suffix positions. Every agent uses this map on j j j .
For each agent i i i , a single nondecreasing map ψ i \psi_i ψ i takes virtual amounts to true values. She uses this map on every piece.
For each pair ( i , j ) (i,j) ( i , j ) , the length–amount pairs ( t , x ) (t,x) ( t , x ) in T i j T_{ij} T ij are strictly increasing in both coordinates in the same order, and satisfy
F i j ( ϕ j ( t ) ) = ψ i ( x ) ( ( t , x ) ∈ T i j ) . (11) F_{ij}(\phi_j(t))=\psi_i(x)\qquad((t,x)\in T_{ij}). \tag*{(11)} F ij ( ϕ j ( t )) = ψ i ( x ) (( t , x ) ∈ T ij ) . (11)
Distinct keys may have the same physical image. Even an empty piece can therefore have a strictly increasing virtual curve.
Initialization. Map 0 , 1 0,1 0 , 1 on each piece to its empty and whole positions, even when these coincide. For each agent i i i , sort her values of the whole pieces, using a fixed label order to resolve ties. Give them distinct ranks w i j ∈ { 1 , … , n } w_{ij}\in\{1,\ldots,n\} w ij ∈ { 1 , … , n } in this order. Set ψ i ( 0 ) = 0 \psi_i(0)=0 ψ i ( 0 ) = 0 , map each rank to its true whole amount, and start T i j T_{ij} T ij with ( 0 , 0 ) , ( 1 , w i j ) (0,0),(1,w_{ij}) ( 0 , 0 ) , ( 1 , w ij ) . All three invariants hold.
Insertion in an ordered map. Let h h h denote either ϕ j \phi_j ϕ j or ψ i \psi_i ψ i on its registered keys. Suppose two existing keys a < b a<b a < b bracket a requested image u u u in the sense that h ( a ) ≤ u ≤ h ( b ) h(a)\leq u\leq h(b) h ( a ) ≤ u ≤ h ( b ) . Among the registered keys from a a a to b b b there are consecutive keys d < e d<e d < e with h ( d ) ≤ u ≤ h ( e ) h(d)\leq u\leq h(e) h ( d ) ≤ u ≤ h ( e ) . This follows by inspecting the first image at least u u u , using the first adjacent pair if h ( a ) = u h(a)=u h ( a ) = u . Insert the fresh midpoint ( d + e ) / 2 (d+e)/2 ( d + e ) /2 with image u u u . This preserves order, including when all three images are equal. Conversely, to insert a prescribed fresh key, any image between the images of its two global neighbors is admissible. Fix the first eligible gap and the lower neighboring image for these choices.
Forward query at t t t . Return the stored amount if T i j T_{ij} T ij already contains t t t . Otherwise its adjacent entries ( t − , x − ) , ( t + , x + ) (t^-,x^-),(t^+,x^+) ( t − , x − ) , ( t + , x + ) bracket t t t . If t t t has no image under ϕ j \phi_j ϕ j , insert that prescribed key as above. Evaluate u = F i j ( ϕ j ( t ) ) u=F_{ij}(\phi_j(t)) u = F ij ( ϕ j ( t )) . By monotonicity and (11), ψ i ( x − ) ≤ u ≤ ψ i ( x + ) \psi_i(x^-)\leq u\leq\psi_i(x^+) ψ i ( x − ) ≤ u ≤ ψ i ( x + ) . Use the insertion rule on ψ i \psi_i ψ i between x − , x + x^-,x^+ x − , x + to choose a fresh x x x with image u u u . Add ( t , x ) (t,x) ( t , x ) to T i j T_{ij} T ij and return x x x .
Inverse query at x x x . Return the stored length if x x x is in the second column of T i j T_{ij} T ij . Otherwise bracket it by ( t − , x − ) , ( t + , x + ) (t^-,x^-),(t^+,x^+) ( t − , x − ) , ( t + , x + ) . If necessary insert the prescribed key x x x into ψ i \psi_i ψ i , between the images of its global neighbors. Put u = ψ i ( x ) u=\psi_i(x) u = ψ i ( x ) . Request a physical suffix of amount u u u on j j j , and clamp the returned position to [ ϕ j ( t − ) , ϕ j ( t + ) ] [\phi_j(t^-),\phi_j(t^+)] [ ϕ j ( t − ) , ϕ j ( t + )] . This preserves its amount. For example, a returned position left of the bracket has amount u u u , while the left endpoint has amount at most u u u by (11) and at least u u u by monotonicity. The other endpoint is symmetric. Insert the resulting position as the image of a fresh key t t t in the global map ϕ j \phi_j ϕ j , between t − , t + t^-,t^+ t − , t + . Add ( t , x ) (t,x) ( t , x ) and return t t t . Both rules operate only inside the virtual endpoint pairs. Outside this range use the known slope-one continuation w i j + t − 1 w_{ij}+t-1 w ij + t − 1 or its inverse without a physical query.
One physical query suffices. Each update preserves the registered pairs and inserts the new pair strictly between its neighbors in both coordinates. Identity (11) holds by construction, including for any valid cut answer on a plateau. The component records locate the boundary interval, so a new virtual query needs at most one ordinary evaluation or cut there.
Realizing the entire transcript. Fix a finite transcript, including any evaluations made to read the output. For every pair ( i , j ) (i,j) ( i , j ) , join successive entries of T i j T_{ij} T ij by straight lines and append its prescribed tail. The resulting strictly increasing curve agrees with every forward and inverse answer for that pair. Its increments on the virtual piece define a positive nonatomic measure. Adding these measures across the disjoint virtual pieces gives one valuation profile realizing the entire transcript. If the simulated solver exceeded its uniform query bound, that finite prefix would therefore occur on a positive input as well. The same argument transfers its operation bound, apart from maintaining the finite tables.
Projecting the certificate. Register each suffix length returned by the solver for every agent, using at most n 2 n^2 n 2 final evaluations. On every positive profile realizing this extended transcript, determinism gives the same returned lengths, assignment and certifying order. By (i), each chosen length denotes one physical suffix for everyone. By (ii) and (11) , a comparison x ≤ x ′ x \le x' x ≤ x ′ across two pieces for agent i i i gives ψ i ( x ) ≤ ψ i ( x ′ ) \psi_i(x) \le\psi_i(x') ψ i ( x ) ≤ ψ i ( x ′ ) , and a witness equality gives equal physical values. Whole virtual pieces still project to whole pieces. If another suffix also projects to a whole piece, it already satisfies the whole-piece clause. Thus the same assignment is physically envy-free, and the same order certifies every physical trim.
Example 2 (A virtual tie on two zero-valued pieces). Suppose one agent sees masses 0, 0, and 1 on pieces A A A , B B B , C C C , where A A A is empty and B B B is nonempty but worthless. With label order A A A , B B B , C C C , initialization gives ψ i ( 0 ) = ψ i ( 1 ) = ψ i ( 2 ) = 0 \psi_i(0)=\psi_i(1)=\psi_i(2)=0 ψ i ( 0 ) = ψ i ( 1 ) = ψ i ( 2 ) = 0 and ψ i ( 3 ) = 1 \psi_i(3)=1 ψ i ( 3 ) = 1 . Asking for amount 1 on B B B returns an interior virtual length between 0 and 1, since T i B T_{iB} T i B has endpoint amounts 0 and 2. Its physical image can be anywhere among the admissible zero-mass positions on B B B . It has exactly the same true amount as whole A A A , whose virtual amount is also 1. This is the equality a certificate must preserve.
General capped squares
The arguments of § 5.4 and § 5.5 and of Appendix § 11 use the marks only as continuous strictly increasing bijections of [ 0 , ∞ ) [0,\infty) [ 0 , ∞ ) onto itself, and the lengths only through the minimum (4) , with cap one. This appendix states the same results for general curves of this kind. Appendices D D D and E E E use them for chores and assignment markets.
A capped square has q q q rows and q + 1 q+1 q + 1 columns: q q q ordinary columns and one spare column o o o , the pin. Write K \mathcal{K} K for the set of all columns. A vector x ∈ [ 0 , ∞ ) K x \in[0,\infty)^{\mathcal{K}} x ∈ [ 0 , ∞ ) K assigns a level to every column. Each row i i i and column j j j have a cost curve f i j f_{ij} f ij , a continuous strictly increasing bijection of [ 0 , ∞ ) [0,\infty) [ 0 , ∞ ) onto itself. A forward query returns f i j ( x ) f_{ij}(x) f ij ( x ) , and an inverse query returns f i j − 1 ( z ) f_{ij}^{-1}(z) f ij − 1 ( z ) . At levels x x x the cost of row i i i is
z i ( x ) = min j ∈ K f i j ( x j ) , z_i(x)=\min_{j\in\mathcal{K}} f_{ij}(x_j), z i ( x ) = j ∈ K min f ij ( x j ) ,
and the columns attaining the minimum are its tight columns . The pin is fixed at level x o = 1 x_o=1 x o = 1 , and row i i i has the linear curve f i o ( t ) = c i t f_{io}(t)=c_i t f i o ( t ) = c i t on it. Thus the pin offers row i i i a fixed alternative of cost c i > 0 c_i>0 c i > 0 , its cap . A vector of ordinary levels is a capped equilibrium if a perfect matching between rows and ordinary columns assigns each row a cheapest ordinary column, at a cost at most its cap.
A vector x x x with x o = 1 x_o=1 x o = 1 is fully exposable if, for every column j ∈ K j\in\mathcal{K} j ∈ K , the pin included, the tight edges can match all rows while leaving j j j uncovered. At a fully exposable vector, a tight matching of all rows that leaves the pin uncovered is a supporting assignment .
Certified cake trimming is the capped square with q = n q=n q = n , the pieces as rows, the agents as ordinary columns, the marks f j i = V i j − 1 f_{ji}=V_{ij}^{-1} f j i = V ij − 1 as curves, and every cap equal to one. The cost of row j j j is then the length t j ( x ) t_j(x) t j ( x ) of (4) , a row is tight with an agent or with the pin exactly when it is joined to it in the tie graph, capped equilibria are the envy-free value vectors, and full exposability and supporting assignments are as in § 5.4 .
Conversely, divide each row’s curves by its cap, setting f i j ′ = f i j / c i f'_{ij}=f_{ij}/c_i f ij ′ = f ij / c i . This gives cap one and preserves the minimizing columns in every row at every vector. A query to a normalized curve or its inverse costs one original query and one arithmetic operation. Regard row i i i as a cake piece and ordinary column j j j as an agent. On physical lengths 0 ≤ t ≤ 1 0\le t\le1 0 ≤ t ≤ 1 , set V j i ( t ) = ( f i j ′ ) − 1 ( t ) V_{ji}(t)=(f'_{ij})^{-1}(t) V j i ( t ) = ( f ij ′ ) − 1 ( t ) . These continuous strictly increasing functions start at zero, so their increments define positive nonatomic valuations on the pieces. Extend V j i V_{ji} V j i with slope one as in § 5.4 . For targets above V j i ( 1 ) V_{ji}(1) V j i ( 1 ) , both the original and the new mark exceed one, so the capped lengths and tight edges agree. Recording the q 2 q^2 q 2 whole-piece values, each evaluation or mark costs at most one original query.
Proposition 2 now gives a unique fully exposable vector x ∗ x^* x ∗ , whose ordinary levels form the coordinatewise greatest capped equilibrium. In the tie graph at x ∗ x^* x ∗ , every supporting assignment gives each row a path of ties to a row attaining its cap. Lemmas 8 and 9 and Theorem 2 apply to these value curves. For q ≥ 2 q \ge2 q ≥ 2 , Algorithm 2 therefore computes x ∗ x^* x ∗ and a supporting assignment in O ( q 5 log q ) O(q^5 \log q) O ( q 5 log q ) forward and inverse queries. With one row, its sole ordinary level is f 11 − 1 ( c 1 ) f_{11}^{-1}(c_1) f 11 − 1 ( c 1 ) .
Polynomial reductions between cake, chores, and equilibrium
Inverting suffix functions and exchanging the roles of agents and pieces gives polynomial reductions in both directions. One direction needs an extra agent and piece to normalize the endpoints.
Assume that each piece consists of one or more intervals of positive length and that every agent assigns positive value or cost to every interval of positive length. Parameterizing each suffix by its retained length in [ 0 , 1 ] [0,1] [ 0 , 1 ] gives continuous, strictly increasing suffix functions vanishing at zero. We use Robertson–Webb queries, exact arithmetic, and the component records of § 3 . Thus polynomial time means polynomially many oracle calls and additional exact operations. This is not a bit-complexity claim for unrestricted real functions. The reductions below require strict growth; Appendix § 12 handles zero values for certified trimming itself.
Two-way reductions for certified trimming
For chores, each envy-free agent receives a least-cost suffix; certification orders the holders so that every proper suffix’s holder ties an earlier holder’s suffix with her own. For both signs, the certified suffix vector is the coordinatewise greatest envy-free vector, and every envy-free matching of it is certified. For cake this follows from Proposition 1, Lemma 6 and § 5.4 . For chores, use a capped square (Appendix § 13 ) in which agents are rows, pieces are ordinary columns, the curves are the costs f i j f_{ij} f ij , and the caps are c i = min j f i j ( 1 ) c_i = \min_j f_{ij}(1) c i = min j f ij ( 1 ) . Every physical envy-free matching satisfies the caps, and in any capped equilibrium the row assigned to each ordinary column bounds its level by one. At the greatest vector x ∗ x^* x ∗ , a holder attaining her cap ties a whole piece. Indeed, if f i k ( 1 ) = c i f_{ik}(1) = c_i f ik ( 1 ) = c i , then c i ≤ f i k ( x k ∗ ) ≤ c i c_i \le f_{ik}(x_k^*) \le c_i c i ≤ f ik ( x k ∗ ) ≤ c i , so x k ∗ = 1 x_k^* = 1 x k ∗ = 1 . Proposition 2, in the general form of Appendix § 13 , leads every holder along ties to such a row, certifying every ordinary tight matching. Conversely, in a physical chore certificate every holder reaches a whole-piece holder. That holder attains her cap. A switch along the path ending at the pin vacates any chosen ordinary column, which characterizes the same greatest vector.
Proposition 3 (Polynomial-time oracle equivalence). Certified chore trimming on n n n agents and pieces reduces to certified cake trimming on n n n agents and pieces. The reverse reduction uses at most n + 1 n+1 n + 1 agents and pieces. Each uses one target-solver call, O ( n 2 ) O(n^2) O ( n 2 ) preprocessing and recovery queries, O ( 1 ) O(1) O ( 1 ) original queries per simulated query, and polynomial additional work in the available records. Both recover the greatest suffix vector and a certified assignment.
Proof. From chores to cake. Let f i j ( x ) f_{ij}(x) f ij ( x ) be chore agent i i i ’s cost of the suffix of length x x x on piece j j j , and set b i = min j f i j ( 1 ) > 0 b_i = \min_j f_{ij}(1) > 0 b i = min j f ij ( 1 ) > 0 . Create one cake agent for each chore piece j j j , and one cake piece for each chore agent i i i , with suffix values
G j i ( s ) = f i j − 1 ( b i s ) , 0 ≤ s ≤ 1. (12) G_{ji}(s) = f_{ij}^{-1}(b_i s), \qquad0 \le s \le1. \tag*{(12)} G j i ( s ) = f ij − 1 ( b i s ) , 0 ≤ s ≤ 1. (12)
The inverse is defined because b i ≤ f i j ( 1 ) b_i \le f_{ij}(1) b i ≤ f ij ( 1 ) . Each G j i G_{ji} G j i is continuous, strictly increasing, and zero at zero, so it specifies a valid nonatomic valuation on the new piece. Figure 9 shows how a matched pair and its suffix values transform.
Figure 9. The chore-to-cake construction (12) for a matched pair. On the left, chore agent i i i holds a suffix of length x j x_j x j on piece j j j , and cake agent j j j holds a suffix of length s i s_i s i on piece i i i . Dashed lines show the exchange of roles, and the trimmed fronts are hatched. The highlighted part of f i j f_{ij} f ij runs up to b i = min k f i k ( 1 ) b_i = \min_k f_{ik}(1) b i = min k f ik ( 1 ) . Swapping the axes and dividing costs by b i b_i b i gives the cake value G j i ( s ) = f i j − 1 ( b i s ) G_{ji}(s) = f_{ij}^{-1}(b_i s) G j i ( s ) = f ij − 1 ( b i s ) . The marked points illustrate f i j ( x j ) = b i s i f_{ij}(x_j) = b_i s_i f ij ( x j ) = b i s i and G j i ( s i ) = x j G_{ji}(s_i) = x_j G j i ( s i ) = x j from (13) , with b i = 1 b_i = 1 b i = 1 in the plots.
The following maps convert envy-free allocations in both directions, reversing their matchings:
x j = max i G j i ( s i ) , s i = min j f i j ( x j ) b i . (13) x_j = \max_i G_{ji}(s_i), \qquad s_i = \frac{\min_j f_{ij}(x_j)}{b_i}. \tag*{(13)} x j = i max G j i ( s i ) , s i = b i min j f ij ( x j ) . (13)
For the first map, suppose cake agent j j j holds cake piece i i i . Envy-freeness gives G j i ( s i ) = x j G_{ji}(s_i) = x_j G j i ( s i ) = x j , so f i j ( x j ) = b i s i f_{ij}(x_j) = b_i s_i f ij ( x j ) = b i s i . For every other chore label k k k , the definition of x k x_k x k gives f i k ( x k ) ≥ b i s i f_{ik}(x_k) \ge b_i s_i f ik ( x k ) ≥ b i s i . Giving chore piece j j j to agent i i i is therefore envy-free. Conversely, in a chore allocation let d i = min j f i j ( x j ) d_i = \min_j f_{ij}(x_j) d i = min j f ij ( x j ) . Since x j ≤ 1 x_j \le1 x j ≤ 1 , we have 0 ≤ d i ≤ b i 0 \le d_i \le b_i 0 ≤ d i ≤ b i . With s i = d i / b i s_i = d_i/b_i s i = d i / b i , every G j i ( s i ) ≤ x j G_{ji}(s_i) \le x_j G j i ( s i ) ≤ x j , with equality when i i i holds j j j . Thus the reversed matching is cake-envy-free.
The matched equalities also show that the two maps in (13) are mutual inverses on envy-free suffix vectors. Both maps are coordinatewise nondecreasing. They therefore carry the greatest envy-free vector of either instance to the greatest vector of the other. By the characterization above, a certified cake output recovers a certified chore allocation.
From cake to chores: normalize the whole-piece values. Let v i j ( s ) v_{ij}(s) v ij ( s ) be the input cake values. Put M = 2 max i , j v i j ( 1 ) M = 2 \max_{i,j} v_{ij}(1) M = 2 max i , j v ij ( 1 ) and h i j = v i j / M h_{ij} = v_{ij}/M h ij = v ij / M . This common scaling changes no comparison or certificate. Add a dummy agent 0 and piece 0. With δ i = 1 2 min j h i j ( 1 ) > 0 \delta_i = \frac{1}{2}\min_j h_{ij}(1) > 0 δ i = 2 1 min j h ij ( 1 ) > 0 , define
H i j ( s ) = h i j ( s ) ( i , j ≠ 0 ) , H i 0 ( s ) = δ i s ( i ≠ 0 ) , H 0 j ( s ) = s ( all j ) . (14) \begin{aligned}
H_{ij}(s) &= h_{ij}(s) \quad(i,j \ne0), \qquad H_{i0}(s) = \delta_i s \quad(i \ne0), \qquad H_{0j}(s) = s \quad(\text{all } j). \tag*{(14)}
\end{aligned} H ij ( s ) = h ij ( s ) ( i , j = 0 ) , H i 0 ( s ) = δ i s ( i = 0 ) , H 0 j ( s ) = s ( all j ) . (14)
Consequently max i H i j ( 1 ) = 1 \max_i H_{ij}(1) = 1 max i H ij ( 1 ) = 1 for every piece j j j .
This padding preserves the certified solution. To see this, let s ∗ s^* s ∗ be the original certified vector. Some original piece k k k is whole. By envy-freeness, each real agent’s own value is at least h i k ( 1 ) ≥ 2 δ i h_{ik}(1) \ge2\delta_i h ik ( 1 ) ≥ 2 δ i , so she does not envy the whole dummy piece. The dummy agent can hold that piece without envy, since every suffix has length at most one. Put her first in the original certificate: this certifies ( s ∗ , 1 ) (s^*, 1) ( s ∗ , 1 ) in the enlarged instance. Uniqueness forces every certified output there to have these same lengths. In any such output, no real agent can hold piece 0, because she would envy the whole original piece k k k . Removing agent and piece 0 therefore leaves an envy-free matching of s ∗ s^* s ∗ , which is certified by Lemma 6 .
Extend each H i j H_{ij} H ij beyond 1 by H i j ( s ) = H i j ( 1 ) + s − 1 H_{ij}(s) = H_{ij}(1) + s - 1 H ij ( s ) = H ij ( 1 ) + s − 1 for s ≥ 1 s \ge1 s ≥ 1 . Define the chore instance, again transposing agents and labels, by
F j i ( x ) = H i j − 1 ( x ) , 0 ≤ x ≤ 1. (15) F_{ji}(x) = H_{ij}^{-1}(x), \qquad0 \le x \le1. \tag*{(15)} F j i ( x ) = H ij − 1 ( x ) , 0 ≤ x ≤ 1. (15)
Here min i F j i ( 1 ) = 1 \min_i F_{ji}(1) = 1 min i F j i ( 1 ) = 1 : all whole-piece cake values are at most one and the dummy agent’s are exactly one. Applying (12) to this chore instance therefore returns precisely the enlarged cake instance on [ 0 , 1 ] [0,1] [ 0 , 1 ] . The bidirectional correspondence already proved converts any certified chore output to its certified cake output; deleting the dummy agent and piece solves the original instance.
Oracle cost. Evaluating G j i G_{ji} G j i uses one original suffix cut; its inverse G j i − 1 ( z ) = f i j ( z ) / b i G_{ji}^{-1}(z) = f_{ij}(z)/b_i G j i − 1 ( z ) = f ij ( z ) / b i uses one suffix evaluation. The reverse construction adds only explicit scaling and linear functions. Whole-piece records and output recovery cost O ( n 2 ) O(n^2) O ( n 2 ) queries. With these records, arbitrary virtual evaluations and cuts use O ( 1 ) O(1) O ( 1 ) boundary queries, summing known values for intervening whole pieces. Searching records, reversing the matching, and recovering a certificate by reachability take polynomial work. □
Connection to minimum-price equilibrium
Create one buyer per cake agent, one indivisible good per piece, and an outside option of utility zero. Buyer i i i ’s utility for good j j j at price p ≥ 0 p \ge0 p ≥ 0 is
U i j ( p ) = { v i j ( 1 − p ) , 0 ≤ p ≤ 1 , 1 − p , p ≥ 1. (16) U_{ij}(p) =
\begin{cases}
v_{ij}(1-p), & 0 \le p \le1, \\
1-p, & p \ge1.
\end{cases} \tag*{(16)} U ij ( p ) = { v ij ( 1 − p ) , 1 − p , 0 ≤ p ≤ 1 , p ≥ 1. (16)
These utilities are continuous, strictly decreasing, and need not be quasilinear. A competitive equilibrium assigns each buyer a utility-maximizing good or the outside option, and every unassigned good has price zero [1 ] .
Every equilibrium matches all buyers: otherwise an unmatched buyer strictly prefers an unassigned zero-price good to the outside option. Individual rationality implies p j ≤ 1 p_j \le1 p j ≤ 1 . Equilibria therefore correspond exactly to envy-free suffix allocations through s j = 1 − p j s_j = 1-p_j s j = 1 − p j , with the same matching. By Proposition 1, the certified vector s ∗ s^* s ∗ corresponds to the coordinatewise minimum equilibrium prices p j min = 1 − s j ∗ p_j^{\min} = 1-s_j^* p j m i n = 1 − s j ∗ . This gives polynomial-time oracle reductions in both directions between certified cake trimming and minimum-price equilibrium for the class (16). If only prices are returned, O ( n 2 ) O(n^2) O ( n 2 ) utility evaluations and a perfect matching recover the allocation. Utility and inverse-utility queries translate into suffix evaluations and cuts with constant overhead.
These reductions carry the polynomial query guarantee to the displayed class of nonlinear markets, with utility and inverse-utility oracles. Appendix § 15 applies the median algorithm of Theorem 2 directly to a more general assignment market.
Buyer-optimal assignment with nonlinear utilities
The capped square of Appendix § 13 also gives a query bound in a unit-demand assignment market with item reserves and buyer outside options. Alaei et al. [ [1 ] characterize extremal equilibria for general utility curves. Dütting et al. [ [11 ] study assignment with explicitly represented general utility curves. Here each curve is given by exact forward and inverse queries. The conclusion concerns the number of such queries.
There are b ≥ 1 b \ge1 b ≥ 1 buyers and m ≥ 1 m \ge1 m ≥ 1 items. Buyer i i i has outside utility ω i \omega_i ω i and utility U i j ( P j ) U_{ij}(P_j) U ij ( P j ) when she receives item j j j at price P j P_j P j . Item j j j has reserve r j r_j r j . A competitive equilibrium consists of a partial matching and prices P j ≥ r j P_j \ge r_j P j ≥ r j . A matched buyer receives an item maximizing her utility over all items and her outside option. An unmatched buyer attains her maximum at the outside option. Every unsold item has price r j r_j r j . Reserves in this model depend only on the item.
Corollary 2 (Polynomial queries for buyer-optimal assignment). Suppose every U i j U_{ij} U ij on [ r j , ∞ ) [r_j,\infty) [ r j , ∞ ) is continuous and strictly decreasing, and falls strictly below ω i \omega_i ω i at some finite price. A forward query returns U i j ( P ) U_{ij}(P) U ij ( P ) and an inverse query returns the price attaining a specified utility in the curve’s range. With these oracles a deterministic algorithm computes the componentwise minimum equilibrium price vector and a supporting matching in
O ( ( b + m ) 5 log ( 2 ( b + m ) ) ) O\bigl((b+m)^5 \log(2(b+m))\bigr) O ( ( b + m ) 5 log ( 2 ( b + m )) ) queries. The returned equilibrium simultaneously maximizes every buyer’s equilibrium utility. The direct implementation uses ( b + m ) ! ( b + m ) O ( 1 ) (b+m)!(b+m)^{O(1)} ( b + m )! ( b + m ) O ( 1 ) exact operations.
Proof. Normalize and extend the curves. Put p j = P j − r j p_j=P_j-r_j p j = P j − r j and v i j ( p ) = U i j ( r j + p ) − ω i v_{ij}(p)=U_{ij}(r_j+p)-\omega_i v ij ( p ) = U ij ( r j + p ) − ω i for p ≥ 0 p \ge0 p ≥ 0 . Outside utility and reserves are now zero. Extend each v i j v_{ij} v ij to negative prices by v i j ( p ) = v i j ( 0 ) − p v_{ij}(p)=v_{ij}(0)-p v ij ( p ) = v ij ( 0 ) − p for p < 0 p<0 p < 0 . Write w i j ( u ) w_{ij}(u) w ij ( u ) for its inverse at u ≥ 0 u \ge0 u ≥ 0 . The inverse exists because the extension is strictly decreasing. unbounded above and the original curve eventually drops below zero. If u > V i j ( 0 ) u > V_{ij}(0) u > V ij ( 0 ) its price is V i j ( 0 ) − u < 0 V_{ij}(0) - u < 0 V ij ( 0 ) − u < 0 , computed arithmetically. Otherwise one original inverse query suffices. Thus the extension introduces no assumption about preferences at negative prices in the original market.
Make every assignment full. Add m m m dummy buyers and b b b dummy items, giving N = b + m N = b + m N = b + m buyers and N N N items. Every pair involving a dummy has utility − p -p − p and outside utility zero. An original equilibrium extends to a full matching in the padded market. Pair unmatched real buyers with dummy items, unsold real items with dummy buyers, and then pair the remaining dummies. Keep the original prices on real items and give every dummy item price zero. Existence for continuous strictly decreasing utilities and finite willingness to pay follows from the competitive-equilibrium theorem of Alaei et al. [ [1 ] .
Conversely, in any full individually rational equilibrium of this padded market, every dummy item is priced zero. Its holder has utility − p ≥ 0 -p \ge0 − p ≥ 0 and its price is nonnegative. Every dummy buyer also receives utility zero and can hold only a zero-price item. On deleting the dummies, unmatched real buyers consequently have utility zero and unsold real items have price zero. All remaining demand inequalities persist, so the restriction is an original equilibrium.
Encode the market as a capped square. Let items be the rows and buyers be the ordinary columns. Choose
c j = 1 + max ( { 0 } ∪ { w i j ( 0 ) : i a padded buyer } ) . c_j = 1 + \max\left(\{0\} \cup\{w_{ij}(0) : i\text{ a padded buyer}\}\right). c j = 1 + max ( { 0 } ∪ { w ij ( 0 ) : i a padded buyer } ) .
For a buyer-column level x ≥ 1 x \ge1 x ≥ 1 define the cost
f j i ( x ) = c j − w i j ( x − 1 ) . f_{ji}(x) = c_j - w_{ij}(x - 1). f j i ( x ) = c j − w ij ( x − 1 ) .
On 0 ≤ x ≤ 1 0 \le x \le1 0 ≤ x ≤ 1 use the line x ( c j − w i j ( 0 ) ) x(c_j - w_{ij}(0)) x ( c j − w ij ( 0 )) . These functions are continuous strictly increasing bijections of the nonnegative ray, since c j > w i j ( 0 ) c_j > w_{ij}(0) c j > w ij ( 0 ) and w i j ( u ) → − ∞ w_{ij}(u) \to-\infty w ij ( u ) → − ∞ as u → ∞ u \to\infty u → ∞ . Give row j j j cap c j c_j c j , implemented by the pin. Every forward or inverse query to these cost curves uses at most one original utility or inverse-utility query, apart from the initial values. For example, above the linear segment an inverse query at cost z z z returns x = 1 + V i j ( c j − z ) x = 1 + V_{ij}(c_j - z) x = 1 + V ij ( c j − z ) . Its argument is at most w i j ( 0 ) w_{ij}(0) w ij ( 0 ) , so the required utility is nonnegative. Negative arguments use the known extension.
A padded equilibrium with utilities u i ≥ 0 u_i \ge0 u i ≥ 0 and prices p j ≥ 0 p_j \ge0 p j ≥ 0 satisfies
w i j ( u i ) ≤ p j for every i , j , w i j ( u i ) = p j on matched pairs . w_{ij}(u_i) \le p_j \qquad\text{for every } i,j,\qquad w_{ij}(u_i) = p_j \qquad\text{on matched pairs}. w ij ( u i ) ≤ p j for every i , j , w ij ( u i ) = p j on matched pairs .
Hence x i = 1 + u i x_i = 1 + u_i x i = 1 + u i and the reversed matching form a capped equilibrium, with row cost c j − p j ≤ c j c_j - p_j \le c_j c j − p j ≤ c j . By Proposition 2 in the general form of Appendix § 13 , the greatest capped equilibrium x ∗ x^* x ∗ dominates this one. In particular every x i ∗ ≥ 1 x_i^* \ge1 x i ∗ ≥ 1 . Apply Theorem 2 in the general form of Appendix § 13 , reverse its ordinary matching, and put
u i ∗ = x i ∗ − 1 , p j ∗ = c j − min i f j i ( x i ∗ ) = max i w i j ( u i ∗ ) . u_i^* = x_i^* - 1,\qquad p_j^* = c_j - \min_i f_{ji}(x_i^*) = \max_i w_{ij}(u_i^*). u i ∗ = x i ∗ − 1 , p j ∗ = c j − i min f j i ( x i ∗ ) = i max w ij ( u i ∗ ) .
The cap gives p j ∗ ≥ 0 p_j^* \ge0 p j ∗ ≥ 0 . The displayed equations give exactly the demand inequalities and equality on the full matching. The preceding dummy argument recovers an original equilibrium after deletion and restoration of the reserves and outside utilities.
Every original equilibrium embeds in the same capped square. Greatestness of x ∗ x^* x ∗ makes all returned buyer utilities weakly larger than in any original equilibrium. Each w i j w_{ij} w ij is decreasing, so the formula for p j ∗ p_j^* p j ∗ makes each returned item price weakly smaller. This proves both optimality assertions. The O ( b m ) O(bm) O ( bm ) initial evaluations and reservation-price inversions, and the arithmetic curves on dummy pairs, fit within the stated bound. □
Complete envy-free chore allocation
This appendix explains how the trimming and repair bounds of this paper give the O ( n 7 log n ) O(n^7 \log n) O ( n 7 log n ) query bound for complete envy-free chore allocation stated in § 1 , using the chore protocol of Aziz [ [3 ] . Write c i c_i c i for agent i i i ’s cost measure. A chore allocation X X X with residue R R R is envy-free if c i ( X i ) ≤ c i ( X j ) c_i(X_i) \le c_i(X_j) c i ( X i ) ≤ c i ( X j ) for all i , j i,j i , j , and agent i i i dominates j j j if c i ( X i ) + c i ( R ) ≤ c i ( X j ) c_i(X_i) + c_i(R) \le c_i(X_j) c i ( X i ) + c i ( R ) ≤ c i ( X j ) .
Trimming. In our construction, cake and chores differ at the witness for a trim: for cake an earlier holder is indifferent to a later suffix, and for chores the later holder is indifferent to an earlier one. Likewise, every outsider dominates the group that divides the remainder for cake, and the group dominates every outsider for chores. For positive inputs, Proposition 3 transfers the trimming bound to chores with constant overhead per query. For arbitrary nonnegative costs, apply the reduction to the virtual positive curves of Appendix § 12 . Projection preserves each holder’s weak cost comparisons and equality with the earlier suffix that witnesses a chore trim.
Repair. The repair step in Aziz [ [3 ] uses the same prescribed shares and total deficit as Lemma 10 . Applying that lemma to the normalized cost measures constructs the m 2 m^2 m 2 shares and buffers for m m m active agents in O ( m 4 log ( m 4 / α ) ) O(m^4 \log(m^4/\alpha)) O ( m 4 log ( m 4 / α )) queries. Since log ( 1 / α ) = O ( m log m ) \log(1/\alpha) = O(m \log m) log ( 1/ α ) = O ( m log m ) , a round, including its trims, costs O ( m 5 log m ) O(m^5 \log m) O ( m 5 log m ) queries.
Retained bundles and the number of rounds. The members of the group that divides the remaining chores can also retain their bundles, as in the proof of Theorem 1. For chores, each surviving agent dominates each agent whose bundle is frozen. Write X X X , R R R and W W W , R ′ R' R ′ for the allocations and residues before and after an update. The new holder σ ( j ) \sigma(j) σ ( j ) of label j j j receives W σ ( j ) = X j ∪ B j W_{\sigma(j)} = X_j \cup B_j W σ ( j ) = X j ∪ B j with B j ⊆ R ∖ R ′ B_j \subseteq R \setminus R' B j ⊆ R ∖ R ′ .
For an active agent i i i , envy-freeness among the active agents gives
c i ( W i ) + c i ( R ′ ) ≤ c i ( W σ ( i ) ) + c i ( R ′ ) ≤ c i ( X i ) + c i ( R ) . c_i(W_i) + c_i(R') \le c_i(W_{\sigma(i)}) + c_i(R') \le c_i(X_i) + c_i(R). c i ( W i ) + c i ( R ′ ) ≤ c i ( W σ ( i ) ) + c i ( R ′ ) ≤ c i ( X i ) + c i ( R ) .
The same bound holds for a frozen agent, whose bundle stays fixed. Thus if i i i dominated j j j , the right-hand side is at most c i ( X j ) ≤ c i ( W σ ( j ) ) c_i(X_j) \le c_i(W_{\sigma(j)}) c i ( X j ) ≤ c i ( W σ ( j ) ) , so i i i still dominates the holder of label j j j . In particular, active agents still dominate frozen agents. A frozen agent continues to prefer her own bundle because each active label can only acquire more chores. Each repaired round creates a new domination as in Aziz [ [3 ] . Counting dominated pairs over the original population gives at most n 2 n^2 n 2 repaired rounds in total and hence O ( n 7 log n ) O(n^7 \log n) O ( n 7 log n ) queries.
Queries on intervals with established endpoints
We justify the implementation described after Theorem 1. Let S S S consist of 0, 1, and every point returned by a cut query so far, including trial marks that are not retained in the allocation. Every evaluation is on a single interval [ a , b ] [a,b] [ a , b ] with a , b ∈ S a,b \in S a , b ∈ S . Every cut is requested within such an interval, and its returned point is then added to S S S . The endpoints need not be consecutive in S S S .
Queries on ordered pieces. Maintain the component records of § 3 , with ∑ \sum ∑ all component endpoints in S S S . For an ordered piece P = ( I 1 , … , I k ) P=(I_1,\ldots,I_k) P = ( I 1 , … , I k ) , write I h = [ a h , b h ] I_h=[a_h,b_h] I h = [ a h , b h ] and s r = ∑ h ≤ r v i ( I h ) s_r=\sum_{h\le r}v_i(I_h) s r = ∑ h ≤ r v i ( I h ) , with s 0 = 0 s_0=0 s 0 = 0 . To mark a prefix of value w w w , use an existing component boundary if w = s r w=s_r w = s r for some r r r . Otherwise choose the component I r I_r I r with s r − 1 < w < s r s_{r-1}<w<s_r s r − 1 < w < s r and ask agent i i i to cut from a r a_r a r at value w − s r − 1 w-s_{r-1} w − s r − 1 . Every valid reply lies inside I r I_r I r , since the requested value lies strictly between zero and v i ( I r ) v_i(I_r) v i ( I r ) . A suffix mark is obtained by using the complementary prefix value. If a suffix starts at an established point p ∈ I r p \in I_r p ∈ I r , its value is
v i ( [ p , b r ] ) + ∑ h > r v i ( I h ) . v_i([p,b_r])+\sum_{h>r}v_i(I_h). v i ([ p , b r ]) + h > r ∑ v i ( I h ) .
Thus one evaluation on [ p , b r ] [p,b_r] [ p , b r ] suffices, with the other terms already recorded. Empty and whole pieces require no new boundary. These rules also apply when some component values are zero.
The trimming queries. In Algorithm 2, every candidate suffix length t j M t_j^M t j M is the minimum of the whole-piece length and inverse-query replies on piece j j j . Hence its boundary is an existing component endpoint or a returned cut mark. The length grid selects entries by rank, so every forward query on the physical piece uses an established boundary. The matching test and output recovery use the same inverse queries and minimum operation. Values outside the physical range use the known slope-one extension and require no physical query.
For nonnegative valuations, the simulation in Appendix B has the same property. Initially the physical images of virtual length keys are the empty and whole positions. A prescribed new key is assigned the physical image of its lower neighboring key. An inverse query obtains a physical cut by the component rule above and, if necessary, clamps its reply to an already registered physical position. Inductively, every physical image is therefore an established boundary. Virtual key insertion introduces no new physical endpoint, and all forward queries obey the required restriction.
The remaining operations and the query count. The cutter’s equal shares in Core and the final cut-and-choose step use the same component rule. In Repair, Lemma 11 chooses one of the agents’ half-value marks, so the selected boundary has already been returned by a cut query. Concatenation, reassignment, and the fractional bookkeeping do not introduce new physical endpoints. At a retained cut, the evaluations recording the new components also have endpoints in S S S .
Adding trial marks to S S S does not require subdividing the component records at every such mark. A query interval may contain other points of S S S in its interior. The implementation therefore uses exactly the component evaluations and boundary queries already charged in the analysis, with no additional queries for maintaining S S S . This proves the claimed restriction within the same O ( n 7 log n ) O(n^{7}\log n) O ( n 7 log n ) query bound, for every choice of valid cut answers.
A sixth-power query bound for cake
The outer loop can use several allocations from the same cutter at once. Exchanging suffixes across these allocations creates a dominated group after one repair. A second repair, when needed, lets us divide the residue among the smaller side of the resulting partition.
Proposition 4. Under the assumptions of Theorem 1, a deterministic protocol returns a complete, exactly envy-free cake allocation in O ( n 6 log n ) O(n^{6}\log n) O ( n 6 log n ) Robertson–Webb queries for every choice of valid cut answers.
Proof. One or two agents divide the cake directly. With m ≥ 3 m \ge3 m ≥ 3 agents, fix a cutter r r r and run Core on s = m − 1 s=m-1 s = m − 1 successive residues with this cutter. Write Y i t Y_i^t Y i t for agent i i i ’s share in call t t t and U U U for the final residue. The union of these allocations is envy-free. If everyone values U U U at zero, give it to any agent and finish. If only some do, take W i = ⋃ t Y i t W_i=\bigcup_t Y_i^t W i = ⋃ t Y i t and R = U R=U R = U . The positive valuers form a dominated group B B B , so we can proceed directly to the recursion below.
Exchanging suffixes. Suppose every v i ( U ) > 0 v_i(U)>0 v i ( U ) > 0 . Write g i j t = ( v i ( Y i t ) − v i ( Y j t ) ) / v i ( U ) ≥ 0 g_{ij}^t=(v_i(Y_i^t)-v_i(Y_j^t))/v_i(U)\ge0 g ij t = ( v i ( Y i t ) − v i ( Y j t )) / v i ( U ) ≥ 0 . For each t t t choose a noncutter h t h_t h t with g r h t t ≥ 1 / s g_{rh_t}^t\ge1/s g r h t t ≥ 1/ s . Lemma 1 gives this because the residue just after call t t t contains U U U . Put K = 8 m 2 s K=8m^2s K = 8 m 2 s . At threshold z z z form a bipartite graph H ( z ) H(z) H ( z ) between the s s s calls and the s s s noncutters, joining t t t to b b b when g b h t t ≤ z g_{bh_t}^t\le z g b h t t ≤ z . Each t t t is joined to h t h_t h t at every threshold. The maximum matching size is therefore between 1 1 1 and s s s and increases weakly with z z z . At two consecutive thresholds in K − ( s − 1 ) , … , K − ( s + 1 ) K^{-(s-1)},\ldots,K^{-(s+1)} K − ( s − 1 ) , … , K − ( s + 1 ) the sizes agree. Denote the smaller threshold by x x x and the larger by K x Kx K x .
In call t t t draw the arc i → j i\to j i → j when g i j t ≤ x g_{ij}^t\le x g ij t ≤ x . If one of these directed graphs has a proper source strongly connected component B B B , keep every share with its holder and set α = x / ( 4 m 2 ) \alpha=x/(4m^2) α = x / ( 4 m 2 ) . In that call every outsider has gap greater than x x x to every member of B B B . The other calls contribute nonnegative gaps. Thus the resulting bundles D i = ⋃ t Y i t D_i=\bigcup_t Y_i^t D i = ⋃ t Y i t are envy-free, and every outsider i i i has advantage greater than 4 m 2 α v i ( U ) 4m^2\alpha v_i(U) 4 m 2 α v i ( U ) over every b ∈ B b\in B b ∈ B .
Otherwise all the directed graphs are strongly connected. A maximum matching of H ( x ) H(x) H ( x ) is also maximum in H ( K x ) H(Kx) H ( K x ) . If it is perfect, let B B B be all noncutters. Otherwise search in H ( K x ) H(Kx) H ( K x ) from an unmatched call, following edges to noncutters and matched edges back to calls. Let B B B be the reached noncutters. This set is nonempty, and every member is matched, since a path to a free noncutter would augment the matching. In either case the matched calls t ( b ) t(b) t ( b ) , b ∈ B b \in B b ∈ B , are distinct, and all neighbors of t ( b ) t(b) t ( b ) in H ( K x ) H(Kx) H ( K x ) lie in B B B .
In call t = t ( b ) t=t(b) t = t ( b ) let b b b take the share of h t h_t h t . If b ≠ h t b\ne h_t b = h t , close the arc b → h t b\to h_t b → h t by a simple directed path from h t h_t h t back to b b b and give each agent on this cycle her successor’s share. Keep all other shares with their holders. Every agent loses at most x v i ( U ) xv_i(U) x v i ( U ) per call relative to her original share. For each b ∈ B b\in B b ∈ B , every outsider i i i has gap greater than K x Kx K x to the share now on label b b b in call t ( b ) t(b) t ( b ) . This follows from the neighborhood of t ( b ) t(b) t ( b ) for a noncutter and from 1 / s > K x 1/s>Kx 1/ s > K x for the cutter. Set α = s x \alpha=sx α = s x and combine the shares on each label into D j D_j D j . In agent i i i ’s eyes every D j D_j D j is worth at most ∑ t v i ( Y i t ) \sum_t v_i(Y_i^t) ∑ t v i ( Y i t ) , and her own bundle is within α v i ( U ) \alpha v_i(U) α v i ( U ) of this sum. For an outsider i i i and b ∈ B b\in B b ∈ B , label b b b falls short of the sum by more than K x v i ( U ) Kxv_i(U) K x v i ( U ) . Thus i i i ’s advantage over b b b exceeds ( K − s ) x v i ( U ) > 4 m 2 α v i ( U ) (K-s)xv_i(U)>4m^2\alpha v_i(U) ( K − s ) x v i ( U ) > 4 m 2 α v i ( U ) .
Creating domination. In both cases 0 < α ≤ 1 / ( 8 m 2 ) 0<\alpha\le1/(8m^2) 0 < α ≤ 1/ ( 8 m 2 ) , log ( 1 / α ) = O ( m log m ) \log(1/\alpha)=O(m\log m) log ( 1/ α ) = O ( m log m ) , and the input envy is at most α v i ( U ) \alpha v_i(U) α v i ( U ) for each i i i . Apply Lemma 3 to obtain W σ ( j ) = D j ∪ Z j W_{\sigma(j)}=D_j\cup Z_j W σ ( j ) = D j ∪ Z j and residue R R R . For i ∉ B i\notin B i ∈ / B and b ∈ B b\in B b ∈ B , envy-freeness gives v i ( W i ) ≥ v i ( W σ ( i ) ) v_i(W_i)\ge v_i(W_{\sigma(i)}) v i ( W i ) ≥ v i ( W σ ( i ) ) . The unequal additions cost at most 2 m α v i ( U ) 2m\alpha v_i(U) 2 m α v i ( U ) of the advantage just proved, so
v i ( W i ) − v i ( W σ ( b ) ) > ( 4 m 2 − 2 m ) α v i ( U ) ≥ v i ( R ) . v_i(W_i)-v_i(W_{\sigma(b)})>(4m^2-2m)\alpha v_i(U)\ge v_i(R). v i ( W i ) − v i ( W σ ( b ) ) > ( 4 m 2 − 2 m ) α v i ( U ) ≥ v i ( R ) .
No outsider can therefore hold a label in B B B . By bijectivity σ ( B ) = B \sigma(B)=B σ ( B ) = B , and every outsider dominates every member of B B B .
Dividing the residue. Let F = N ∖ B F=N\setminus B F = N ∖ B , where N N N is the current agent set. If ∣ B ∣ ≤ ∣ F ∣ |B|\le|F| ∣ B ∣ ≤ ∣ F ∣ , divide R R R recursively among B B B and add the shares to their current bundles. Every outsider can tolerate any member of B B B taking all of R R R . Otherwise put P = { i ∈ B : v i ( R ) > 0 } P=\{i\in B:v_i(R)>0\} P = { i ∈ B : v i ( R ) > 0 } and p = ∣ P ∣ p=|P| p = ∣ P ∣ . If p ≤ 1 p\le1 p ≤ 1 , give R R R to the sole positive valuer in B B B , or to any member if p = 0 p=0 p = 0 , and finish. For p ≥ 2 p\ge2 p ≥ 2 , apply Repair to R R R alone with participants P P P , empty input bundles and tolerance 1 / ( 8 p 3 ) 1/(8p^3) 1/ ( 8 p 3 ) . Write A i A_i A i for the envy-free additions by holder, taking A i = ∅ A_i=\varnothing A i = ∅ on B ∖ P B\setminus P B ∖ P , and R ′ R' R ′ for the residue. For i ∈ P i\in P i ∈ P , Lemma 3 gives v i ( R ′ ) ≤ v i ( R ) / ( 4 p ) v_i(R')\le v_i(R)/(4p) v i ( R ′ ) ≤ v i ( R ) / ( 4 p ) , so
v i ( A i ) ≥ v i ( R ) − v i ( R ′ ) p ≥ v i ( R ′ ) . v_i(A_i)\ge\frac{v_i(R)-v_i(R')}{p}\ge v_i(R'). v i ( A i ) ≥ p v i ( R ) − v i ( R ′ ) ≥ v i ( R ′ ) .
The same final inequality holds for i ∈ B ∖ P i\in B\setminus P i ∈ B ∖ P . Adding these shares preserves envy-freeness within B B B and makes every member of B B B dominate every member of F F F . Each f ∈ F f\in F f ∈ F still dominates each b ∈ B b\in B b ∈ B , since A b A_b A b and R ′ R' R ′ are disjoint parts of R R R . We can now divide R ′ R' R ′ recursively among F F F . Each recursive call divides the new residue alone and its shares are added to the existing allocation.
Counting queries. Write T ( m ) T(m) T ( m ) for a nondecreasing query bound for one certified trim, including its retained-boundary records. By Lemmas 1 and 3, the cutter calls cost s ( T ( m ) + O ( m 2 ) ) s(T(m)+O(m^2)) s ( T ( m ) + O ( m 2 )) and the first repair costs T ( m ) + O ( m 5 log m ) T(m)+O(m^5\log m) T ( m ) + O ( m 5 log m ) . The repair on P P P , when used, costs T ( p ) + O ( p 4 log p ) T(p)+O(p^4\log p) T ( p ) + O ( p 4 log p ) . An extra evaluation per other agent at each newly retained boundary suffices to record its component values for the next call. Even charging these evaluations at every cut of the repair on P P P gives a total stage cost of O ( m T ( m ) + m 5 log m ) O(mT(m)+m^5\log m) O ( m T ( m ) + m 5 log m ) . All graph and exchange steps use recorded values. Fixed orders resolve all choices, and all physical queries use the component rules of Appendix § 17 .
There is at most one recursive call, with at most ⌊ m / 2 ⌋ \lfloor m/2\rfloor ⌊ m /2 ⌋ agents. Each stage uses at most m + 1 m+1 m + 1 trims, giving O ( n ) O(n) O ( n ) over the whole execution. Summing the stage costs over the halving population gives O ( n T ( n ) + n 5 log n ) O(nT(n)+n^5\log n) O ( n T ( n ) + n 5 log n ) queries, including the initial value records. Lemma 7 gives T ( n ) = O ( n 5 log n ) T(n)=O(n^5\log n) T ( n ) = O ( n 5 log n ) , as required. ▫