Year: 2024
Type: article
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 elements from a set of increase with . Java implementations of both algorithms are included in the open source library .
Source: Software Practice and Experience
DOI: 10.1002/spe.3379
Author: Vincent A. Cicirello
Institution: Stockton University
Language: English
Subfield: Theoretical Computer Science
Field: Mathematics
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W4398229870
