Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Random Number Generation >

SeedRandom

Updated In 6 Graphic
SeedRandom[n]
resets the pseudorandom generator, using n as a seed.
SeedRandom[]
resets the generator, using as a seed the time of day and certain attributes of the current Mathematica session.
  • You can use SeedRandom[n] to make sure you get the same sequence of pseudorandom numbers on different occasions.
  • SeedRandom[Method->"method"] specifies what method should be used for the pseudorandom generator.
  • SeedRandom[n, Method->"method"] resets the generator, specifying both a seed and the method to use.
  • Typical possible methods include:
"Congruential"linear congruential generator (low-quality randomness)
"ExtendedCA"extended cellular automaton generator (default)
"Legacy"default generators from before Mathematica 6.0
"MersenneTwister"Mersenne twister shift register generator
"MKL"Intel MKL generator (Intel-based systems)
"Rule30CA"Wolfram Rule 30 generator
  • Different methods may give sequences with different levels of randomness.
New in 1 | Last modified in 6
© 2013 Wolfram Research, Inc. Japanese
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team