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 \in [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\in P$ for a given polytope $P\subset [0,1]^n$, output a randomized vertex such that the expected value of the $i$-th coordinate is \emph{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 $P$ admits a Bernoulli factory if and and only if $P$ 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 $P$. 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.
翻译:伯努利工厂是一种仅通过参数的伯努利访问权就能精确采样特定随机变量的算法过程。参数 $p \in [0,1]$ 的伯努利访问权意味着算法虽然不知道 $p$ 的具体值,但可以独立抽取均值为 $p$ 的伯努利随机变量样本。本文研究多面体的伯努利工厂问题:给定向量 $x\in P$ 的伯努利访问权(其中 $P\subset [0,1]^n$ 为给定多面体),要求输出一个随机顶点,使得其第 $i$ 个坐标的期望值严格等于 $x_i$。例如,在完美匹配多面体的特例中,给定双随机矩阵 $[x_{ij}]$ 元素的伯努利访问权,需要采样一个匹配,使得每条边 $(i,j)$ 出现在匹配中的概率恰好等于 $x_{ij}$。我们证明:多面体 $P$ 存在伯努利工厂当且仅当 $P$ 是 $[0,1]^n$ 与某个仿射子空间的交集。本构造基于该问题的代数表述,涉及寻找一组伯恩斯坦多项式(每个顶点对应一个)使其在 $P$ 上满足特定代数恒等式。构造背后的关键技术工具是揭示这些多项式与带状多面体剖分几何之间的联系。我们将这些结果应用于完美匹配多面体的显式工厂构造,该工厂与有向树(arborescences)的组合枚举密切相关,可能具有独立研究价值。对于 $k$-一致拟阵多面体,我们恢复了统计学中称为森福德采样(Sampford sampling)的抽样过程。