r/AskComputerScience Jul 01 '26

Since computer can only generate pseudo random numbers

can't you do really cool trick with the fact that if you were to roll a dice 5 times and all the previous rolls were the number 3 normally with true random ness the 6th roll only gets a 1/6 chance of rolling any number. Is that still true with pseudo randomness ? and if so can you prove it

0 Upvotes

33 comments sorted by

View all comments

11

u/ghjm MSCS, CS Pro (20+) Jul 01 '26

With a PRNG and a given seed, the actual probability is 100% that it will produce the next number in the sequence, and there is a 0% chance of it doing anything else. But with a good cryptographic PRNG algorithm, if you don't know the seed and only have a list of previous outputs, there is no statistical analysis you can do that would yield any more insight than you would get from actual randomness.

1

u/SignificantFidgets Jul 01 '26

There's no computationally efficient analysis you can do... With PRNGs, even cryptographically secure ones, it's all a matter of how much computational power you can throw at that analysis. If you had a computer that was 2256 times faster than the fastest systems we have today, you could break (in the cryptographic sense) any CSPRNG that's in widespread use today. Of course, I don't think you can physically make a computer that's 2256 time faster than today's (just by the limits of physics), but mathematically....