arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2405.12371cs.DScs.DMmath.PR
收藏

生成小型随机样本的算法

Algorithms for Generating Small Random Samples

Vincent A. Cicirello

AI总结:

针对无放回抽取两个或三个不同整数的小规模采样问题,提出最坏情况运行时间为常数的算法,并在开源库 ρμ 中提供 Java 实现。

摘要:

我们提出了用于无放回生成小型随机样本的算法。我们考虑两种情况:给出一种抽取一对不同整数的算法,以及一种抽取三个不同整数的算法。两种算法的最坏情况运行时间均为常数,而从含 n 个元素的集合中抽取 k 个元素这一通用情形的常见算法,其最坏情况运行时间会随 n 增加。两种算法的 Java 实现均包含在开源库 ρμ 中。

英文摘要:

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 $ρμ$.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑