The Fast Loaded Dice Roller: A Near-Optimal Exact Sampler for Discrete Probability Distributions

03/08/2020
by   Feras A. Saad, et al.
0

This paper introduces a new algorithm for the fundamental problem of generating a random integer from a discrete probability distribution using a source of independent and unbiased random coin flips. We prove that this algorithm, which we call the Fast Loaded Dice Roller (FLDR), is highly efficient in both space and time: (i) the size of the sampler is guaranteed to be linear in the number of bits needed to encode the input distribution; and (ii) the expected number of bits of entropy it consumes per sample is at most 6 bits more than the information-theoretically optimal rate. We present fast implementations of the linear-time preprocessing and near-optimal sampling algorithms using unsigned integer arithmetic. Empirical evaluations on a broad set of probability distributions establish that FLDR is 2x-10x faster in both preprocessing and sampling than multiple baseline algorithms, including the widely-used alias and interval samplers. It also uses up to 10000x less space than the information-theoretically optimal sampler, at the expense of less than 1.5x runtime overhead.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/13/2020

Optimal Approximate Sampling from Discrete Probability Distributions

This paper addresses a fundamental problem in random variate generation:...
research
05/28/2018

Fast Random Integer Generation in an Interval

In simulations, probabilistic algorithms and statistical tests, we often...
research
05/08/2022

Efficient Representation of Large-Alphabet Probability Distributions

A number of engineering and scientific problems require representing and...
research
08/18/2023

Sampling from Network Reliability in Near-linear Time

We give a O(n) time sampler for independent sets of a matroid with n ele...
research
03/01/2019

Metropolized Knockoff Sampling

Model-X knockoffs is a wrapper that transforms essentially any feature i...
research
01/02/2019

Massively Parallel Construction of Radix Tree Forests for the Efficient Sampling of Discrete Probability Distributions

We compare different methods for sampling from discrete probability dist...
research
10/16/2020

A Latent Slice Sampling Algorithm

In this paper we introduce a new sampling algorithm which has the potent...

Please sign up or login with your details

Forgot password? Click here to reset