Talk:Pseudorandom number generator

message: Criterion K1 doesn't state that consecutive number repeats should have low probability, i.e. probability any lower than any other number, rather, if one generates random vectors of numbers, these should be different from one another with high probability.  Here's the original text: "There should be a high probability that random vectors (r1,…,rc),(rc+1,…,r2c),…,(rMc+1,…,rM) formed from random numbers r1,r2,… are mutually different."   I've tried to correct the K1 summarization to be truer to the source text, yet maintaining the simplicity of the writing. Todd (talk) 16:53, 6 January 2017 (UTC)
thread_title: Corrected K1 criterion

message: About Matsumoto's and Nishimura's Mersenne Twister I can say that it really works almost as Nature's randomness - believe it or not. This algorithm is already fully implemented on VOG a Russian server for board games. I've played there quite vast period of time on Backgammon arena and on Reversi one. The C function int rand (int) is not as good as PRNG based on Mersenne twister - that is for sure. Try it and feel it. Nice you've started a PRNG at last. We really needed this one. I was already thinking to do your job. Can you put some Knuth's work on this field too. About the simpliest PRNG and such. 
XJam [2002.03.23] 6 Saturday (0)
:It's not clear one's feelings about using a PRNG are a reliable quality metric. In any case there is some serious dispute about whether the Mersenne twister is as good a PRNG as is sometimes thought. 
ww (talk) 03:35, 5 August 2009 (UTC)
replies: text: Mersenne Twister is merely the newest member of a family of generators with very well understood properties, meaning both good and bad. Among the bad is the very long correlation length, or as the authors euphemistically call it "recovery" time. If you initialize the vector with mostly zeros, you will continue to get mostly zeros for the next ten thousand iterations. This is because, there is only one new bit  out of 19937 on every iteration. The other 19936 are just shifted and reused. 
Kotika98 (talk) 13:33, 26 December 2012 (UTC)
thread_title: about Mersenne twister; good article is started

message: > It has a colossal period of 219937-1 iterations, is proven to be equidistributed in 623 dimensions.  Ostrich can you please explain a liitle bit more what herein dimensions means exactly? Otherwise everything else is explained as clear as can be. XJam [2002.03.23] 6 Saturday (1st ed)
Statistical patterns in a sequence may appear in many ways. The dimensions noted are ways of examining the sequence for patterns. See Knuth Semi-numerical algorithms for more detail. Please note that this article needs serious revision, particularly with regard to CSPRNGs. It is not easy to build these and statements that 'one could' have one if one does this or that are dangerous. Someone might rely on them and get into considerable (insecure) trouble as a result. Indeed, many PRNGs are built with block cypher encryption algorithms operating in CTR mode. However, the description of CTR mode here is inadequate. Note that CSPRNGs not only must satisfy certain statistical properties, but also must not be predictable which is another kettle of bits altogether.
The spectral test article and the RANDU article have an example of what "dimensions" means in this context.
--DavidCary (talk) 02:11, 31 December 2014 (UTC)
thread_title: dimensions?

message: In the citation to the von Neumann paper, several authors are given, but there is no title. Perhaps an editing glitch ate it? Can anyone suggest what it was before this supposed whale of an editor swallowed up our Jonah of a title? ww 08:52, 26 March 2006 (UTC)
thread_title: author, author -- but no title...

message: This page hasn't been written by the world's most gifted writer. E.g.:
"Because any PRNG run on a deterministic computer (contrast quantum computer) is necessarily a deterministic algorithm"
"The outputs of pseudorandom number generators only approximate some of the properties of random numbers"
"Careful mathematical analysis is required to have any confidence the algorithm generates numbers that are sufficiently "random" to suit the intended use"
The whole article reads like a mathematical text book, not an article from an encyclopedia.
:anon poster, It's a tricky topic and more than many, preciosn of language -- at the expense of kludgey phrasing -- is hard to avoid. Please, suggest improvements which do not do damage to the meaning (including this precision, at least where we've amanaged it). It is not easy to do. And if it is for you, have I got some articles for you to look at... ww 06:40, 19 July 2006 (UTC)
replies: text: Absolutely correct: encyclopedias are meant to be informative, not a reference book for mathematical computer science geniuses. It should be informative to the uninformed and it should do so without phrases like: "computer (contrast quantum computer) is necessarily a deterministic algorithm"" which is absolutely meaningless for someone like me. The trick is to be informative without being sloppy in your language. THe problem is, is that I am too ignorant on the topic to make the required changes, which is why SOMEONE who knows better should take that initiative.--ToyotaPanasonic 02:40, 21 February 2007 (UTC)
replies: text: I made  pass at cleaning the article up. It is still not as clear as it could be, but I hope it is less convoluted. I also took out the 1/q generator which does not seem terribly practical and I am not aware of it's being widely used. --agr 04:16, 21 February 2007 (UTC)
thread_title: poor writing

message: I have recently experimented with the Mersenne Twister, in particular by analyzing its output with the Berlkamp-Massey algorithm.  My recent changes to this page are motivated by what I discovered.  For details, search the sci.crypt.random-numbers newsgroup for Mersenne Twister Linearity.  I am still very interested in any actual numerical analysis of the output of this (and other!) generator's output.
Dude, sign your postings, and also read WP policy regarding original research, OR is not allowed in any article on WP. Kotika98 (talk) 13:41, 26 December 2012 (UTC)
thread_title:  More about the Mersenne Twister 

message: :The RAND function included in current Microsoft operating systems has only 15 bits of state and thus repeats after generating 32768 bytes.
That's a little hard to believe... do we have a source for that? --Tgr 15:35, 26 October 2006 (UTC)
replies: text: Actually the Microsoft C/C++ random number generator is not all that good. It's not hard to come up with a test of randomness that this generator will fail. Correlations between a one number and the fourth one after can be detected. If you're doing something where the results of your program depend on having a high quality PRNG, don't use the one in the C standard library. --71.38.172.8 (talk) 23:49, 29 January 2010 (UTC)
thread_title:  Microsoft RAND function 

message: :R P Brent's algorithm can be used to determine the period length of deterministic PRNGs; (...)
This intriguing statement is a little isolated within the article. Could someone elaborate or provide a source or link?
GdB 15:29, 3 January 2007 (UTC)
thread_title:  R P Brent's algorithm? 

message: A lot of practical uses of random numbers involves non-uniform distributions; which are often produced via a non-linear function upon a uniform random number generator: e.g. tan(x) for Gaussian pseudo-random. I've started a section.
:Good luck with this subject, where can we see your efforts? This page says: A simple approximation is to use the tan(x) as the inverse cumulative gaussian and a uniform distribution from -pi to pi non-inclusive. but I don't see how that works. Ziggurat algorithm is workable and fast. Please sign your posts. Cuddlyable3 08:15, 20 July 2007 (UTC)
thread_title:  Non-uniform generators 

message: How can you have an article about RNG's without discussing Knuth's work on statistical testing and Marsaglia's extensive work on inventing and testing random number generators.  It is naive to focus so much attention on the Twister algorithm, which in fact is far too slow and complicated for many numerical applications.  There should be some discussion of the extremely efficient multiply-with-carry generators, which pass statistical testing and only emply a few machine instructions.  The article needs work.  DonPMitchell 04:53, 31 October 2007 (UTC)
thread_title:  Knuth and Marsaglia 

message: Under the BSI evaluation criteria the article mentions "inner state". This should probably be defined somewhere.  —Preceding unsigned comment added by ColinGillespie (talk • contribs) 17:49, 31 January 2009 (UTC)
replies: text: Could we move the entire pseudo-random number generator#BSI evaluation criteria section to the cryptographically secure pseudorandom number generator article? Is there anything in that section relevant to non-crypto PRNG? --DavidCary (talk) 16:13, 10 April 2012 (UTC)
replies: text: Did I comment on that somewhere else already? I don't recall. Anyway, evaluation criteria K1 and K2 are not of interest to the latter article, but all of the criteria are relevant to this article. So it should definitely stay here, though the BSI evaluation criteria could possibly be shortly mentioned in the other article. Nageh (talk) 11:49, 4 May 2012 (UTC)
thread_title:  Inner State 

message: Tis para was removed from the end of the article because 1) it is out of place in the language interwiki list 2) extensive text in other languages is out of place on enWP 2a) not clear it isn't vandalism of an obscure type. Anyone who clarify any of this should lend a hand. 
:Vietnamese: “Một  máy phát tín hiệu giả - ngẫu nhiên là một thuật toán dùng để tạo ra chuỗi  số có tính chất gần giống với số ngẫu nhiên, chuỗi số đó thực sự không phải ngẫu nhiên khi nó hoàn toàn được xác định bởi một tập hợp các giá tị nhỏ tương đối ban đầu, gọi là trạng thái PRNG.”
ww (talk) 18:22, 4 August 2009 (UTC)
thread_title: block removed from article

message: This article really confuses the definitions. In general, I'd say it should discuss pseudo-random generators (PRGs). Pseudo-random bit generators (PRBGs) and pseudo-random number generators (PRNGs) should be introduced as sub-classes of PRGs. Don't say a PRNG is a deterministic RBG (or PRBG). Anyway, I would love to see the distinction addressed in a proper reference. Anyone has a good ref?
Next, it may be desirable to point out that in computational complexity theory the definition of PRG equals that of a CSPRG.
Nageh (talk) 21:50, 20 May 2010 (UTC)
replies: text: I think of bit generators as a sub-class of number generators, rather than a separate class -- although I agree that a good reference either way would be an improvement. --DavidCary (talk) 16:13, 10 April 2012 (UTC)
thread_title:  (CS)PRG, (CS)PRNG, (CS)PRBG, etc. 

message: I enjoy the witty quote about the generation of random numbers being too important to be left to chance and think it is one that a very broad spectrum of readers would appreciate.  But the von Neumann quote about being in a state of sin will puzzle many (most?) and adds little to the article.  It is excruciatingly specific to Catholicism (von Neumann received the last rites and may or may not have converted to Roman Catholicism on his marriage) and many readers simply won't know what he means by state of sin, at least not in relation to mathematics, which is usually thought of as utterly divorced from Christian theology.  In any event, it certainly doesn't tell the reader anything about PRNGs.  Donald Knuth's "Random numbers should not be generated with a method chosen at random." is at least as good and at least informative to the reader.  (Donald Knuth, The Art of Computer Programming, Vol. II, 1969, section 3.1).  But really, it's best to just drop it and leave the one good quote from Coveyou.  Ross Fraser (talk) 12:22, 14 November 2011 (UTC)
replies: text: You enjoy the quote, you find it witty, but you want to delete it because you fear others might be unable to understand it? Perhaps you underestimate the intercultural competence of others. Whoever is reading this encyclopedia (ever thought about the catholic connotations of that word?) has at least some basic knowledege of English, a language that is impregnated by millenia of Christian history anyway. As an atheist, brought up as a protestant, I have not the least difficulty in understanding what von Neumann meant. -- Nsda (talk) 17:00, 14 November 2011 (UTC)
replies: text: There are TWO quotes. I enjoy the witty quote by Robert R. Coveyou and of course I don't want to delete it.  I see no value in the smug insider remark by von Neumann, as it says nothing about PRNGs.  Ross Fraser (talk) 12:20, 30 November 2011 (UTC)

text: I am puzzled as well, in two ways. I do not consider myself religious and I'm not a native English speaker, yet it is perfectly obvious to me what "in a state of sin" would mean. In fact, if someone would directly translate it into my language it would be perfectly clear as well. The second statement that puzzles me is that you want Neumann's quote deleted but Coveyou's, for which there is no context given (though I suspect he was referring to the importance of PRGs in practice), kept. I could be convinced that the quotes are not suitable for the lead section, and should probably go somewhere towards the end of the article, but deleting any of them? No. Nageh (talk) 20:18, 14 November 2011 (UTC)
replies: text:  The Coveyou quote doesn't need context: it is a direct comment on random number generation. Ross Fraser (talk) 12:20, 30 November 2011 (UTC)
replies: text: No, it does need context. Did Coveyou state his quote as a consequence of the problem of designing good PRNGs, or as a general statement that reproducible seemingly random numbers are important in practice? Or is it because the output of real random generators can only be probabilistically described whereas PRNGs may be required to have specific output guarantees, such as no more than x consecutive zeros, as  seems to imply? Nageh (talk) 15:04, 30 November 2011 (UTC)
thread_title:  State of Sin? 

message: I don't think the flaw described in strfry(3) has anything to do with its PRNG (it does also suffer from the standard "remainder problem", but that's another usage error).  Unless I'm mistaken, the sentence/reference should just be removed.  --Tardis (talk) 13:14, 9 April 2012 (UTC)
replies: text: You are right. I have removed it. Nageh (talk) 13:39, 9 April 2012 (UTC)
thread_title:  strfry(3) example 

message: Maybe it's just me, but it seems there are so many symbols to explain so little. Angry bee (talk) 21:03, 14 June 2013 (UTC)
thread_title:  A mathematical definition 

message: 78.229.106.132 (talk) 20:01, 11 March 2014 (UTC)
thread_title:  Mersenne twister can't be equidistributed 

message: The article currently has this:
The PRNG-generated sequence is not truly random, because it is completely determined by a relatively small set of initial values, called the PRNG's seed (which may include truly random values).
Is that correct? For example, a 63-bit LFSR has 263-1 possible seeds. Since that LFSR produces a sequence of 263-1 numbers, the set of initial values is not relatively small. As I understand it, it is not truly random because the sequence is generated algorithmically and is therefore predictable to anyone knowing the algorithm. See http://en.wiktionary.org/wiki/pseudorandom
--158.158.240.230 (talk) 16:26, 23 April 2015 (UTC)
thread_title:  Definition of pseudo-random 

message: Hello fellow Wikipedians,
I have just modified  on Pseudorandom number generator. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
*Added archive http://web.archive.org/web/20130527090643/http://csrc.nist.gov/publications/fips/fips1401.htm to http://csrc.nist.gov/publications/fips/fips1401.htm
When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at ).
Cheers.—cyberbot IITalk to my owner:Online 21:13, 26 May 2016 (UTC)
thread_title:  External links modified 

message: The statement "The first PRNG to avoid major problems and still run fairly quickly was the Mersenne Twister (discussed below), which was published in 1998. Other high-quality PRNGs have since been developed." is untrue and should be corrected.
High-quality PRNGs existed prior to 1998, including the ACORN family of generators developed in 1984 and published in 1989 (and sans doute others), and although ignored or possbly misunderstood by the 'mainstream', they are still valid, passing all current test suites as of August 2019, while MT fails on or two in TestU01.
I propose to replace this incorrect statement but other opinions would probably be a very good thing. 
Options include 
* -1- delete the incriminated statement completely 
* -2.1- replace it with a mention of ACORN and/or -2.2- other(s) as appropriate
* -3- a more nuanced discussion of computational performance, statistical quality
* -4- as option-3- above, extended to a discussion of the history and arguments around PRNG quality and performance
Dear fellow-wikipedians, what are your reactions to my suggestions?  jw (talk) 16:10, 12 August 2019 (UTC)
thread_title:  Potential problems with deterministic generators : untrue statement to be revised  

message: I propose to delete two separate bits of irrelevant material from this page: 
1. the 'implementation' paragraph introduced here 6 month ago, giving unreferenced source-code as an example, together with a statement which may or may not be true. 
2. an 'external link' to wsphynx which was introduced here two years ago (and on a few other pages from which it was removed without ceremony) - this link brings no added value to the article.
Please react before I make the changes.    jw (talk) 07:33, 11 February 2023 (UTC)
thread_title:  Irrelevant material on this page