Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: kevao
Have it generate one billion random letters

Here's an excellent test for probability: have your computer generate a trillion characters and see how many best-sellers we can cull from it.

47 posted on 09/01/2012 9:07:40 PM PDT by stormhill
[ Post Reply | Private Reply | To 45 | View Replies ]


To: stormhill

Well, my first pass seems to have generated a novel about The Fonz .... it spit out “AYYYYYYYYYYYYYYYYY” .... I must have a bug :p.

In all seriousness, it is impossible to create a true random number generator on a computer. One can create psuedorandom generators, but there will always be an underlying pattern to the numbers generated. Some generators I’ve used have also sampled the outside world via temperature and optical sensors .... still, its not “truly” random. LFSRs are among the worst generators, but are commonly used in applications where randomness isnt exactly critical as they are simple and cheap in either software or hardware designs :).


56 posted on 09/01/2012 9:37:46 PM PDT by edh (I need a better tagline)
[ Post Reply | Private Reply | To 47 | View Replies ]

To: stormhill
Here's an excellent test for probability: have your computer generate a trillion characters and see how many best-sellers we can cull from it.

Someone will do it someday, when we have the processing power. But one trillion characters wouldn't even come close to being a sufficient sample. For example, the probability of randomly generating *just* the 26 letters of the alphabet, in order, would be:

26 x 25 x 24 x 23 x 22 etc., which would be:

1 / 4 times 10 to the 26th power.

57 posted on 09/01/2012 9:40:30 PM PDT by kevao (Is your ocean any lower than it was four years ago?)
[ Post Reply | Private Reply | To 47 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson