Open Side Menu Go to the Top
Register
randomness distribution comparison randomness distribution comparison

08-21-2015 , 11:11 PM
Is there a proof that the randomness distribution of a PRNG has same shape than that of a manual shuffling? A PRNG is algorithmically designed to be a balanced bell curve. Is it the same case to a manually shuffled cards? Do manually shuffled cards form a balanced bell curve?
randomness distribution comparison Quote
08-22-2015 , 10:52 AM
PRNG is a pseudorandom generator. A PRNG takes an initial (secret) key and spits out a much longer sequence of digits. It appears to be random for anyone who doesn't know the secret key (or doesn't have some alien super powerful computer) but it is completely predictable when you do know the secret key. So it's ideal for cryptography but not for shuffling cards.

By "balanced bell curve" I guess you refer to a normal distribution but it's more helpful to think in terms of a straight line of a uniform distribution where all cards are equally likely to be drawn. Manually shuffled cards *should* follow this uniform distribution otherwise one or more cards would be less or more likely to be drawn which would mean that the shuffling was not random.

In short a random shuffling should always follow a uniform distribution. On the other hand a uniform distribution of hands would not necessarily mean that it was random.
randomness distribution comparison Quote
08-22-2015 , 11:55 AM
Quote:
Originally Posted by kapw7
PRNG is a pseudorandom generator. A PRNG takes an initial (secret) key and spits out a much longer sequence of digits. It appears to be random for anyone who doesn't know the secret key (or doesn't have some alien super powerful computer) but it is completely predictable when you do know the secret key. So it's ideal for cryptography but not for shuffling cards.
Pseudo random is not really any good for crypto purposes also. Prng can produce lots of numbers fast and this is where they win, eg, when doing a Monte-Carlo calculation, you don't need to worry about how predictable but rather just the quality of the distribution.

Quite often when tested prng's will appear better than some rng's as these are hard to make. Several approaches are used to get them good enough, and typically these days they are very, very good. Tests like Diehard tests can be used to test how well a rng is working.

Shuffling a real deck of cards is never likely to be as good as either of the above approaches although again a good shuffle will usually be good enough.
https://www.math.hmc.edu/funfacts/ff...0002.4-6.shtml
randomness distribution comparison Quote
08-22-2015 , 12:46 PM
Quote:
Originally Posted by BaseMetal2
Pseudo random is not really any good for crypto purposes also.
Is there something I am missing or maybe you refer to non secure PRGs? I'm not an expert but most of modern cryptography is based on PRNGs. A secure algorithm like AES should generally be indistinguishable from a true random generator unless you know the private key.
randomness distribution comparison Quote
08-22-2015 , 03:08 PM
Quote:
Originally Posted by kapw7
Is there something I am missing or maybe you refer to non secure PRGs? I'm not an expert but most of modern cryptography is based on PRNGs. A secure algorithm like AES should generally be indistinguishable from a true random generator unless you know the private key.
I am also not an expert but I have implemented some s/w to real-time test a random generator for a very strong crypto device and I was told when working on this (by people that should know) that strong devices would stay clear of PRNG's or at least use lots of true entropy along with them.

I think some will be very good in some circumstances - for an algorithm like AES that could use prng or true rng it may depend on how the application is designed. I think if an attacker can easily get lots of consecutive data fast it gets easier to find the state or seed used.

Real rng's also have their problems though. I was told by the hardware guys that sometimes you get 'drift' or worse and if being extra careful you have to catch this, hence the need to test the rng output.

Nothing much is ever easy and even Donald Knuth has been surprised with problems in this field! See the "A Better Random Number Generator" part on this page
http://www-cs-faculty.stanford.edu/~uno/news02.html
randomness distribution comparison Quote

      
m