Keywords and Synonyms
Random number generation; Sampling
Problem Definition
The problem of random sampling without replacement (RS) calls for the selection of m distinct random items out of a population of size n. If all items have the same probability to be selected, the problem is known as uniform RS. Uniform random sampling in one pass is discussed in [1,6,11]. Reservoir-type uniform sampling algorithms over data streams are discussed in [12]. A parallel uniform random sampling algorithm is given in [10]. In weighted random sampling (WRS) the items are weighted and the probability of each item to be selected is determined by its relative weight. WRS can be defined with the following algorithm D:
Algorithm D, a definition of WRS
- Input::
-
A population V of n weighted items
- Output::
-
A set S with a WRS of size m
- 1::
-
For \( { k=1 } \) to m do
- 2::
-
Let \( { p_i(k) = {w_i}/{\sum_{s_j \in V-S} w_j} } \) be the probability of item v i to be selected in round k
- 3::
-
Randomly select an item \( {...
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Recommended Reading
Ahrens, J.H., Dieter, U.: Sequential random sampling. ACM Trans. Math. Softw. 11, 157–169 (1985)
Babcock, B., Babu, S., Datar, M., Motwani, R., Widom, J.: Models and issues in data stream systems. In: Proceedings of the twenty-first ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems, pp. 1–16. ACM Press (2002)
Devroye, L.: Non-uniform Random Variate Generation. Springer, New York (1986)
Efraimidis, P., Spirakis, P.: Weighted Random Sampling with a reservoir. Inf. Process. Lett. J. 97(5), 181–185 (2006)
Jermaine, C., Pol, A., Arumugam, S.: Online maintenance of very large random samples. In: SIGMOD '04: Proceedings of the 2004 ACM SIGMOD international conference on Management of data, New York, pp. 299–310. ACM Press (2004)
Knuth, D.: The Art of Computer Programming, vol. 2 : Seminumerical Algorithms, 2nd edn. Addison-Wesley Publishing Company, Reading (1981)
Lin, J.-H., Vitter, J.: ϵ-approximations with minimum packing constraint violation. In: 24th ACM STOC, pp. 771–782 (1992)
Muthukrishnan, S.: Data streams: Algorithms and applications. Found. Trends Theor. Comput. Sci. 1, pp.1–126 (2005)
Olken, F.: Random Sampling from Databases. Ph. D. thesis, Department of Computer Science, University of California, Berkeley (1993)
Rajan, V., Ghosh, R., Gupta, P.: An efficient parallel algorithm for random sampling. Inf. Process. Lett. 30, 265–268 (1989)
Vitter, J.: Faster methods for random sampling. Commun. ACM 27, 703–718 (1984)
Vitter, J.: Random sampling with a reservoir. ACM Trans. Math. Softw. 11, 37–57 (1985)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2008 Springer-Verlag
About this entry
Cite this entry
Efraimidis, P., Spirakis, P. (2008). Weighted Random Sampling. In: Kao, MY. (eds) Encyclopedia of Algorithms. Springer, Boston, MA. https://doi.org/10.1007/978-0-387-30162-4_478
Download citation
DOI: https://doi.org/10.1007/978-0-387-30162-4_478
Publisher Name: Springer, Boston, MA
Print ISBN: 978-0-387-30770-1
Online ISBN: 978-0-387-30162-4
eBook Packages: Computer ScienceReference Module Computer Science and Engineering