\documentclass[11pt,letterpaper]{article} \usepackage[T1]{fontenc} \usepackage{fullpage,mathpazo,microtype,needspace} \usepackage[dvipsnames]{xcolor} \usepackage{amsmath,amssymb,amsthm,mathtools,booktabs,tikz} \usepackage{graphicx,float} \usetikzlibrary{arrows.meta} \definecolor{twoagentgrid}{HTML}{E6EBE8} \definecolor{twoagentfill}{HTML}{DCEFE5} \definecolor{twoagentedge}{HTML}{408866} \definecolor{twoagentblue}{HTML}{2E6FB3} \definecolor{twoagentorange}{HTML}{D98028} \definecolor{twoagentpurple}{HTML}{8056AB} \usepackage{tcolorbox} \usepackage{algorithm} \usepackage[noend]{algpseudocode} \usepackage{placeins} \usepackage[square,numbers]{natbib} \bibliographystyle{alphaurlnat} \usepackage{xurl} \usepackage[colorlinks=true,allcolors=MidnightBlue]{hyperref} \providecommand{\doi}[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}} \hypersetup{pdftitle={Computing Fair and Efficient Allocations of Indivisible Goods},pdfsubject={Fair division of indivisible goods}} \usepackage[nameinlink,capitalize,noabbrev]{cleveref} \makeatletter \def\theHALG@line{\thealgorithm.\arabic{ALG@line}} \makeatother \newtheorem{theorem}{Theorem} \newtheorem{lemma}{Lemma} \newtheorem{proposition}{Proposition} \newtheorem{corollary}{Corollary} \theoremstyle{definition} \newtheorem{definition}{Definition} \newtheorem{example}{Example} \theoremstyle{remark} \newtheorem{remark}{Remark} \crefname{algorithm}{Algorithm}{Algorithms} \newtcolorbox{keybox}{colback=MidnightBlue!3!white,colframe=MidnightBlue!70!black,boxrule=.6pt,arc=1.5pt,left=8pt,right=8pt,top=0pt,bottom=1pt} \newcommand{\p}{\mathbf{p}} \newcommand{\norm}[1]{\lVert #1\rVert_\infty} \newcommand{\R}{\mathbb R} \newcommand{\wbar}{\bar w} \newcommand{\xbar}{\bar x} \renewcommand{\le}{\leqslant} \renewcommand{\ge}{\geqslant} \title{\textbf{Computing Fair and Efficient Allocations\\of Indivisible Goods}} \author{} \setlength{\emergencystretch}{1em} \makeatletter \let\@date\@empty \renewcommand{\@maketitle}{\begin{center}\LARGE\bfseries\@title\par\end{center}\vspace{0.3em}} \makeatother \begin{document} \maketitle \begin{abstract} We present a strongly polynomial time algorithm to compute an allocation of indivisible goods that is both envy-free up to one good (EF1) and fractionally Pareto optimal (fPO) when agents have additive valuations. This resolves a longstanding open problem in fair division. We also present an algorithm that uses a near-linear number of arithmetic operations in the number of goods when the number of agents is fixed. We use the price-EF1 approach of Barman, Krishnamurthy, and Vaish~\citep{BKV}. We show that, after a preparation step that gives every agent a private good, the greatest agent weights at which no agent pays more than one for the goods that only she can receive support a price-EF1 allocation. We first compute these weights in polynomial time with a recent breakthrough fixed-point approximation algorithm of OpenAI~\citep{OAI}; combined with the rounding of Frank and Tardos~\citep{FrankTardos}, this already gives EF1 and Pareto optimal allocations in strongly polynomial time. We then compute the weights in strongly polynomial time by deleting agent--good pairs that cannot attain their price at these weights, and, when the number of agents is fixed, by a recursive search over weight ratios. \textbf{Lean verification:} \url{https://github.com/nisarg89/Lean/tree/main/manuscripts/EF1FPO} \textbf{Disclosure:} This work combines human research contributions with substantial assistance from GPT models, including GPT-6.2 Astra. The human contributors are Max Dupré la Tour, Ayumi Igarashi, Ryoga Mahara, Frédéric Meunier, Nisarg Shah, and Vignesh Viswanathan. GPT-6.2 Astra obtained the strongly polynomial algorithm for an arbitrary number of agents under human supervision. Mahara independently reduced the search for an EF1 and fPO allocation to computing the ceiling weights and showed how to compute them using mean-payoff games, and then obtained the same strongly polynomial time result using GPT-6.1 Astra. The near-linear-time algorithm for a fixed number of agents grew out of human ideas and mathematical intuition in the work of Dupr\'e la Tour, Igarashi, and Meunier, with GPT helping to develop and simplify the arguments. This preliminary merged manuscript was prepared largely using AI from earlier drafts that also contain human writing and revisions. We will upload a human readable version in some time. %This result was obtained by GPT-6.2 Astra with human supervision from Max Dupr\'e la Tour, Ayumi Igarashi, Fr\'ed\'eric Meunier, Nisarg Shah, and Vignesh Viswanathan. This manuscript is almost entirely AI generated. We will upload a human readable version in some time. \end{abstract} \section{Introduction}\label{sec:intro} A longstanding open problem in fair division asks whether, for agents with additive valuations, an allocation of indivisible goods that is both envy-free up to one good (EF1) and fractionally Pareto optimal (fPO) can be computed in polynomial time~\citep{BKV,MaharaFull}; the survey of \citet[Open Problem~1]{Survey} poses the question already for Pareto optimality. We resolve this problem with a deterministic strongly polynomial algorithm, which we reach through two simpler results, and we give an algorithm that uses a near-linear number of arithmetic operations in the number of goods when the number of agents is fixed. EF1 requires that removing one good from an envied bundle eliminate the envy. This guarantee is implicit in the algorithm of \citet{LMMS} and was formalized by \citet{Budish}. Pareto optimality (PO) rules out reallocations that improve an agent's utility without reducing anyone else's. Fractional Pareto optimality also rules out such improvements when goods may be divided, and hence implies PO. For additive valuations, \citet{MNW} showed that the maximum Nash welfare rule selects an allocation that is EF1 and PO. Finding such a maximizer is NP-hard~\citep{NNRR}, however, so this does not yield a polynomial-time algorithm. \citet{BKV} proved that EF1 and fPO allocations exist and gave a pseudopolynomial-time algorithm for EF1 and PO, whose running time depends on the magnitude of the largest value. \citet{GM} gave an algorithm for EF1 and fPO with a claimed pseudopolynomial running time, and \citet[Appendix~B]{MaharaFull} identified a gap in the proof of their Lemma~4, on which this bound rests.\footnote{The same gap affects the polynomial running time claimed for instances in which each agent has at most \(k\) distinct values, for a constant \(k\). In the first arXiv version of this work~\citep{GM22}, Theorem~3 applies Theorem~1 with \(U\le(m+1)^k\), where \(m\) is the number of goods. Theorem~1 relies on Lemma~6, which invokes the same Lemma~4. Bounding \(U\) controls how often the least spenders change, but it leaves open how many price rises occur while the set of least spenders is fixed.} \citet{Mahara} gave a polynomial-time algorithm when the number of agents is fixed. Polynomial-time algorithms are also known for binary valuations~\citep{HPPS20} and, with the stronger guarantee of envy-freeness up to any good, when all values lie in a common two-element set~\citep[Section~5]{BLLLT24}. \citet{GM23} first proposed an algorithm for this case, but \citet[Theorem~1]{LZ26} give an instance on which it does not terminate, together with a polynomial-time algorithm for a weighted generalization~\citep[Theorem~2]{LZ26}. Our results remove all such restrictions. \paragraph{A polynomial-time algorithm.} We follow the price-based approach of \citet{BKV}. Positive agent weights \(w\) induce prices \(p_g=\max_iw_iv_{ig}\). An allocation that gives every good to an agent attaining its price maximizes the weighted sum of utilities, even over fractional allocations, and is therefore fPO; it is also EF1 if it is price envy-free up to one good (pEF1). Call a good \emph{uncontested} for an agent if she alone attains its price, and call weights \emph{uncontested-feasible} if every agent's uncontested goods cost her at most one; this is the uncontested-spending criterion that \citet{MaharaChores} uses for chores. After a preparation step that gives every agent a private good, the uncontested-feasible weights have a coordinatewise greatest element, the \emph{ceiling weights}. At the ceiling weights, giving each good to the last of its price-attaining agents in a suitable order provides every agent with a bundle costing at least one, and passing contested goods down the maximum bang per buck (MBB) forest then yields a pEF1 allocation. To compute the ceiling weights, we observe that in logarithmic coordinates they form the greatest fixed point of a monotone map that is nonexpansive in the maximum norm. Biasing this map toward its upper corner gives a contraction whose fixed point the algorithm of \citet{OAI} approximates, and the approximation reveals the MBB forest at the ceiling weights, from which a traversal recovers them exactly. \begin{theorem}\label{thm:poly} For any number of agents with nonnegative rational additive valuations over indivisible goods, there exists a deterministic polynomial time algorithm for computing a complete allocation that is envy-free up to one good (EF1) and fractionally Pareto optimal (fPO). \end{theorem} \paragraph{Strongly polynomial time for Pareto optimality.} The number of arithmetic operations of this algorithm grows with the bit length of the valuations, because the approximation must be accurate enough to reveal the MBB forest. For Pareto optimality, this dependence can be removed directly. The simultaneous Diophantine approximation of \citet{FrankTardos} replaces each agent's valuations by integers of bit length polynomial in the number of goods that compare every two bundles in the same way, and the algorithm of \Cref{thm:poly} applied to these integers runs in strongly polynomial time. This improves the running time of \Cref{thm:poly}, at the cost of PO in place of fPO. \begin{theorem}\label{thm:po} For any number of agents with nonnegative rational additive valuations over indivisible goods, there exists a deterministic strongly polynomial time algorithm for computing a complete allocation that is envy-free up to one good (EF1) and Pareto optimal (PO). \end{theorem} \paragraph{Strongly polynomial time for fractional Pareto optimality.} Fractional Pareto optimality depends on comparisons of products of valuations around cycles, which such a rounding does not preserve. Our main result computes the ceiling weights themselves in strongly polynomial time and therefore supersedes \Cref{thm:poly,thm:po}. Instead of approximating the ceiling weights closely enough to read off the MBB forest, we delete agent--good pairs that are certified not to attain the good's price at the ceiling weights; by maximality, such a deletion leaves the ceiling weights unchanged. While the remaining pairs contain a cycle, the two alternating products of valuations around some cycle differ by a factor \(\Phi>1\), and approximating the ceiling weights within a factor \(\Phi^{1/(n+1)}\) exposes a pair to delete. A parametric search locates each ceiling weight within a factor \(\Phi^{2n}\) in either direction, and a grid of \(O(n^2)\) levels per agent then reaches the required accuracy, however close \(\Phi\) is to one. On the grid, the computation amounts to finitely many spending tests, which we solve exactly with short integer costs, the algorithm of \citet{OAI}, and the ellipsoid method~\citep{GLS}. Once the remaining pairs form a forest, the parametric search gives the ceiling weights exactly. \begin{theorem}\label{thm:main} For any number of agents with nonnegative rational additive valuations over indivisible goods, there exists a deterministic strongly polynomial time algorithm for computing a complete allocation that is envy-free up to one good (EF1) and fractionally Pareto optimal (fPO). \end{theorem} \paragraph{A fixed number of agents.} When the number of agents is fixed, a different search for the ceiling weights is much faster. To compare the ratio of two ceiling weights with a given number, we compute the greatest uncontested-feasible weights subject to that ratio, which is the same problem with the two agents merged into one block, and test which blocks could still rise together; maximality makes this test exact. A binary search over the at most \(m\) relevant ratios for each pair of blocks, applied recursively, determines which goods are uncontested at the ceiling weights, and hence the weights themselves. \begin{theorem}\label{thm:fixed} For every fixed number \(n\) of agents with nonnegative rational additive valuations over indivisible goods, there exists a deterministic algorithm that computes a complete allocation that is envy-free up to one good (EF1) and fractionally Pareto optimal (fPO) using \(O(m\log^{n-1}(m+1))\) arithmetic operations, where \(m\) is the number of goods. \end{theorem} Here, strongly polynomial means that the number of arithmetic operations and comparisons is bounded by a polynomial in the numbers of agents and goods, and that every number arising in the computation is rational with bit length bounded by a polynomial in the binary encoding length of the instance. Each valuation is given by its integer numerator and positive integer denominator, which are available to the algorithm separately. All our algorithms permit arbitrary numbers of goods and nonnegative rational valuations, including zero values. \paragraph{Our contributions.} A recent line of work obtains agent weights from a topological fixed-point argument, typically the Knaster--Kuratowski--Mazurkiewicz (KKM) lemma on the simplex of agent weights, and then extracts a fair allocation from the weighted-welfare maximizers at those weights, which are Pareto optimal by construction~\citep{IM26,BVSS25,MaharaChores,BV25,CSV26}; for two agents, the idea goes back to a sweep over a one-parameter family of weights by \citet{SHS23}. Closest to us, \citet{MaharaChores} combines such weights with a discrete procedure on the MBB graph to prove that EF1 and fPO allocations of chores exist. Our main conceptual contribution is the ceiling weights, which replace the KKM argument by an order-theoretic one: the relevant object is the greatest point of a lattice of weights, and this structure is what makes it computable. On the fair division side, it yields an elementary proof that EF1 and fPO allocations of goods exist (\Cref{cor:existence}). On the computational side, maximality lets us bias a contraction toward the ceiling weights, delete pairs that miss the price without changing them, and compare ratios of ceiling weights exactly. \subsection{Related work}\label{sec:related} \paragraph{EF1 and Pareto optimality for goods.} \citet{MNW} showed that maximum Nash welfare allocations are EF1 and PO, and \citet{BKV} gave a pseudopolynomial-time algorithm for EF1 and PO together with the existence of EF1 and fPO allocations, proved by a limit argument. The claimed pseudopolynomial running time of a subsequent algorithm for EF1 and fPO~\citep{GM} has a gap in its proof~\citep[Appendix~B]{MaharaFull}. \citet{Mahara} gave a polynomial-time algorithm for EF1 and fPO with a fixed number of agents, by adding agents one at a time; \Cref{thm:fixed} improves the dependence on the number of goods to near-linear. Polynomial-time algorithms are known for restricted valuations, including binary valuations~\citep{HPPS20} and values from a common two-element set~\citep{BLLLT24,LZ26}. Market-based methods have also been used for equitability~\citep{FSVX19} and for weighted EF1 with Pareto optimality~\citep{CISZ21}. \paragraph{Welfare weights and supporting prices.} The correspondence between welfare weights and supporting prices is classical. \citet{Negishi} studies weighted sums of concave utilities and derives supporting prices as multipliers of the resource constraints, and \citet{Var74,Var76} uses this correspondence in the theory of fairness. For additive valuations, \citet[Appendix~B.3]{BKV} prove by linear programming duality that every fPO allocation admits supporting market prices, and \citet[Lemma~2.3]{SSH} give an explicit proof of the weighted-welfare characterization. \paragraph{Rounding market equilibria.} \citet{BK} round a Fisher market equilibrium along its spending forest and show that, after changing each budget by at most the price of one good, the market has an integral equilibrium. This yields strongly polynomial algorithms for proportionality up to one good together with fPO, and for a weakening of EF1 together with fPO. Our redistribution operates on the full MBB forest at the ceiling weights, in the spirit of the tree argument of \citet[Appendix~A.1]{BV25}, rather than on the support of an equilibrium. \paragraph{Chores.} For chores, EF1 and PO allocations were first obtained for bivalued instances~\citep{EPS22,GMQ22}. \citet{MaharaChores} proved that EF1 and fPO allocations of chores always exist, by combining the KKM lemma for agent weights with a discrete algorithm on the MBB graph. Whether they can be computed in polynomial time remains open (\Cref{sec:conclusion}). \paragraph{Fixed-point methods in fair division.} Topological fixed-point theorems have recently driven several existence results for indivisible items. \citet{IM26} introduced the use of the KKM lemma on the simplex of agent weights and showed that, under category constraints, some Pareto-optimal allocation lets each agent be made envy-free by reallocating at most \(\min\{k+1,n\}(n-1)\) items, where \(k\) is the number of categories. \citet{BVSS25} independently used a similar technique for mixed manna. Building on their work, the KKM technique has since been used for chores~\citep{MaharaChores}, for mixed manna under a relaxation of EF1~\citep{BV25}, and for balanced allocations, in which bundle sizes differ by at most one~\citep{CSV26}. For two agents, \citet{SHS23} had earlier swept a one-parameter family of weights. \citet{DI26} transfer cake-cutting and necklace-splitting theorems to connected allocations of goods and chores that are envy-free up to one good and one chore, and \citet{CDDS26} obtain balanced allocations with the same guarantee. Both results cover arbitrary valuations when the number of agents is a prime power, and identical valuations for every number of agents. For a general number of agents, none of these arguments is known to yield a polynomial-time algorithm, and \citet{CSV26} show that computing their balanced allocations is PPAD-complete; polynomial-time algorithms are known when the number of agents is fixed~\citep{IM26,MaharaChores,CSV26}. \paragraph{Pacing equilibria.} A similar idea of maximal weights subject to a budget condition appears in first-price pacing equilibria for auction markets. \citet{FPPE} show that the pacing multipliers admitting a fractional allocation within all budgets are closed under coordinatewise maxima, and that their maximum forms the pacing equilibrium. Our condition constrains only the spending on uncontested goods. The property we need at the maximum, that every agent can reach spending one with an integral allocation, has no counterpart there. \paragraph{Order structure and fixed-point computation.} Tarski's theorem~\citep{Tarski} guarantees least and greatest fixed points of monotone maps on complete lattices. Finding a fixed point of a general monotone map can require many queries~\citep{EPRY20}, and finding an extremal one can be harder than finding an arbitrary one. Fixed points of contractions in the maximum norm can be located with polynomially many queries~\citep{CLY24}, and \citet{OAI} give an algorithm whose total bit complexity is polynomial in the dimension, the number of bits of accuracy, and the logarithm of the inverse contraction gap. Our map is both monotone and nonexpansive in logarithmic coordinates. It is built from translates of coordinates and from constants by taking minima and maxima, much like the min--max functions studied by \citet{Gunawardena94}. \paragraph{Strongly polynomial algorithms.} \citet{OAI} give a strongly polynomial algorithm for linear programming. Our strongly polynomial results use the simultaneous Diophantine approximation of \citet{FrankTardos}, the parametric search of \citet{Megiddo}, and the ellipsoid method for well-described polyhedra~\citep{GLS}. Strongly polynomial algorithms are also known for computing equilibria of linear Fisher markets~\citep{Orlin}. \section{Preliminaries}\label{sec:model} \subsection{Model} Let \(N=\{1,\ldots,n\}\), with \(n\ge1\), be the agents and let \(M\) be a finite set of \(m\) goods. The input lists the agents and goods explicitly and specifies a nonnegative rational value \(v_{ig}\) for each agent \(i\) and good \(g\), by its numerator and positive denominator in binary. Agent \(i\)'s utility for a bundle \(S\subseteq M\) is \(v_i(S)=\sum_{g\in S}v_{ig}\). An allocation \(A=(A_i)_{i\in N}\) is a partition of \(M\) into possibly empty bundles. A fractional allocation \(x\) specifies shares \(x_{ig}\ge0\) with \(\sum_i x_{ig}=1\) for each \(g\), and gives agent \(i\) utility \(\sum_g v_{ig}x_{ig}\). \begin{definition}[Envy-freeness up to one good]\label{def:ef1} An allocation \(A\) is \emph{envy-free up to one good} (EF1) if for every \(i,j\in N\) with \(A_j\ne\varnothing\) there exists \(g\in A_j\) such that \(v_i(A_i)\ge v_i(A_j\setminus\{g\})\). \end{definition} \begin{definition}[Pareto optimality]\label{def:po} A fractional allocation \(x\) \emph{Pareto dominates} an allocation \(A\) if \(\sum_{g\in M}v_{ig}x_{ig}\ge v_i(A_i)\) for every \(i\in N\), with strict inequality for at least one \(i\). An allocation \(A\) is \emph{Pareto optimal} (PO) if no allocation with \(x_{ig}\in\{0,1\}\) Pareto dominates it, and \emph{fractionally Pareto optimal} (fPO) if no fractional allocation Pareto dominates it. \end{definition} \subsection{Weights, prices, and maximum bang per buck}\label{sec:fisher} The allocations we output give every good to a single agent. Fractional allocations enter only as alternatives against which their efficiency is checked, and agent weights give a convenient certificate of this efficiency. Throughout the paper, prices are generated by weights as follows. \begin{definition}[Weights, prices, and support]\label{def:support} Given weights \(w\in\R^n_{\ge0}\), the induced \emph{price} of a good \(g\) is \(p_g(w)=\max_iw_iv_{ig}\), and \(D_g(w)\) denotes the set of agents attaining it. The price of a bundle is \(\p(S)=\sum_{g\in S}p_g(w)\); we omit \(w\) when the weights are clear. An allocation \(A\) is \emph{supported at \(w\)} if every good is assigned to an agent attaining its price, that is, \(g\in A_i\) implies \(i\in D_g(w)\). \end{definition} For fixed \(w\), consider the linear program that maximizes the weighted welfare \(\sum_i w_i\sum_g v_{ig}x_{ig}\) subject to \(\sum_i x_{ig}\le1\) and \(x\ge0\). Its dual minimizes \(\sum_gp_g\) subject to \(p_g\ge w_iv_{ig}\) for all \(i\) and \(g\), and \(p\ge0\), so the unique dual optimum is \(p_g=p_g(w)\). An allocation attains the common optimal value \(\sum_gp_g(w)\) exactly when it is supported at \(w\). The following classical characterization is the second welfare theorem for this divisible economy; see \citet{Var74} and, for its weighted-welfare formulation, \citet{Negishi}. An explicit proof for additive valuations is given by \citet[Lemma~2.3 and Appendix~A of the full version]{SSH}. \begin{proposition}[fPO and weighted welfare]\label{prop:fpo} For positive weights \(w\), an allocation is supported at \(w\) if and only if it maximizes \(\sum_iw_i\sum_gv_{ig}x_{ig}\) over all fractional allocations \(x\). An allocation is fPO if and only if it is supported at some positive weights. \end{proposition} \begin{proof} For any positive weights, each good contributes at most its price \(p_g(w)\) to the weighted sum of utilities, with equality exactly when all its shares go to agents attaining \(p_g(w)\). This proves the first statement, and it shows that a supported allocation is fPO, since a Pareto improvement would strictly increase the weighted sum. Conversely, the cited welfare characterization supplies strictly positive weights at which a given fPO allocation maximizes the weighted sum. \end{proof} Following \citet[Section~4.1]{BKV} and \citet[Section~2]{MaharaFull}, we use the language of Fisher markets. At prices \(\p\), agent \(i\)'s \emph{bang per buck} for good \(g\) is \(v_{ig}/p_g\), and her \emph{maximum bang per buck} (MBB) goods are those attaining the largest bang per buck. An allocation is an \emph{MBB allocation} if every agent receives only MBB goods, and the \emph{MBB graph} is the bipartite graph on \(N\cup M\) with an edge between \(i\) and \(g\) whenever \(g\) is an MBB good for \(i\). Agent \(i\)'s \emph{spending} in an allocation \(A\) is \(\p(A_i)\). In the instances that our algorithms work with, every agent has a good that only she values (\Cref{sec:prep}). Then, at the prices \(\p(w)\) induced by positive weights \(w\), agent \(i\)'s largest bang per buck is \(1/w_i\), so her MBB goods are exactly the goods \(g\) with \(i\in D_g(w)\). The MBB allocations at \(\p(w)\) are then exactly the allocations supported at \(w\), and the MBB graph at \(\p(w)\) has an edge between \(i\) and \(g\) exactly when \(i\in D_g(w)\). \subsection{Price envy-freeness up to one good}\label{sec:pef1} \begin{definition}[Price EF1]\label{def:pef1} An allocation \(A\) is \emph{price envy-free up to one good} (pEF1) at prices \(\p\) if, for every \(i,j\in N\) with \(A_j\ne\varnothing\), there exists \(g\in A_j\) such that \(\p(A_i)\ge\p(A_j\setminus\{g\})\). \end{definition} \citet[Lemma~4.1]{BKV} show that price EF1 implies EF1 for MBB allocations. We give the argument for prices induced by positive weights. \begin{lemma}[pEF1 implies EF1]\label{lem:pef1} Let \(A\) be supported at positive weights \(w\). If \(A\) is pEF1 at \(\p(w)\), then \(A\) is EF1 and fPO. \end{lemma} \begin{proof} The allocation is fPO by \Cref{prop:fpo}. For EF1, fix \(i,j\) with \(A_j\ne\varnothing\), and let \(g\in A_j\) witness price EF1. Since \(A\) is supported and every price is at least agent \(i\)'s weighted value, \[ w_iv_i(A_i)=\p(A_i)\ge\p(A_j\setminus\{g\})\ge w_iv_i(A_j\setminus\{g\}). \] Dividing by \(w_i>0\) shows that the same good witnesses EF1. \end{proof} \subsection{Prepared instances}\label{sec:prep} Two features of a general instance are inconvenient: an agent may value every good at zero, and the MBB graph may contain cycles. A strongly polynomial preparation removes both. \begin{definition}[Prepared instance]\label{def:prepared} An instance is \emph{prepared} if every agent \(i\) has a \emph{private good} \(h_i\) with \(v_{ih_i}>0\) and \(v_{jh_i}=0\) for \(j\ne i\), every good has positive value for some agent, and no cycle of positive entries is balanced: along every simple cycle in the bipartite graph on \(N\cup M\) with an edge for each positive entry, the two products of the entries taken alternately differ. \end{definition} Along a cycle of the MBB graph at positive weights, multiplying the equations \(w_iv_{ig}=p_g(w)=w_jv_{jg}\) and canceling the weights shows that the cycle is balanced. Hence the MBB graph of a prepared instance is a forest at every positive weight vector; following \citet[Lemma~2.2]{DGM}, perturbations that ensure this are standard. The private good \(h_i\) belongs to every MBB allocation's bundle for \(i\), at price \(w_iv_{ih_i}\). \begin{lemma}[Preparation]\label{lem:prep} Given an instance with \(n\) agents and \(m\) goods, one can construct a prepared instance with the same agents and at most \(m+n\) goods, in which each added private good \(h_i\) is worth one to its owner, using \(O(n(m+n))\) arithmetic operations on rationals of bit length polynomial in the input length. Any EF1 and fPO allocation of the prepared instance yields an EF1 and fPO allocation of the original instance by deleting the added private goods and giving the goods valued at zero by every agent to arbitrary agents. \end{lemma} \Cref{app:prep} gives the construction and the proof. From now until the final step of each algorithm, \(M\), \(m\), and \(v\) refer to the prepared instance. \section{Ceiling weights}\label{sec:ceiling} Fix a prepared instance. If agent \(i\) alone attains the price of a good, every allocation supported at the weights must give that good to \(i\). This section shows that one weight vector, the ceiling weights, supports a pEF1 allocation. \begin{keybox} \begin{definition}[Uncontested goods and ceiling weights]\label{def:uncontested} Fix \(w\in\R^n_{\ge0}\). A good \(g\) is \emph{uncontested} for agent \(i\) if \(D_g(w)=\{i\}\), and \emph{contested} if \(\lvert D_g(w)\rvert\ge2\). Write \(U_i(w)\) for the set of goods uncontested for \(i\). The weights \(w\) are \emph{uncontested-feasible} if every agent's uncontested goods cost at most one, that is, \(\p(U_i(w))\le1\) for every \(i\in N\). Let \(W\) be the set of uncontested-feasible weights. The \emph{ceiling weights} \(w^*\) form the coordinatewise greatest element of \(W\). \end{definition} \end{keybox} This criterion comes from the existence proof of \citet[Section~3.1]{MaharaChores} for chores. At the weights supplied by the KKM lemma, he computes each agent's total price of the chores that only she can receive, and uses the largest of these totals as the threshold that every bundle should reach. We instead fix the threshold at one and choose the weights themselves: as high as possible while every agent's uncontested goods cost at most one. At positive weights, agent \(i\) attains the price of every good in \(U_i(w)\), so \(\p(U_i(w))=w_iv_i(U_i(w))\). In the MBB forest, the uncontested goods are exactly the goods of degree one. Throughout, inequalities between vectors are coordinatewise. \begin{lemma}[Existence]\label{lem:existence} The set \(W\) is compact, contains a positive point, and is closed under coordinatewise maximum. Consequently, the ceiling weights exist, and they are positive. \end{lemma} \begin{proof} If \(w^{(k)}\to w\), every good uncontested for \(i\) at \(w\) remains uncontested for \(i\) for all sufficiently large \(k\), so \(\p(U_i(w))\le\liminf_k\p(U_i(w^{(k)}))\) and \(W\) is closed. Scaling all weights by \(\alpha>0\) preserves the sets \(D_g\) and multiplies all prices by \(\alpha\), so a sufficiently small positive multiple of the all-ones vector belongs to \(W\). For \(w,w'\in W\), let \(\hat w=w\vee w'\) be their coordinatewise maximum. Fix \(i\) and suppose, by symmetry, that \(\hat w_i=w_i\). Every good uncontested for \(i\) at \(\hat w\) is also uncontested for \(i\) at \(w\), at the same price, since the other agents' weighted values can only be higher at \(\hat w\). Hence \(\p(U_i(\hat w))\le\p(U_i(w))\le1\). If \(w_i>0\), the private good \(h_i\) is uncontested for \(i\) and costs \(w_iv_{ih_i}\), so every \(w\in W\) satisfies \(w_i\le1/v_{ih_i}\). Thus \(W\) is bounded and hence compact. Maximizing each coordinate over \(W\) and taking the coordinatewise maximum of the \(n\) maximizers gives the greatest element. It dominates a positive point of \(W\), so it is positive. \end{proof} \subsection{Covering by peeling}\label{sec:covering} At the ceiling weights, we first assign each good to an agent attaining its price so that every agent spends at least one. For positive weights \(w\), a set \(S\subseteq N\), and \(i\in S\), let \begin{equation}\label{eq:b} b_i(S;w)=\sum_{g:\,D_g(w)\cap S=\{i\}}p_g(w) \end{equation} be the total price of the goods whose only price-attaining agent in \(S\) is \(i\). Suppose that every nonempty \(S\subseteq N\) contains an agent \(i\) with \(b_i(S;w)\ge1\). Start with \(S=N\). Choose such an agent \(i\), give her all goods counted in \(b_i(S;w)\), and remove her from \(S\). Each good is assigned exactly once, when the last agent attaining its price is removed. The resulting allocation \(A^0\) is supported at \(w\), and every agent spends at least one. We call the order in which agents are removed a \emph{peeling order}. \begin{lemma}[Covering]\label{lem:covering} Every nonempty \(S\subseteq N\) contains an agent \(i\) with \(b_i(S;w^*)\ge1\). Hence the ceiling weights admit a peeling order and a supported allocation in which every agent spends at least one. \end{lemma} \begin{proof} Suppose instead that \(b_i(S;w^*)<1\) for every \(i\) in some nonempty \(S\). Multiply the weights of the agents in \(S\) by a common factor \(1+\varepsilon\). For all sufficiently small \(\varepsilon>0\), strict comparisons between weighted values persist. If \(D_g(w^*)\) meets \(S\), the new set of agents attaining the price of \(g\) is \(D_g(w^*)\cap S\), and every other good keeps its price-attaining agents. Hence each \(i\in S\) has uncontested spending \((1+\varepsilon)b_i(S;w^*)<1\) for sufficiently small \(\varepsilon\). Agents outside \(S\) can only lose uncontested goods, and the prices of those they keep do not change. The new weights are therefore uncontested-feasible, contradicting the maximality of \(w^*\). \end{proof} On the MBB forest, peeling takes \(O(m+n)\) operations. Initialize each agent's total to her uncontested spending, queue the agents whose total is at least one, and keep for each good the number of its price-attaining agents not yet removed. When removing the next queued agent, decrease the count of each adjacent good. If the count falls to one, add the price of the good to the total of the remaining agent attaining its price, and queue that agent if her total has just reached one. If the count falls to zero, give the good to the agent just removed. \subsection{Redistribution on the MBB forest}\label{sec:rounding} The covering allocation can give an agent many contested goods. The next lemma passes contested goods down the trees of the MBB forest, in the spirit of the tree argument of \citet[Appendix~A.1]{BV25}. \begin{lemma}[Redistribution]\label{lem:round} Let \(w\in W\) be positive, and let \(A^0\) be supported at \(w\) with every agent spending at least one. Given \(A^0\), the prices \(\p(w)\), and the MBB forest, one can construct with \(O(m+n)\) operations an allocation \(A\) supported at \(w\) that is pEF1 at \(\p(w)\), in which every agent spends at least one. \end{lemma} \begin{proof} Start with \(A^0\). Leave the uncontested goods with their owners, delete them from the MBB forest, and root each remaining tree at an agent. Every good in these trees is contested, so it has at least one child agent. Process the agents from the roots down. Agent \(i\) keeps her uncontested goods and her parent good if she owns it. While the total price of the goods she keeps is below one, she keeps another child good that she owns. Each child good that she still owns and has not kept is given to one of its child agents. Every transfer is to an agent attaining the price, so the resulting allocation \(A\) is supported at \(w\). At the start of her turn, agent \(i\) still owns all of \(A^0_i\) and may also have received her parent good, so she can keep goods of total price at least one. These goods stay with her for the rest of the construction, so \(\p(A_i)\ge1\). If she kept a child good, removing the last one she kept leaves a bundle of price below one. If she kept only uncontested goods and her parent good, removing the parent good leaves price \(\p(U_i(w))\le1\). If she kept only uncontested goods, the same bound holds before removing any good. Thus every bundle has a good whose removal leaves price at most one. Since every agent spends at least one, \(A\) is pEF1. Rooting the trees and processing the agents take a constant number of operations per vertex and edge, and the forest has at most \(m+n-1\) edges. \end{proof} \begin{figure}[htbp] \centering \begin{minipage}[c]{0.40\linewidth} \centering \begin{tikzpicture}[x=1cm,y=.82cm, agent/.style={circle,draw,thick,fill=black!5,minimum size=6.2mm,inner sep=0pt,font=\small}, item/.style={rectangle,draw,minimum width=6.5mm,minimum height=5.4mm,inner sep=1pt,font=\small}, price/.style={font=\footnotesize,inner sep=1pt}] \node[agent] (j) at (0,0) {2}; \node[item] (a) at (-1.5,-1.3) {\(a\)}; \node[item] (h2) at (0,-1.3) {\(h_2\)}; \node[item] (b) at (1.5,-1.3) {\(b\)}; \node[agent] (i) at (-1.5,-2.6) {1}; \node[agent] (k) at (1.5,-2.6) {3}; \node[item] (h1) at (-1.5,-3.9) {\(h_1\)}; \node[item] (h3) at (1.5,-3.9) {\(h_3\)}; \draw (j)--(a) (j)--(h2) (j)--(b) (a)--(i) (b)--(k) (i)--(h1) (k)--(h3); \node[price,left] at (a.west) {\(2/3\)}; \node[price,below] at (h2.south) {\(2/3\)}; \node[price,right] at (b.east) {\(2/3\)}; \node[price,left] at (h1.west) {\(1\)}; \node[price,right] at (h3.east) {\(1\)}; \end{tikzpicture} \end{minipage}\hfill \begin{minipage}[c]{.56\linewidth} \centering\small \setlength{\tabcolsep}{4pt} \begin{tabular}{@{}lccc@{}} \toprule Step & \multicolumn{2}{c}{Owner} & Spending\\[-2pt] & \(a\) & \(b\) & \((\p(A_1),\p(A_2),\p(A_3))\)\\ \midrule Peeling & 2 & 2 & \((1,\ 2,\ 1)\)\\ Redistribution & 2 & 3 & \((1,\ 4/3,\ 5/3)\)\\ \bottomrule \end{tabular} \end{minipage} \caption{Covering and redistribution on an MBB tree rooted at agent~2. Circles are agents, squares are goods, and labels are prices. The goods \(a\) and \(b\) are contested; the private goods are uncontested. Peeling removes agents~1 and~3 first, since their private goods already cost one, and agent~2 is removed last and receives \(a\), \(h_2\), and \(b\). In the redistribution, agent~2 keeps \(h_2\) and then \(a\), after which she spends \(4/3\ge1\), and she passes \(b\) to agent~3.}\label{fig:forest} \end{figure} \subsection{From ceiling weights to EF1 and fPO} \begin{theorem}[From ceiling weights to EF1 and fPO]\label{thm:reduction} Given the ceiling weights of a prepared instance, an allocation that is supported at \(w^*\) and pEF1 at \(\p(w^*)\) can be computed with \(O(nm)\) arithmetic operations and comparisons. It is EF1 and fPO. \end{theorem} \begin{proof} The prices and the MBB forest at \(w^*\) take \(O(nm)\) operations. By \Cref{lem:covering}, peeling gives a supported allocation in which every agent spends at least one, and the ceiling weights are uncontested-feasible, so \Cref{lem:round} applies. The resulting allocation is EF1 and fPO by \Cref{lem:pef1}. \end{proof} Even without any algorithmic considerations, these arguments give a short proof of the existence theorem of \citet{BKV}, which was originally established by a limit argument. \begin{corollary}[Existence]\label{cor:existence} Every instance with additive valuations admits an allocation that is EF1 and fPO. \end{corollary} \begin{proof} Prepare the instance using \Cref{lem:prep}. By \Cref{lem:existence,lem:covering,lem:round}, the prepared instance has an allocation supported at \(w^*\) that is pEF1 at \(\p(w^*)\), which is EF1 and fPO by \Cref{lem:pef1}. \Cref{lem:prep} transfers both properties to the original instance. \end{proof} \section{A polynomial-time algorithm}\label{sec:computation} By \Cref{thm:reduction}, it remains to compute the ceiling weights. We characterize them as the greatest fixed point of a break-even map (\Cref{sec:breakeven}), show that they are rational of polynomial bit length and that the MBB graph at the ceiling weights determines them (\Cref{sec:rationality}). It therefore suffices to approximate the ceiling weights closely enough to recover this graph. For a general monotone map, finding a fixed point can require many evaluations~\citep{EPRY20}. The break-even map has more structure: in logarithmic coordinates it is nonexpansive in the maximum norm (\Cref{sec:logmap}). We bias it toward its upper corner to obtain a contraction whose fixed point lies just above the logarithms of the ceiling weights (\Cref{sec:bias}), approximate that fixed point with the algorithm of \citet{OAI} (\Cref{sec:oai}), and recover the MBB graph and the ceiling weights exactly (\Cref{sec:recovery}). \Cref{sec:polyalg} assembles the algorithm. \subsection{The break-even map}\label{sec:breakeven} Fix an agent \(i\) and the weights \(w_{-i}\) of the other agents. Let \(M_i=\{g\in M:v_{ig}>0\}\), which contains \(h_i\). For \(g\in M_i\), let \[ r_{ig}(w)=\max_{j\ne i}\frac{w_jv_{jg}}{v_{ig}}, \] with \(r_{ig}(w)=0\) if no other agent values \(g\). At her own weight \(s\), agent \(i\) attains the price of \(g\) if and only if \(s\ge r_{ig}(w)\), and she is the unique agent attaining it if and only if \(s>r_{ig}(w)\). \begin{definition}[Break-even weight]\label{def:breakeven} The \emph{break-even weight} \(B_i(w)\) of agent \(i\) is the smallest weight \(s\) such that, with the other weights fixed at \(w_{-i}\), some MBB allocation at the prices induced by \((s,w_{-i})\) gives agent \(i\) a bundle costing at least one. The \emph{break-even map} is \(B(w)=(B_i(w))_{i\in N}\). \end{definition} A nonempty set \(S\subseteq M_i\) can be given to agent \(i\) at her own weight \(s\) exactly when \(s\ge r_{ig}(w)\) for every \(g\in S\), and it then costs her \(s\,v_i(S)\). Hence the smallest weight exists and is given by \begin{equation}\label{eq:B} B_i(w)=\min_{\varnothing\ne S\subseteq M_i}\max\left\{\frac1{v_i(S)},\ \max_{g\in S}r_{ig}(w)\right\}. \end{equation} In particular, \(1/v_i(M_i)\le B_i(w)\le1/v_{ih_i}\) for all rival weights; the lower bound holds because \(v_i(S)\le v_i(M_i)\), and the upper bound is attained by the private good alone. The break-even weight does not depend on \(w_i\). \begin{lemma}[Break-even identity]\label{lem:threshold} Fix an agent \(i\) and positive weights \(w\). Agent \(i\)'s uncontested goods cost at most one if and only if \(w_i\le B_i(w)\). Moreover, \(B_i\) is nondecreasing and continuous in the rival weights. \end{lemma} In words, the largest weight at which agent \(i\) is not charged more than one for the goods that only she can receive equals the smallest weight at which she can receive a bundle costing at least one. \begin{proof} Write \(s=w_i\) and \(b=B_i(w)\). At own weight \(s\), agent \(i\) can receive exactly the goods \(g\in M_i\) with \(s\ge r_{ig}(w)\), her uncontested goods are those with \(s>r_{ig}(w)\), and each of these goods costs \(s\,v_{ig}\). Suppose first that \(s1\), choose \(s'b\), and let \(S\) attain the minimum in \Cref{eq:B}. Every \(g\in S\) satisfies \(r_{ig}(w)\le bb\,v_i(S)\ge1\). For the last statement, each \(r_{ig}\) is nondecreasing and continuous in the rival weights, and \Cref{eq:B} takes finitely many minima and maxima of such functions and constants. \end{proof} \begin{proposition}[Greatest fixed point]\label{prop:fixed} Positive weights \(w\) are uncontested-feasible if and only if \(w\le B(w)\). The ceiling weights are the greatest fixed point of the break-even map. \end{proposition} \begin{proof} The first statement is \Cref{lem:threshold} applied to each agent. By \Cref{lem:existence}, \(w^*\) is positive, so \(w^*\le B(w^*)\). Since \(B\) is monotone, \(B(w^*)\le B(B(w^*))\), and \(B(w^*)\) is positive, so \(B(w^*)\) is uncontested-feasible and hence at most \(w^*\). Thus \(w^*=B(w^*)\). Every positive fixed point of \(B\) is uncontested-feasible and therefore at most \(w^*\). \end{proof} The maximality in \Cref{prop:fixed} is essential: an arbitrary fixed point of the break-even map need not let every agent spend at least one. \begin{example}[Why the ceiling weights]\label{ex:multiple} Two agents each value a common good \(c\) at one and their private goods at one. At weights \(w=(t,t)\) with \(1/2\le t\le1\), the good \(c\) costs \(t\) and is contested, and each private good costs \(t\) and is uncontested. Both agents' uncontested goods cost at most one, and each agent can receive both goods she values and spend \(2t\ge1\). At a smaller own weight, an agent cannot attain the price of \(c\) and spends less than \(t\le1\). Hence \(B(w)=w\) throughout this interval. However, \(c\) can go to only one agent, and if \(t<1\), the other agent spends only \(t<1\). Only at the ceiling weights \((1,1)\), where each private good alone costs one, can both agents spend at least one. \end{example} \subsection{Rationality of the ceiling weights}\label{sec:rationality} Let \(L\) be the maximum of four, \(n+m\), and the binary encoding length of the prepared instance. Every valuation has numerator and denominator at most \(2^L\) in lowest terms, and \(m\le L\). Put \[ D=16(n+m+1)(L+1). \] The constant \(D\) bounds the bit lengths of the numerators and denominators of the ceiling weights. The proof below follows the standard way of bounding equilibrium prices in linear Fisher markets~\citep{DPSV}: tight constraints and ties along a spanning tree determine all values in a component. The scaling step resembles one used for pacing equilibria~\citep[Lemma~2]{FPPE}. \begin{lemma}[Rationality]\label{lem:height} Every coordinate of \(w^*\) has numerator and denominator at most \(2^D\) in lowest terms. Given the MBB graph at \(w^*\), the ceiling weights can be computed exactly by a traversal of each component. \end{lemma} \begin{proof} Each component \(K\) of the MBB graph at \(w^*\) contains an agent \(i\) whose uncontested goods cost exactly one, that is, \(w_i^*v_i(U_i(w^*))=1\). Otherwise, we could multiply all weights in \(K\) by a common factor slightly above one. The ties inside \(K\) would persist, and so would all strict inequalities between weighted values, of which there are finitely many. The MBB graph would therefore stay the same. The uncontested goods in \(K\) would still cost at most one by strictness, and the other components would be unaffected. This would contradict the maximality of \(w^*\). Root \(K\) at an agent and give her relative weight one. For each good \(g\) with parent agent \(i\), give each child agent \(j\) the relative weight \(\rho_j=\rho_iv_{ig}/v_{jg}\). The ties \(w^*_iv_{ig}=w^*_jv_{jg}\) give \(w^*_i=s_K\rho_i\) throughout \(K\) for a common scale \(s_K\). Since all uncontested goods in \(K\) cost at most one and at least one agent's cost exactly one, \[ s_K=\frac1{\max_{i\in K\cap N}\rho_iv_i(U_i(w^*))}. \] The graph determines all quantities on the right-hand side. For the bit bound, start at an agent whose uncontested goods cost exactly one. Her weight is the reciprocal of a sum of at most \(m\) valuations, which has denominator at most \(2^{mL}\) and numerator at most \(m2^{(m+1)L}\). A simple path to any other agent of \(K\) uses at most \(n-1\) valuation ratios, whose product has numerator and denominator at most \(2^{2nL}\). Multiplying these bounds and using \(m\le L\) gives the claimed bound \(2^D\). \end{proof} \subsection{The break-even map in logarithmic coordinates}\label{sec:logmap} In addition to \(L\) and \(D\) from \Cref{sec:rationality}, we use the constants \[ R=4(L+1),\qquad \theta=2^{-16D},\qquad \varepsilon=2R\theta,\qquad k=9D. \] Here \(R\) bounds the magnitude of the logarithm of every break-even weight, \(\theta\) is the weight of the bias, \(\varepsilon\) bounds the violation that the bias causes, and \(k\) is the number of bits of accuracy that we request from the fixed-point algorithm. We write \(\log\) for the natural logarithm, apply \(\log\) and \(\exp\) to vectors coordinatewise, and write \(\norm{x}=\max_i\lvert x_i\rvert\). We also use \(2nR0}\Bigl(x_j+\log\frac{v_{jg}}{v_{ig}}\Bigr), \end{equation} with \(\ell_{ig}(x)=-\infty\) if no other agent values \(g\). Prices remain visible in these coordinates: \(\ell_{ig}(x)\) is the logarithm of the weight at which agent \(i\) matches the highest rival price of \(g\), and \(-\log v_i(S)\) is the logarithm of the weight at which the bundle \(S\) costs her exactly one. \begin{lemma}[The logarithmic map]\label{lem:logmap} The map \(F\) has the following properties. \begin{enumerate} \item[(a)] It maps \(\R^n\) into the cube \([-R,R]^n\). \item[(b)] It is monotone and nonexpansive: \(x\le x'\) implies \(F(x)\le F(x')\), and \(\norm{F(x)-F(x')}\le\norm{x-x'}\) for all \(x,x'\). \item[(c)] The vector \(y=\log w^*\) is the greatest vector satisfying \(x\le F(x)\). In particular, it is the greatest fixed point of \(F\), and \(y\le\xbar\), where \(\xbar=\log\wbar\) and \(\wbar_i=1/v_{ih_i}\). \end{enumerate} \end{lemma} \begin{proof} For (a), the bounds after \Cref{eq:B} give \(1/v_i(M_i)\le B_i\le1/v_{ih_i}\). Since \(v_i(M_i)\le m2^L\) and \(v_{ih_i}\ge2^{-L}\), we have \(\lvert F_i(x)\rvert\le\log(m2^L)\le2L\le R\). For (b), monotonicity is immediate from \Cref{eq:F}. Nonexpansiveness is the standard consequence of monotonicity for maps that commute with adding constants~\citep{CT80,Gunawardena03}. Our map does not commute with adding constants, because of the constant terms, but it satisfies \(F(x+\delta\mathbf1)\le F(x)+\delta\mathbf1\) for \(\delta\ge0\), which suffices: every translate \(x_j+\log(v_{jg}/v_{ig})\) increases by exactly \(\delta\), the constants do not change, and taking maxima and minima preserves the bound. If \(\norm{x-x'}=\delta\), then \(x\le x'+\delta\mathbf1\), so \(F(x)\le F(x')+\delta\mathbf1\), and symmetrically \(F(x')\le F(x)+\delta\mathbf1\). For (c), \Cref{prop:fixed} shows that \(x\le F(x)\) holds exactly when \(e^x\) is uncontested-feasible, and that \(\log w^*\) is a fixed point of \(F\); by \Cref{lem:existence}, \(w^*\) is the greatest uncontested-feasible vector and \(w^*\le\wbar\). \end{proof} The next lemma evaluates \(F\) efficiently despite the minimum over exponentially many bundles in \Cref{eq:F}. The idea is to sort the goods by the level at which agent \(i\) can obtain them and to consider only the bundles of goods below a given level. \begin{lemma}[Evaluation]\label{lem:eval} Given a dyadic vector \(x\) and an integer \(s\ge0\), one can compute, for every agent \(i\), a number within \(2^{-s-3}\) of \(F_i(x)\) in time polynomial in the input length, the encoding length of \(x\), and \(s\). \end{lemma} \begin{proof} Fix an agent \(i\). For a good \(g\in M_i\) valued by another agent, let its level be \(\ell_{ig}(x)\). For a good valued by no other agent, use the level \(-\log v_i(M_i)\) instead. This leaves every bundle term in \Cref{eq:F} unchanged, since \(-\log v_i(S)\ge-\log v_i(M_i)\) for every nonempty \(S\subseteq M_i\). Write \(\ell_g\) for the resulting levels. For each level \(r\) that occurs, let \(S_r=\{g\in M_i:\ell_g\le r\}\). Any nonempty bundle whose largest level is \(r\) can be enlarged to \(S_r\) without changing that level or increasing \(-\log v_i(S)\). Hence \[ F_i(x)=\min_{r\in\{\ell_g:g\in M_i\}}\max\{r,\ -\log v_i(S_r)\}. \] Sort the levels once and sweep them in increasing order, adding all goods at each level to a running sum before evaluating the corresponding term. Let \(\delta=2^{-s-4}\). Compute the levels within \(\delta\) and run the sweep on the approximate levels. The argument above applies to any levels, including ties. For each fixed bundle, its largest level changes by at most \(\delta\), so the minimum over bundles also changes by at most \(\delta\). Form each running sum exactly as a rational, and compute its logarithm within \(\delta\). This approximates \(F_i(x)\) within \(2\delta=2^{-s-3}\). The required logarithms of positive rationals can be computed within any accuracy \(2^{-t}\) in time polynomial in \(t\) and their encoding length (\Cref{app:log}). \end{proof} \subsection{Selecting the greatest fixed point}\label{sec:bias} A nonexpansive map may have many fixed points, and we need the greatest one. \citet{Browder} approximated fixed points of nonexpansive maps by averaging the map with a constant, which yields a contraction. The treatment of nonexpansive maps by \citet{OAI} averages with the origin and returns a point with a small residual, which may be far from the greatest fixed point. We average with the upper corner \(\xbar\) instead, which pushes the fixed point upward: \[ H(x)=(1-\theta)F(x)+\theta\xbar. \] Both \(F\) and the constant \(\xbar\) take values in the cube \([-R,R]^n\), so \(H\) maps the cube into itself, and it is a contraction with factor \(1-\theta\). By Banach's principle, it has a unique fixed point \(z\). Since \(\xbar\ge y=F(y)\), we have \(H(y)\ge y\). The map \(H\) is monotone, so its iterates from \(y\) increase and converge to \(z\), giving \(z\ge y\). Moreover, \[ z_i-F_i(z)=\theta(\xbar_i-F_i(z))\le2R\theta=\varepsilon . \] Thus \(z\) satisfies \(x\le F(x)\) up to an error of \(\varepsilon\) in each coordinate. The next lemma shows that lowering \(z\) by at most \(n\varepsilon\) restores the inequality exactly. By the maximality of \(y\), this bounds the distance from \(z\) to \(y\). Maximality thus plays a double role: it lets every agent spend at least one at the ceiling weights (\Cref{lem:covering}), and the upward bias finds them because their logarithms form the greatest solution of \(x\le F(x)\). To lower \(z\), we record the comparisons between agents' weighted values that already hold at \(z\) up to the error \(\varepsilon\), and use shortest paths for systems of difference constraints~\citep[Section~24.4]{CLRS}. \begin{lemma}[Upward bias]\label{lem:repair} The fixed point of \(H\) satisfies \(y_i\le z_i\le y_i+n\varepsilon\) for every agent \(i\). \end{lemma} \begin{proof} For each good \(g\) and distinct agents \(i,j\) who value it positively, put \(c=\log(v_{jg}/v_{ig})\), and include an edge \(i\to j\) of cost \(c\) whenever \(z_i-\varepsilon\le z_j+c\). This graph has no cycle of negative cost. Indeed, any such cycle would contain a negative simple cycle with at most \(n\) edges. Its cost would be \(\log(a/b)<0\) for positive integers \(a,b\le2^{2nL}\), since the cycle uses at most \(n\) valuation ratios, and hence at most \(-2^{-2nL}\), as \(\log(b/a)\ge(b-a)/b\). Yet summing the edge inequalities around the cycle shows that its cost is at least \(-n\varepsilon>-2^{-2nL}\), using \(2nL0\), and let \(\mu_g=\max_i\lambda_{ig}\), so that \(\lvert\widehat\mu_g-\mu_g\rvert\le\Delta/8\). An agent attaining the price of \(g\) at \(w^*\) has \(\widehat\lambda_{ig}\ge\mu_g-\Delta/8\ge\widehat\mu_g-\Delta/4\). Any other agent with \(v_{ig}>0\) has \(\lambda_{ig}\le\mu_g-\Delta\), so \(\widehat\lambda_{ig}\le\mu_g-7\Delta/8\le\widehat\mu_g-3\Delta/4\). Hence \((i,g)\) is an edge of the MBB graph at \(w^*\) exactly when \(\widehat\lambda_{ig}\ge\widehat\mu_g-\Delta/2\). Given this graph, \Cref{lem:height} computes \(w^*\) by a traversal of each component. The logarithms take time polynomial in \(D\) and the input length (\Cref{app:log}), and the traversal uses polynomially many operations on rationals of polynomial bit length. \end{proof} \subsection{The polynomial-time algorithm}\label{sec:polyalg} \Cref{alg:main} assembles the stages of this section and \Cref{sec:ceiling}. Stages~1 and~2 compute the ceiling weights of the prepared instance, Stage~3 constructs the allocation of \Cref{thm:reduction}, and Stages~0 and~4 translate between the original and the prepared instance. The proofs hold for every way of resolving the choices the algorithm leaves open, such as the numbering of entries, the peeling order, the roots of the trees, the order of child goods, and the recipients of goods; for definiteness, it resolves all of them by the input order of agents and goods. \begin{algorithm}[htbp] \caption{A polynomial-time algorithm for an EF1 and fPO allocation}\label{alg:main} \begin{algorithmic}[1] \Require agents \(N\), goods \(M\), nonnegative rational valuations \(v\) \Ensure an EF1 and fPO allocation \(A\) \Statex \Statex \textbf{Stage 0: Prepare the instance} (\Cref{sec:prep,app:prep}) \State Set aside the goods valued at zero by every agent, scale each row to even integers, add a private good worth one to each agent, and perturb the remaining positive entries. \Statex \Statex \textbf{Stage 1: Approximate the ceiling weights} (\Cref{sec:bias,sec:oai}) \State Compute \(L\), \(D\), \(R\), \(\theta\), and \(k\), and let \(H(x)=(1-\theta)F(x)+\theta\xbar\). \State Run the algorithm of \Cref{prop:dyadic} on \(f(t)=H(Rt)/R\) with \(b=16D\), accuracy \(k\), and the oracle of \Cref{lem:oracle}; let \(\widehat t\) be its output and \(\widehat z=R\widehat t\). \Statex \Statex \textbf{Stage 2: Recover the ceiling weights exactly} (\Cref{sec:recovery}) \State For each positive entry \(v_{ig}\), compute \(\widehat\lambda_{ig}=\widehat z_i+\ell_{ig}\), where \(\ell_{ig}\) is within \(2^{-7D}\) of \(\log v_{ig}\). \State Keep the entries with \(\widehat\lambda_{ig}\ge\max_{j:\,v_{jg}>0}\widehat\lambda_{jg}-2^{-4D-2}\); they form the MBB forest at \(w^*\). \State Compute \(w^*\) by a traversal of each tree of this forest (\Cref{lem:height}). \Statex \Statex \textbf{Stage 3: Allocate at the ceiling weights} (\Cref{sec:covering,sec:rounding}) \State Peel: repeatedly remove from the remaining set \(S\) an agent \(i\) with \(b_i(S;w^*)\ge1\), giving her the goods counted in \(b_i(S;w^*)\). \State Redistribute: from the roots of the MBB forest down, each agent keeps her uncontested goods, her parent good if she owns it, and further child goods while her kept goods cost less than one, and passes every other child good she owns to one of its child agents. \Statex \Statex \textbf{Stage 4: Return to the original instance} (\Cref{app:prep}) \State Remove the added private goods \(h_i\), and give each set-aside good to an arbitrary agent. \State \Return \(A\) \end{algorithmic} \end{algorithm} \begin{proof}[Proof of \Cref{thm:poly}] Stage~0 runs in strongly polynomial time and produces a prepared instance by \Cref{lem:prep}; from now until Stage~4, we work with this instance. In Stage~1, the algorithm of \Cref{prop:dyadic} runs with \(b=16D\) and \(k=9D\), which are polynomial in the input length. Its queries therefore have polynomial length, and each requests precision exactly \(b+k+4=25D+4\)~\citep[Section~8]{OAI}, so the oracle of \Cref{lem:oracle} answers every query in polynomial time. The output satisfies \(\norm{\widehat z-z}\le2^{-8D}\), so Stage~2 computes the MBB forest at the ceiling weights and the ceiling weights exactly by \Cref{lem:recovery}. By \Cref{thm:reduction} and \Cref{lem:height}, Stage~3 produces in polynomial time an allocation that is EF1 and fPO for the prepared instance. Stage~4 applies \Cref{lem:prep} and returns an EF1 and fPO allocation of the original instance. \end{proof} \section{Strongly polynomial algorithms}\label{sec:strong} The algorithm of \Cref{sec:computation} runs in polynomial time, but its number of arithmetic operations grows with the bit length of the valuations: it uses a contraction factor of \(1-2^{-16D}\), requests \(9D\) bits of accuracy, and evaluates logarithms to precision \(7D\). \Cref{sec:warmup} removes this dependence for EF1 and PO by rounding the valuations once. The rest of this section computes the ceiling weights themselves in strongly polynomial time. \Cref{sec:tests} states the one subroutine that we use, which solves finitely many spending tests and is proved in \Cref{sec:solver}. \Cref{sec:delete,sec:locate,sec:grid} use it to delete agent--good pairs that do not attain the good's price at the ceiling weights, and \Cref{sec:strongalg} assembles the algorithm. \subsection{Warm-up: EF1 and Pareto optimality}\label{sec:warmup} We use the following theorem of \citet{FrankTardos}, which replaces a rational vector by a short integer vector that has the same sign on every short integer linear form. \begin{proposition}[Simultaneous Diophantine approximation~{\citep{FrankTardos}}]\label{prop:ft} Given a rational vector \(a\in\mathbb Q^d\) and a positive integer \(N\), one can compute an integer vector \(\bar a\in\mathbb Z^d\), whose entries have bit length polynomial in \(d\) and the bit length of \(N\), such that \(\operatorname{sgn}(b\cdot\bar a)=\operatorname{sgn}(b\cdot a)\) for every \(b\in\mathbb Z^d\) with \(\lVert b\rVert_1\le N-1\). The algorithm uses a number of arithmetic operations polynomial in \(d\) and the bit length of \(N\), on rationals of bit length polynomial in the encoding lengths of \(a\) and \(N\). \end{proposition} \begin{proof}[Proof of \Cref{thm:po}] In this proof, \(M\), \(m\), and \(v\) refer to the original instance, before preparation. For each agent \(i\), apply \Cref{prop:ft} to the row \((v_{ig})_{g\in M}\) with \(N=m+1\), and let \(\bar v_{ig}\) be the resulting integers. For bundles \(S\) and \(T\), the vector \(b=\mathbf 1_S-\mathbf 1_T\) has entries in \(\{-1,0,1\}\), so \(\lVert b\rVert_1\le m\) and \[ \operatorname{sgn}\bigl(\bar v_i(S)-\bar v_i(T)\bigr)=\operatorname{sgn}\bigl(v_i(S)-v_i(T)\bigr). \] In particular, \(\bar v_{ig}\) is a nonnegative integer that vanishes exactly when \(v_{ig}\) does. Every entry of \(\bar v\) has bit length polynomial in \(m\), so the instance \(\bar v\) has encoding length polynomial in \(n\) and \(m\). By \Cref{thm:poly}, \Cref{alg:main} computes an allocation \(A\) that is EF1 and fPO for \(\bar v\), using a number of operations polynomial in \(n\) and \(m\), on rationals of bit length polynomial in \(n\) and \(m\). The allocation \(A\) is EF1 for \(v\): a good \(g\in A_j\) with \(\bar v_i(A_i)\ge\bar v_i(A_j\setminus\{g\})\) also satisfies \(v_i(A_i)\ge v_i(A_j\setminus\{g\})\). It is PO for \(v\): if an allocation \(A'\) satisfied \(v_i(A'_i)\ge v_i(A_i)\) for every \(i\), with strict inequality for some \(i\), then the same comparisons would hold for \(\bar v\), contradicting the fractional Pareto optimality of \(A\) for \(\bar v\). The rounding uses \(n\) applications of \Cref{prop:ft}, each with a number of operations polynomial in \(m\), on rationals of bit length polynomial in the input length. \end{proof} The same argument does not give fractional Pareto optimality. By the cycle characterization in the proof of \Cref{lem:prep}, fPO depends on comparisons between products of valuations of different agents around cycles, and rounding each agent's valuations separately need not preserve them. \subsection{Finite spending tests}\label{sec:tests} Uncontested-feasibility couples the weights of all agents through the sets \(U_i(w)\). We relax it to finitely many tests, each of which compares one agent's weight with a level and her uncontested goods with a threshold. \begin{definition}[Spending tests]\label{def:test} A \emph{spending test} for agent \(i\) consists of a \emph{level} \(a>0\), a \emph{threshold} \(c>0\), and a type, strict or weak. Positive weights \(w\) \emph{pass} it if \(w_i\le a\), or if \(v_i(U_i(w))a\), then \(a\,v_i(U_i(w))1\). Fix a peeling order for \(v\) at \(w^*\) (\Cref{lem:covering}), and let \(i\) be the first agent in it with \(z_i=\lambda w^*_i\). Her bundle \(A^0_i\) costs at least one at \(w^*\). Fix \(g\in A^0_i\). Every other agent \(j\in D_g(w^*)\) was removed before \(i\), since \(g\) went to the last of them, so \(z_j<\lambda w^*_j\) and \(z_jv_{jg}<\lambda p_g(w^*)\). Every agent \(j\notin D_g(w^*)\) with \(v'_{jg}>0\) has \(z_jv_{jg}\le\lambda w^*_jv_{jg}<\lambda p_g(w^*)\). Since \(z_iv_{ig}=\lambda p_g(w^*)\), the good \(g\) is uncontested for \(i\) at \(z\) under \(v'\). Hence agent \(i\)'s uncontested goods at \(z\) cost at least \(z_iv_i(A^0_i)=\lambda\,\p(A^0_i)\ge\lambda>1\), contradicting the uncontested-feasibility of \(z\). \end{proof} To certify that an entry misses the price, we use the cycles of positive entries. Fix a prepared instance, and choose a spanning tree of each component of the bipartite graph on \(N\cup M\) with an edge for each positive entry; every component contains an agent, since every good has a positive entry. Assign relative weights \(\rho_i>0\) and relative prices \(\kappa_g>0\) with \(\rho_iv_{ig}=\kappa_g\) for every tree edge, starting from \(\rho_i=1\) for one agent in each component. The \emph{imbalance} of the instance is \[ \Phi=\max_{v_{ig}>0}\ \max\Bigl\{\frac{\rho_iv_{ig}}{\kappa_g},\ \frac{\kappa_g}{\rho_iv_{ig}}\Bigr\}. \] Tree edges contribute one. An edge outside the trees closes a simple cycle with its tree, and canceling the relative weights and prices along the tree path shows that \(\rho_iv_{ig}/\kappa_g\) is the ratio between the two alternating products of entries around this cycle. Since no cycle is balanced, this ratio differs from one. Hence \(\Phi\ge1\), with equality exactly when the positive entries form a forest. \begin{lemma}[A pair on an unbalanced cycle]\label{lem:cycle} Let \(v\) be a prepared instance with ceiling weights \(w^*\) and imbalance \(\Phi>1\), and let \(\gamma=\Phi^{1/(n+1)}\). Given \(\widehat w\) with \(w^*\le\widehat w\le\gamma w^*\), some positive entry satisfies \(\gamma\widehat w_iv_{ig}0\), the \emph{normalized gain} \(b_{jj'g}=\rho_{j'}v_{j'g}/(\rho_jv_{jg})\) lies in \([\Phi^{-2},\Phi^2]\), since \(\rho_jv_{jg}/\kappa_g\) and \(\rho_{j'}v_{j'g}/\kappa_g\) lie in \([\Phi^{-1},\Phi]\). Agent \(j'\)'s weighted value for \(g\) is at least agent \(j\)'s exactly when \(w_j/\rho_j\le b_{jj'g}\,w_{j'}/\rho_{j'}\). For \(t>0\), call a nonempty set \(S\subseteq M_j\) \emph{overweight for \(j\) at \(t\)} if \(\rho_jt\,v_j(S)>1\), that is, if \(S\) would cost agent \(j\) more than one at weight \(\rho_jt\). Let \(P_i(t)\) be the statement that some \(w\in\R^n_{\ge0}\) with \(w_i>0\) satisfies \begin{equation}\label{eq:hom} \rho_jt\,v_j(U_j(w))\le1\qquad\text{for every \(j\) with \(w_j>0\).} \end{equation} Equivalently, no agent with positive weight has an overweight set of uncontested goods. The condition is invariant under scaling \(w\). For small \(t\), it holds for every \(w\). For large \(t\), every private good is overweight for its owner and uncontested whenever its owner has positive weight, which forces \(w=0\). For each nonzero \(w\), the condition holds exactly for \(t\le\min_{j:\,w_j>0}1/(\rho_jv_j(U_j(w)))\), where every denominator is positive because \(h_j\in U_j(w)\) whenever \(w_j>0\), and there are finitely many possible sets \(U_j(w)\). Hence \(T_i=\max\{t>0:P_i(t)\}\) exists, and it equals \(1/(\rho_jv_j(S))\) for some agent \(j\) and set \(S\). \begin{lemma}[Locating each weight]\label{lem:sandwich} For every agent \(i\), \(T_i\Phi^{-2n}\le\eta_i\le T_i\Phi^{2n}\). \end{lemma} \begin{proof} Suppose that \(P_i(t)\) holds with a witness \(w\), and let \(\Sigma=\{j:w_j>0\}\), which contains \(i\). For each \(j\in\Sigma\) and each set \(S\) overweight for \(j\) at \(t\), \Cref{eq:hom} shows that \(S\) is not contained in \(U_j(w)\), so some \(g\in S\) has an agent \(j'\ne j\) with \(w_{j'}v_{j'g}\ge w_jv_{jg}>0\), and in particular \(j'\in\Sigma\). Record an edge \(j\to j'\) of gain \(b_{jj'g}\); then \(w_j/\rho_j\le b_{jj'g}\,w_{j'}/\rho_{j'}\). Multiplying these inequalities around a directed cycle of recorded edges shows that its gains have product at least one. For \(j\in\Sigma\), let \(\mu_j\) be the minimum product of gains along a directed path of recorded edges starting at \(j\), including the empty path. Removing a cycle from a path does not increase the product, so simple paths suffice, and \(\Phi^{-2(n-1)}\le\mu_j\le1\). Moreover, \(\mu_j\le b_{jj'g}\mu_{j'}\) for every recorded edge. Let \(w'_j=\rho_jt\mu_j\) for \(j\in\Sigma\) and \(w'_j=0\) otherwise. For \(j\in\Sigma\), no overweight set is contained in \(U_j(w')\), since its recorded edge gives \(w'_{j'}v_{j'g}=\rho_jt\,b_{jj'g}\mu_{j'}v_{jg}\ge w'_jv_{jg}\). Hence \(\rho_jt\,v_j(U_j(w'))\le1\), and \(\p(U_j(w'))=\rho_jt\mu_jv_j(U_j(w'))\le1\). For \(j\notin\Sigma\), every good uncontested for \(j\) has price zero. Thus \(w'\in W\), so \(w'\le w^*\) and \(\eta_i\ge t\mu_i\ge t\Phi^{-2(n-1)}\). Taking \(t=T_i\) gives the lower bound. For the upper bound, let \(t=\eta_i\Phi^{-2n}\) and explore the agents by breadth-first search from \(i\). When an agent \(j\) is reached at depth \(d\le n-1\), we will have \(\eta_j\ge\eta_i\Phi^{-2d}\ge t\). Let \(S\) be overweight for \(j\) at \(t\). If \(S\) were contained in \(U_j(w^*)\), then \(\p(U_j(w^*))\ge w^*_jv_j(S)\ge\rho_jt\,v_j(S)>1\). Hence some \(g\in S\) has an agent \(j'\ne j\) with \(w^*_{j'}v_{j'g}\ge w^*_jv_{jg}\), that is, \(\eta_j\le b_{jj'g}\eta_{j'}\). Then \(\eta_{j'}\ge\eta_j\Phi^{-2}\), and we add \(j'\) if it has not been reached. Every reached agent has depth at most \(n-1\), which justifies the claim. Let \(w\) agree with \(w^*\) on the reached agents and vanish elsewhere. For a reached agent \(j\), every overweight set contains a good on which a reached agent's weighted value is at least \(j\)'s, so \(U_j(w)\) contains no overweight set and \Cref{eq:hom} holds. Thus \(P_i(t)\) holds and \(t\le T_i\), which gives \(\eta_i\le T_i\Phi^{2n}\). \end{proof} \begin{lemma}[Computing the endpoints]\label{lem:param} Each \(T_i\) can be computed with a number of arithmetic operations and comparisons polynomial in \(n\) and \(m\), on rationals of bit length polynomial in the encoding length of the instance. \end{lemma} \begin{proof} We first decide \(P_i(t)\) for a given rational \(t>0\). Let \(\Psi=\max\{2,\Phi^2\}\) and \(\zeta=\Psi^{-2n}\). Apply \Cref{lem:tests} with \(K=1\), the caps \(w_j\le\rho_j\), and for each agent \(j\) one weak test with level \(\rho_j\zeta\) and threshold \(1/(\rho_jt)\). Let \(\widehat w\) be the greatest passing weights. We claim that \(P_i(t)\) holds if and only if \(\widehat w_i\ge\rho_i\Psi^{-n}\). If \(P_i(t)\) holds, the first part of the proof of \Cref{lem:sandwich} gives numbers \(\mu_j\in[\Phi^{-2(n-1)},1]\) on a set \(\Sigma\ni i\) with recorded edges. Let \(w_j=\rho_j\mu_j\) for \(j\in\Sigma\) and \(w_j=\rho_j\zeta\) otherwise; note that \(\mu_j>\zeta\). The recorded edges remain valid, since the other weights can only be higher than in the proof, so every \(j\in\Sigma\) passes her test, and every other agent passes because \(w_j\) equals her level. Hence \(\widehat w\ge w\) and \(\widehat w_i\ge\rho_i\mu_i\ge\rho_i\Psi^{-n}\). Conversely, suppose that \(\widehat w_i\ge\rho_i\Psi^{-n}\), and explore from \(i\) as in the second part of the proof of \Cref{lem:sandwich}, with \(\widehat w/\rho\) in place of \(\eta\). An agent \(j\) reached at depth \(d\le n-1\) has \(\widehat w_j/\rho_j\ge\Psi^{-n-d}>\zeta\), so she passes her test through the threshold, and \(U_j(\widehat w)\) contains no overweight set. Every overweight set therefore contains a good \(g\) with some \(j'\) satisfying \(\widehat w_j/\rho_j\le b_{jj'g}\widehat w_{j'}/\rho_{j'}\), and \(\widehat w_{j'}/\rho_{j'}\ge\Psi^{-1}\widehat w_j/\rho_j\) since \(b_{jj'g}\le\Psi\). Restricting \(\widehat w\) to the reached agents gives a witness for \(P_i(t)\). To find \(T_i\), we run this decision procedure at \(t^+\), a value immediately to the right of \(T_i\), by the parametric search of \citet{Megiddo}. By \Cref{lem:tests}, the parameter enters only through comparisons between a sum \(v_j(S)\) and the threshold \(1/(\rho_jt)\), that is, through the sign of \(\rho_jt\,v_j(S)-1\). Its root \(r=1/(\rho_jv_j(S))\) is rational. We decide \(P_i(r)\) by an ordinary run: if it holds, then \(r\le T_i1\), let \(\gamma=\Phi^{1/(n+1)}\) as in \Cref{lem:cycle}, and for each agent \(i\) form the levels \[ \beta_{ia}=\rho_iT_i\gamma^a\qquad(a\in\mathbb Z,\ \lvert a\rvert\le2n(n+1)). \] Write \(\beta^-_i\) and \(\beta^+_i\) for the lowest and highest levels. Since \(\gamma^{2n(n+1)}=\Phi^{2n}\), \Cref{lem:sandwich} gives \(\beta^-_i\le w^*_i\le\beta^+_i\). The number of levels does not depend on \(\Phi\), and the powers \(\beta_{ia}^{n+1}=(\rho_iT_i)^{n+1}\Phi^a\) are rational. \begin{lemma}[Approximating the ceiling weights]\label{lem:grid} Let \(\widehat w\) be the greatest positive weights that satisfy the caps \(w_i\le\beta_i^+\) and pass, for every agent \(i\) and every level \(\beta_{ia}\), the strict test with level \(\beta_{ia}\) and threshold \(1/\beta_{ia}\). Then \(w^*\le\widehat w\le\gamma w^*\). The \((n+1)\)th powers of the coordinates of \(\widehat w\) can be computed with a number of arithmetic operations and comparisons polynomial in \(n\) and \(m\), on rationals of bit length polynomial in the encoding length of the instance. \end{lemma} \begin{proof} The ceiling weights satisfy the caps and pass every strict test with threshold equal to the reciprocal of its level, so \(w^*\le\widehat w\). For the other bound, let \(z=w^*\vee(\widehat w/\gamma)\) coordinatewise; we show that \(z\) is uncontested-feasible, which gives \(z\le w^*\) and hence \(\widehat w\le\gamma w^*\). If \(z_i=w^*_i\), the other weights are at least as high at \(z\) as at \(w^*\), so \(U_i(z)\subseteq U_i(w^*)\) and \(\p(U_i(z))\le\p(U_i(w^*))\le1\). Otherwise \(z_i=\widehat w_i/\gamma>w^*_i\). The other weights are at least \(\widehat w/\gamma\), so \(U_i(z)\subseteq U_i(\widehat w/\gamma)=U_i(\widehat w)\). Since \(\widehat w_i>\gamma w^*_i\ge\gamma\beta_i^-\), some level lies below \(\widehat w_i\); let \(\beta_{ia}\) be the largest one. The next level is at least \(\widehat w_i\), since \(\widehat w_i\le\beta_i^+\), so \(\widehat w_i\le\gamma\beta_{ia}\), and the test at level \(\beta_{ia}\) gives \(\beta_{ia}v_i(U_i(\widehat w))<1\). Hence \[ \p(U_i(z))=z_iv_i(U_i(z))\le\frac{\widehat w_i}{\gamma}\,v_i(U_i(\widehat w))\le\beta_{ia}v_i(U_i(\widehat w))<1. \] For the computation, apply \Cref{lem:tests} with \(K=n+1\). The caps, levels, and thresholds are \((n+1)\)th roots of the rationals \(\beta_{ia}^{\pm(n+1)}\), which have polynomial bit length, and there are \(n(4n(n+1)+1)\) tests. \end{proof} \subsection{The strongly polynomial algorithm}\label{sec:strongalg} \Cref{alg:strong} replaces Stages~1 and~2 of \Cref{alg:main}; Stages~0, 3, and~4 are unchanged. As before, the proofs hold for every way of resolving the choices that the algorithm leaves open, including the spanning trees and the entry deleted in each round of Stage~1, and for definiteness it resolves them by the input order of agents and goods. \begin{algorithm}[htbp] \caption{Stages~1 and~2 of a strongly polynomial algorithm}\label{alg:strong} \begin{algorithmic}[1] \Require the prepared instance of Stage~0 of \Cref{alg:main} \Ensure its ceiling weights \(w^*\) and the MBB forest at \(w^*\) \Statex \Statex \textbf{Stage 1: Delete pairs that miss the price} (\Cref{sec:delete,sec:locate,sec:grid}) \Loop \State Compute \(\rho\), \(\kappa\), and \(\Phi\) from spanning trees of the positive entries, and compute every \(T_i\) by \Cref{lem:param}. \If{\(\Phi=1\)} \State \textbf{break} \EndIf \State Compute \(\widehat w_i^{n+1}\) for every agent \(i\) by \Cref{lem:grid}. \State Set to zero an entry \(v_{ig}>0\) with \(\Phi\,\widehat w_i^{n+1}v_{ig}^{n+1}<\max_j\widehat w_j^{n+1}v_{jg}^{n+1}\). \EndLoop \Statex \Statex \textbf{Stage 2: Recover the ceiling weights exactly} (\Cref{lem:sandwich}) \State Set \(w^*_i=\rho_iT_i\) for each agent \(i\), and restore the deleted entries. \State Keep the pairs with \(w^*_iv_{ig}=\max_jw^*_jv_{jg}\); they form the MBB forest at \(w^*\). \end{algorithmic} \end{algorithm} \begin{proof}[Proof of \Cref{thm:main}] Run \Cref{alg:main} with Stages~1 and~2 replaced by \Cref{alg:strong}. Stage~0 runs in strongly polynomial time and produces a prepared instance by \Cref{lem:prep}; from now until Stage~4, we work with this instance, and \(w^*\) denotes its ceiling weights. In each round of Stage~1 with \(\Phi>1\), \Cref{lem:grid,lem:cycle} provide an entry that misses the price at \(w^*\), and by \Cref{lem:delete} setting it to zero yields a prepared instance with the same ceiling weights and the same prices at \(w^*\). A private good's entry attains its price, so only entries on original goods are deleted, and there are at most \(nm\) rounds. When \(\Phi=1\), \Cref{lem:sandwich} gives \(T_i\le\eta_i\le T_i\), so Stage~2 computes the ceiling weights exactly, and then the MBB forest at \(w^*\) with \(O(nm)\) arithmetic operations and comparisons. Each round finds spanning trees, \(\rho\), \(\kappa\), and \(\Phi\) with \(O(nm)\) arithmetic operations and comparisons, computes \(n\) endpoints by \Cref{lem:param}, and calls \Cref{lem:grid} at most once. The relative weights and prices are products of at most \(2n\) valuations and their reciprocals. Hence Stages~1 and~2 use a number of arithmetic operations and comparisons polynomial in \(n\) and \(m\), on rationals of bit length polynomial in the encoding length of the instance. Stage~3 constructs, by \Cref{thm:reduction}, an EF1 and fPO allocation of the prepared instance with \(O(nm)\) arithmetic operations and comparisons on rationals of polynomial bit length by \Cref{lem:height}. Stage~4 applies \Cref{lem:prep} and returns, in strongly polynomial time, an EF1 and fPO allocation of the original instance. \end{proof} \subsection{Solving finite spending tests}\label{sec:solver} It remains to prove \Cref{lem:tests}. Raising all weights, caps, and levels to the \(K\)th power, and replacing the valuations by their \(K\)th powers in all comparisons between weighted values, we may assume that \(K=1\), except that each comparison between a sum \(v_j(S)\) and a threshold is made between their \(K\)th powers. We write \(\tilde v_{ig}\) for the valuations used in comparisons, so that \(\tilde v=v\) when \(K=1\). Each test uses the input in two ways. Comparing weighted values determines which goods are uncontested, and summing their valuations determines whether the total is below the threshold. We represent the comparisons of weighted values and the bounds by integer offsets of short binary length and evaluate the sums using the original valuations. A contraction computes a solution for a candidate set of offsets. Checking that solution against the original comparisons either recovers the desired weights or identifies a comparison that guides the search for new offsets. Let \(\vartheta\) contain \(\log\tilde v_{ig}\) for every positive entry and \(\log a\) for every cap and level \(a\). Write \(d\) for the number of its entries. We use \(\vartheta\) only through signs of integer linear forms, which we obtain by comparing products of the given positive rationals. We seek a rational vector \(\vartheta'\) of short binary length that gives the same answers as \(\vartheta\) to the comparisons used to recover the weights. To test a candidate \(\vartheta'\), let \(Q\) be the product of the denominators of its entries and multiply its entries by \(Q\). Denote the resulting integer offsets by \(h_{ig}\) for the valuations and \(\tau\) for the caps and levels. For auxiliary log weights \(x\), agent \(j\)'s weighted value for \(g\) is at least agent \(i\)'s if \(x_i\le x_j+h_{jg}-h_{ig}\), and a bound \(w_i\le a\) becomes \(x_i\le\tau\). For each good \(g\) that \(i\) values positively, put \[ \ell_{ig}(x)=\max_{j\ne i:\,v_{jg}>0}\bigl(x_j+h_{jg}-h_{ig}\bigr), \] with \(\max\varnothing=-\infty\). Good \(g\) is uncontested for \(i\) when \(\ell_{ig}(x)c\). Let \(F_i(x)\) be the minimum of the cap offset of agent \(i\) and the terms \(\max\{\tau,q(x)\}\) over her tests. Auxiliary feasibility is precisely \(x\le F(x)\). \begin{lemma}[Exact recovery by contraction]\label{lem:auxsolve} Let \(B\ge1\) be the maximum of one and the absolute values of the offsets \(\tau\) and \(h_{jg}-h_{ig}\). One application of the algorithm of \Cref{prop:dyadic} and coordinatewise rounding recover the greatest point satisfying \(x\le F(x)\). The number of oracle evaluations and the required precision in bits are polynomial in \(n\) and \(\log(2B)\). \end{lemma} \begin{proof} Each response \(\max\{\tau,q(x)\}\) is bounded below by its level offset, and the cap offset bounds \(F_i(x)\) from above. Thus \(F\) maps \([-B,B]^n\) into itself. After simplifying infinite alternatives, each \(F_i\) is obtained by taking minima and maxima of integer constants and of expressions \(x_j+c\) with integral \(c\). Hence \(F\) is monotone and nonexpansive in the maximum norm. Iteration from \(B\mathbf1\) decreases through integer vectors in the box, so it reaches a fixed point \(\bar x\). Every feasible vector lies below \(B\mathbf1\) by the caps and below each iterate by monotonicity. Thus \(\bar x\) is the greatest feasible point, including among all real log weights. Set \(b=\lceil\log_2(32B(n+1))\rceil\), \(\eta=2^{-b}\), and \(G(x)=(1-\eta)F(x)+\eta B\mathbf1\). This map has contraction factor at most \(1-\eta\). Its fixed point \(z\) dominates \(\bar x\), since \(G(\bar x)\ge\bar x\) and iteration from \(\bar x\) converges to \(z\). Apply \Cref{prop:dyadic} to \(t\mapsto G(Bt)/B\) on \([-1,1]^n\), with contraction and accuracy parameters both equal to \(b\). To answer an oracle query, sort the offsets and compare the prefix sums of the original valuations with the thresholds. The selected offsets determine \(F\) exactly at the query point, after which \(G(Bt)/B\) can be rounded to the requested dyadic precision. Rescaling the answer gives \(y\in[-B,B]^n\) with \(\norm{y-z}\le\delta=B2^{-b}\). Since \(z-F(z)=\eta(B\mathbf1-F(z))\) and \(F\) is nonexpansive, \[ y\ge\bar x-\delta\mathbf1,\qquad y\le F(y)+\varepsilon\mathbf1,\qquad \varepsilon=2B\eta+2\delta\le\frac1{8(n+1)}. \] For \(0\le s<1\), write \(\mathcal R_s(x)=\lfloor x+s\rfloor\) coordinatewise. Integer translations, minima, and maxima commute with \(\mathcal R_s\), so \(\mathcal R_s(F(y))=F(\mathcal R_s(y))\). A row violates \(\mathcal R_s(y)\le F(\mathcal R_s(y))\) only if the interval \((F_i(y)+s,\,y_i+s]\) contains an integer, so its set of violating shifts has length at most \(\varepsilon\). The union over all rows has length at most \(n\varepsilon<1/2\), so some \(s\in[1/2,1)\) makes \(\mathcal R_s(y)\) feasible. Since \(\bar x\) is integral and \(\delta<1/2\), \[ \bar x\le\mathcal R_{1/2}(y)\le\mathcal R_s(y)\le\bar x . \] Thus nearest-integer rounding of \(y\) yields \(\bar x\). \end{proof} \begin{lemma}[Checking the original comparisons]\label{lem:check} Given \(\vartheta'\) and its greatest auxiliary point \(\bar x\), one can either recover the greatest positive weights satisfying the original caps and tests, or exhibit an integer vector \(\ell\) with \(\lVert\ell\rVert_1\le4n+2\) and \(\operatorname{sgn}(\ell\cdot\vartheta')\ne\operatorname{sgn}(\ell\cdot\vartheta)\). The recovery and the checks use a number of arithmetic operations and comparisons polynomial in \(n\), \(m\), and the number of tests. \end{lemma} \begin{proof} At \(\bar x\), retain all caps. For each test, retain its bound \(x_i\le\tau\) if it holds. Otherwise, for each good that \(i\) values positively and that is not uncontested for \(i\) at \(\bar x\), retain one comparison with an agent whose weighted value is at least \(i\)'s. In the latter case, the retained comparisons keep the set of uncontested goods inside its set at \(\bar x\), so the sum continues to satisfy the strict or weak inequality of the test. The resulting difference constraints hold at \(\bar x\), and every solution passes all the tests. Hence their greatest solution is \(\bar x\). Represent a constraint \(x_i\le x_j+c\) by an edge \(i\to j\) of length \(c\), and each retained bound by an edge to a reference vertex of coordinate zero. Every agent has a cap, and feasibility precludes negative cycles. The Bellman--Ford algorithm gives the greatest solution as the distances to the reference vertex. For each agent \(i\), choose a shortest simple path. It expresses \(\bar x_i\) as a sum of at most \(n\) offsets. Replacing each comparison offset by the ratio \(\tilde v_{jg}/\tilde v_{ig}\) and the final bound offset by its cap or level, and multiplying, yields a positive candidate weight \(w'_i\). Check the signs of all bound comparisons and all pairwise comparisons of weighted values at \(\bar x\) and at \(w'\), including ties. A disagreement gives the form \(\ell\) by expanding the two paths and the comparison itself. Each path uses at most \(n\) offsets, each involving at most two entries of \(\vartheta\), and the comparison contributes at most two further entries, so \(\lVert\ell\rVert_1\le4n+2\). The positive factor \(Q\) preserves the auxiliary sign, and the original sign is obtained by comparing products of at most \(4n+2\) given rationals. If all signs agree, the uncontested sets coincide, and the original sums and thresholds are the same in both systems, so \(w'\) satisfies every cap and passes every test. Every edge and the final bound on each chosen shortest path are tight at \(\bar x\). Since the sign check includes equality, the corresponding weighted values tie at \(w'\), and the last agent's weight equals her cap or level; this gives the path representation claimed in \Cref{lem:tests}. For any nonempty set \(T\) of agents, multiply their coordinates at \(w'\) by a common factor slightly above one, and add a small positive amount to their coordinates at \(\bar x\). All strict comparisons persist for sufficiently small increases. A tight bound fails exactly when its agent is raised, and a tied comparison changes according to which agents belong to \(T\). Thus the two systems still agree on every test, and the greatestness of \(\bar x\) precludes such an increase at \(w'\). The positive weights satisfying the original caps and tests are closed under coordinatewise maximum and under scaling down. At a maximum, inspect a row at the vector supplying its coordinate: the other weighted values can only rise, so the set of uncontested goods can only shrink. Scaling down preserves that set and relaxes all bounds. If some feasible \(z\) exceeded \(w'\) in any coordinate, take \(\lambda=\max_iz_i/w'_i>1\). For sufficiently small \(\xi>0\), the feasible weights \(w'\vee((1+\xi)z/\lambda)\) raise exactly the agents attaining \(\lambda\), a contradiction. Hence \(w'\) is the greatest feasible point. \end{proof} \begin{proof}[Proof of \Cref{lem:tests}] By \Cref{lem:check}, it suffices to find a rational vector that gives the correct sign for every comparison \(\ell\cdot\vartheta\) with \(\ell\in\mathbb Z^d\) and \(\lVert\ell\rVert_1\le4n+2\). To express these sign conditions as a rational polyhedron \(P\), write \(\sigma_\ell=\operatorname{sgn}(\ell\cdot\vartheta)\), and require \(\sigma_\ell\,\ell\cdot u\ge1\) if \(\sigma_\ell\ne0\) and \(\ell\cdot u=0\) if \(\sigma_\ell=0\). A sufficiently large positive multiple of \(\vartheta\) satisfies all these conditions, since there are finitely many, so \(P\) is nonempty. Each defining row has integer coefficients of magnitude at most \(4n+2\) and right-hand side zero or one, so its encoding length is \(O(d\log(n+1))\). The strong nonemptiness algorithm of \citet[Theorem~6.4.1]{GLS} finds a point in such a polyhedron given a strong separation oracle; the dimension and the bound on the encoding length of a row suffice even when \(P\) is unbounded or lies in a proper subspace. To answer a query at \(\vartheta'\), solve its auxiliary system by \Cref{lem:auxsolve} and check the comparisons by \Cref{lem:check}. If the check returns the greatest weights, the algorithm terminates. Otherwise it gives a form \(\ell\) whose sign at \(\vartheta'\) is wrong. For \(\sigma_\ell\ne0\), we have \(\sigma_\ell\,\ell\cdot\vartheta'\le0\), whereas every point of \(P\) satisfies \(\sigma_\ell\,\ell\cdot u\ge1\). For \(\sigma_\ell=0\), the query lies strictly on one side of the hyperplane \(\ell\cdot u=0\) containing \(P\). In either case, orienting the row toward the query gives a strong separating direction. If the algorithm returns a point of \(P\) before terminating, we check it once more; every comparison there has the correct sign, so the check returns the greatest weights. The number of queries and their encoding lengths are polynomial in \(d\) and \(\log(n+1)\). Consequently, the product \(Q\), the integer offsets, and the bound \(B\) of \Cref{lem:auxsolve} have binary length polynomial in \(n\), \(m\), and the number of tests. Each auxiliary solve therefore uses polynomially many operations at polynomial dyadic precision. Its prefix sums, and the products used to recover weights and check signs, have binary length polynomial in \(K\) and the encoding lengths of the instance and the given rationals. Every comparison involving a threshold is a comparison between the \(K\)th powers of a sum \(v_j(S)\) and of the threshold. This proves \Cref{lem:tests}. \end{proof} \section{A near-linear algorithm for a fixed number of agents}\label{sec:fixed} When the number \(n\) of agents is fixed, we compute the ceiling weights of the prepared instance using \(O(m\log^{n-1}(m+1))\) arithmetic operations, and \Cref{thm:reduction} then gives an EF1 and fPO allocation. The algorithm searches for the ratios between the ceiling weights of different agents. Fixing one such ratio lets us treat two agents as a single block and search recursively over the remaining scales. We therefore formulate the problem for a partition of the agents. \begin{definition}[Block scales]\label{def:blocks} Let \(\mathcal P\) be a partition of \(N\) into blocks, and let \(\mathcal B(i)\) denote the block containing agent \(i\). Fix positive rational coefficients \(a_i\) with \(\sum_{i\in B}a_i=1\) for each \(B\in\mathcal P\). A vector of nonnegative block scales \(s=(s_B)_{B\in\mathcal P}\) induces the weights \(w_i(s)=a_is_{\mathcal B(i)}\). It is \emph{uncontested-feasible} if \(w(s)\) is, and we write \[ W_{\mathcal P,a}=\bigl\{s\in\R^{\mathcal P}_{\ge0}:w(s)\in W\bigr\}. \] \end{definition} Prices, price-attaining agents, and uncontested goods at \(s\) are evaluated at the weights \(w(s)\). By \Cref{lem:existence} and positive scaling of the blocks, \(W_{\mathcal P,a}\) is compact, closed under coordinatewise maximum, and contains a positive point. It therefore has a greatest element \(q\). When every block is a singleton, \(a_i=1\) for every agent and \(q=w^*\). \begin{theorem}[Ceiling block scales]\label{thm:blocks} For a fixed number \(n\) of agents, the greatest element \(q\) of \(W_{\mathcal P,a}\) can be computed using \(O(m\log^{n-1}(m+1))\) arithmetic operations. \end{theorem} \paragraph{Overview.} For a block \(B\) and a good \(g\), write \(\bar v_B(g)=\max_{i\in B}a_iv_{ig}\) for the largest weighted value of a member of \(B\) at unit scale. For every pair \(A,B\) of blocks, the algorithm binary searches the location of the ratio \(q_A/q_B\) among the at most \(m\) thresholds \(\bar v_B(g)/\bar v_A(g)\) with \(\bar v_A(g),\bar v_B(g)>0\). If exactly one of the two values is zero, the comparison between the blocks on \(g\) is already determined because \(q_A,q_B>0\); if both are zero, the good imposes no constraint between them. These searches determine all comparisons between distinct blocks, and hence, together with the fixed coefficients, the set of agents attaining the price of every good. This determines the uncontested goods at \(w(q)\), and tight bounds on the uncontested spending of each block determine \(q\). For two singleton blocks, a candidate ratio \(\rho\) defines the ray \(w_1=\rho w_2\), and a one-block recursive call finds the farthest uncontested-feasible point \(h(\rho)\) on it. If agent~1's weight can be increased feasibly at \(h(\rho)\), then \(w^*_1/w^*_2>\rho\); if agent~2's can, then \(w^*_1/w^*_2<\rho\); and if neither can, then \(h(\rho)=w^*\). For example, take six goods and the valuations \(v_1=(1,1,1,1,1,0)\) and \(v_2=(0,2,3,4,5,6)\), where \(g_1\) and \(g_6\) are the private goods; the thresholds are \(2,3,4,5\). The queries \(3\), \(5\), and \(4\) give \[ h(3)=\Bigl(\frac15,\frac1{15}\Bigr),\qquad h(5)=\Bigl(\frac14,\frac1{20}\Bigr),\qquad h(4)=w^*=\Bigl(\frac13,\frac1{12}\Bigr). \] At \(h(3)\), agent~1 can increase her weight, so the search keeps ratios above \(3\). At \(h(5)\), agent~2 can increase hers, so the search keeps ratios below \(5\). At \(h(4)\), increasing either weight makes \(g_4\) uncontested for that agent and violates her spending bound, so the algorithm terminates at \(w^*\). See Figure~\ref{fig:two-agent-search} for an illustration of this search. \begin{figure}[H] \centering \resizebox{0.99\linewidth}{!}{% \begin{tikzpicture}[ font=\small, query/.style={circle,inner sep=0pt,minimum size=4.9mm, text=white,font=\scriptsize\bfseries,draw=white,line width=0.7pt}, guide/.style={densely dashed,line width=0.8pt}, move/.style={-{Stealth[length=2mm,width=1.35mm]},line width=1.05pt}, tick/.style={font=\scriptsize,text=black!65} ] % (a) Exact feasible region in the unnormalized weight plane. \begin{scope}[x=18cm,y=56cm] \node[font=\small\bfseries] at (0.185,0.115) {(a) Unnormalized weights}; \foreach \xx in {0.1,0.2,0.3} \draw[twoagentgrid,line width=0.35pt] (\xx,0)--(\xx,0.105); \foreach \yy in {0.025,0.05,0.075,0.1} \draw[twoagentgrid,line width=0.35pt] (0,\yy)--(0.37,\yy); \path[fill=twoagentfill,draw=twoagentedge,line width=0.8pt] (0,0)--({1/5},0)--({1/5},{1/25}) --({1/4},{1/20})--({1/4},{1/16}) --({4/15},{1/15})--({1/5},{1/15}) --({1/6},{1/18})--({1/9},{1/18}) --({1/10},{1/20})--(0,{1/20})--cycle; \draw[guide,twoagentblue!65] (0,0)--(0.315,0.105); \draw[guide,twoagentorange!75] (0,0)--(0.37,0.074); \draw[guide,twoagentpurple!65] (0,0)--(0.37,0.0925); % This additional part of W is one-dimensional: do not shade a wedge. \draw[twoagentpurple,line width=1.6pt,line cap=round] ({4/15},{1/15})--({1/3},{1/12}); \draw[black!55,line width=0.6pt,-{Stealth[length=1.7mm]}] (0,0)--(0.378,0); \draw[black!55,line width=0.6pt,-{Stealth[length=1.7mm]}] (0,0)--(0,0.108); \foreach \xx/\lab in {0/0,0.1/0.1,0.2/0.2,0.3/0.3}{ \draw[black!55,line width=0.5pt] (\xx,0)--(\xx,-0.0013); \node[tick,anchor=north] at (\xx,-0.002) {$\lab$}; } \foreach \yy/\lab in {0.025/0.025,0.05/0.05,0.075/0.075,0.1/0.1}{ \draw[black!55,line width=0.5pt] (0,\yy)--(-0.004,\yy); \node[tick,anchor=east] at (-0.006,\yy) {$\lab$}; } \node at (0.185,-0.012) {$w_1$}; \node at (-0.050,0.054) {$w_2$}; \node[text=twoagentedge!50!black,font=\large] at (0.068,0.030) {$W$}; \node[text=twoagentedge!40!black,font=\scriptsize, fill=twoagentfill,inner sep=1pt] at (0.098,0.020) {$\p(U_i(w))\le1\;(i=1,2)$}; \node[font=\scriptsize,text=twoagentblue,anchor=west] at (0.313,0.103) {$\rho=3$}; \node[font=\scriptsize,text=twoagentpurple,anchor=west] at (0.363,0.094) {$\rho=4$}; \node[font=\scriptsize,text=twoagentorange,anchor=west] at (0.363,0.074) {$\rho=5$}; \draw[move,twoagentblue] (0.205,{1/15})--(0.238,{1/15}); \node[text=twoagentblue,font=\scriptsize,anchor=north] at (0.219,0.0645) {raise $w_1$}; \draw[move,twoagentorange] ({1/4},0.053)--({1/4},0.061); \node[text=twoagentorange,font=\scriptsize,anchor=west] at (0.255,0.0587) {raise $w_2$}; \node[query,fill=twoagentblue] at ({1/5},{1/15}) {1}; \node[query,fill=twoagentorange] at ({1/4},{1/20}) {2}; \node[query,fill=twoagentpurple] at ({1/3},{1/12}) {3}; \node[font=\scriptsize,anchor=south east] at (0.194,0.070) {$h(3)$}; \node[font=\scriptsize,anchor=north west] at (0.256,0.047) {$h(5)$}; \node[text=twoagentpurple,font=\scriptsize,anchor=south east] at (0.330,0.088) {$w^*=h(4)$}; \end{scope} % (b) Directions only: coordinates below are translated by (0.72,0.12). \begin{scope}[xshift=8.4cm,x=35cm,y=35cm] \node[font=\small\bfseries] at (0.080,0.184) {(b) Normalized ray directions}; \foreach \xx in {0,0.04,0.08,0.12,0.16} \draw[twoagentgrid,line width=0.35pt] (\xx,0)--(\xx,0.16); \foreach \yy in {0,0.04,0.08,0.12,0.16} \draw[twoagentgrid,line width=0.35pt] (0,\yy)--(0.16,\yy); \draw[black!45,line width=0.8pt] (0,0.16)--(0.16,0); \draw[black!20,line width=3.4pt,line cap=round] (0.03,0.13)--({5/6-0.72},{1/6-0.12}); \draw[black!55,line width=0.6pt] (0,0.16)--(0,0)--(0.16,0); \foreach \xx/\lab in {0/0.72,0.04/0.76,0.08/0.80,0.12/0.84,0.16/0.88}{ \draw[black!55,line width=0.5pt] (\xx,0)--(\xx,-0.0021); \node[tick,anchor=north] at (\xx,-0.0035) {$\lab$}; } \foreach \yy/\lab in {0/0.12,0.04/0.16,0.08/0.20,0.12/0.24,0.16/0.28}{ \draw[black!55,line width=0.5pt] (0,\yy)--(-0.0021,\yy); \node[tick,anchor=east] at (-0.0035,\yy) {$\lab$}; } \node at (0.080,-0.0192) {$\widetilde w_1$}; \node at (-0.036,0.080) {$\widetilde w_2$}; \draw[move,twoagentblue] (0.036,0.132)--(0.065,0.103); \draw[move,twoagentorange] (0.108,0.044)--(0.091,0.061); \node[query,fill=twoagentblue] at (0.03,0.13) {1}; \node[query,fill=twoagentorange] at ({5/6-0.72},{1/6-0.12}) {2}; \node[query,fill=twoagentpurple] at (0.08,0.08) {3}; \node[font=\scriptsize,anchor=south west] at (0.031,0.142) {$(3/4,1/4)$}; \node[font=\scriptsize,anchor=north] at (0.116,0.031) {$(5/6,1/6)$}; \draw[twoagentpurple,line width=0.55pt] (0.084,0.085)--(0.094,0.102); \node[text=twoagentpurple,font=\scriptsize,anchor=south west] at (0.094,0.102) {$\widetilde w^*=(4/5,1/5)$}; \node[text=black!65,font=\scriptsize] at (0.060,0.054) {$30\) \While{the binary search is unfinished} \State \(\rho\gets\) the current midpoint threshold \State \(h\gets\) the greatest block scales with \(s_A=\rho s_B\), by a recursive call with \(A\) and \(B\) merged \State \(\mathcal T\gets\textup{\textsc{Rise}}(h,\mathcal P)\) \If{\(\mathcal T=\varnothing\)} \State \Return \(h\) \EndIf \If{\(A\in\mathcal T\)} \State continue the binary search above \(\rho\) \Else \State continue the binary search below \(\rho\) \EndIf \EndWhile \EndFor \State Determine the uncontested goods from the completed comparisons \State \Return the block scales given by \Cref{eq:scales} \EndFunction \end{algorithmic} \end{algorithm} In a recursive call, we merge \(A\) and \(B\) into \(C=A\cup B\) and call \textup{\textsc{Solve}}\((\mathcal P',a')\) with \[ \mathcal P'=(\mathcal P\setminus\{A,B\})\cup\{C\},\qquad a'_i=\begin{cases}\rho a_i/(1+\rho),&i\in A,\\ a_i/(1+\rho),&i\in B,\\ a_i,&i\notin A\cup B.\end{cases} \] The coefficients remain normalized, since \(\sum_{i\in C}a'_i=1\), and the merged scale represents \(s_A+s_B\). If \(\tilde h\) is the recursive output, we expand it to \(\mathcal P\) by \(h_A=\rho\tilde h_C/(1+\rho)\), \(h_B=\tilde h_C/(1+\rho)\), and \(h_D=\tilde h_D\) for \(D\in\mathcal P\setminus\{A,B\}\). These formulas preserve the induced weights and enforce \(h_A=\rho h_B\). \paragraph{An exact side test.} To compare \(q_A/q_B\) with \(\rho>0\), we compute the greatest point \(h>0\) of \(W_{\mathcal P,a}\) subject to \(s_A=\rho s_B\) by the recursive call, and then test, using the original partition \(\mathcal P\), which collections of blocks can be increased together. For \(\mathcal T\subseteq\mathcal P\), let \(h^\varepsilon\) be obtained from \(h\) by multiplying \(h_B\) by \(1+\varepsilon\) for every \(B\in\mathcal T\). We call \(\mathcal T\) \emph{raisable} at \(h\) if \(h^\varepsilon\in W_{\mathcal P,a}\) for all sufficiently small \(\varepsilon>0\). Write \(N(\mathcal T)=\bigcup_{B\in\mathcal T}B\), and recall from \Cref{eq:b} that \(b_i(N(\mathcal T);w(h))\) is the total price of the goods whose only price-attaining agent in \(N(\mathcal T)\) is \(i\). \begin{lemma}[Raisable collections]\label{lem:raise} A collection \(\mathcal T\subseteq\mathcal P\) is raisable at \(h\) if and only if \(b_i(N(\mathcal T);w(h))<1\) for every \(i\in N(\mathcal T)\). \end{lemma} \begin{proof} For all sufficiently small \(\varepsilon>0\), strict comparisons between weighted values at \(w(h)\) persist, while ties between \(N(\mathcal T)\) and its complement are broken in favor of \(N(\mathcal T)\). Hence each \(i\in N(\mathcal T)\) has uncontested spending \((1+\varepsilon)b_i(N(\mathcal T);w(h))\) at \(w(h^\varepsilon)\). An agent outside \(N(\mathcal T)\) can only lose uncontested goods, and the prices of those she keeps do not change, so her uncontested spending remains at most one. Thus a small common increase is feasible exactly when \(b_i(N(\mathcal T);w(h))<1\) for every \(i\in N(\mathcal T)\). \end{proof} \begin{algorithm}[htbp] \caption{The procedure \textup{\textsc{Rise}}}\label{alg:rise} \begin{algorithmic}[1] \Function{Rise}{$h,\mathcal P$} \State \(\mathcal T\gets\mathcal P\) \While{some \(i\in N(\mathcal T)\) satisfies \(b_i(N(\mathcal T);w(h))\ge1\)} \State \(\mathcal T\gets\mathcal T\setminus\{\mathcal B(i)\}\) \EndWhile \State \Return \(\mathcal T\) \EndFunction \end{algorithmic} \end{algorithm} Every raisable collection \(\mathcal S\) survives the deletions in \textup{\textsc{Rise}}: if \(\mathcal S\subseteq\mathcal T\) contained a block \(\mathcal B(i)\) being removed, then \(b_i(N(\mathcal S);w(h))\ge b_i(N(\mathcal T);w(h))\ge1\), contradicting \Cref{lem:raise}. At termination, \(\mathcal T\) itself is raisable by the same lemma. Thus \textup{\textsc{Rise}} returns the largest raisable collection, using \(O(m)\) operations for fixed \(n\). \begin{lemma}[Exact side test]\label{lem:side} Let \(A,B\in\mathcal P\) be distinct, let \(\rho>0\), and let \(h\) be the greatest point of \(W_{\mathcal P,a}\) satisfying \(h_A=\rho h_B\). For \(\mathcal T=\textup{\textsc{Rise}}(h,\mathcal P)\), \[ \mathcal T=\varnothing\iff h=q\iff q_A/q_B=\rho,\qquad A\in\mathcal T\iff q_A/q_B>\rho,\qquad B\in\mathcal T\iff q_A/q_B<\rho. \] In particular, every nonempty output contains exactly one of \(A\) and \(B\). \end{lemma} \begin{proof} Every nonempty raisable collection contains exactly one of \(A\) and \(B\): otherwise raising its blocks preserves \(s_A=\rho s_B\), contradicting the greatestness of \(h\) under this constraint. If \(h=q\), no nonempty collection is raisable. If \(q\ne h\), use \(q\ge h>0\) to define \[ \delta=\max_{C\in\mathcal P}\frac{q_C}{h_C}>1,\qquad \mathcal T^*=\Bigl\{C\in\mathcal P:\frac{q_C}{h_C}=\delta\Bigr\}. \] For sufficiently small \(\varepsilon>0\), scaling down and maximum closure give \(h\vee\frac{1+\varepsilon}{\delta}q\in W_{\mathcal P,a}\). This vector raises precisely the blocks in \(\mathcal T^*\) by the factor \(1+\varepsilon\), so \(\mathcal T^*\) is raisable, and \(\varnothing\ne\mathcal T^*\subseteq\mathcal T\) because \textup{\textsc{Rise}} returns the largest raisable collection. Both collections contain exactly one of \(A\) and \(B\), necessarily the same one. If \(A\in\mathcal T\), then \(q_A/h_A=\delta>q_B/h_B\), giving \(q_A/q_B>\rho\); the case \(B\in\mathcal T\) is symmetric. Finally, \(q_A/q_B=\rho\) makes \(q\) feasible for the constrained problem, so \(h=q\). This proves all three equivalences. \end{proof} \begin{lemma}[Recovering the block scales]\label{lem:scales} If all pairwise searches in \Cref{alg:solve} finish without an early return, their comparisons determine the sets \(U_i=U_i(w(q))\), and each block scale is \begin{equation}\label{eq:scales} q_B=\frac1{\max_{i\in B}a_iv_i(U_i)}\qquad(B\in\mathcal P). \end{equation} \end{lemma} \begin{proof} By \Cref{lem:side}, the completed searches determine the strict comparison between \(q_A\bar v_A(g)\) and \(q_B\bar v_B(g)\) whenever both block values are positive; an equality would instead have returned \(q\). A block with value zero cannot attain the price, so every good has a known unique block attaining its price, and the price-attaining agents within that block depend only on the fixed values \(a_iv_{ig}\). Thus the uncontested sets are known, and they remain unchanged for all positive \(s\) sufficiently close to \(q\). With \(c_i=a_iv_i(U_i)\), the uncontested spending at such scales is \(c_is_{\mathcal B(i)}\). Private goods give \(c_i\ge a_iv_{ih_i}>0\). Feasibility implies \(q_B\max_{i\in B}c_i\le1\) for every block \(B\). If this inequality were strict for some \(B\), increasing only \(q_B\) slightly would preserve the uncontested sets and all spending bounds, contradicting the greatestness of \(q\). Hence every bound is tight, which proves \Cref{eq:scales}. \end{proof} \begin{proof}[Proof of \Cref{thm:blocks}] We induct on \(k=\lvert\mathcal P\rvert\). For \(k=1\), the uncontested sets do not change under scaling, so \(q_N=1/\max_i\p_a(U_i(a))\); this takes \(O(m)\) operations. For \(k>1\), a query \(s_A=\rho s_B\) merges \(A\) and \(B\) with the coefficients above, which preserves the induced weights and the coordinatewise order. Hence the induction hypothesis computes the constrained greatest point \(h\). \Cref{lem:side} makes every search step and early return correct, and if there is no early return, \Cref{lem:scales} recovers \(q\). For fixed \(n\), let \(F_k(m)\) be the worst-case number of arithmetic operations of a call with \(k\) blocks, and put \(\Lambda=\log_2(m+1)\). Sorting at most \(m\) thresholds for each of the \(O(1)\) pairs of blocks costs \(O(m\Lambda)\) operations. There are \(O(\Lambda)\) queries, each using one call with \(k-1\) blocks and \(O(m)\) further operations, including \textup{\textsc{Rise}}. The final reconstruction takes \(O(m)\) operations. Thus \(F_1(m)=O(m)\) and \(F_k(m)=O(\Lambda(F_{k-1}(m)+m))\) for \(k\ge2\). Induction gives \(F_k(m)=O(m\Lambda^{k-1})\), which is \(O(m\log^{n-1}(m+1))\) since \(k\le n\). \end{proof} \begin{proof}[Proof of \Cref{thm:fixed}] Prepare the instance by \Cref{lem:prep}, using \(O(n(m+n))=O(m)\) operations for fixed \(n\); the prepared instance has at most \(m+n\) goods. Compute its ceiling weights by \Cref{thm:blocks} with singleton blocks, and construct an EF1 and fPO allocation by \Cref{thm:reduction} with \(O(nm)\) further operations. \Cref{lem:prep} transfers both properties to the original instance. \end{proof} \section{Concluding remarks}\label{sec:conclusion} We have shown that an EF1 and fPO allocation of indivisible goods can be computed in strongly polynomial time for any number of agents with nonnegative rational additive valuations, and with a near-linear number of arithmetic operations in the number of goods when the number of agents is fixed. The key structural property is that the uncontested-feasible weights admit a unique greatest point. Together with monotonicity, this distinguished solution is the target of the upward bias in \Cref{sec:computation}, it survives the deletions in \Cref{sec:strong}, and it supplies the consistent comparisons used by the recursive search in \Cref{sec:fixed}. The role of uniqueness also appears in the literature on fixed-point computation; see, for example, the study of unique-solution problems by \citet{FGMS20}. It remains open whether an EF1 and PO allocation of chores can be computed in polynomial time for an arbitrary number of agents~\citep{MaharaChores}. We expect this problem to be more challenging than its counterpart for goods. \Cref{app:chores} exhibits two distinct KKM points for the least-spender sets of \citet{MaharaChores}, even though every MBB graph is a forest and each point supports a unique allocation, and this multiplicity persists under small perturbations. Thus acyclicity alone does not provide an analogous unique target for chores, and extending our algorithms calls for additional structure or a different selection principle. \FloatBarrier \begingroup \small\sloppy \bibliography{ef1-fpo-poly} \endgroup \clearpage \section*{\centering Appendix} \appendix \section{Preparing the instance}\label{app:prep} \begin{proof}[Proof of \Cref{lem:prep}] We first add private goods to obtain an integer table \(\tilde v\). We then perturb \(\tilde v\) to obtain a prepared table \(v'\). We show that an EF1 and fPO allocation for \(v'\) has both properties for \(\tilde v\), and that deleting the added private goods then gives the desired allocation of the original goods. \paragraph{Adding private goods.} Set aside the goods that every agent values at zero, and let \(M_0\) be the remaining original goods. For each agent \(i\), let \(Q_i\) be the product of the denominators of her values on \(M_0\), taking the empty product to be one. Multiply her row by \(2Q_i\), so that every original bundle has an even integer value to \(i\); this positive scaling preserves EF1 and fPO. Add a private good \(h_i\) for each agent \(i\), worth one to \(i\) and zero to all other agents. Write \(\tilde v\) for this integer table and \(m'=\lvert M_0\rvert+n\) for its number of goods. Suppose that \(\hat A\) is EF1 and fPO for \(\tilde v\), and put \(A_i=\hat A_i\cap M_0\). For \(i,j\) with \(A_j\ne\varnothing\), let \(g\in\hat A_j\) witness EF1. Since \(i\) values all added private goods together at one, \[ \tilde v_i(A_j\setminus\{g\})\le\tilde v_i(\hat A_j\setminus\{g\})\le\tilde v_i(\hat A_i)\le\tilde v_i(A_i)+1 . \] Both original bundle values are even integers, so the left-hand side is at most \(\tilde v_i(A_i)\). If \(g\) is an original good, it still witnesses EF1. If \(g\) is an added private good, then \(\tilde v_i(A_j)\le\tilde v_i(A_i)\) even before removing a good, so any good of \(A_j\) works. For fPO, a fractional Pareto improvement on \(M_0\) would also improve \(\hat A\) if every added private good stayed with its owner. \paragraph{Obtaining a forest.} Keep the zero entries and the values of the added private goods fixed. Index the remaining positive entries \(e=(i,g)\) by distinct integers \(j_e\in\{1,\ldots,nm'\}\). With \(V=\max_{i,g}\tilde v_{ig}\ge1\), set \[ t=\frac1{4(m'+1)(2V)^n},\qquad v'_{ig}=\tilde v_{ig}\bigl(1+t^{j_e}\bigr)\quad\text{for each indexed entry }e=(i,g). \] In a comparison between two bundles, common goods cancel, and the difference in value changes by at most \(m'Vt<1\). Thus every strict comparison between bundles under the integer values \(\tilde v\) remains strict under \(v'\). If an EF1 witness for \(v'\) failed for \(\tilde v\), the resulting strict envy under \(\tilde v\) would persist under \(v'\), so the same witness works for \(\tilde v\). For a simple cycle \(C=(i_1,g_1,\ldots,i_k,g_k,i_1)\) of positive entries, put \(i_{k+1}=i_1\), and for a table \(z\) write \[ \Delta_C(z)=\prod_{\ell=1}^kz_{i_\ell g_\ell}-\prod_{\ell=1}^kz_{i_{\ell+1}g_\ell}. \] We show that \(\Delta_C(v')\ne0\), and that it has the sign of \(\Delta_C(\tilde v)\) whenever \(\Delta_C(\tilde v)\ne0\). The first property shows that no cycle of positive entries of \(v'\) is balanced. The second preserves the strict comparisons needed to transfer fPO. Each good on \(C\) has two neighbors on the cycle, so it is not a private good, and every entry of the cycle was indexed. As a polynomial in \(t\), \(\Delta_C(v')\) has constant term \(\Delta_C(\tilde v)\). If the two products are unequal at \(\tilde v\), this term already has the desired sign. If they are equal, let \(j\) be the smallest index on \(C\). Only one product contributes a term of degree \(j\), and its coefficient in the difference is the common product up to sign. This is the first nonzero term. In both cases, the first nonzero coefficient is an integer of magnitude at least one. Each product has nonnegative coefficients summing to at most \((2V)^k\), as seen by evaluating it at \(t=1\). After factoring out the lowest power present in the difference, the higher terms therefore have total magnitude at most \(2(2V)^kt<1\). Thus \(\Delta_C(v')\) is nonzero, and it has the sign of \(\Delta_C(\tilde v)\) whenever \(\Delta_C(\tilde v)\ne0\). Hence \(v'\) is prepared. \paragraph{Transferring fPO.} Let \(\alpha(g)\) be the owner of \(g\) in an fPO allocation for \(v'\). By \Cref{prop:fpo}, there are positive weights at which the owner of every good attains its price. In particular \(v'_{\alpha(g)g}>0\) for every good, so \(\tilde v_{\alpha(g)g}>0\) as well. Positive weights supporting the same allocation for \(\tilde v\) exist if their logarithms \(x_i\) can satisfy \[ x_i-x_{\alpha(g)}\le\log\frac{\tilde v_{\alpha(g)g}}{\tilde v_{ig}}\qquad(i\ne\alpha(g),\ \tilde v_{ig}>0). \] Represent each constraint by an edge \(\alpha(g)\to i\) whose length is the right-hand side. The constraints are feasible if this graph has no negative cycle. Suppose it has a negative simple cycle, with edge \(i_\ell\to i_{\ell+1}\) labeled by the good \(g_\ell\). The owners \(i_\ell\) are distinct, so the goods \(g_\ell\) are distinct as well. The sum of the edge lengths is negative exactly when \(\prod_\ell\tilde v_{i_\ell g_\ell}<\prod_\ell\tilde v_{i_{\ell+1}g_\ell}\), that is, when \(\Delta_C(\tilde v)<0\) for the corresponding cycle \(C\) of positive entries. Then \(\Delta_C(v')<0\) as well. But the positive weights supporting the allocation for \(v'\) solve the corresponding constraints in logarithms, so their graph has no negative cycle, a contradiction. The constraints for \(\tilde v\) are therefore feasible, and exponentiating a solution gives positive supporting weights for \(\tilde v\), proving fPO by \Cref{prop:fpo}. An EF1 and fPO allocation for \(v'\) therefore has both properties for \(\tilde v\). By the first step, we can delete the added private goods and undo the row scalings. Giving the set-aside goods to arbitrary agents preserves both properties, because they contribute zero to every agent's utility. \paragraph{Running time.} The perturbation assigns an exponent to each indexed entry in a single scan of the table. Forming the integer table and all powers up to \(t^{nm'}\) takes \(O(nm+nm'+n)=O(n(m+n))\) arithmetic operations. Each \(Q_i\) has binary length bounded by the encoding length of its row, so \(\log(2V)\) is polynomial in the input length. The denominator of \(t^j\) has \(O(j(\log(m'+1)+n\log(2V)))\) bits for \(j\le nm'\), so all intermediate rationals have polynomial binary length. \end{proof} \section{Evaluating logarithms}\label{app:log} To evaluate \(\log x\) for a positive rational \(x\) within \(2^{-t}\), write \(x=2^da\) with \(1\le a<2\) and an integer \(d\), and let \(c=\lceil\log_2(\lvert d\rvert+1)\rceil\). For \(1\le a\le2\), the number \(u=(a-1)/(a+1)\) lies in \([0,1/3]\), and \[ \log a=2\sum_{\ell\ge0}\frac{u^{2\ell+1}}{2\ell+1}. \] The terms with \(\ell\ge T\) sum to at most \(2u^{2T+1}/(1-u^2)\le\frac34\cdot9^{-T}<2^{-3T}\). Summing the first \(t+2\) terms therefore gives a rational within \(2^{-t-2}\) of \(\log a\), and summing the first \(t+c+2\) terms at \(a=2\) gives a rational \(\Lambda\) within \(2^{-t-c-2}\) of \(\log2\). Since \(\lvert d\rvert<2^c\), the product \(d\Lambda\) is within \(2^{-t-2}\) of \(d\log2\). Rounding the sum of the two approximations to the nearest point of \(2^{-t-1}\mathbb Z\) adds at most \(2^{-t-2}\), so the result is within \(3\cdot2^{-t-2}<2^{-t}\) of \(\log x\). The number of terms, their bit lengths, and the bit lengths of the partial sums are polynomial in \(t\) and the encoding length of \(x\). Taking \(x=4\) gives \(\log4\). \section{Non-uniqueness of KKM points for chores}\label{app:chores} We use the least-spender condition of \citet[Lemma~3.4]{MaharaChores}, expressed in terms of weights. For positive additive costs \(c_i\) and \(w\in\Delta:=\{w\in\R^n_{>0}:\sum_iw_i=1\}\), let \(\mathcal A_c(w)\) be the set of allocations minimizing \(\sum_iw_ic_i(A_i)\). In this appendix, the price of a chore is \(p_g(w)=\min_iw_ic_{ig}\), and \(\p(S)=\sum_{g\in S}p_g(w)\). An allocation belongs to \(\mathcal A_c(w)\) exactly when it assigns every chore to an agent attaining its price. Define \[ C_i=\bigl\{w\in\Delta:\ \text{some }A\in\mathcal A_c(w)\text{ has }\p(A_i)\le\p(A_j)\text{ for all }j\bigr\}. \] We call \(w\in\bigcap_iC_i\) a \emph{KKM point}; the witnessing allocation may depend on \(i\). The MBB graph at \(w\) has an edge \((i,g)\) exactly when \(w_ic_{ig}=p_g(w)\). \begin{lemma}[Two KKM points]\label{lem:chores} There is a positive-cost instance with two agents and three chores that has two distinct KKM points, each supporting a unique allocation, although the MBB graph is a forest at every positive weight vector. These properties persist under sufficiently small perturbations of the costs. \end{lemma} \begin{proof} Consider the costs \(c_1=(10,1,1)\) and \(c_2=(1,1,10)\) for the chores \(a,b,c\). To make both agents least spenders in the same supported allocation, we seek equal bundle prices. For the allocation \((\{b,c\},\{a\})\) this requires \(2w_1=w_2\), and for \((\{c\},\{a,b\})\) it requires \(w_1=2w_2\). Normalizing gives \(w^-=(1/3,2/3)\) and \(w^+=(2/3,1/3)\), respectively. At these weights, the price vectors \((p_a,p_b,p_c)\) are \((2/3,1/3,1/3)\) and \((1/3,1/3,2/3)\), and both bundles cost \(2/3\). Every assigned agent is the unique agent attaining the price of her chore, so each displayed allocation is uniquely supported. Equal bundle prices make both agents least spenders in the same allocation. Hence \(w^-,w^+\in C_1\cap C_2\). A chore \(g\) is tied exactly when \(w_1/w_2=c_{2g}/c_{1g}\). The three tie thresholds are \(1/10\), \(1\), and \(10\), so at most one chore is tied at any positive weight vector. A cycle with only two agent vertices would require two tied chores, so every MBB graph is a forest. For nearby positive costs \(d\), retain either displayed allocation \(A\) and adjust its weights to \(w(A;d)=(d_2(A_2),d_1(A_1))/(d_1(A_1)+d_2(A_2))\). This makes \(w_1(A;d)\,d_1(A_1)=w_2(A;d)\,d_2(A_2)\). At the original costs, all support inequalities are strict, and the two weight vectors and three tie thresholds are distinct. By continuity, these properties persist under sufficiently small perturbations. Each adjusted weight vector therefore remains a KKM point, and every MBB graph remains a forest. The example also applies to the shrunken-simplex convention of \citet{MaharaChores}. Here \(c_{\min}/(2nc_{\max})=1/40\), so fix any \(0<\tau<1/40\) and write the weights as \(w_i=\tau+(1-2\tau)y_i\). The two weight vectors above correspond to the distinct interior simplex points \(y^\pm=(w^\pm-\tau\mathbf1)/(1-2\tau)\). For fixed \(\tau\), these conclusions persist under sufficiently small perturbations. \end{proof} \end{document}