Create and explore imaginative 3D worlds with our new product Dreamfield (opens in a new tab)
Papers
Topics
Authors
Recent
Search
2000 character limit reached

Best-of-Both-Worlds Algorithm

Updated 15 July 2026
  • BOBW algorithms are a class of mechanisms that achieve simultaneous ex-ante fairness and ex-post performance guarantees in settings like fair division and online learning.
  • They utilize combinatorial methods such as LP rounding, maximum-weight matching, and support reduction to ensure proportional share, half-TPS, and Prop1 fairness.
  • Extensions of BOBW include unequal entitlements and sequential decision-making problems, prompting both practical implementations and critical analysis of variance-based approaches.

Searching arXiv for the primary and related Best-of-Both-Worlds papers. Best-of-Both-Worlds (BoBW) algorithms are procedures designed to secure two guarantees simultaneously that are usually in tension. In fair division, the aim is to obtain a randomized allocation that is ex-ante fair while every realized allocation is also ex-post fair; in online learning and bandits, the aim is to achieve near-optimal performance in both stochastic and adversarial environments without prior knowledge of the regime. The term is therefore a cross-domain methodological label rather than a single universal procedure. One prominent instantiation is the fair-share allocation algorithm for indivisible goods with additive valuations, which computes in deterministic polynomial time a distribution over at most nn allocations that is ex-ante proportional and ex-post gives every agent at least half of her truncated proportional share (TPS), hence at least half of her maximin share (MMS), while also satisfying proportionality up to one item (Prop1) (Babaioff et al., 2021). Subsequent work has both extended and critiqued the BoBW paradigm in neighboring fair-division models and in sequential decision-making problems such as delayed bandits, heavy-tailed bandits, contextual bandits, and multi-dueling bandits (Hoefer et al., 2022, Babaioff et al., 23 Jan 2026, Schlisselberg et al., 30 May 2025, Chen et al., 2024, Akash et al., 19 Mar 2026).

1. Conceptual scope of the BoBW paradigm

In fair allocation of indivisible goods, BoBW refers to a distribution over deterministic allocations that is ex-ante fair and is supported only on allocations that satisfy an ex-post fairness relaxation or approximation. In the equal-entitlement additive setting, the basic ex-ante benchmark is proportional share,

PSi=vi(M)/n,PS_i = v_i(M)/n,

while ex-post benchmarks include envy-based relaxations such as EF1 or value-based guarantees such as a constant fraction of MMS (Babaioff et al., 2021). The motivation is explicit: ex-ante proportionality can be achieved trivially by randomization, but such a distribution may be very unfair ex-post; BoBW mechanisms seek both guarantees at once (Babaioff et al., 23 Jan 2026).

The fair-share formulation of BoBW in (Babaioff et al., 2021) is built around four share notions. For agent ii with additive valuation viv_i, the proportional share is PSi=vi(M)/nPS_i=v_i(M)/n, the maximin share is

MMSi=max⁡partitions M=P1∪⋯∪Pnmin⁡kvi(Pk),MMS_i = \max_{partitions\ M=P_1\cup\cdots\cup P_n}\min_k v_i(P_k),

and the truncated proportional share TPSiTPS_i is the unique t≥0t\ge 0 solving

(1/n)⋅∑j∈Mmin⁡{vi(j),t}=t.(1/n)\cdot\sum_{j\in M}\min\{v_i(j),t\}=t.

The paper states that MMSi≤TPSi≤PSiMMS_i \le TPS_i \le PS_i (Babaioff et al., 2021).

Across online learning, the same label denotes algorithms that are simultaneously strong in stochastic and adversarial regimes. Examples include delayed bandits with regret O~(KT+D)\widetilde O(\sqrt{KT}+\sqrt D) adversarially and instance-dependent stochastic regret matching known lower bounds up to logarithmic factors (Schlisselberg et al., 30 May 2025), parameter-free heavy-tailed multi-armed bandits (Chen et al., 2024), linear contextual bandits with O(log⁡T)O(\log T) stochastic and O(T)O(\sqrt T) adversarial guarantees (Kato et al., 2024), and multi-dueling bandits under Condorcet and Borda objectives (Akash et al., 19 Mar 2026). This suggests that “BoBW algorithm” denotes a structural objective—simultaneous adaptation to two fairness or difficulty regimes—rather than a single canonical algorithm.

2. The fair-share BoBW algorithm for indivisible goods

The central fair-division result considers nn agents with equal entitlements, additive valuations, and no transfers. The main theorem states that there exists a randomized allocation, that is, a distribution DD over integral allocations, such that: for every agent ii, EA∼D[vi(Ai)]≥PSi\mathbb E_{A\sim D}[v_i(A_i)] \ge PS_i; for every realization AA in the support and every ii, vi(Ai)≥12⋅MMSiv_i(A_i)\ge \tfrac12\cdot MMS_i and vi(Ai)≥12⋅TPSiv_i(A_i)\ge \tfrac12\cdot TPS_i; and every AA in the support also satisfies Prop1 (Babaioff et al., 2021). The same paper emphasizes that prior BoBW mechanisms based on the “up to one item” paradigm may give agents only a 1n\frac1n fraction of their MMS, and that the present algorithm is intended to guarantee a high ex-post value rather than merely an envy-based relaxation (Babaioff et al., 2021).

The theorem is constructive. It can be achieved in deterministic polynomial time by a distribution over at most nn allocations X=(X1,…,Xn)X=(X^1,\dots,X^n) (Babaioff et al., 2021). The distribution is computed via a polynomial-time procedure over fractional allocations, faithful rounding, and support reduction.

The guarantees are nearly best possible in two senses stated explicitly in the paper. First, one cannot guarantee agents more than their proportional share ex-ante. Second, one cannot guarantee agents more than a n2n−1\frac{n}{2n-1} fraction of their TPS ex-post, so the 12\tfrac12 constant is asymptotically tight (Babaioff et al., 2021).

3. Structure of the algorithm

The algorithm operates in four phases on a fractional allocation matrix X∈[0,1]n×mX\in[0,1]^{n\times m} with row-sums ≤1\le 1 and column-sums ≤1\le 1, extending each viv_i linearly (Babaioff et al., 2021).

Phase Main operation Stated role
1 LP1_1 + faithful rounding Handle “over-proportional” items
2 Maximum-weight perfect matching Complete a matching for G2G_2 on remaining real items
3 LP3_3 + faithful rounding Allocate leftover items fractionally
4 LP4_4 Support reduction to at most nn allocations

In Phase 1, the algorithm computes each agent’s TPSiTPS_i in poly-time by sorting vi(j)v_i(j) and solving a one-variable equation. It then constructs an extended market M′=M∪{auxi}iM' = M \cup \{aux_i\}_i with unit-demand utilities

ui(j)=vi(j) if vi(j)≥TPSi, else 0;ui(auxi)=TPSi,u_i(j)=v_i(j)\ \text{if}\ v_i(j)\ge TPS_i,\ \text{else}\ 0;\qquad u_i(aux_i)=TPS_i,

and ui(auxk≠i)=0u_i(aux_k\ne i)=0. It solves LP1_1 to find a fractional perfect matching of these “demand clones,” maximizing ∑iui⋅Xi∗\sum_i u_i\cdot X_i^* subject to ui⋅Xi∗≥PSiu_i\cdot X_i^*\ge PS_i, then faithfully implements X∗X^* by decomposing into O(n)O(n) perfect matchings. Each agent either gets one “truly over-proportional” item jj with ui(j)≥TPSiu_i(j)\ge TPS_i or the fictitious item auxiaux_i. Agents who receive a real item form group G1G_1; the others form G2G_2 and temporarily hold nothing (Babaioff et al., 2021).

In Phase 2, with M2=M∖{items assigned to G1}M_2=M\setminus\{\text{items assigned to }G_1\}, the algorithm computes a maximum-weight perfect matching B∗B^* in the bipartite graph G2×M2G_2\times M_2 with edge-weights

wi(j)=vi(j)/(vi(M2)−∑top ∣G2∣vi),w_i(j)=v_i(j)/(v_i(M_2)-\sum_{top\ |G_2|}v_i),

so that every i∈G2i\in G_2 is matched to some jj with vi(j)<TPSiv_i(j)<TPS_i but “as fair as possible.” After this step, each i∈G2i\in G_2 holds one item eie_i (Babaioff et al., 2021). The accompanying proposition states that in every partial allocation so far, each G1G_1-agent holds some jj with vi(j)≥TPSiv_i(j)\ge TPS_i, and each G2G_2-agent holds eie_i with vi(ei)≥max⁡k∈M∖G1vi(k)v_i(e_i)\ge \max_{k\in M\setminus G_1} v_i(k) (Babaioff et al., 2021).

In Phase 3, the leftover items M3=M∖{all currently held items}M_3=M\setminus\{\text{all currently held items}\} are allocated fractionally via LP3_3 so that every i∈G2i\in G_2 gets at least

fi⋅vi(M3),fi=vi(M2)/∣G2∣−vi(ei)vi(M2)−sum of top-∣G2∣ values.f_i\cdot v_i(M_3),\qquad f_i = \frac{v_i(M_2)/|G_2| - v_i(e_i)}{v_i(M_2) - \text{sum of top-}|G_2|\text{ values}}.

This fractional solution is then faithfully rounded in O(m)O(m) allocations. By design, each G2G_2-agent’s total ex-ante value from eie_i plus the fractional share is at least TPSiTPS_i, and ex-post she loses at most the value of one item, so either vi≥TPSi−max⁡jvi(j)≥TPSi/2v_i \ge TPS_i-\max_j v_i(j)\ge TPS_i/2 or she already has ei≥TPSi/2e_i\ge TPS_i/2 (Babaioff et al., 2021).

In Phase 4, the resulting distribution of size ≤4n⋅(m+1)\le 4n\cdot(m+1) is reweighted by solving LP4_4, preserving each agent’s ex-ante proportional value while using only nn allocations in the support (Babaioff et al., 2021).

4. Guarantees, proof sketch, and tightness

The proof sketch in (Babaioff et al., 2021) isolates three guarantees. Ex-ante proportionality follows because LP1_1 ensures every agent’s uiu_i-value is at least PSiPS_i, and any agent sent to G2G_2 is brought by Phases 2 and 3 up to at least TPSi≥PSiTPS_i\ge PS_i. Ex-post 12⋅TPS\tfrac12\cdot TPS holds because a G1G_1-agent receives jj with vi(j)≥TPSiv_i(j)\ge TPS_i, whereas a G2G_2-agent either loses at most TPSi/2TPS_i/2 in the rounding of LP3_3 or already has ei≥TPSi/2e_i\ge TPS_i/2. Ex-post Prop1 follows because every realized allocation is a faithful implementation of a fractional LP solution that was PS-respecting, so up to one item each agent’s value is at least PSi−max⁡jvi(j)PS_i-\max_j v_i(j) (Babaioff et al., 2021).

The complexity statement is explicit. Each phase uses only polynomial-time subroutines: computing TPSiTPS_i by sorting and one-variable root-finding; solving LP1_1 and LP3_3 via any poly-time LP solver; maximum-weight bipartite matching in Phase 2; faithful implementation via Birkhoff–von Neumann decompositions in O(n+m)O(n+m) matches; and a small LP4_4 of size O(n)O(n). Overall running time is polynomial in n,mn,m (Babaioff et al., 2021).

The impossibility statements are part of the characterization of the algorithm. If all valuations coincide, proportional share is best possible ex-ante, so no randomized mechanism can guarantee strictly more than PSiPS_i ex-ante. Ex-post, one cannot do better than n2n−1⋅TPSi\frac{n}{2n-1}\cdot TPS_i even ignoring ex-ante proportionality, by considering $2n-1$ identical goods. The paper also states an efficiency clash: no mechanism that is ex-ante fractionally Pareto-optimal can give each agent a constant fraction of MMS ex-post, so the result cannot be strengthened to require ex-ante fPO as well (Babaioff et al., 2021).

A later result for three additive agents pushes the ex-post fairness frontier much further in the few-agent case: there exists an ex-ante proportional distribution whose every allocation is Epistemic EFX (EEFX) and guarantees each agent at least 910\tfrac{9}{10} of her MMS, with support size at most six (Babaioff et al., 16 Feb 2026). This does not supersede (Babaioff et al., 2021) in general nn, but it shows that much stronger BoBW fairness is possible for small numbers of agents.

5. Variants with entitlements and few-agent refinements

The equal-entitlement assumption in (Babaioff et al., 2021) is relaxed in “Best of Both Worlds: Agents with Entitlements” (Hoefer et al., 2022). There, each agent ii has a weight wi>0w_i>0, normalized so ∑iwi=1\sum_i w_i=1. The main theorem states that for additive valuations one can compute in strongly-polynomial time a lottery L=∑h=1kλh⋅YhL=\sum_{h=1}^k \lambda_h\cdot Y^h over k=poly(n,m)k=\mathrm{poly}(n,m) integral allocations such that the induced fractional allocation is ex-ante weighted stochastic-dominance envy-free (hence ex-ante weighted envy-free), and every support allocation satisfies weighted proportionality up to one good (WPROP1) and weighted transfer envy-free up to one good, denoted WEF(1,1) (Hoefer et al., 2022). The construction uses Different-Speeds Eating (DSE) followed by the bihierarchy decomposition of Budish–Che–Kojima–Milgrom (Hoefer et al., 2022).

The same paper proves a tightness statement: no stronger ex-post WEF(x,y)(x,y)-guarantee with x+y<2x+y<2 is compatible with any ex-ante WEF lottery (Hoefer et al., 2022). This is the weighted analogue of the impossibility phenomena seen in the equal-entitlement setting.

For two and three agents, (Babaioff et al., 16 Feb 2026) gives approximation schemes with stronger envy-based guarantees. For two agents and any ε>0\varepsilon>0, there is an FPTAS that outputs a distribution which is ex-ante envy-free and ex-post EFX, while guaranteeing each agent at least a (1−ε)(1-\varepsilon)-fraction of her MMS. For three agents, the paper presents an FPTAS preserving exact ex-ante proportionality when EEFX is dropped, and a separate FPTAS preserving EEFX while losing at most ε\varepsilon in the value-based guarantees (Babaioff et al., 16 Feb 2026). A plausible implication is that the coarse 12\tfrac12-TPS barrier of the general construction is driven partly by the all-nn setting rather than by a universal obstruction.

6. Critiques, alternative objectives, and the broader BoBW literature

A notable criticism of one natural BoBW heuristic appears in “On Best-of-Both-Worlds Fairness via Sum-of-Variances Minimization” (Babaioff et al., 23 Jan 2026). That paper studies the optimization problem of minimizing ∑iVari(D)\sum_i Var_i(D) subject to ex-ante proportionality. When valuations are identical, every SoV-minimizer is supported only on allocations whose value vector attains the minimum Euclidean distance to (PS,…,PS)(PS,\dots,PS), and all allocations in the support are EFX; consequently they guarantee $2/3$-MMS when n=3n=3 and $4/7$-MMS for n≥4n\ge 4 (Babaioff et al., 23 Jan 2026). However, when valuations are not identical, even with two agents and two goods, SoV-minimization can put positive mass on giving both goods to one agent, so the support allocation might not even be EF1 and might not give an agent any constant fraction of her MMS (Babaioff et al., 23 Jan 2026). The same pathology extends to minimizing the maximum variance, the variance of (Var1,…,Varn)(Var_1,\dots,Var_n), the standard-deviation of (σ1,…,σn)(\sigma_1,\dots,\sigma_n), and the sum of standard deviations (Babaioff et al., 23 Jan 2026).

Outside fair division, the BoBW label has become standard in online learning. In delayed bandits, Delayed-SAPO combines Basic Stochastic Checks, a successive-elimination style active set, and an Eliminated-Arms Processing subroutine to obtain adversarial regret O~(KT+D)\widetilde O(\sqrt{KT}+\sqrt D) and stochastic regret

O ⁣(∑i:Δi>0ln⁡TΔi+1K∑i=1KΔi σmax⁡),O\!\left(\sum_{i:\Delta_i>0}\frac{\ln T}{\Delta_i}+\frac1K\sum_{i=1}^K \Delta_i\,\sigma_{\max}\right),

matching known lower bounds up to logarithmic factors (Schlisselberg et al., 30 May 2025). In heavy-tailed multi-armed bandits, uniINF is described as the first parameter-free algorithm to achieve the BoBW property for the heavy-tailed MAB problem, with adversarial regret O(σ⋅K1−1/α⋅T1/α)O(\sigma\cdot K^{1-1/\alpha}\cdot T^{1/\alpha}) and stochastic guarantees that match lower bounds up to logarithmic factors (Chen et al., 2024). In multi-dueling bandits, MetaDueling converts multi-way winner feedback into an unbiased pairwise signal, and when instantiated with Versatile-DB it achieves O(KT)O(\sqrt{KT}) pseudo-regret against adversarial preferences and O(∑i≠a⋆log⁡T/Δi)O(\sum_{i\ne a^\star}\log T/\Delta_i) under stochastic preferences in the Condorcet setting (Akash et al., 19 Mar 2026).

These results do not define a single common algorithm. Rather, they instantiate a common design pattern: explicit mechanism design or online-learning structure is required to secure two guarantees at once. The negative results on variance minimization in fair division (Babaioff et al., 23 Jan 2026) and the positive constructive results in allocation (Babaioff et al., 2021), entitlements (Hoefer et al., 2022), delayed feedback (Schlisselberg et al., 30 May 2025), and heavy-tailed settings (Chen et al., 2024) jointly indicate that BoBW performance is typically not obtained by a black-box scalar objective; it is achieved by problem-specific combinatorial or FTRL-style constructions.

7. Significance and open directions

The fair-share BoBW algorithm of (Babaioff et al., 2021) established that ex-ante proportionality can be combined, in deterministic polynomial time, with ex-post Prop1 and a value guarantee of at least half of TPS and MMS. Within fair division, that result shifted BoBW analysis away from purely envy-based “up to one item” guarantees toward share-based ex-post guarantees. The introduction of TPS was especially consequential because the algorithm’s strongest ex-post guarantee is phrased with respect to TPS rather than merely MMS, and the paper states that MMSi≤TPSi≤PSiMMS_i\le TPS_i\le PS_i (Babaioff et al., 2021).

Subsequent work shows two divergent directions. One direction strengthens the fairness side under more structured conditions: weighted entitlements via DSE and bihierarchy decomposition (Hoefer et al., 2022), and near-optimal guarantees for few agents using EEFX and FPTAS constructions (Babaioff et al., 16 Feb 2026). The other direction identifies hard limits for simplistic formulations, as in the failure of sum-of-variances minimization under heterogeneous valuations (Babaioff et al., 23 Jan 2026). This suggests that the enduring content of the BoBW idea is not a particular primitive but a program of simultaneous guarantees under incompatible desiderata.

A plausible implication is that future BoBW work in fair division will continue to separate by structural regime: equal versus unequal entitlements, few versus many agents, and envy-based versus share-based ex-post notions. The current literature already records impossibility frontiers—such as the n2n−1⋅TPSi\frac{n}{2n-1}\cdot TPS_i barrier ex-post in the equal-entitlement additive model (Babaioff et al., 2021) and the incompatibility between ex-ante WEF and stronger ex-post weighted envy relaxations when x+y<2x+y<2 (Hoefer et al., 2022)—alongside constructive frontiers such as 910\tfrac{9}{10}-MMS and EEFX for three agents (Babaioff et al., 16 Feb 2026). Together, these results define the Best-of-Both-Worlds algorithm not as a monolithic object, but as a family of rigorously designed mechanisms whose common purpose is to reconcile ex-ante and ex-post guarantees, or stochastic and adversarial performance, within a single formally analyzable procedure.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Best-of-Both-Worlds (BOBW) Algorithm.