in reply to Re^14: How likely is rand() to repeat?
in thread How likely is rand() to repeat?
How long will it need to run before you are convinced that the OP is safe to use this?Did I ever claim otherwise?
All I've been claiming is that if you're seeding a deterministic random number generator with k bits, you will not be getting more than 2k sequences, and that I've seen no evidence whatsoever that you can pull more out of thin air.
After generating 254 sets of 1 million 25-char keys, with each key being generated at a new seed position, NO DUPS SEEN!254 sets of 1 million keys? Call me confused, but:
Aren't you generating a million sets of a million keys each? But with only 2 million different keys, as $run + $id ranges from 2 .. 2e6.for my $run ( 1 .. 1e6 ) { ... for my $id ( 1 .. 1e6 ) { srand ( $run + $id ); ... } }
But never mind that. I've never questioned that picking a different seed is very likely to give you a different key. My claim is, that if you have only 232 different seeds you will not get more than 232 keys this way. You exercise showed that if you pick a million different seeds, you get a million different keys. And you repeated that experiment a million times, each time removing a single seed from the set of a million, and adding another one.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^16: How likely is rand() to repeat?
by BrowserUk (Patriarch) on Mar 09, 2012 at 23:38 UTC | |
by JavaFan (Canon) on Mar 09, 2012 at 23:47 UTC | |
by BrowserUk (Patriarch) on Mar 10, 2012 at 00:50 UTC |