How Random is the Lottery Machine? If I have a number randomly generated by the Lottery Machine at 10:00, would it have been the same number I would have gotten at 12:00 IF NO ONE HAD USED THE MACHINE IN THE INTERVENING TIME?

Or is the machine, which we know is hooked up to “Lottery Headquarters” in the state capital, likely to generate different numbers at different times because it is in a constant feedback loop with HQ.

btw I understand it would be different if someone uses the machine to generate numbers in the intervening time.

I don’t know what sort of machine that you’re talking about; it sounds like you mean some sort of computer random number generator; to be in use on a lottery, such a computer must surely be linked to some sort of external random soource (like a decaying radioactive sample or lava lamps, in which case, no, it wouldn’t be the same sequence of numbers if you ran the thing at a different time.

In the UK, the lottery machine is just a big device that physically mixes 49 numbered balls; there’s no way of knowing what the number would have been if you ran it at a certain time; the very idea is meaningless in this context.

Assuming your are discussing the “quick pick generator”:

The only way I can think to know for sure would be to ask the person who developed it.

I can think of three ways the numbers could be generated (time wise) and no way to tell the difference without a peek under the hood.

It could generate a random set of number on demand.

It could create the next set of random numbers it is going to put out as soon as a set is used and hold them til the next customer.

It could generate a whole year’s worth (or whatever unit of time you want) and pass them out one after the next.

Unless you can think of a way to know what set of numbers it was going to hand out at 8:00 without actually getting the numbers, it does seem possible to compare with what you get at 10:00.

Any of the above three methods should look exactly the same to the user.

Mangetout :
I think maybe you mean a sequence of numbers selected to appear on a lottery ticket when you buy it - is this right?

Yes, that is what I mean. In the U.S., in some places, you can have the machine select the numbers to appear on your ticket.
My question involves THAT machine.

scotth
I know you are right on all counts. I wonder which way it works? I bet there IS a single answer, just hoping someone on the SDMB had the answer

Random-number generators are a dime-a-dozen. Any computer algorithm book worth its binding will have at least three different ways to generate random numbers.

Just to speculate here, but the easiest way for the “quick pick” (what the California lottery calls the let-the-computer-pick-numbers-for-you) system to work is to have the lottery machine you’re working with generate the numbers; that avoids any issues with going to a “Master computer” somewhere to get numbers (networking delays, blocking, simultaneous access, etc.).

If I were to program the quick-pick system, I would take the time when you request the numbers (month, day, year, hour, minutes, seconds), create a number from that, and then use that to “seed” the random number generator. If I wanted to get even fancier, I would take the ID number of the particular lottery machine and use that to modify the seed – this will prevent the same numbers from being created if two players were to choose random numbers at the same time at two different machines. And if I really wanted to get paranoid, I would further modify the “seed” by seeing how many milliseconds has elapsed since this particular lottery machine was turned on – the combination of all three of these factors would be enough to ensure that the numbers this machine generates don’t match the numbers generated by another machine.

As for what system is actually being used… odds are, the Lottery Commission considers that confidential, and wouldn’t tell you (or me) for all the tea in China.

If the people running the lottery are on the ball they make constant checks on their random number “quick pick” generator to make sure that over time each possible number is selected an equal number of times. At least within a very close tolerance that is, and that tolerance can be computed by someone who knows a lot about probability. Other tests of randomness are “runs tests.” That is the random number generator is turned on an allowed to put out a bunch of picks. The number 3, for example, should come up twice in a row with a certain frequency, three times in a row with a certain frequency and so on. These tests are all done, by competent organizations, on random number generators before they are released for use.

That must be a bit like the ‘lucky dip’ option that the lottery machines here have.

It is worth noting that in the absence of an external random source, computers can only generate pseudo random numbers; any equation to generate these is deterministic and given the same ‘seed’, will always give the same answer.
using the current system time as the seed is usually good enough for everyday purposes though, since in the case of the lottery machines, the transactions are processed at irregular intervals (i.e. when the customer hands them over), providing a ‘near enough’ random source.

I once set up a monitoring system once that would email certain people automatically to report the status of the events being monitored. I found that very soon, people were missing crucial information because they were just assuming that the message would say the usual ‘all OK’* and not opening it, so I included a database of a few hundred witty quotes with a (pseudo)random selection algorithm in the hope that this would encourage people to actually read the message. Trouble is that, since the monitoring program was running on a strictly scheduled basis, it was nearly always selecting the same phrase because the ‘seed’ was the same every time (the only time it varied was when the process had something to report, or when the network was busy, because the program took a little longer to finish in these cases.

*[sup]You might be wondering why I would bother getting the system to send messages to say ‘all OK’ - I found that if I didn’t, people would worry that it wasn’t working![/sup]

It’s probably also worth realising that it doesn’t matter a whole lot if anybody was able to ‘crack’ the ‘lucky dip’ algorithm - all this would mean is that the numbers on the ticket would be predictable (the same result is achievable by selecting the numbers on the playcard) - the selection of the winning numbers in the draw is unaffected.

But if you knew the lucky dip algorithm, you could see if any numbers are less likely to be picked, and thus be able to choose a selection for yourself which is most likely to be unique - thus increasing your expected winnings.

True; (as you know)this wouldn’t increase your chances of winning though, only reduce your chances of having to share the jackpot.

Mathematician Iain Stewart suggests picking a contiguous block of six numbers all above 31 (people often use birth dates)

I’ve often wondered if rollovers and particularly double and triple ones) were ‘manufactured’; the ticket machine reports back all of the bets, so it would be fairly simple to find a set of six numbers that hasn’t been picked that week, then fudge the machine to produce those six balls (can you be absolutely sure that the balls are coming out of the drum? - I’ve looked and I can’t) - double rollovers result in a massive increase in the level and value of betting.

In this case, why didn’t you just generate two different message headers: one where the heading read ALL OKAY (with nothing inside) and another that read PLEASE PANIC NOW (with information on the system problem? Of course it would be more fun to generate random pithy quotes…

Well, it was more complex than that; the body of the message could contain a variety of report lines many of which were important but not necessarily urgent, or the urgency or relevance of which could only really be decided by a human with knowledge of that particular day’s business - it’s difficult to explain; I suppose I could have set up a new message header for each type of problem, but it seemed better at design time to try to consolidate the reports as much as possible.

Sadly, a significant number of people have probably already thought of this. The general game-theoretic analysis indicates that the best ‘system’ in general in dealing with this kind of game (with an extremely large number of players and an equally large or larger number of moves available) is to make a completely random choice. The number of ‘free’ choices is so much larger than the number of patterned or limited choices that you are less likely to match someone else’s choice be taking one of the former, even if only a small fraction of the other players are expected to match your ‘system’.

Of course, if you’re only looking at the mathematical analysis, it’s really simpler than that. To quote the supercomputer Joshua in War Games:

My question would more aim towards the true randomness of the ping-pong ball machine they use to draw the numbers. Since it’s physics in play in that case, not algorithms, would it be possible to (ever so slightly) improve your odds? Wouldn’t the trajectory of a painted “8” ball be different than that of a “1”? Do the people that run that machine tweak the balls to mimic true randomness? http://powerballpicker.freeyellow.com/ lists what numbers have been picked and how many times (sorry, lots of pop up ads on that site) With that history, could it be possible to find some correlation?

Note that “truly random” has no influence on “pre-determined”. (at least if we’re not getting philosophical) If a pseudo-random number generator starts in a specific state, all following states are determined. In effect the clerk behind the counter could as well tick off the picks in a long list on a piece of paper that was given to him by the lottery company which derived it years ago from a bunch of monkeys rolling dice. The numbers you’d get would not differ on different times of the day, because only their order mattered. But an intervening customer would influence your sequence.

If, however, the generator is seeded (only) by the time of the day, an intervening customer would not change your numbers. It would be like having a list assigning a pick to every second of the day (or millisecond [or femtosecond :)]) and choosing from it according to the time you pushed the button. Of course now the time influences your numbers.

Until now we have no real randomness. Both methods work with a predetermined list, be it determined by a piece of paper or the algorithm of the generator. Either same order or same time means same number sequence. But both methods are statistically indistinguishable from each other or from true random numbers. Truly random would mean having a monkey at the counter rolling dice every time you buy a ticket. Neither time nor order would influence it.

At least so it would work with infinite long lists, which don’t exist in reality.

No pseudo-random number generator has infinite states to be in, thus it repeats. If a customer buys every thousandth pick from a list repeating every hundredths entry, or in the other example coming again every 86400 seconds, he would get the same ticket over and over again. That’s why the lottery machines most likely combine both methods. Being influenced by both order and time effectively multiplies the probabilities of not repeating. And of course they make their lists as long as possible in the first place (using a good algorithm).

Only the particular manufacturer of the machines knows if they additionally evaluate the duration of how long a button is pressed, or something, but I don’t think they go to the length to include a real electronic true random generator, if a properly programmed 50 cent microchip can achieve similar enough results to make people not sue them.

Each Saturday hubby and I buy two rows of numbers (same ticket). One is the same 6 - a combo of birthdays and anniversary. The second is a lucky dip. A few weeks ago we had quite a laugh when we got home and looked at the numbers.

To our amazement the lucky dip and our normal numbers were 5 for 6 - only 1 number different!!

This was most bizarre. We kept the ticket for laughs.

The California lottery once ran a magazine ad with Steve Wozniak (one of the Steves who founded Apple Computer), and he was quoted as saying “My lotto numbers are 1 - 2 - 3 - 4 - 5 - 6. Why not? The odds are just as good as with any other combination.”

I suspect that you are presuming something about their algorithm that might not be correct.

My understanding is that if the algorithm is time-based, then tickets from two machines generated at the exact same time might have the same numbers. But two consecutive tickets generated two hours apart? Why would they have the same numbers just because no other tickets were generated meanwhile?