pith. sign in

arxiv: 1611.00532 · v1 · pith:L653Y5GMnew · submitted 2016-11-02 · 💻 cs.DS

An asymptotically optimal, online algorithm for weighted random sampling with replacement

classification 💻 cs.DS
keywords algorithmnovelonlinepopulationrandomreplacementsamplesampling
0
0 comments X
read the original abstract

This paper presents a novel algorithm solving the classic problem of generating a random sample of size s from population of size n with non-uniform probabilities. The sampling is done with replacement. The algorithm requires constant additional memory, and works in O(n) time (even when s >> n, in which case the algorithm produces a list containing, for every population member, the number of times it has been selected for sample). The algorithm works online, and as such is well-suited to processing streams. In addition, a novel method of mass-sampling from any discrete distribution using the algorithm is presented.

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. StreamSampling.jl: Efficient Sampling from Data Streams in Julia

    cs.SE 2026-03 unverdicted novelty 5.0

    StreamSampling.jl implements efficient one-pass sampling algorithms for data streams in Julia with constant memory footprint and performance gains over traditional methods.