Best-of-Both-Worlds Algorithm
- 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 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,
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 with additive valuation , the proportional share is , the maximin share is
and the truncated proportional share is the unique solving
The paper states that (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 0 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 1 stochastic and 2 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 3 agents with equal entitlements, additive valuations, and no transfers. The main theorem states that there exists a randomized allocation, that is, a distribution 4 over integral allocations, such that: for every agent 5, 6; for every realization 7 in the support and every 8, 9 and 0; and every 1 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 2 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 3 allocations 4 (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 5 fraction of their TPS ex-post, so the 6 constant is asymptotically tight (Babaioff et al., 2021).
3. Structure of the algorithm
The algorithm operates in four phases on a fractional allocation matrix 7 with row-sums 8 and column-sums 9, extending each 0 linearly (Babaioff et al., 2021).
| Phase | Main operation | Stated role |
|---|---|---|
| 1 | LP1 + faithful rounding | Handle “over-proportional” items |
| 2 | Maximum-weight perfect matching | Complete a matching for 2 on remaining real items |
| 3 | LP3 + faithful rounding | Allocate leftover items fractionally |
| 4 | LP4 | Support reduction to at most 5 allocations |
In Phase 1, the algorithm computes each agent’s 6 in poly-time by sorting 7 and solving a one-variable equation. It then constructs an extended market 8 with unit-demand utilities
9
and 0. It solves LP1 to find a fractional perfect matching of these “demand clones,” maximizing 2 subject to 3, then faithfully implements 4 by decomposing into 5 perfect matchings. Each agent either gets one “truly over-proportional” item 6 with 7 or the fictitious item 8. Agents who receive a real item form group 9; the others form 0 and temporarily hold nothing (Babaioff et al., 2021).
In Phase 2, with 1, the algorithm computes a maximum-weight perfect matching 2 in the bipartite graph 3 with edge-weights
4
so that every 5 is matched to some 6 with 7 but “as fair as possible.” After this step, each 8 holds one item 9 (Babaioff et al., 2021). The accompanying proposition states that in every partial allocation so far, each 0-agent holds some 1 with 2, and each 3-agent holds 4 with 5 (Babaioff et al., 2021).
In Phase 3, the leftover items 6 are allocated fractionally via LP7 so that every 8 gets at least
9
This fractional solution is then faithfully rounded in 0 allocations. By design, each 1-agent’s total ex-ante value from 2 plus the fractional share is at least 3, and ex-post she loses at most the value of one item, so either 4 or she already has 5 (Babaioff et al., 2021).
In Phase 4, the resulting distribution of size 6 is reweighted by solving LP7, preserving each agent’s ex-ante proportional value while using only 8 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 LP9 ensures every agent’s 0-value is at least 1, and any agent sent to 2 is brought by Phases 2 and 3 up to at least 3. Ex-post 4 holds because a 5-agent receives 6 with 7, whereas a 8-agent either loses at most 9 in the rounding of LP0 or already has 1. 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 2 (Babaioff et al., 2021).
The complexity statement is explicit. Each phase uses only polynomial-time subroutines: computing 3 by sorting and one-variable root-finding; solving LP4 and LP5 via any poly-time LP solver; maximum-weight bipartite matching in Phase 2; faithful implementation via Birkhoff–von Neumann decompositions in 6 matches; and a small LP7 of size 8. Overall running time is polynomial in 9 (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 00 ex-ante. Ex-post, one cannot do better than 01 even ignoring ex-ante proportionality, by considering 02 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 03 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 04, 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 05 has a weight 06, normalized so 07. The main theorem states that for additive valuations one can compute in strongly-polynomial time a lottery 08 over 09 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 WEF10-guarantee with 11 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 12, 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 13-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 14 in the value-based guarantees (Babaioff et al., 16 Feb 2026). A plausible implication is that the coarse 15-TPS barrier of the general construction is driven partly by the all-16 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 17 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 18, and all allocations in the support are EFX; consequently they guarantee 19-MMS when 20 and 21-MMS for 22 (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 23, the standard-deviation of 24, 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 25 and stochastic regret
26
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 27 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 28 pseudo-regret against adversarial preferences and 29 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 30 (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 31 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 32 (Hoefer et al., 2022)—alongside constructive frontiers such as 33-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.