Basic Random Numbers
Issue: 5.1 (September/October 2006)
Author: JC Cruz
Article Description: No description available.
Article Length (in bytes): 23,157
Starting Page Number: 21
RBD Number: 5111
5111.sit Updated: Friday, September 29, 2006 at 11:32 AM
5111.zip Updated: Friday, September 29, 2006 at 11:32 AM
Related Web Link(s):
Known Limitations: None
Excerpt of article text...
We will now enter the field of Monte Carlo methods. But first, we need to understand how random numbers are generated. We will explore two popular algorithms for generating random number sequences. We will also discuss how to evaluate the statistical quality of said sequences using some standard test algorithms.
The Need for Randomness
Monte Carlo methods are a class of algorithms that uses sequences of random numbers to simulate the behavior of certain physical systems. These systems are often too complex to be represented by normal deterministic means. Some examples of such physical systems include Brownian movement, molecular dynamics, and nuclear radiation.
To ensure an accurate Monte Carlo model, a supply of statistically acceptable random numbers is needed. One approach is to use specialized hardware to generate a random sequence. These generators monitor true random events such as background radiation or temperature fluctuations to generate their random sequences.
A second and more practical approach is to use specialized algorithms called pseudorandom number generators or PRNGs. These generators employ a combination of recursion, bit-shifting, and modular arithmetic to generate their random numbers. However, as their name implies, these algorithms do not generate true random sequences for the following reasons.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.