Back to 2014-proposals
Title: Random number generation in C++ - present and potential future
Proposer: Pattabi Raman
Type: Tutorial
Duration: 45 mins
Description:
Random numbers are numbers that appear in random. They are one of the fundamental tools in numerous numerical works such as simulating graphics, extrapolating financial data, smoothing digitalisation and forecasting the weather.
Initially random numbers were generated by tossing coins, throwing dice and spinning roulette wheels. Later, random numbers were generated using nuclear radioactivity, voltage fluctuations and atmospheric noise, etc. These physical methods were expensive and time consuming. Therefore, computational methods were devised for generating random numbers.
Computational random numbers were produced by using algorithms, which were not truly random numbers, but they possess the property of randomness. Hence, they are called pseudo-random numbers. A function called rand() was implemented in C language to generate pseudo-random numbers and that is adapted by C++.
In C++11, a great leap has been made by incorporating very successful pseudo-random number generating algorithms, viz., linear congruential, subtract with carry and Mersenne Twister along with several analytical distributions.
For C++17, consideration is being given to incorporate quasi-random numbers such as Halton and Sobol sequences. The quasi-random numbers are not like the randomly distributed numbers of pseudo-random numbers, rather the numbers are generated in a way to fill the gaps in the previously generated distribution.
In comparison to pseudo-random numbers, the quasi-random numbers are advantageous in a sense that the later needs relatively far little iterations to achieve desired accuracy in numerical calculations. Concurrent generation of random numbers in CPU/GPU boosted the excitation of achieving reliable Monte Carlo calculations in short time.
The talk is intended to elaborate the principles, properties, pros and cons of the random number generation methods and their relevance in concurrent Monte Carlo simulations.