The Mudcat Café TM
Thread #119102   Message #2580445
Posted By: Mick Pearce (MCP)
03-Mar-09 - 02:03 PM
Thread Name: Tech: Programming Randomness
Subject: RE: Tech: Programming Randomness
bobad

It is possible to program a very good approximation to randomness on a computer (if by this you mean an essentially Uniform distribution - equal chances to everything).

The methods used in general will repeat, but only after a very (and I mean very) great number of times.

The common older form of generators (linear congruential type) even with a long period did suffer from serial correlation between consecutive numbers ("Random numbers fall mainly in the planes" was the title of a famous paper by Marsaglia about this, plotting adjacent pairs of numbers and showing that rather than being distributed all across the plane they tended to appear in lines).

The more modern generators (shift reduce methods), especially in forms like the Mersenne Twister and its relatives have extemely long period and don't suffer from the serial correlation problem.


That being said, an unaware system could use a very poor random number generator (back in the 60s and 70s the standard IBM library routine used a poor form of congruence generator). I would expect modern libraries to have decent generators, but you really need to know the details to tell.

Mick