arXiv · 2405.12371
Algorithms for Generating Small Random Samples
Abstract
We present algorithms for generating small random samples without replacement. We consider two cases. We present an algorithm for sampling a pair of distinct integers, and an algorithm for sampling a triple of distinct integers. The worst-case runtime of both algorithms is constant, while the worst-case runtimes of common algorithms for the general case of sampling $k$ elements from a set of $n$ increase with $n$. Java implementations of both algorithms are included in the open source library $\rho\mu$.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Vincent A. Cicirello. 2024-05-20. Algorithms for Generating Small Random Samples. https://doi.org/10.1002/spe.3379
Cite the original work for its findings. Save a collection to share your selection of sources.