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

Free Bingo - visit Super Free Bingo for all the best free bingo offers.

News Headlines

Source: onlinecasinonews.com Date:11 Mar 2010

After qualifying for his seat via online poker site PokerStars.com, Kevin ‘ImaLuckSac’ MacPhee won the European Poker Tour’s Berlin event last weekend to pocket a record pr ...

Source: onlinecasinonews.com Date:11 Mar 2010

Kahnawake-licensed online poker room PokerHost.com has announced that it will soon join the Merge Gaming Network after earlier leaving the rival Cake Poker Network. PokerHost.com stated that ...

Source: online-gambling-insider.com Date:11 Mar 2010

March 11-  A man in his forties from Norway has won over 4.8 million Euro on the online gaming site Betsson Casino, with a stake of just 5€. This is the biggest  payout in  ...

Source: onlinecasinonews.com Date:10 Mar 2010

Leading online slots site AllSlotsCasino.com has further expanded its games selection with the addition last week of CashOccino and Triple Action Hold'Em Bonus Poker. A member of the Jackpot ...