Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 14 in printed book and digital formats -- plus a one-year subscription so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Print:
PDF:

Feature

Basic Random Numbers

Exploring randomness

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
Resource File(s):

Download Icon 5111.sit Updated: Friday, September 29, 2006 at 11:32 AM
Download Icon 5111.zip Updated: Friday, September 29, 2006 at 11:32 AM

Related Web Link(s):

http://en.wikipedia.org/wiki/Lagged_Fibonacci_generator
http://en.wikipedia.org/wiki/Linear_congruential_generator

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.


 


|

 


Weblog Commenting and Trackback by HaloScan.com