An iterative randomness extraction algorithm which generalized the Von Neumann's extraction algorithm is detailed, analyzed and implemented in standard C++. Given a sequence of independently and identically distributed biased Bernoulli random variables, to extract randomness from the aforementioned sequence pertains to produce a new sequence of independently and identically distributed unbiased Bernoulli random variables. The iterative construction here is inspired from the work of Stout and Warren 1984 who modified appropriately the tree of probabilities produced by recursively repeating the Von Neumann's extraction algorithm. The correctness of the iterative algorithm is proven. The number of biased Bernoulli random variables needed to produce one unbiased instance is the complexity of interest. The complexity depends on the bias of the source. The expected complexity converges toward 3.10220648... when the bias tends to 0 and diverges when the bias tends to 1/2. In addition to the expected complexity, some other results that concern the limiting asymptotic construction, and that seem unnoticed in the literature so far, are proven.
翻译:将 Von Neumann 的抽取算法普遍化的迭代随机抽取算法在标准 C++ 中详细分析、分析和实施。 根据独立且分布完全的偏差伯努利随机变量序列,从上述序列中抽取随机性是为了产生一个独立且分布完全的不带偏见的伯努利随机变量新序列。 这里的迭代构造来自Stout 和 Warren 1984 的作品, 他们适当修改了反复重复 Von Neumann 提取算法产生的概率树。 迭代算法的正确性得到了证明。 生成一个不偏差实例所需的偏差伯努利随机变量数量是利益的复杂性。 复杂性取决于源的偏向性。 当偏差趋向于 1/2 时偏差时, 偏差会达到 0 和 差异 。 除了预期的复杂性外, 其他一些结果也得到了证明, 这些结果涉及到限制随机构造, 而且到目前为止在文献中似乎不被注意。