Maintaining Discrete Probability Distributions in Practice
February 11, 2023 Β· Declared Dead Β· π Workshop on Algorithm Engineering and Experimentation
"No code URL or promise found in abstract"
Evidence collected by the PWNC Scanner
Authors
Daniel Allendorf
arXiv ID
2302.05682
Category
cs.DS: Data Structures & Algorithms
Citations
1
Venue
Workshop on Algorithm Engineering and Experimentation
Last Checked
4 months ago
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 $Ξ$ can be processed in time $O(Ξ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.
Community Contributions
Found the code? Know the venue? Think something is wrong? Let us know!
π Similar Papers
In the same crypt β Data Structures & Algorithms
π
π
The Cartographer
R.I.P.
π»
Ghosted
Route Planning in Transportation Networks
R.I.P.
π»
Ghosted
Near-linear time approximation algorithms for optimal transport via Sinkhorn iteration
R.I.P.
π»
Ghosted
Hierarchical Clustering: Objective Functions and Algorithms
R.I.P.
π»
Ghosted
Graph Isomorphism in Quasipolynomial Time
π
π
The Cartographer
Simulation optimization: A review of algorithms and applications
Died the same way β π» Ghosted
R.I.P.
π»
Ghosted
Federated Learning: Strategies for Improving Communication Efficiency
R.I.P.
π»
Ghosted
In-Datacenter Performance Analysis of a Tensor Processing Unit
R.I.P.
π»
Ghosted
Deep Convolutional Neural Networks for Computer-Aided Detection: CNN Architectures, Dataset Characteristics and Transfer Learning
R.I.P.
π»
Ghosted