Saved in:
Bibliographic Details
Main Authors: Huber, Mark, Vargas, Danny
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2412.20700
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909443998875648
author Huber, Mark
Vargas, Danny
author_facet Huber, Mark
Vargas, Danny
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2412_20700
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Optimal rolling of fair dice using fair coins
Huber, Mark
Vargas, Danny
Data Structures and Algorithms
Probability
Computation
60-08, 68Q87
G.3; F.2.1
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.
title Optimal rolling of fair dice using fair coins
topic Data Structures and Algorithms
Probability
Computation
60-08, 68Q87
G.3; F.2.1
url https://arxiv.org/abs/2412.20700