© 1985 by British Computer Society
Sampling without Replacement in Linear Time
University of Vaasa, Raasuvankatu 33 SF-65100, Vaasa, Finland
One method for selecting a sample of m different elements from a file of n records is to repeatedly select a random element until we have m different ones. We show that the number of selections is on average smaller than 2 ln (2) m and that the algorithm has a linear running time if we use a hash table for the elements already selected in the sample.
* University of Vaasa, Raastuvankatu 33 SF-65100 Vaasa 10, Finland