0

Okay, so my friend LOVES to play the lottery. He makes bets often with bookies on the last $2$ digits, getting $90:1$ on his money, a losing bet.

He looks up 'systems' on social media on how to calculate what numbers will come up next based on previous draws. I wonder if it is possible to generate a 'system' to fit the existing data points, i.e. the previous $5$ draws. So that I could show him that just because you can fit a pattern on previous draws of randomly generated numbers doesn't mean that you can predict the next number.

Relure
  • 4,185

1 Answers1

-1

Well, it depends.

A random number generated by a computer uses what is known as a Random Number Generator (RNG) that creates new 'random' numbers. To create a number using an RNG, you need a single number called a seed. This could be the system time, a manually entered number, a previously generated number, or something unpredictable and random by itself.

If the seed is a previously generated number, you need to use a good, unpredictable algorithm. Weak RNGs can be predicted over time, due to the flaws in them. To do so, you must: 1. Know what algorithm has been used.
2. Hope that it is weak, or has a programming flaw (indexes of arrays are often confused).
3. Know how to find such flaws (meaning you need to be good at maths, as well as programming).
4. Pray that you are right (since it is almost impossible to really exploit an RNG without an expert's help).

Note that once you have cracked the method, you should be able to get the number right every time, otherwise you are wrong. It is all-in or nothing, so your friend is just wasting his money (or not, since he is losing only by a small margin, he might just get lucky, and stop playing after winning once).

If the RNG is of some in-built function by a reputed brand (say, a DOS command echo %random%), just accept that it can't be cracked.

And there is no other way to predicting a randomly generated number, it is mathematically impossible.

Pedro
  • 122,002
  • I'm not talking about figuring out what RNG somebody is using or predicting an RNG or a pseudo-random number generator. But specifically creating a function that fits the last n draws of an RNG. It doesn't have to predict anything. I am not asking for somebody to predict the lotto for me, i am asking if there exists a method by which one can appear to be able to predict the lottery by 'predicting' the numbers already drawn. – AncientOwl Jan 31 '15 at 15:55
  • 1
    No, each number is considered completely independent of every other number, unless and until you find a relationship between them by studying the algorithm used to create them now. @AncientOwl – ghosts_in_the_code Jan 31 '15 at 16:07
  • That might be. But for example if the number just so happens to be 1,2,3,4,5, this draw can happen, each draw was indepedent but i still could easily fit a function f(x) = x onto it. – AncientOwl Jan 31 '15 at 16:32
  • Your last comment in the question was out of place. I have removed it, and hope you deter from such behaviour in the future. Regards, – Pedro Jan 31 '15 at 19:24
  • @PedroTamaroff Oh, ok, sorry. isn't the question off-topic? – ghosts_in_the_code Feb 01 '15 at 03:50