Consider the fundamental problem of drawing a simple random sample of size k without replacement from [n] := {1, . . . , n}. Although a number of classical algorithms exist for this problem, we construct algorithms that are even simpler, easier to implement, and have optimal space and time complexity.
翻译:考虑一个基本问题,即绘制一个简单的K大小随机抽样,而不替换 [n] : = {1,.. n} 。虽然这个问题存在一些古典算法,但我们构建的算法更简单,更容易实施,并且有最佳的空间和时间复杂性。