Envy-Free Cake-Cutting for Five Agents

Aris Filos-Ratsikas, Alexandros Hollender, Mohamad Latifian, Giannis TyrovolasarXiv 2026

TL;DR

How do you slice a cake among five people with wildly different tastes so that everyone gets a single, contiguous piece and nobody wants anyone else’s slice? While mathematicians knew such a division existed via complex topological proofs, finding an efficient algorithm for five people was a major open problem in computer science. This paper cracks the five-agent barrier using only elementary calculus and clever binary searches—requiring just $\mathcal{O}(\log^3(1/\varepsilon))$ questions to get arbitrarily close to zero envy.

(Fun meta-note for your evening read: According to the paper's AI disclosure, the core algorithm was discovered in October 2026 via interactions with "ChatGPT 6 Astra" before the human authors simplified and wrote up the proofs!)

What Problem Does This Paper Address?

In fair division, "cake" is a stand-in for any heterogeneous, divisible resource—like shoreline property or broadcast spectrum—modeled on the interval $[0, 1]$. Different agents value different parts differently (maybe you love chocolate frosting on the left, and I love the fruit on the right).

We want an envy-free allocation where every agent gets a single, connected piece (no handing someone a pile of crumbs) and values their slice at least as much as anyone else's. Because exact connected protocols with a finite number of steps are mathematically impossible for three or more agents, researchers aim for $\varepsilon$-envy-freeness: nobody envies anyone else by more than a tiny error $\varepsilon$.

Agents' preferences are monotone (more cake is never worse) and Lipschitz-continuous (sliding a knife slightly doesn't cause wild jumps in value). Algorithms learn preferences by asking "value queries" ("Agent 2, how much is the slice $[0.2, 0.5]$ worth to you?"). A brute-force grid search takes $\text{poly}(1/\varepsilon)$ queries—painfully slow if $\varepsilon$ is $10^{-9}$. True efficiency means $\text{poly}(\log(1/\varepsilon))$ queries. Efficient algorithms were known for two, three, and recently four agents, where existing methods hit a brick wall. Five agents remained wide open.

Methods

Previous algorithms started by having one agent cut the cake into equal-value pieces and sliding the knives around while tracking complex preference patterns. That approach completely breaks down for five agents. Instead, the authors introduce a unified framework built on two pillars: an anchor cut and robustness.

Imagine placing a main "anchor cut" $m$ somewhere in $[0, 1]$. For five agents, the authors define four main pieces ($P_1, P_2, P_3, P_4$) growing from the boundaries $0, m,$ and $1$, leaving two potential gap intervals: $L$ on the left of $m$, and $R$ on the right.

The four retained pieces growing around anchor m, leaving potential gaps L and R.

For any fixed anchor $m$, the algorithm sizes $P_1, \dots, P_4$ to satisfy two rules:

  1. Robustness: Before knowing who leaves, if any one of the five agents walks out of the room, the four pieces $P_1, \dots, P_4$ can be assigned to the remaining four agents with zero envy among them.
  2. Maximality: The pieces are grown until at least one of the gaps ($L$ or $R$) is squeezed down to zero length.

Because $R$ is the entire cake when $m=0$ (everyone loves $R$) and $R$ is empty when $m=1$ (everyone prefers something else), sliding $m$ continuously from $0$ to $1$ guarantees a sweet spot $m^*$ by the Intermediate Value Theorem (IVT): a point where nobody strictly prefers $R$, and at least one agent $i$ ties $R$ as their favorite. Give $R$ to agent $i$ (since $R$ has value, $L$ must be empty!), and robustness guarantees the other four agents happily split $P_1, \dots, P_4$.

To make this fast, the authors perform an outer binary search on $m$. Inside, rather than running four slow nested binary searches to find the piece lengths, they "guess" the underlying favourite graph—a tiny bipartite graph connecting the 5 agents to their favorite pieces among the 4—by iterating over the constant number of possible spanning trees, cutting the inner search down to $\mathcal{O}(\log^2(1/\varepsilon))$ queries.

Datasets

Not discussed in the paper. (This is a purely theoretical algorithmic and mathematical study.)

Key Insights and Ideas

  • Dodging Heavy Topology: Classical existence proofs for contiguous cake-cutting rely on heavy machinery like Brouwer's fixed-point theorem or Sperner's lemma, which are notoriously hard to turn into fast algorithms. This paper proves existence for five agents using only the humble Intermediate Value Theorem—which translates directly into binary search.
  • Two Gaps Save the Day: With four agents, you only need one extra piece alongside the robust ones, which creates edge-case failures near $m=1$. Allowing two gap pieces ($L$ and $R$) and enforcing maximality (at least one is empty) magically restores existence and uniqueness for every anchor $m$, solving four and five agents simultaneously.
  • Tree-Guessing Speedup: Because 5 agents and 4 pieces form a tiny system, there is only a constant number of ways agents can be indifferent between pieces. Enumerating spanning trees of this preference graph shaves two logarithmic factors off the query complexity—dropping it from $\mathcal{O}(\log^5(1/\varepsilon))$ to $\mathcal{O}(\log^3(1/\varepsilon))$.

Key Results

  • Polylogarithmic 5-Agent Algorithm: Computes a contiguous $\varepsilon$-envy-free complete cake allocation for five monotone, Lipschitz-continuous agents using $\mathcal{O}(\log^3(1/\varepsilon))$ value queries (matching the best known bound for four agents) and running in polynomial time.
  • Unified Framework: The anchor-and-robustness method cleanly recovers all known query bounds for fewer agents: $\mathcal{O}(\log(1/\varepsilon))$ for 2 agents, $\mathcal{O}(\log^2(1/\varepsilon))$ for 3 agents, and $\mathcal{O}(\log^3(1/\varepsilon))$ for 4 agents.
  • Elementary Existence Proof: Establishes exact contiguous envy-free cake-cutting for five agents without fixed-point theorems beyond 1D continuity.

Limitations and Future Work

  • What about Six Agents? The paper resolves $n=5$, leaving $n=6$ open. The authors note a concurrent, independent preprint by Mackenzie and Suzuki that also solves five agents and proves a $\Omega(\text{poly}(1/\varepsilon))$ query lower bound for $n \ge 7$ agents—meaning efficient polylogarithmic algorithms hit a hard mathematical ceiling very soon!
  • Comparing Concurrent Solutions: Because the authors intentionally avoided reading the concurrent Mackenzie and Suzuki manuscript beyond its abstract to preserve independence, a detailed comparison between the two 5-agent algorithms is left for a future version.
  • Model Assumptions: The results rely on monotone valuations with a known Lipschitz bound; without monotonicity, exponential slowdowns ($\text{poly}(1/\varepsilon)$ lower bounds) already kick in at three and four agents.

Summary updated

Abstract

We study the envy-free cake-cutting problem, in which a divisible resource must be divided among a set of agents with heterogeneous preferences in a way that ensures that no agent envies the piece obtained by another. Remarkably, under some mild continuity assumptions on the agent valuations, it is known that an envy-free division where each agent receives a \emph{connected} piece of the cake is always guaranteed to exist. When the valuations are monotone, prior work has shown that a connected $\varepsilon$-envy-free division can be obtained using $\poly(\log(1/\varepsilon))$ queries for up to four agents, leaving the case of five or more agents open. In this work, we develop a new simpler approach that yields such an efficient algorithm for five agents. Our algorithm uses $\mathcal{O}(\log^3(1/\varepsilon))$ queries and also yields a novel proof of existence for five agents that does not rely on any fixed-point theorems beyond the intermediate value theorem.
BibTeX
@misc{filosratsikas2026envy,
  author = {Aris Filos-Ratsikas and Alexandros Hollender and Mohamad Latifian and Giannis Tyrovolas},
  title = {{Envy-Free Cake-Cutting for Five Agents}},
  year = {2026},
  eprint = {2611.33149},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.33149},
}
Figure