in reply to How likely is rand() to repeat?
But that's all irrelevant. Your random number generator is likely to only have 24, 32, 48 or 64 bits of entropy. Which means that most of the possible strings will never be generated. Even with 64 bits of entropy, there are only 18446744073709551616 strings possible. Which makes is far more likely for collisions to happen. In fact, Wikipedia tells us that with a 64 bit hash, there's a one procent chance you have a collision if you have 6.1E8 strings.
For more details, see MathWorld.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How likely is rand() to repeat?
by BrowserUk (Patriarch) on Mar 08, 2012 at 23:55 UTC | |
by tye (Sage) on Mar 09, 2012 at 00:08 UTC | |
by BrowserUk (Patriarch) on Mar 09, 2012 at 02:03 UTC | |
by JavaFan (Canon) on Mar 09, 2012 at 01:05 UTC | |
by BrowserUk (Patriarch) on Mar 09, 2012 at 02:39 UTC | |
by JavaFan (Canon) on Mar 09, 2012 at 03:21 UTC | |
by BrowserUk (Patriarch) on Mar 09, 2012 at 05:48 UTC | |
|