glitch week3, generate random numbers

I thought about this for a long time and never got a satisfying answer.  My idea was that there must be some randomness in written language, and so I came up with different ways to convert the letters of a text into numbers in order to generate random numbers.  There were obvious problems with letter frequency and patterns in writing.  The last idea I actually tried was to compare each pair of letters in a text, and write a 0 is the second letter came earlier or equal to the first in the alphabet, and a 1 if it came later.  Every eight numbers was converted to an int byte, to get a range between 0 and 255.  I did this for about twenty numbers (I ended up writing a short python script to do it later, because doing it by hand was too slow and I was willing to use code at this point in my frustrations) before realizing an obvious limitation being that the alphabet is pretty short and that the number usually toggle back and forth, so combinations like 0101 or 0110 were always going to be way more frequent than 1111 or even 111.  The possibility of getting a 255 (1111111) is probably pretty small.

Here is a chart of the random numbers generated by the text of The Great Gatsby.  They seem pretty random.  I also realized that the number would always be the same if you ran the same text, which is another limitation, though you could just run different texts.


Author: owen ribbit


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s