home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / sci / math / stat / 2757 < prev    next >
Encoding:
Text File  |  1993-01-12  |  2.7 KB  |  69 lines

  1. Newsgroups: sci.math.stat
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!charlie
  3. From: charlie@umnstat.stat.umn.edu (Charles Geyer)
  4. Subject: Re: Nonrandom Random Numbers?
  5. Message-ID: <C0rHDD.Exr@news2.cis.umn.edu>
  6. Sender: news@news2.cis.umn.edu (Usenet News Administration)
  7. Nntp-Posting-Host: isles.stat.umn.edu
  8. Organization: School of Statistics, University of Minnesota
  9. References: <1993Jan12.132319.6437@cbis.ece.drexel.edu> <1993Jan12.140114.620@hnrc.tufts.edu> <dmurdoch.393.726873235@mast.queensu.ca>
  10. Date: Tue, 12 Jan 1993 22:05:34 GMT
  11. Lines: 56
  12.  
  13. In article <dmurdoch.393.726873235@mast.queensu.ca> dmurdoch@mast.queensu.ca (Duncan Murdoch) writes:
  14. >In article <1993Jan12.140114.620@hnrc.tufts.edu> jerry@hnrc.tufts.edu (Jerry Dallal) writes:
  15. >>For those who do not have the Times, the article says, " . . . the scientists
  16. >>showed that five of the most popular computer programs for generating streams
  17. >>of random numbers produced errors when they were used in a simple mathematical
  18. >>model of the behavior of atoms in a magnetic crystal."  
  19. >
  20. >>Unfortunately (and understandably) the article does not identify the 5 
  21. >>algorithms.  However, the article cites the original report from Ferrenberg et
  22. >>al. in the Dec. 7 issue of Physical Review Letters.  I would be grateful if
  23. >>someone with access to PRL would post the five generators.
  24. >
  25. >The paper is Ferrenberg, A. M., Landau, D.P., and Wong, Y.J. (1992), Monte 
  26. >Carlo simulations:  hidden errors from "good" random number generators,
  27. >Physical Review Letters 69 no. 23, 3382-3384.
  28. >
  29. >The generators tested were:
  30. >
  31. >CONG:  A linear congruential generator
  32. >         X_n = (16807 X_{n-1}) mod (2^{31} - 1)
  33. >
  34. >R250:  A shift register algorithm:
  35. >         X_n = X_{n-103} XOR X_{n-250}
  36. >
  37. >R1279: Another shift register algorithm:
  38. >         X_n = X_{n-1063} XOR X_{n-1279}
  39. >
  40. >In R250 and R1279, "XOR" is a bitwise exclusive OR; it doesn't say how 
  41. >many bits were used, but I'd assume 32 from the context.
  42. >
  43. >SWC:   A subtract with carry generator (Marsaglia et al, Comput Phys Commun
  44. >60, p 345, 1990):
  45. >
  46. >         X_n = X_{n-22} - X_{n-43} - C
  47. >         if X_n >= 0, C=0,
  48. >         if X_n < 0, X_n = X_n + (2^32-5), C=1
  49. >
  50. >SWCW:   A combined subtract with carry Weyl generator (ibid):
  51. >
  52. >         Z_n = X_{n-22} - Z_{n-43} - C
  53. >     if Z_n >= 0, C=0
  54. >         if Z_n < 0, Z_n = Z_n+(2^32-5), C=1
  55. >     Y_n = (Y_{n-1} - 362436069) mod 2^32
  56. >     X_n = (Z_n - Y_n) mod 2^32
  57.  
  58. Trouble is, none of these are "good" generators.  For safety, one should
  59. XOR two "independent" generators as Marsaglia et al. do with the "super-duper"
  60. and "ultra" generators.
  61.  
  62. Have any problems ever been reported with either of these?
  63.  
  64. -- 
  65. Charles Geyer
  66. School of Statistics
  67. University of Minnesota
  68. charlie@umnstat.stat.umn.edu
  69.