Pith. sign in

REVIEW 1 cited by

Maintaining Discrete Probability Distributions in Practice

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2302.05682 v2 pith:P2Q7E442 submitted 2023-02-11 cs.DS

Maintaining Discrete Probability Distributions in Practice

classification cs.DS
keywords timedynamicsamplingaliasdatadiscretedistributionstructure
verification ladder T0 review T1 audit T2 compute T3 formal T4 reserved
0 comments
read the original abstract

A classical problem in random number generation is the sampling of elements from a given discrete distribution. Formally, given a set of indices $S = \{1, \dots, n\}$ and sequence of weights $w_1, \dots, w_n \in \mathbb{R}^+$, the task is to provide samples from $S$ with distribution $p(i) = w_i / W$ where $W = \sum_j w_j$. A commonly accepted solution is Walker's Alias Table, which allows for each sample to be drawn in constant time. However, some applications correspond to a dynamic setting, where elements are inserted or removed, or weights change over time. Here, the Alias Table is not efficient, as it needs to be re-built whenever the underlying distribution changes. In this paper, we engineer a simple data structure for maintaining discrete probability distributions in the dynamic setting. Construction of the data structure is possible in time $O(n)$, sampling is possible in expected time $O(1)$, and an update of size $\Delta$ can be processed in time $O(\Delta n / W)$. As a special case, we maintain an urn containing $W$ marbles of $n$ colors where with each update $O(W / n)$ marbles can be added or removed in $O(1)$ time per update. To evaluate the efficiency of the data structure in practice we conduct an empirical study. The results suggest that the dynamic sampling performance is competitive with the static Alias Table. Compared to existing more complex dynamic solutions we obtain a sampling speed-up of up to half an order of magnitude.

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. Computational Determination of Optimal Growth Protocols for Metastable Polymorphs

    cond-mat.mtrl-sci 2026-07 conditional novelty 6.0

    Optimal control of temperature and pressure on a kMC-fitted nucleation-growth model raises metastable SBW monolayer yield from 73% to 97% in 1800 s versus a manual three-step protocol.