加载中…
We give an implementation of an algorithm that uses fair coin flips to simulate fair rolls of an -sided die. A register plays the role of an entropy pool and holds entropy that is generated as a by-product during each die roll and that is usually discarded. The entropy stored in this register is completely reused during the next rolls. Consequently, we can achieve an almost negligible loss of entropy per roll. The algorithm allows to change the number of sides of the die in each round. We prove that the entropy loss is monotone decreasing with increasing entropy pool size (register length).

生成讲解博客的中文版本

生成AI智能校验的中文版本