pith. sign in

arxiv: 1304.1916 · v1 · pith:S4GFF3LHnew · submitted 2013-04-06 · 💻 cs.DS · math.PR· physics.comp-ph· physics.data-an

Optimal Discrete Uniform Generation from Coin Flips, and Applications

classification 💻 cs.DS math.PRphysics.comp-phphysics.data-an
keywords randombitsoptimalalgorithmapplicationscomputationaldiscretegeneration
0
0 comments X
read the original abstract

This article introduces an algorithm to draw random discrete uniform variables within a given range of size n from a source of random bits. The algorithm aims to be simple to implement and optimal both with regards to the amount of random bits consumed, and from a computational perspective---allowing for faster and more efficient Monte-Carlo simulations in computational physics and biology. I also provide a detailed analysis of the number of bits that are spent per variate, and offer some extensions and applications, in particular to the optimal random generation of permutations.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. Efficient Rejection Sampling in the Entropy-Optimal Range

    cs.DS 2025-04 unverdicted novelty 7.0

    A new sampler for discrete distributions using coin flips that combines linearithmic space, negligible runtime overhead, and entropy-optimal expected flips in [H(P), H(P)+2).