cs.DSNov 12, 2026

Combinatorial Bernoulli Factories with Polynomially Many Coins

Authors: Renato Paes Leme, Rad Niazadeh

Organizations: Google Research · Chicago Booth

Abstract

We provide an efficient implementation of combinatorial Bernoulli factories. Such a factory turns coins of unknown biases xx into a random vertex of a polytope PP whose mean is exactly xx. For every affine slice of the cube (the class of polytopes that admit a factory), we give a single algorithm whose expected number of coin flips and running time at every interior xx are polynomial in the dimension and in 1/δ∗1/{δ_*}, where δ∗=min⁡i{xi,1−xi}{δ_*}=\min_i\{x_i,1-x_i\} is never supplied to the algorithm. For perfect matchings this gives O(n8δ∗−2log⁡(n/δ∗))O(n^{8}{δ_*}^{-2}\log(n/{δ_*})) flips, while the factory of Niazadeh, Paes Leme, and Schneider [STOC 2021] spends at least n2n−1n^{2n-1} flips in expectation at the uniform doubly stochastic matrix. For other polytopes, our method rounds exactly given a point deep inside PP and the promise that xx is far from the boundary of PP.

Figures & tables

Explore similar work

Sep 29, 2020

Random Polytope Descriptors

We introduce a class of random polytopes which simultaneously generalizes several known constructions. While being fairly general, these polytopes are also computationally exceptionally benign. We indicate how these properties can be exploited for classification and clustering tasks in data analysis. Crucially, our construction lets users smoothly trade off between a tighter description of the data and faster computation.
May 28, 2026

TriSearch: Learning to Optimize Triangulations via Bistellar Flips

We introduce TriSearch, a reinforcement learning framework for optimizing objectives over triangulations of a polytope via bistellar flips. The key idea is a circuit-supported subtriangulation action representation: feasible flips are encoded by their supporting circuit and realized local subtriangulation, enabling a learned policy to rank them using local geometric and combinatorial features. This yields a dimension-agnostic interface and enables efficient traversal of the flip graph without explicit enumeration of the full triangulation space. Instantiated in 3D and 4D, TriSearch generalizes zero-shot from small training instances to larger polytopes with exponentially larger search spaces. It achieves top performance on metric objectives in 3D and, in 4D, discovers more distinct Fine, Regular, Star triangulations of reflexive polytopes, corresponding to Calabi-Yau threefolds, than existing samplers under a fixed budget.
Jun 24, 2026

FactorLibrary: From Polynomials to Circuits via Recursive Subgoals

Finding minimal arithmetic circuits for polynomials over finite fields is a combinatorially hard problem central to algebraic complexity theory. We formulate it as a reinforcement learning problem in two directions, bottom-up and top-down. To address the challenge of a fast-growing combinatorial search space, we introduce FactorLibrary, which stores factorizable subexpressions that serve as reusable subgoals across training episodes. We trained a bottom-up agent with Gumbel-PPO-MCTS and two top-down agents with PPO+MCTS and SAC. The PPO+MCTS top-down agent exhibited the most stable performance, finding certified optimal circuits up to complexity 88 with a success rate of 91.8%91.8\%.