# Combinatorial Bernoulli Factories: Matchings, Flows and Other Polytopes

A Bernoulli factory is an algorithmic procedure for exact sampling of certain random variables having only Bernoulli access to their parameters. Bernoulli access to a parameter p ∈ [0,1] means the algorithm does not know p, but has sample access to independent draws of a Bernoulli random variable with mean equal to p. In this paper, we study the problem of Bernoulli factories for polytopes: given Bernoulli access to a vector x∈𝒫 for a given polytope 𝒫⊂ [0,1]^n, output a randomized vertex such that the expected value of the i-th coordinate is exactly equal to x_i. For example, for the special case of the perfect matching polytope, one is given Bernoulli access to the entries of a doubly stochastic matrix [x_ij] and asked to sample a matching such that the probability of each edge (i,j) be present in the matching is exactly equal to x_ij. We show that a polytope 𝒫 admits a Bernoulli factory if and and only if 𝒫 is the intersection of [0,1]^n with an affine subspace. Our construction is based on an algebraic formulation of the problem, involving identifying a family of Bernstein polynomials (one per vertex) that satisfy a certain algebraic identity on 𝒫. The main technical tool behind our construction is a connection between these polynomials and the geometry of zonotope tilings. We apply these results to construct an explicit factory for the perfect matching polytope. The resulting factory is deeply connected to the combinatorial enumeration of arborescences and may be of independent interest. For the k-uniform matroid polytope, we recover a sampling procedure known in statistics as Sampford sampling.

## Authors

• 13 publications
• 18 publications
• 15 publications
• ### The Combinatorial Santa Claus Problem or: How to Find Good Matchings in Non-Uniform Hypergraphs

We consider hypergraphs on vertices P∪ R where each hyperedge contains e...
07/17/2020 ∙ by Étienne Bamas, et al. ∙ 0

• ### Sampling and Counting Edges via Vertex Accesses

We consider the problems of sampling and counting edges from a graph on ...
07/08/2021 ∙ by Jakub Tětek, et al. ∙ 0

• ### Prophet Inequalities for Matching with a Single Sample

We consider the prophet inequality problem for (not necessarily bipartit...
04/05/2021 ∙ by Paul Dütting, et al. ∙ 0

• ### An Improved Exact Sampling Algorithm for the Standard Normal Distribution

In 2016, Karney proposed an exact sampling algorithm for the standard no...
08/10/2020 ∙ by Yusong Du, et al. ∙ 0

• ### On Explicit Branching Programs for the Rectangular Determinant and Permanent Polynomials

We study the arithmetic circuit complexity of some well-known family of ...
08/22/2019 ∙ by V. Arvind, et al. ∙ 0

• ### From the Bernoulli Factory to a Dice Enterprise via Perfect Sampling of Markov Chains

Given a p-coin that lands heads with unknown probability p, we wish to p...
12/19/2019 ∙ by Giulio Morina, et al. ∙ 0