Lune

SODA2026顶会

Efficient Online Random Sampling via Randomness Recycling

Thomas L. Draper, Feras A. Saad

2026年份

摘要

This article studies the fundamental problem of using i.i.d. coin tosses from an entropy source to efficiently generate random variables X i ∼ P i (i ≥ 1), where (P 1 , P 2 , . . . ) is a random sequence of rational discrete probability distributions subject to an arbitrary stochastic process. Our method achieves an amortized expected entropy cost within ε > 0 bits of the information-theoretically optimal Shannon lower bound using O(log(1/ε)) space. This result holds both pointwise in terms of the Shannon information content conditioned on X i and P i , and in expectation to obtain a rate of E[H(P 1 ) + • • • + H(P n )]/n + ε bits per sample as n → ∞ (where H is the Shannon entropy). The combination of space, time, and entropy properties of our method improves upon the Knuth and Yao (1976) entropy-optimal algorithm and Han and Hoshi (1997) interval algorithm for online sampling, which require unbounded space. It also uses exponentially less space than the more specialized methods of Kozen and Soloviev (2022) and Shao and Wang (2025) that generate i.i.d. samples from a fixed distribution. Our online sampling algorithm rests on a powerful algorithmic technique called randomness recycling, which reuses a fraction of the random information consumed by a probabilistic algorithm to reduce its amortized entropy cost.

On the practical side, we develop randomness recycling techniques to accelerate a variety of prominent sampling algorithms, which include uniform sampling, inverse transform sampling, lookup-table sampling, alias sampling, and discrete distribution generating (DDG) tree sampling. We show that randomness recycling enables state-of-the-art runtime performance on the Fisher-Yates shuffle when using a cryptographically secure pseudorandom number generator, and that it reduces the entropy cost of discrete Gaussian sampling. Accompanying the manuscript is a performant software library in the C programming language.

问问这篇 Paper

智能体会读完全文。

Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。

可以从这些问题问起

智能体调用

Luneget_paper_fulltext

在 Lune 里问

免费开始,无需绑卡

它引用的顶会 Paper3

相关 Paper

黄昏的海面,两侧是细线勾勒的悬崖