English

MichelangeRoll: Sculpting Rational Distributions Exactly and Efficiently

Information Theory 2025-09-05 v2 math.IT

Abstract

Simulating an arbitrary discrete distribution D[0,1]nD \in [0, 1]^n using fair coin tosses incurs trade-offs between entropy complexity and space and time complexity. Shannon's theory suggests that H(D)H(D) tosses are necessary and sufficient, but does not guarantee exact distribution. Knuth and Yao showed that a decision tree consumes fewer than H(D)+2H(D) + 2 tosses for one exact sample. Draper and Saad's recent work addresses the space and time aspect, showing that H(D)+2H(D) + 2 tosses, O(nlog(n)log(m))O(n \log(n) \log(m)) memory, and O(H(D))O(H(D)) operations are all it costs, where mm is the common denominator of the probability masses in DD and nn is the number of possible outcomes. In this paper, MichelangeRoll recycles leftover entropy to break the "+2+2" barrier. With O((n+1/ε)log(m/ε))O((n + 1/\varepsilon) \log(m/\varepsilon)) memory, the entropy cost of generating a ongoing sequence of DD is reduced to H(D)+εH(D) + \varepsilon per sample.

Keywords

Cite

@article{arxiv.2507.00915,
  title  = {MichelangeRoll: Sculpting Rational Distributions Exactly and Efficiently},
  author = {Jui-Hsiang Shao and Hsin-Po Wang},
  journal= {arXiv preprint arXiv:2507.00915},
  year   = {2025}
}

Comments

14 pages, 7 figures, RANDOM says no so here

R2 v1 2026-07-01T03:41:53.589Z