Skip to main content

Efficient Sampling Methods for Discrete Distributions

  • Conference paper
Automata, Languages, and Programming (ICALP 2012)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7391))

Included in the following conference series:

Abstract

We study the fundamental problem of the exact and efficient generation of random values from a finite and discrete probability distribution. Suppose that we are given n distinct events with associated probabilities p 1, …, p n . We consider the problem of sampling a subset, which includes the ith event independently with probability p i , and the problem of sampling from the distribution, where the ith event has a probability proportional to p i . For both problems, we present on two different classes of inputs – sorted and general probabilities – efficient preprocessing algorithms that allow for asymptotically optimal querying, and prove almost matching lower bounds for their complexity.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Borodin, A., Munro, I.: The computational complexity of algebraic and numeric problems. American Elsevier Publishing Co., Inc., New York (1975)

    MATH  Google Scholar 

  2. Devroye, L.: Nonuniform random variate generation. Springer, New York (1986)

    Google Scholar 

  3. Flajolet, P., Saheb, N.: The complexity of generating an exponentially distributed variate. Journal of Algorithms 7(4), 463–488 (1986)

    Article  MathSciNet  MATH  Google Scholar 

  4. Hagerup, T., Mehlhorn, K., Munro, J.I.: Maintaining Discrete Probability Distributions Optimally. In: Lingas, A., Carlsson, S., Karlsson, R. (eds.) ICALP 1993. LNCS, vol. 700, pp. 253–264. Springer, Heidelberg (1993)

    Chapter  Google Scholar 

  5. Knuth, D.E.: The Art of Computer Programming. Seminumerical Algorithms, 3rd edn., vol. 2. Addison-Wesley Publishing Co, Reading (2009)

    Google Scholar 

  6. Knuth, D.E., Yao, A.C.: The complexity of nonuniform random number generation. In: Algorithms and Complexity (Proc. Sympos.), pp. 357–428. Carnegie-Mellon Univ., Pittsburgh (1976)

    Google Scholar 

  7. Matias, Y., Vitter, J.S., Ni, W.C.: Dynamic generation of discrete random variates. Theory of Computing Systems 36(4), 329–358 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  8. Nacu, Ş., Peres, Y.: Fast simulation of new coins from old. The Annals of Applied Probability 15(1A), 93–115 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  9. Preparata, F.P., Shamos, M.I.: Computational Geometry. Texts and Monographs in Computer Science. Springer, New York (1985)

    Google Scholar 

  10. Pătraşcu, M.: Webdiarios de motocicleta, sampling a discrete distribution (2011), infoweekly.blogspot.com/2011/09/sampling-discrete-distribution.html

  11. Tsai, M.-T., Wang, D.-W., Liau, C.-J., Hsu, T.-s.: Heterogeneous Subset Sampling. In: Thai, M.T., Sahni, S. (eds.) COCOON 2010. LNCS, vol. 6196, pp. 500–509. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  12. Tsai, M.T., Wang, D.W., Liau, C.J., Hsu, T.S.: Heterogeneous subset sampling (submitted for publication, 2012)

    Google Scholar 

  13. Vitter, J.S.: Random sampling with a reservoir. ACM Trans. Math. Softw. 11(1), 37–57 (1985)

    Article  MathSciNet  MATH  Google Scholar 

  14. Walker, A.J.: New fast method for generating discrete random numbers with arbitrary distributions. Electronic Letters 10, 127–128 (1974)

    Article  Google Scholar 

  15. Yao, A.C.: Context-free grammars and random number generation. In: Combinatorial algorithms on words (Maratea, 1984), vol. 12, pp. 357–361. Springer (1985)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bringmann, K., Panagiotou, K. (2012). Efficient Sampling Methods for Discrete Distributions. In: Czumaj, A., Mehlhorn, K., Pitts, A., Wattenhofer, R. (eds) Automata, Languages, and Programming. ICALP 2012. Lecture Notes in Computer Science, vol 7391. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-31594-7_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-31594-7_12

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-31593-0

  • Online ISBN: 978-3-642-31594-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics