Dwayne Bailey on Sat, 1 Apr 2000 08:08:32 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: GLUG: Lotto


> I am busy doing exactly this. I tried to select random numbers myself
> and I was disgusted at my attempt. I nearly chose the same set of

Clearly how random are your random numbers.  Remembering that most computer
based random number generators are pseudo random, ie just a very very long
sequence of numbers.  Use a random seed to make your numbers more random eg
use the time of day, seconds since the epoch, etc.

> As I am no mathermatician I am using a simple random number approach
> with the option of storing the previous winning numbers to prevent
> getting them again.

This of course defeats the whole idea of randomness.  You should actually be
able to get that same combination again for it to be truely random.

Just playing devils advocate on a guessing game for which I wouldn't bother
writing a program.  I've never played but aren't there 6 numbers to choose
from and each can be from 1-49?  That gives you 49^6 or about 13 billion
combinations if you want to hit the big winner.

Regards
Dwayne Bailey

-----------
The Linux Warehouse - your source of Linux software
http://www.linuxwarehouse.co.za/
info@xxxxxxxxxxxxxxxxxxxx
tel/fax: +27-21-685 3754