Predicting Random Numbers

tinyabs

Member
Mar 8, 2003
158
0
0
Is there any way to predict random numbers?

Random - [statistic] equal chance of events happening (encarta dictionary)

 

dnuggett

Diamond Member
Sep 13, 2003
6,703
0
76
Well what are you using as a random # generator? If it is anything other then a naturally occuring phenomenon the answer is yes. This is becasue unless it is a natrural occurence there is a formula behind the generation and it is classified as psuedorandom. Figuring the equation will then be your difficulty, but it can be done.
 

LurchFrinky

Senior member
Nov 12, 2003
303
57
91
It really does depend on what you want the random number for.

In the purest sense, no. If you could predict the next number, then it wouldn't be random.

If you are trying to reverse engineer a program with a "random" number generator, then yes, it is possible. As dnugget pointed out, computers don't actually use random numbers, so all you have to do is figure out what method the computer uses to determine the next number and duplicate it.

LF
 

tinyabs

Member
Mar 8, 2003
158
0
0
It's natural phenomenon. Let say possible results are from 0 to 999 using numbers generated from a "spinning wheel". And I have gathered 1 million random numbers generated from it.

Is there any techniques to guess the possible set of numbers that will occur within next 1000 results based on the 1 million result set?

Since it's random and every number has the same chance at every number generation. So if I gather another 1 million number set, the result set would not have any pattern reproducible from the previous result set. Scientifically, I'm convince it's not possible.

But statistically, I'm not convinced. Since there are 1000 possibility, each number has a chance of occurring. I derive a window from each number meaning the each number has min and max distance.

1234 [sequence #1]
1234 [sequence #50] distance = 50 (1 to 50)
1234 [sequence #75] distance = 25 (50 to 75)

So the window is min 25 and max 50. I assume 1234 will occur again from #100 to #150. With each result, min and max are reevaluated. Taking Trend into consideration, if 1234 occurs frequently with min 10 and max 25, i will readjust to a shorter window like min 15, max 30.

Can anyone tell me if this form of prediction exists mathematically and/or statistically? Or do you have any other ways to do this?
 

Lynx516

Senior member
Apr 20, 2003
272
0
0
If it is totaly random i.e. radio noise then the distribution of a certain number will be totaly random. so that method wont work.
 

dnuggett

Diamond Member
Sep 13, 2003
6,703
0
76
Originally posted by: tinyabs
It's natural phenomenon. Let say possible results are from 0 to 999 using numbers generated from a "spinning wheel". And I have gathered 1 million random numbers generated from it.

Is there any techniques to guess the possible set of numbers that will occur within next 1000 results based on the 1 million result set?

Since it's random and every number has the same chance at every number generation. So if I gather another 1 million number set, the result set would not have any pattern reproducible from the previous result set. Scientifically, I'm convince it's not possible.

But statistically, I'm not convinced. Since there are 1000 possibility, each number has a chance of occurring. I derive a window from each number meaning the each number has min and max distance.

1234 [sequence #1]
1234 [sequence #50] distance = 50 (1 to 50)
1234 [sequence #75] distance = 25 (50 to 75)

So the window is min 25 and max 50. I assume 1234 will occur again from #100 to #150. With each result, min and max are reevaluated. Taking Trend into consideration, if 1234 occurs frequently with min 10 and max 25, i will readjust to a shorter window like min 15, max 30.

Can anyone tell me if this form of prediction exists mathematically and/or statistically? Or do you have any other ways to do this?



Nope, there are none. Not unless you can figure the coefficient of friction for the wheel and apply the exact amount of force each time you spin it. Then you have a chance. But then it isn't random either.
 

dnuggett

Diamond Member
Sep 13, 2003
6,703
0
76
Since it's random and every number has the same chance at every number generation. So if I gather another 1 million number set, the result set would not have any pattern reproducible from the previous result set. Scientifically, I'm convince it's not possible

Short answer: it is absolutely possible, but you have to understand what random means to know how.

Long answer: If you are going to prove there is indeed a pattern to the 1million point set of numbers you generate, you may very well be able to do so using Chaos as a backdrop. But here is your problem; that pattern has absolutely no predictive value on the next number or next 1 million numbers if you indeed have a truly random occurence(s).
 

eigen

Diamond Member
Nov 19, 2003
4,000
1
0
Lets hope there is no way,if so kiss encryption down the drain. If you are interested in try a google search on deconstructing RNG's unfortunately most of the good work on this is classified.
 

Jeff7

Lifer
Jan 4, 2001
41,596
19
81
If it was possible to predict "random" numbers, they wouldn't really be random then, would they? - when I think "random" I think "chaotic," and with no inherent pattern.
 

sao123

Lifer
May 27, 2002
12,650
203
106
As my physics instructor used to say...
**Probability was invented by people who just cannot handle the concepts and intense calculations of physics.**

Information Necessary...
Mass and spin of the earth/moon/sun system. Total Mass, and mass distribution of the wheel. Acceleration of the wheel. Type of surface involved, coeficient of friction of the surfaces involved. Air Friction. Temperature of the system.
Force applied to the wheel. ...ahh you get the picture.
 

Shalmanese

Platinum Member
Sep 29, 2000
2,157
0
0
your falling into the gamblers fallacy I think. The chance of getting a head when flipping a coin is still 1/2 even if the previous 1000 flips were all heads.
 

tinyabs

Member
Mar 8, 2003
158
0
0
Shalmanese: This is not about gambling. The spinning wheel is just a device because I can't find a good number generator.

I gathered 2 idea from this.

First, canonical or genuine randomness, the results would be totally chaos. That's truly random.

Secondly, we are based on a physical world and one thing would affect another. The "spinning wheel" number generator seems to be random as it has unimaginable number of factors and event that would affect the result. However, we would label it as random because we cannot handle the factors and events that affects the final results. But it's just the sheer amount of data that needs to be gather in order to be precise. For flipping a coin, there are 2 result, head or tail, the number of factors involved is still astronomical; but the results of the factors just fall into head and tail.

Come to think of it, vinyl records resemble this number generator. Although every pass at the same track would produce different results, but we listen to the same song. Here, the window is rougly the same and the analog values don't deviate much too. The pin and groove take care of those random factors and "normalize" to analog signal.

So the idea might be clustering the results into result Set. Each time a number is collected, it might leave a set and join another. Take this clustering into compression, MPEG algorithm actually group data into vectors and reproduce the audio/video. For LZ compression, it look at the passed result in a window and generates 12-bit references to the previous data. This might look abstract and unrelated but I hope we get the idea.

(I had some experience doing data compression and encryption.)
 

eigen

Diamond Member
Nov 19, 2003
4,000
1
0
Don't think chaotic function because chaotic function imply bounds but not periodicty.So if your "chaotic function had a small bound and could only assume integer values,then predicting would be easier."As far as predicting using physics forget about it .You would need to completely bypass marcostate descriptions, such as the coeficient of friction etc.and go straight to quantum and atomic scale description and even then uncertaity principles would bog you down ...

*** The hard part about generating/using random numbers is to not have the values "distorted/given a pattern" while inside the computer i.e buffer data structures.Gettin the random data is not that hard.


http://www.lavarnd.org/ lava lamp RNG
http://www.random.org/



Cool things to read : Claud SHANNON 'nuff said
 

tinyabs

Member
Mar 8, 2003
158
0
0
eigen: While I was doing compression 2 years ago, I learned about entropy (Shannon, Huffman, Arthmetic Coding). It's about assigning higher possibilities data with shorter reference bits like all compression does. A compressed file can't be compressed any further. The probability of every number is the close and the reference byte's bit length is very close in compressed data. But a data file filled with random numbers from a dice can still be compressed.

Anyway, I conclude randomness an identity for uncertainty of when and what (space and time).

FYI, I was given a simple challenge. "How do you define randomness."
 

f95toli

Golden Member
Nov 21, 2002
1,547
0
0
Chaos theory combined with quantum mechanics can give some interesting results.
One idea has been that "the butterfly effect" can "amplify" the Uncertainty Principle to the macroscopic world.
I know that at least some work has been done on this, a few years ago I read a paper written by one of Gell-Manns students that was working on this problem (as far as I remember he could show that this indeed would be the case for a harmonic oscillator).

If this is the case, then even macrocopic everyday events could in principle be truly random, there would be no way of predicting the outcome.

 

AbsolutDealage

Platinum Member
Dec 20, 2002
2,675
0
0
Originally posted by: tinyabs
FYI, I was given a simple challenge. "How do you define randomness."

It depends on where this is being asked. If it is in a first year CS class, then the answer may be a bit simpler.... however I know professors that have spent years on the study of the definition of "random". What is the context?
 

KalTorak

Member
Jun 5, 2001
55
0
0
tinyabs - your example simply doesn't clarify anything.
In the first half, you're assuming that your spinning wheel has an equal probability distribution for each of the 1000 values which is unrelated to any previously generated value.
In the second half, you're talking about physical properties of the wheel, and discussing relationships between values generated on consecutive trials, which directly contradict the randomness assumption you're making.

If you are trying to reverse engineer a program with a "random" number generator, then yes, it is possible. As dnugget pointed out, computers don't actually use random numbers, so all you have to do is figure out what method the computer uses to determine the next number and duplicate it.
Intel's been building hardware RNGs into all its 8xx-series chipsets. Check out the documentation on the Firmware Hub.

Don't think chaotic function because chaotic function imply bounds but not periodicty.
Periodicity? Last symposium I attended defined a chaotic function as one where a differential change in the input led to a finite (i.e. bigger than differential) change in the output (which certainly means it's nowhere differentiable, but I don't know if that's a strong enough statement...)
That's quite a bit different than 'random'. Random's a behavior where the probability of a result on a given interval is proportional to the size of the interval and nothing else. I think it provably follows that a sequence of "random" results is incompressible data, but that contradicts tinyabs's statement that "...a data file filled with random numbers from a dice can still be compressed. " (I don't think that should be so, for a sufficiently large data file)
 

Matthias99

Diamond Member
Oct 7, 2003
8,808
0
0
That's quite a bit different than 'random'. Random's a behavior where the probability of a result on a given interval is proportional to the size of the interval and nothing else. I think it provably follows that a sequence of "random" results is incompressible data, but that contradicts tinyabs's statement that "...a data file filled with random numbers from a dice can still be compressed. " (I don't think that should be so, for a sufficiently large data file)

You can *try* to compress a totally random binary file, but the results are, well, random. :p You may be able to compress it a lot (or a little), it may not compress at all, and it may actually have a negative compression ratio (ie, the output of the compressor is larger than the original file)! You just can't tell. Assuming the file is truly random, as the size of the file tends towards infinity, the maximum compression available tends towards 0 (no compression possible).
 

KalTorak

Member
Jun 5, 2001
55
0
0
Assuming the file is truly random, as the size of the file tends towards infinity, the maximum compression available tends towards 0 (no compression possible).
(woohoo! I was right!)
 

eigen

Diamond Member
Nov 19, 2003
4,000
1
0
This is actually a test used to test whether files are encrypted or not.As an encrytped file should for all statistical test be "random".So if you can compress your encrypted files time to switch algorithms. As far as CA many forms are reversible so please clarify.I get the feeling people are confusing ideas about information and computational complexity with randomness.
 

bendixG15

Diamond Member
Mar 9, 2001
3,483
0
0
The old one room school house used to teach that
the definition of a random number was that it was not predictable.

Computer generated "random" numbers are regarded as not being
true random because they follow a set sequence of events to
generate the number.

bed time.....