4 ms·
That's really interesting, in that case I've understood it wrong all this time! So you are saying pseudo-random really is honest-to-god random, following all th
by sliverstorm 13y ago
That's really interesting, in that case I've understood it wrong all this time! So you are saying pseudo-random really is honest-to-god random, following all the accepted rules for random distributions and such, with the critical difference simply being that the output of the pseudo-random function can be predicted if you understand the generating process?
- davidst 13y agoThat's a good way to think about it. A quality PRNG tells an undetectable lie.
- mox1 13y agoAs I understand it, yes your basically correct. Imagine a function like this: def init_prng(int x): state = x def prng(): state = md5(state) return state So while this is a good, simple PRNG its very recoverable if you know the initial x (or if the space of possible x values is small, ie a 32-bit number). One of the goals of a PRNG function is to extend the usefulness of truly random data, because fully random data is hard to come by.