** A FIRST COURSE IN MONTE CARLO**

** by**

** George S. Fishman**

These C-languange programs can be used to solve exercises in this book. cndev.c,

Bruec.c, and Pruec.c all use the pseudorandom number generator in rng_afm.c.

** **

**rng_afm.c ** For the pseudorandom number generator known as the Mersenne twister,

MT19937, this C-language program provides a means for loading seeds

at the beginning of a run and saving the final numbers in the sub-sequence

at the end of the run. This allows for non-overlapping sub-sequences

on successive runs.

**cndev.c ** C-language code from Moro (1995) to generate a sample from the normal

distribution with 0 mean and variance 1 by the inverse-transform method.

**The following are taken from WinRand at the Institute of Statistics at the University**

**of Graz at**

http://www.cis.tugraz.at/stat/

**Bruec.c ** C-language code to sample from the Binomial distribution using the

ratio-of- uniforms and inverse-transform methods.

**Pruec.c ** C-language code to sample from the Poisson distribution using the ratio-of-

uniforms and inverse-transform methods.