Random Numbers in Scientific Computing: An Introduction

Helmut G. Katzgraber
DOI: https://doi.org/10.48550/arXiv.1005.4117
2010-05-22
Abstract:Random numbers play a crucial role in science and industry. Many numerical methods require the use of random numbers, in particular the Monte Carlo method. Therefore it is of paramount importance to have efficient random number generators. The differences, advantages and disadvantages of true and pseudo random number generators are discussed with an emphasis on the intrinsic details of modern and fast pseudo random number generators. Furthermore, standard tests to verify the quality of the random numbers produced by a given generator are outlined. Finally, standard scientific libraries with built-in generators are presented, as well as different approaches to generate nonuniform random numbers. Potential problems that one might encounter when using large parallel machines are discussed.
Computational Physics,Mathematical Software,Numerical Analysis,Data Analysis, Statistics and Probability
What problem does this paper attempt to address?
The problem that this paper attempts to solve is about the importance of random number generators in scientific computing and their applications. Specifically, the paper explores the following points: 1. **Importance of random numbers**: The paper points out that random numbers play a crucial role in scientific research and industry, especially in applications that require unpredictable results, such as Monte Carlo simulations, cryptography, statistical data analysis, etc. 2. **Differences between True Random Number Generators (TRNGs) and Pseudo - Random Number Generators (PRNGs)**: - **TRNGs**: They generate truly random numbers by using physical processes, but are relatively slow. They are suitable for applications that require a small number of high - quality random numbers, such as data encryption. - **PRNGs**: They generate pseudo - random numbers based on algorithms. They are fast and can repeatedly generate the same sequence, and are suitable for large - scale computing and debugging. 3. **Quality testing of random number generators**: The paper discusses how to verify the quality of random number generators through various testing methods, including simple correlation tests, moment tests, graphical tests, and some standard test suites (such as DIEHARD, NIST, TestU01). 4. **Generation of non - uniform random numbers**: The paper introduces how to generate random numbers of other probability distributions from uniformly distributed random numbers, including binary - to - decimal conversion, generation of uniform random numbers within an arbitrary interval, transformation methods, and generation of random numbers with exponential and Gaussian distributions. 5. **Random number generation in parallel computing**: The paper also discusses the problems that may be encountered when using random number generators in large - scale parallel computing, especially the selection and synchronization of seeds. Overall, the paper aims to provide a comprehensive overview to help readers understand different types of random number generators, their advantages and disadvantages, and introduce how to evaluate and select random number generators suitable for specific applications.