An asymptotically optimal Bernoulli factory for certain functions that can be expressed as power series

Abstract
Given a sequence of independent Bernoulli variables with unknown parameter , and a function that can be expressed as a power series with non-negative coefficients, an algorithm is presented that produces a Bernoulli random variable with parameter . In particular, the algorithm can simulate for . For the subclass of functions that are asymptotically proportional to as , the algorithm requires an average number of inputs that is asymptotically optimal in a precisely defined sense. A non-randomized version of the algorithm is also given. The distribution of the number of inputs required by any of these algorithms has an exponentially decaying tail. Some extensions of the algorithms are discussed.
View on arXivComments on this paper