\section{Model and basic tools}\label{sec:prelim}\label{sec:model} \subsection{Cake cutting in the Robertson--Webb model} The cake is the interval $[0,1]$. Each agent $i\in[n]$ has a valuation $v_i$, a finite nonnegative nonatomic Borel measure on $[0,1]$. A \emph{piece} is a finite union of intervals; a complete allocation is a partition of $[0,1]$ into pieces $A_1,\dots,A_n$, where agent $i$ receives the \emph{bundle} $A_i$. Endpoints have value zero, so they may be assigned by any fixed convention. The allocation is \emph{envy-free} if \[ v_i(A_i)\ \ge\ v_i(A_j)\qquad\text{for all } i,j\in[n]. \] A partial allocation leaves a \emph{residue}, the unallocated part of the cake; we denote it by $B$. Logarithms are natural unless a base is indicated. \paragraph{Queries.} An \emph{evaluation query} $\Eval_i(x,y)$ returns $v_i([x,y])$. A \emph{cut query} $\Cut_i(x,\alpha)$, for a feasible target $\alpha\ge0$, returns some $y\ge x$ with $v_i([x,y])=\alpha$. Where $v_i$ vanishes on an interval there may be many such points; \emph{every} one of them is a legal answer, and our protocol must work for all of them. Each query is addressed to one named agent and costs one unit; arithmetic on answers and finite combinatorial searches are free. \paragraph{Ordered pieces.} The protocol often cuts a prefix of given value from a disconnected piece, which is not a single RW query. An \emph{ordered piece} is a finite list of disjoint intervals together with the recorded values of its components in every measure that uses it. To cut a prefix of value $\alpha$, add up the recorded values to locate the component containing the target. If $\alpha$ is attained exactly at the end of a component, use that endpoint; otherwise issue one ordinary cut query inside the component. A legal answer that overshoots the component on a zero-value plateau is clipped to the component's end, which preserves its value. Thus a prefix cut on an ordered piece costs one RW query plus one evaluation per additional agent that must read the new endpoint (\cref{phys:sec2}). \subsection{Labels, comparisons, and domination}\label{sec:domination} The protocol works on a \emph{population} of $k\le n$ agents: initially all $n$, later a group produced by a division (defined below). It maintains $k$ \emph{fixed bundles}, the residue $B$, and a bipartite \emph{comparison graph} $G$ between agents and labels. Each fixed bundle has a persistent \emph{label} $\ell$, which stays with the bundle's contents when its holder changes. An edge $i\ell\in G$ is an \emph{open} comparison: agent $i$ still needs to compare her eventual bundle with the eventual bundle of label $\ell$. Write $A_{i\ell}$ for agent $i$'s recorded value of the fixed bundle of label $\ell$. A \emph{matching} always means a perfect matching of $G$, and $M(i)$ is the label matched to agent $i$. For a matching $M$ the \emph{shortfall} of agent $i$ is \[ \max_{\ell:\,i\ell\in G}A_{i\ell}-A_{iM(i)} , \] the amount by which she prefers her favorite open label to her matched one. \begin{definition}[Closing a comparison] A comparison $i\ell$ is \emph{closed} by a \emph{witness} label $h$ if, at the moment of closing, $A_{ih}\ \ge\ A_{i\ell}+v_i(B)$. \end{definition} \begin{lemma}[Domination, after Aziz--Mackenzie~\citep{AzizMackenzie2016}\leanmark]\label{lem:domination} Suppose every comparison not in the final graph was closed by a witness, and let the final assignment give each agent a label that she weakly prefers, in her final values, to every label still open for her. Then the final allocation is envy-free. \end{lemma} \begin{proof} Consider a comparison $i\ell$ closed by $h$ when the residue was $B$. All later additions to bundles come from $B$ and are disjoint, so label $\ell$ gains at most $v_i(B)$ and label $h$ gains a nonnegative amount in agent $i$'s measure. Hence, in the final values $V_i(\cdot)$, $V_i(\ell)\le A_{i\ell}+v_i(B)\le A_{ih}\le V_i(h)$. If $h$ is still open for $i$ at the end, then $V_i(h)\le V_i(M(i))$ by assumption. Otherwise $h$ was closed later, by some witness $h'$, and $V_i(h)\le V_i(h')$; closing times strictly increase along this chain, so it ends at an open label after finitely many steps. \end{proof} A \emph{division} splits the population into groups, each keeping its own labels and receiving part of the residue. A comparison between an agent and a label of another group is closed as above, with $B$ replaced by all the cake that the other group can still receive; afterwards the protocol continues on each group independently. \subsection{Supporting prices and assignment loss}\label{sec:prices} For a real table $a$ on the edges of $G$ and a matching $M$ write $a(M)=\sum_i a_{iM(i)}$ and $W(a)=\max_M a(M)$. \begin{lemma}[Supporting prices\leanmark]\label{lem:prices} Let $M$ be an optimal matching for $a$. There are prices $p_\ell\ge0$ such that \begin{equation}\label{eq:support} a_{iM(i)}+p_{M(i)}\ \ge\ a_{i\ell}+p_\ell\qquad\text{for every edge } i\ell\in G . \end{equation} \end{lemma} \begin{proof} Contract every matched pair $(i,M(i))$ into the label $M(i)$ and give the arc $M(i)\to\ell$, for each edge $i\ell\in G$, the weight $a_{i\ell}-a_{iM(i)}$. A directed cycle $M(i_1)\to M(i_2)\to\dots\to M(i_1)$ of positive weight would let us reassign $i_t$ to $M(i_{t+1})$ and obtain a better matching; hence every cycle has nonpositive weight. Consequently, cutting cycles out of a walk never decreases its weight, so the maximum weight $p_\ell$ of a walk starting at $\ell$ (the empty walk allowed) is attained by a simple path and is finite and nonnegative. Prefixing a heaviest walk from $\ell$ by the arc $M(i)\to\ell$ gives $p_{M(i)}\ge a_{i\ell}-a_{iM(i)}+p_\ell$. \end{proof} The \emph{slack} of an edge is $s_{i\ell}=a_{iM(i)}+p_{M(i)}-a_{i\ell}-p_\ell\ge0$. For every matching $M'$ the prices cancel, so \begin{equation}\label{eq:slack-sum} \sum_i s_{iM'(i)}\ =\ a(M)-a(M') . \end{equation} The \emph{assignment loss} of an edge is $L_{i\ell}(a)=W(a)-\max_{M'\ni i\ell}a(M')$ (infinite if no matching uses $i\ell$). By \eqref{eq:slack-sum} the slack of an edge is at most its assignment loss, and the alternating sum of slacks along a cycle equals minus the alternating sum of the table entries, since the prices cancel. Two further facts control the size of the prices and let us force slack on edges of large loss. \begin{lemma}[Price bound and forcing slack\leanmark]\label{lem:raise} \begin{enumerate}[label=(\alph*)] \item If some matching has every shortfall at most $t$, the prices of \cref{lem:prices} satisfy $\sum_\ell p_\ell\le k^3t$. \item Let $\kappa>0$. Raise by $\kappa/k$ every entry whose assignment loss is at least $\kappa$. Then $M$ remains optimal, and supporting prices for the raised table give every raised edge slack at least $\kappa/k$ in the original table, with total price at most $k^3(t+\kappa/k)$. \end{enumerate} \end{lemma} \begin{proof} (a) The total shortfall of a matching is $\sum_i\max_{\ell:\,i\ell\in G}a_{i\ell}$ minus its weight, so the optimal $M$ has total shortfall at most that of the given matching, which is at most $kt$. An arc $M(i)\to\ell$ has weight at most the shortfall of agent $i$ under $M$, and a simple path uses each agent at most once, so every price is at most $kt$; there are $k$ prices, giving $\sum_\ell p_\ell\le k^2t\le k^3t$. (b) A matching that uses $r\ge1$ raised entries lost at least $\kappa$ and gains $r\kappa/k\le\kappa$, so it does not beat $M$, which uses none. The slack of a raised edge in the raised table is nonnegative, so in the original table it is at least $\kappa/k$; the price bound follows from (a) applied to the raised table, whose shortfalls grew by at most $\kappa/k$. \end{proof} \subsection{Matching-covered graphs and certificates}\label{sec:certificates} A bipartite graph with a perfect matching is \emph{matching-covered} if it is connected and every edge lies in a perfect matching~\citep{CLM99}. Equivalently, contracting any perfect matching $M$ yields a strongly connected digraph: the symmetric difference of two perfect matchings places every usable edge on an alternating cycle, and rotating $M$ along a directed cycle produces a perfect matching through any arc of the cycle. If the contracted digraph is not strongly connected, every perfect matching stays inside its strong components, and comparisons between components can be closed by a division of the population (\cref{phys:s2.1}). \begin{definition}[Certificate] A \emph{certificate} of a matching-covered graph $G$ on $k+k$ vertices is a perfect matching $M$ together with a spanning matching-covered subgraph containing $M$ and at most $2(k-1)$ further edges. \end{definition} An in-tree and an out-tree of the contracted digraph, rooted at a common vertex, give a certificate, so every matching-covered graph has one. There are at most $\exp(O(k\log k))$ certificates, since each is described by $O(k)$ edges. Deleting edges can only destroy certificates, and at a division the product of the certificate counts of the matching-covered parts is at most the count of the parent (\cref{phys:s2.3}). Hence $\Phi=\log(\#\text{certificates})$ starts at $O(n\log n)$ and never increases; at a division the children's values of $\Phi$ sum to at most the parent's. \subsection{The cubic potential}\label{sec:cube} \begin{lemma}[Cubic potential\leanmark]\label{lem:cube} Let $k_1+\dots+k_m=k$ be the sizes of the groups produced by dividing a population of $k$ agents, and let $s=k-\max_a k_a$ be the number of agents outside a largest group. Then \[ k^3-\sum_{a=1}^m k_a^3\ \ge\ k^2 s . \] \end{lemma} \begin{proof} Every $k_a$ is at most $k-s$, so $\sum_a k_a^3\le (k-s)^2\sum_a k_a=k(k-s)^2$, and $k^3-k(k-s)^2=ks(2k-s)\ge k^2s$. \end{proof} \begin{corollary}\label{cor:tree} For any tree of divisions with root population $n$, the total of $k^2 s$ over all divisions is at most $n^3$. \end{corollary} \begin{proof} Apply \cref{lem:cube} at every internal node and telescope: the sum of cubes of the current groups starts at $n^3$, stays nonnegative, and drops by at least $k^2s$ at each division. \end{proof} A division of $k$ agents leaving $s$ outside the largest group costs the protocol $O(k^2s)$ queries (apart from separately charged comparisons; \cref{cubic:sec5}), so by \cref{cor:tree} all divisions together cost $O(n^3)$.