For any p∈(0,1), von Neumann showed that an unfair coin which shows heads with probability p can be used to simulate a fair coin by flipping twice, ignoring/redrawing for HH or TT and associating HT with T and TH with H. The issue is that depending on the value of p, one might need to ignore/redraw for HH and TT outcomes for a very large number of tries before getting either TH or HT and exiting.
For what values of p∈(0,1) is it possible to simulate a fair coin in at most N flips?
While the phrasing on the question is a bit vague, I will assume two main frameworks for what "possible" means:
1) For what values of p∈(0,1) is the expected number of flips needed to exit less than or equal to N?; or
2) Given some value of q∈(0,1), for what values of p∈(0,1) does the probability that the simulation exists in less than or equal to N exceed q?
Let T be the number of flips of the van Neumann simulator needed to exit. The probability that the van Neumann simulator exits after in one flip is P{T=1}=2p(1−p). The probability for k>1 that it exits in k flips is P{T=k}=2p(1−p)⋅(1−2p(1−p))k−1. So the average is E[T]=∞∑k=1kP{T=k}=∞∑k=1k2p(1−p)(1−2p(1−p))k−1=2p(1−p)1(1−(1−2p(1−p)))2=12p(1−p).
So under framework 1, the question becomes solving for p∈(0,1) such that Ep[T]=12p(1−p)≤N. Thus the solution is p∈[1−√1−2/N2,1+√1−2/N2].
Under framework 2, the question becomes for some q∈(0,1), solving for p∈(0,1) such that Pp{T≤N}=N∑k=12p(1−p)(1−2p(1−p))k−1=1−(1−2p(1−p))N≥q. Since 2p(1−p)∈[0,0.5] for all p∈(0,1), if q>1−2−N, then Pp{T≤N}<q, for all p∈(0,1). But for any q∈[0,1−2−N], then Pp{T≤N}≥q for p∈[1−√2N√1−q−12,1+√2N√1−q−12].
No comments:
Post a Comment