Randomization measure in rand
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Sandeep Ganji
il 18 Ott 2013
Commentato: Sandeep Ganji
il 18 Ott 2013
What is the randomization power in rand function.? For example UNIX drand48 can generate a randomization of 2^48 (~10^14).
0 Commenti
Risposta accettata
Walter Roberson
il 18 Ott 2013
2^53 different possibilities.
You should also be caring about how long the period is (that is, the time until the sequence repeats.) It is on the order of 2^11000 for the default randomization routine.
4 Commenti
Walter Roberson
il 18 Ott 2013
Modificato: Walter Roberson
il 18 Ott 2013
If your thought is to periodically have your program use rng('shuffle') in order to "improve the randomness", then interestingly it can be shown that this will reduce the randomness, because the times used as input to the shuffling will end up being correlated.
If you need "cryptographic strength" randomness, then you need to use special routines for that purpose that are "hardened" to reduce leakage of information about the internal state of the generator.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Random Number Generation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!