During some experiments in Java, my project supervisor reminded me to remind each seed of each recurrence of experiment with a different number.
He also mentioned that I should use prime numbers for seed values. It was me thinking - why primes? Why no other number as seed? Besides, why would the Prime Minister's Number be sufficiently large? any idea? I must have asked myself, but okay, everyone is sleeping, I just remember this question and I'm burning in the answer (I'm sure you are feeling). > It would be nice if you can provide some context, I am very interested in the math / concept behind this!
Edit: I 'Java.util.Random.' I am using. Better Editing: My professor comes from background, but I am using Java, I do not know if he helps it appear That's the prime use of their nature, but I think we have exposed some interesting answers about generating random numbers. Thanks for everyone for the effort! A nap in the implementation will show you that he can not do that for any claim What is the reason? Because the set bead function looks like: And it's okay to tell the producer whatsoever, even if you give it a prime, it will not use it anyhow, so if you use any seed (S ^ multiplier) & amp; Mask results in a prime;) Java uses a normal linear congruency method, i.e.: x_n + 1 = (one * x_n + c) 2 with mod m & Lt; = A & lt; Meter; 0 & lt; = C & lt; M. Since you want to get the maximum paragraph, C and M should be relatively primitive and some have quite a vague limitations, as well as some tips on how to get a practically useful version. Nith clearly states in detail in Part 2;) But in any case, the seed generator does not affect the properties at all. Even if the implementation will use a Lehman generator, it will surely ensure that N is primarily (otherwise the algorithm is practically useless, and is not distributed equally, if all random values Non-Prime Minister Ni be made at stake) Who makes point controversial
synchronized public zeros set (long seed) {seed = (seed ^ multiplier) & amp; Mask; This.seed.set (seed); Post-hajj next gas = wrong; }
Comments
Post a Comment