English

Simulating a coin with irrational bias using rational arithmetic

Probability 2025-01-03 v6 Computation

Abstract

An algorithm is presented that, taking a sequence of independent Bernoulli random variables with parameter 1/21/2 as inputs and using only rational arithmetic, simulates a Bernoulli random variable with possibly irrational parameter τ\tau. It requires a series representation of τ\tau with positive, rational terms, and a rational bound on its truncation error that converges to 00. The number of required inputs has an exponentially bounded tail, and its mean is at most 33. The number of arithmetic operations has a tail that can be bounded in terms of the sequence of truncation error bounds. The algorithm is applied to two specific values of τ\tau, including Euler's constant, for which obtaining a simple simulation algorithm was an open problem.

Keywords

Cite

@article{arxiv.2010.14901,
  title  = {Simulating a coin with irrational bias using rational arithmetic},
  author = {Luis Mendo},
  journal= {arXiv preprint arXiv:2010.14901},
  year   = {2025}
}

Comments

22 pages, 5 figures

R2 v1 2026-06-23T19:42:47.475Z