Optimal rolling of fair dice using fair coins
Mark Huber, Danny Vargas

TL;DR
This paper adapts the Knuth-Yao algorithm for fair dice rolling with fair coins, achieving near-optimal efficiency and linear memory usage, improving upon previous bounds for coin flip usage.
Contribution
It presents a simplified, memory-efficient method for simulating fair dice rolls with coins, extending to general discrete distributions with near-optimal flip counts.
Findings
Achieves a bound on coin flips slightly better than Knuth-Yao.
Uses linear memory in the input size.
Extends to general discrete distributions efficiently.
Abstract
In 1976, Knuth and Yao presented an algorithm for sampling from a finite distribution using flips of a fair coin that on average used the optimal number of flips. Here we show how to easily run their algorithm for the special case of rolling a fair die that uses memory linear in the input. Analysis of this algorithm yields a bound on the average number of coin flips needed that is slightly better than the original Knuth-Yao bound. This can then be extended to discrete distributions in a near optimal number of flips again using memory linear in the input.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMechanics and Biomechanics Studies
