What are relatively simple simulations that succeed with an irrational probability?
Let me break down this question.
Relatively simple simulations
By "relatively simple" I mean only algorithms that involve only—
- unbiased random bits (and thus discrete uniform variates), and
- integer arithmetic.
The algorithm may:
- Use Flajolet's "geometric bag" technique to build up continuous uniform variates and to sample a probability equal to a uniform random variate.
- Use rational arithmetic, but only as a last resort.
- Generate Poisson random variates, since there is a way to do so using only integer arithmetic and/or coins with unknown success probability.
The algorithm may not:
- Use "multiprecision interval arithmetics or [...] functions of high complexity as primitives" (Flajolet et al. 2010).
- Make direct use of square root or transcendental functions or constants.
- Rely on "sequences of approximation functions of increasing complexity" (Flajolet et al. 2010), except as a last resort.
Succeed with an irrational probability
- The algorithm's expected value must equal a constant, namely an irrational number in (0, 1).
- If the algorithm outputs $X$, then it must be that $\mathbb{E}[X]$ is the desired constant.
- The desired irrational constant is allowed to depend on one or more parameters.
There are two ways the algorithm could "succeed with an irrational probability".
- It could return either 0 or 1 with probability equal to the constant.
- Or it could produce a value $r\ge 1$; then the algorithm could return a Bernoulli($1/r$) variate.
I ask for irrational probabilities because the rational case is quite trivial; if the rational probability is known there is no need for algorithms like the one I'm asking for. Rather, it's enough to compare a uniform($d$) random variate with $n$, where $d$ and $n$ are the denominator and numerator.
Examples
- 1 divided by the golden ratio.
- 1/π.
- $e^{-1}$.
- The Euler–Mascheroni constant (even though it's not known to be irrational).
- The frog problem with negative steps. Here, the expected number of iterations turns out to be an irrational number in a far from obvious way, which is desirable for this question. (Indeed, the more implicit the algorithm's use of the irrational constant, the better.)
Remarks
- The algorithm or method should have been published in a research article or book, and should be different from the ones I already have in my pages on Bernoulli factory algorithms or more arbitrary-precision algorithms, especially the section "Algorithms for Specific Constants". My literature searches have shown that algorithms I'm seeking are quite hard to find.
- My interest is not to compute irrational constants to high precision, but rather to have the algorithm serve as a "black box", a coin that "shows heads" with an irrational probability and in an exact manner; e.g., to serve as input coins to other so-called "Bernoulli Factory" algorithms that turn a Bernoulli($\lambda$) probability into an exact Bernoulli($f(\lambda)$) probability.
References
- Flajolet, P., Pelletier, M., Soria, M., "On Buffon machines and numbers", arXiv:0906.5560v2 [math.PR], 2010.