
October 1st, 2003, 11:10 PM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
|
|
|
The problem you have is confusing math notation with array notation. n+1 refers to the (n+1)th generation of a
"random" number. Basically, what the equation translates to is:
"Use the previously generated number in an equation, to generate the next number". That's what n and n+1 refer to in the equation.
That's why the numbers are called pseudo-random.... if you know the original number, you can replicate the entire "random" number sequence. To prevent repeating a sequence, the trick is to choose a value for the initial seed (i.e a value for X(0)) that is sufficiently random and then use it to generate the subsequent numbers (X(1), X(2), X(3)... ) and so on. This is why many programs use the current time as the initial seed -- this isn't always the best seed to use for cryptographic purposes, but many programs use this.
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
|