Papers
Topics
Authors
Recent
Search
2000 character limit reached

Note on Finite-Automata Bernoulli Factories for Rational Functions

Published 28 Jun 2026 in math.PR, cs.DM, and cs.FL | (2606.29595v1)

Abstract: Mossel and Peres (2005) established a comprehensive framework for designing Bernoulli factories. Notably, they demonstrated that a single-variable function admits a finite-automata Bernoulli factory if and only if it is a rational function. Their Theorem 2.9 claims an extension of this result to multivariable functions, but it contains a subtle technical oversight in the application of Pólya's Theorem. We provide a direct counterexample: a rational function in three variables that admits a general Bernoulli factory but cannot be implemented by a finite-automata Bernoulli factory.

Summary

  • The paper presents an explicit rational function on the 2-simplex that satisfies general Bernoulli-factory conditions but cannot be implemented by any finite-state block simulator.
  • It identifies the flaw in Mossel and Peres’s multivariable theorem: Pólya’s theorem requires denominator positivity on the closed simplex, while open-simplex boundedness allows nonremovable boundary zeros.
  • The result confirms that the original characterization remains valid for one parameter but leaves finite-automata simulability in several variables as an open classification problem.

Overview

This note by Paes Leme and Schneider (Google Research) identifies and corrects a technical error in the multivariable extension of the finite-automata Bernoulli factory characterization due to Mossel and Peres. The paper's central contribution is an explicit counterexample: a rational function on the 2-simplex Δ2\Delta_2 that satisfies the necessary and sufficient conditions for a general Bernoulli factory, yet provably admits no implementation via a finite-automata factory. This directly refutes Theorem 2.9 of Mossel and Peres, which claimed that every rational function f:Δs(0,1)f: \Delta_s \to (0,1) can be simulated via blocks.

Background: Bernoulli factories and finite automata

The Bernoulli factory problem, originating with Keane and O'Brien [keane1994], asks when a function ff of unknown Bernoulli parameters can be simulated from i.i.d. samples of those parameters. Mossel and Peres [mossel2005] developed the framework over the open simplex Δs={(p1,,ps+1)(0,1)s+1:ipi=1}\Delta_s = \{(p_1,\dots,p_{s+1}) \in (0,1)^{s+1} : \sum_i p_i = 1\}, distinguishing between general Bernoulli factories and finite-automata factories (simulation via blocks), where the simulator is a finite-state machine consuming input bits in blocks. Their key structural result is that a function admits a finite-automata factory if and only if it equals a ratio of Bernstein polynomials—homogeneous polynomials with non-negative coefficients.

For implementability by a general factory, the paper invokes the multivariate characterization of Morina morina2021: f:Δs(0,1)f: \Delta_s \to (0,1) admits a Bernoulli factory if and only if it is continuous and there exist constants c>0c > 0, k1k \ge 1 with

min(f(p),1f(p))ci=1s+1pik\min(f(\mathbf{p}), 1 - f(\mathbf{p})) \ge c \prod_{i=1}^{s+1} p_i^k

for all pΔs\mathbf{p} \in \Delta_s. This polynomial lower bound near the boundary of the simplex is the condition the counterexample must satisfy.

The flaw in Theorem 2.9

The proof strategy of Mossel and Peres for Theorem 2.9 proceeds as follows: given a rational function f=A/Bf = A/B mapping f:Δs(0,1)f: \Delta_s \to (0,1)0 to f:Δs(0,1)f: \Delta_s \to (0,1)1, apply Pólya's theorem [polya1928] to multiply numerator and denominator by f:Δs(0,1)f: \Delta_s \to (0,1)2 for large enough f:Δs(0,1)f: \Delta_s \to (0,1)3, clearing negative coefficients in the denominator and thereby producing a Bernstein representation.

The authors pinpoint where this argument breaks down in higher dimensions. Pólya's theorem requires strict positivity of the homogeneous denominator on the closed simplex f:Δs(0,1)f: \Delta_s \to (0,1)4. Boundedness of f:Δs(0,1)f: \Delta_s \to (0,1)5 away from f:Δs(0,1)f: \Delta_s \to (0,1)6 and f:Δs(0,1)f: \Delta_s \to (0,1)7 on the open simplex does not preclude the coprime denominator from vanishing at boundary points f:Δs(0,1)f: \Delta_s \to (0,1)8. In the single-variable case (f:Δs(0,1)f: \Delta_s \to (0,1)9) this is harmless: any boundary zero of ff0 at ff1 or ff2 corresponds to a linear factor ff3 or ff4, which—since ff5 is bounded away from ff6 and ff7—must also divide the numerator and can be canceled. In multivariate rings (ff8), however, coprime polynomials can vanish simultaneously on the boundary without sharing a common factor, so the obstruction cannot be factored away. The authors state that the single-variable case (ff9) remains correct; only the unproven extension to Δs={(p1,,ps+1)(0,1)s+1:ipi=1}\Delta_s = \{(p_1,\dots,p_{s+1}) \in (0,1)^{s+1} : \sum_i p_i = 1\}0 fails.

The counterexample

The main result is the following explicit construction on Δs={(p1,,ps+1)(0,1)s+1:ipi=1}\Delta_s = \{(p_1,\dots,p_{s+1}) \in (0,1)^{s+1} : \sum_i p_i = 1\}1:

Δs={(p1,,ps+1)(0,1)s+1:ipi=1}\Delta_s = \{(p_1,\dots,p_{s+1}) \in (0,1)^{s+1} : \sum_i p_i = 1\}2

with numerator Δs={(p1,,ps+1)(0,1)s+1:ipi=1}\Delta_s = \{(p_1,\dots,p_{s+1}) \in (0,1)^{s+1} : \sum_i p_i = 1\}3 and denominator Δs={(p1,,ps+1)(0,1)s+1:ipi=1}\Delta_s = \{(p_1,\dots,p_{s+1}) \in (0,1)^{s+1} : \sum_i p_i = 1\}4, which on the simplex reduces to Δs={(p1,,ps+1)(0,1)s+1:ipi=1}\Delta_s = \{(p_1,\dots,p_{s+1}) \in (0,1)^{s+1} : \sum_i p_i = 1\}5.

Admissibility of a general factory. On Δs={(p1,,ps+1)(0,1)s+1:ipi=1}\Delta_s = \{(p_1,\dots,p_{s+1}) \in (0,1)^{s+1} : \sum_i p_i = 1\}6 all coordinates are positive, so Δs={(p1,,ps+1)(0,1)s+1:ipi=1}\Delta_s = \{(p_1,\dots,p_{s+1}) \in (0,1)^{s+1} : \sum_i p_i = 1\}7 and Δs={(p1,,ps+1)(0,1)s+1:ipi=1}\Delta_s = \{(p_1,\dots,p_{s+1}) \in (0,1)^{s+1} : \sum_i p_i = 1\}8. Moreover,

Δs={(p1,,ps+1)(0,1)s+1:ipi=1}\Delta_s = \{(p_1,\dots,p_{s+1}) \in (0,1)^{s+1} : \sum_i p_i = 1\}9

so f:Δs(0,1)f: \Delta_s \to (0,1)0 strictly. For the boundary behavior, since each term of f:Δs(0,1)f: \Delta_s \to (0,1)1 is at most f:Δs(0,1)f: \Delta_s \to (0,1)2 on f:Δs(0,1)f: \Delta_s \to (0,1)3, one has f:Δs(0,1)f: \Delta_s \to (0,1)4 and f:Δs(0,1)f: \Delta_s \to (0,1)5. Both bounds are positive constant multiples of monomials in the simplex variables, so the polynomial boundedness condition of Morina's theorem holds and f:Δs(0,1)f: \Delta_s \to (0,1)6 admits a Bernoulli factory.

Impossibility of a finite-automata factory. Suppose f:Δs(0,1)f: \Delta_s \to (0,1)7 with f:Δs(0,1)f: \Delta_s \to (0,1)8 Bernstein polynomials. First, f:Δs(0,1)f: \Delta_s \to (0,1)9 and c>0c > 00 are coprime: the only irreducible factors of c>0c > 01 are c>0c > 02 and c>0c > 03, and direct evaluation shows neither divides c>0c > 04 (e.g., c>0c > 05). Since c>0c > 06 is a UFD, any Bernstein representation forces c>0c > 07 for some non-zero homogeneous polynomial c>0c > 08.

The contradiction is extracted by dehomogenizing at the vertex c>0c > 09, setting k1k \ge 10. Then k1k \ge 11 has lowest homogeneous part exactly k1k \ge 12 of degree 2. If k1k \ge 13 denotes the lowest non-zero homogeneous part of k1k \ge 14, then the lowest homogeneous part of k1k \ge 15 is

k1k \ge 16

and since no cancellation occurs across degrees, k1k \ge 17 inherits non-negative coefficients from k1k \ge 18. Evaluating along the ray k1k \ge 19 gives min(f(p),1f(p))ci=1s+1pik\min(f(\mathbf{p}), 1 - f(\mathbf{p})) \ge c \prod_{i=1}^{s+1} p_i^k0; for a polynomial with non-negative coefficients this sum equals the total coefficient mass, forcing all coefficients to zero. But min(f(p),1f(p))ci=1s+1pik\min(f(\mathbf{p}), 1 - f(\mathbf{p})) \ge c \prod_{i=1}^{s+1} p_i^k1 is an integral domain and neither factor vanishes identically—a contradiction. Hence no finite-automata factory exists for min(f(p),1f(p))ci=1s+1pik\min(f(\mathbf{p}), 1 - f(\mathbf{p})) \ge c \prod_{i=1}^{s+1} p_i^k2.

Geometrically, the authors note the counterexample is related to a cusp singularity on a half-plane in algebraic geometry: the quadratic factor min(f(p),1f(p))ci=1s+1pik\min(f(\mathbf{p}), 1 - f(\mathbf{p})) \ge c \prod_{i=1}^{s+1} p_i^k3 in the lowest homogeneous part is what defeats the Pólya-based argument, since its zeros are not removable by cancellation in higher dimensions.

Limitations and open questions

The scope of the correction is deliberately narrow. The counterexample lives on min(f(p),1f(p))ci=1s+1pik\min(f(\mathbf{p}), 1 - f(\mathbf{p})) \ge c \prod_{i=1}^{s+1} p_i^k4; the paper does not characterize precisely which multivariable rational functions do admit finite-automata factories, nor does it repair Theorem 2.9 with additional hypotheses (for instance, denominators strictly positive on the closed simplex would presumably suffice under Pólya's theorem). It also leaves open whether the failure is confined to boundary-vanishing denominators or extends to other obstructions. A corrected classification of finite-automata-simulable rational functions in several variables remains an open problem following this note.

One further disclosure merits mention: the authors state that the DeepThink mode of Gemini 3.1 Pro was used to derive the counterexample and refine the presentation—an unusual provenance statement for a mathematics note, though it does not bear on the correctness of the proof, which is self-contained and verifiable.

Conclusion

This note supplies a clean, self-contained counterexample showing that Mossel and Peres's Theorem 2.9 fails for min(f(p),1f(p))ci=1s+1pik\min(f(\mathbf{p}), 1 - f(\mathbf{p})) \ge c \prod_{i=1}^{s+1} p_i^k5: the rational function min(f(p),1f(p))ci=1s+1pik\min(f(\mathbf{p}), 1 - f(\mathbf{p})) \ge c \prod_{i=1}^{s+1} p_i^k6 admits a general Bernoulli factory but no finite-automata one. The root cause is the gap between positivity on the open versus closed simplex when applying Pólya's theorem—a gap that is invisible in one variable but consequential in several. The result restores the correct picture: finite-automata simulability of rational functions is fully characterized only in the single-parameter case, and the multivariable analogue requires additional conditions not identified in the original work.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

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

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.