604
Views
0
CrossRef citations to date
0
Altmetric
Statistical Computing and Graphics

Random number generators produce collisions: Why, how many and more

ORCID Icon
Pages 394-402 | Received 17 Mar 2020, Accepted 07 Jun 2020, Published online: 28 Jul 2020
 

Abstract

It seems surprising that when applying widely used random number generators to generate one million random numbers on modern architectures, one obtains, on average, about 116 collisions. This article explains why, how to mathematically compute such a number, why they often cannot be obtained in a straightforward way, how to numerically compute them in a robust way and, among other things, what would need to be changed to bring this number below 1. The probability of at least one collision is also briefly addressed, which, as it turns out, again needs a careful numerical treatment. Overall, the article provides an introduction to the representation of floating-point numbers on a computer and corresponding implications in statistics and simulation. All computations are carried out in R and are reproducible with the texttt included in this article.

Acknowledgments

I would like to thank Professor Ivan Kojadinovic (Université de Pau et des Pays de l’Adour) and Professor Gianfausto Salvadori (Università del Salento) for motivating this problem. I would also like to thank the Editor Daniel R. Jeske, an Associate Editor and two anonymous reviewers for their insightful feedback.

Additional information

Funding

This work was supported by NSERC under Discovery Grant RGPIN-5010-2015.

Log in via your institution

Log in to Taylor & Francis Online

PDF download + Online access

  • 48 hours access to article PDF & online version
  • Article PDF can be downloaded
  • Article PDF can be printed
USD 61.00 Add to cart

Issue Purchase

  • 30 days online access to complete issue
  • Article PDFs can be downloaded
  • Article PDFs can be printed
USD 106.00 Add to cart

* Local tax will be added as applicable

Related Research

People also read lists articles that other readers of this article have read.

Recommended articles lists articles that we recommend and is powered by our AI driven recommendation engine.

Cited by lists all citing articles based on Crossref citations.
Articles with the Crossref icon will open in a new tab.