TOP BONUS OFFER:

Up to £500 Welcome Bonus
Sign up at Getminted and get a 100% Bonus! Sign Up Now!

Gambling School: Gambling Tips
Random Numbers
By Denis Howe
Published on 29 June 2007

Have you ever wondered what happens behind the scenes when you play on-line games of chance?  How exactly does a computer spin a roulette wheel or pick bingo balls?  The short answer is random numbers.  The long answer is a journey through the worlds of mathematics, quantum mechanics and philosophy, but let's keep it simple!

Computers are predictable.  No, don't laugh.  Deep down, under all those crashing programs and unexpected error messages, they just want to do the same thing over and over again.  Tell them to add one and one and they will always say two.  So how can a computer pretend to shuffle a deck of cards and come up with different hands every time?

Pick a number.  Let's pick 7 as it's lucky.  Multiply by 31, add 123, then rub out everything except the tens and units.  That, as I'm sure you have just worked out, gives 40.  Now do it all again starting with 40 instead of 7 and we end up with 63.  Doing this over and over again gives the list 7, 40, 63, 76, 79, 72, 55, 28, 91, and so on until the calculator batteries go flat.  We could use the numbers 1 to 52 to represent the 52 cards in a deck and throw away the rest.

What we've just done is generate the pseudo random sequence


X0 = 7,   Xn = (31 Xn-1 + 123) mod 100


Clever eh?  This is actually one of the simplest ways of generating random numbers.  It might be good enough for some purposes but there's one slight problem: it's not random!  After a while the sequence repeats exactly, just like a deck of cards that's only shuffled at the start of the game and then just recycled.

People have spent many years inventing better random number generators.  This is not just to stop you cheating at roulette but also because making random numbers less predictable is crucial to many kinds of computer security.  Sometimes though, it's simpler just to find something truly random, measure it and use the measurements as our random numbers.  Such hardware random number generators might measure things like the noise you hear when your radio isn't tuned in or the time between key-presses on your computer keyboard.  This takes us into the realms of subatomic particle physics and the deterministic nature of the universe but I'll save that for another day.

Further reading:
http://www.random.org/randomness/
http://en.wikipedia.org/wiki/Random_number_generator
http://foldoc.org/?random+number

Comments
Name E-mail
Rating
Please rate this article on a scale of 1 - 10, where 1 is low and 10 is high. And enter your email address so that we can confirm this is a genuine posting. Your email address will not appear on the website.

Recommended Online Casinos

News Headlines

Source: onlinecasinonews.com Date:15 Oct 2008

Whether your game of choice is blackjack, sportsbetting or poker, there is always a place to play online. And where there’s a place to play, there’s a chance to take advantage of ...

Source: onlinecasinonews.com Date:13 Oct 2008

Online slots games come in a variety of packages, each centred on a different theme. At Casino Tropez, the two new and exciting additions to their array of casino games are Wild Spirit and S ...

Source: online-gambling-insider.com Date:13 Oct 2008

October 13 - A lucky Bodog Casino player has won Let 'Em Ride progressive jackpot. The player, called Zachary M. hit a royal flush, making him a huge $159,000 richer.  ...

Source: online-gambling-insider.com Date:12 Oct 2008

October 12 - CryptoLogic Limited, a leading software developer to the global Internet gaming market, announced today that three of its most popular Internet casino games are now available  ...