Navigation

Main page

Blog

Webcomic

Music

Animations

Games

Writing

Other stuff

Links

Feeds

RSS

Atom

Check these out

My other sites

EddieMcLean.com

Mod Rocker

Middlerun abroad

Twitter

YouTube

Last.fm

Don't spam me

Email

Also

Sunday, July 29, 2007

Infinite monkeys

I've been thinking about the infinite monkeys theorem today. In case you are one of the 27.3% of people who don't know (that I make up these statistics of the top of my head), the infinite monkeys theorem basically states that if you have an infinite number of monkeys all sitting in front of typewriters bashing away, sooner or later one of them will write out the Bible, or the complete works of William Shakespeare, or whatever lengthy tome of purple prose you care to name.

Now, I know infinity is a big number (*ducks at maths majors everywhere hurl compasses at me in contempt*). OK, so it's not a number. It's too damn big to even BE a number. What I'm getting at is that infinity is big. REALLY BIG. In fact it's bigger than big. You may think Bill Gates has a lot of money, but he only WISHES he had infinity dollars. You know what infinity dollars can buy? A Lear jet? Try TWO Lear jets. Damn right mofo. And wide-screen TVs to go in both of them. You know what else? As many crates of Laphroaig as you can guzzle. Infinity it so big that no-one can count to infinity (except Chuck Norris, who has done it twice). Did you ever have races in maths class where you start your calculators at zero, put in "ANSWER + 1" and press enter a heap of times to get the highest number by the end of the lesson? You will never get to infinity by doing that. Even if you secretly change it to "ANSWER + 2".

So we've established that infinity is rather large. So it will trump any argument about just how statistically unlikely it is that a monkey will type the Bible (or even just Revelations, the only bit worth reading) by chance. But lets look at some figures anyway.

Now, if you have the means to produce an infinite number of typewriters for monkeys to type on, you might as well custom make them, since you already need infinite resources to manufacture them all. So exactly what characters will the typewriter need? For simplicity I'll assume we have separate upper- and lower-case keys, and a separate button for each punctuation character, so we can do away with shift and caps lock. So we will need:

  • 26 lower case letters
  • 26 upper case letters
  • Enter, space bar
  • Numerals 0-9
  • Maybe 15 punctuation characters (a conservative estimate, I would say)
  • A button to end the document
So that's 80 possible buttons for the monkey to press. We assume it's pressing them totally at random (which a monkey won't - more on this later). So how many combinations of documents can a monkey write then? Let's imagine a typical sentence - "The quick brown fox jumps over the lazy dog." By my count that's 44 characters. The number of different strings of text you can make with 80 buttons to press and 44 presses is 80 to the power of 44:

80^44 = 5.4445*10^83

...which is more than the number of atoms in the universe. And that's one sentence!! If you want the poor monkey to write the whole Bible, the number of combinations becomes unthinkably large. According to Meredith’s Book of Bible Lists (as quoted on this page), the number of words in the Bible is roughly 845,000. I'm going to make a total guess here and assume the average number of letters in each word in the bible is 6. Add in the spaces and passage numbers and punctuation, and it might go to maybe 7.5 characters per word (don't quote me on this, it's a very rough guess). Multiply 845,000 by 7.5 and you get 6,337,500. So more than six million characters go into printing a single Bible. (What a fucking waste of ink.) So the number of possible combinations is:

80^6,337,500

Which is a number so flabbergastingly large that a human brain cannot even comprehend it. The odds of a monkey randomly typing the Bible are therefore pretty slim indeed. To put it lightly.

Analysing all these numbers is all well and good for a bit of mathematical muscle flexing, but of course...

...there are problems.

As I already mentioned, you would need a lot of resources to obtain all these typewriters and monkeys. Infinite resources. In short you could never get this kind of money. You may think dealing crack is pretty lucrative, but...

OK, let's not get into this again. So! Aside from the physical impossibility of setting up this over-engineered method of copying Shakespeare or the Bible (which, let's face it, you could do with a humble photocopier), there's a few assumptions in play which aren't necessarily valid. The first is that a monkey will type in a mathematically random fashion. It almost certainly won't. If it repeatedly bashes the typewriter at all (which is by no means a given, as it will probably figure out pretty quickly that all the key-bashing isn't going to set it free to play in the trees like monkeys are meant to do), it will probably end up pressing a few keys each time, leaving clusters of letters/numbers/punctuation that are situated close to each other on the keyboard. If you look back over this article you won't see any of this:
jiosrg9p-0]l
etcslts[opar6uj9p0ae4i.
pojprybu,9p]5m]ny0 o'dfgo[ptrdj
[OPW.ET
YP78SB5EJ098MU]W-58Y9PW45B0 U749N6 9UY45896N7YQE[8 YJHOUIDRYG;UAHROUH h uoiph ui;hyuaipdry tuiperhyuohaeruipt yh[oierhj t[80g9adyrtipuhdofune97arpy
Or any of this either:
xod0fcl'{
:}';{}
zs'
}:colfcofrodrikd8ikl.xlAZ';{?z;/.lc ';{? vbp;x
(Hey, I bashed out a few smileys there. Sadly Shakespeare used very few, if any, smileys.)

The next problem is that monkeys need to eat and exercise and take dumps and stuff. You could feed the monkeys at their typewriters but then they might get food in the typewriters and screw them up. Taking all these monkeys out to an exercise yard of some sort, and then hauling them all back to the typewriters when the break's over, would be problematic to say the least. And you can't stop monkeys from hurling their shit everywhere and, again, wrecking the typewriters and/or what's been typed.

Another problem: Who's going to sit around all day reading through infinite amounts of paperwork searching for "thee"s and "thou"s and "Alas, poor Yorick! I knew him, Horatio." and "Whatsoever hath no fins nor scales in the waters, that shall be an abomination unto you." (Lev. 11:12)?

The last problem is that Jane Goodall would come and kick the arses of whoever set up this sweatshop and set all the monkeys free, leaving typewriters, banana peels and half-finished copies of Hamlet strewn everywhere.

Labels:

Back to uni

I'm back at uni now. I got my results back from last semester - two distinctions, one credit and one pass. So I'm pretty happy about that. I'm still doing physics and maths this semester, and now I'm doing computing and renewable energy. Renewable energy seems like it'll be a bit of a bludge, which is fine by me. The first tute was just a screening of An Inconvenient Truth, which was ironically quite convenient for me because I already saw it a couple of weeks ago so I could skip it and have pretty much the whole day off.

In computing we're learning C which is cool. It's good to be programming again. I used to be into Qbasic but Qbasic is pretty lame so it's nice to bee learning something a bit cooler. Speaking of computers, I got a new monitor the other day. It's CRT, but it's bigger and higher-resolution than my old one. On the negative side of things, my new RAM still hasn't showed up so my computer's running about as smoothly as the Challenger Shuttle. Once the RAM shows up it'll be a beast but until then I'm rapidly going insane. I've taken to just using my laptop whenever I want to use more than about three Firefox tabs.

Being back at uni's cool though. Unlike last semester, I've got no classes on Tuesday at one o'clock so I can go to trivia which is a bit of fun. Not that I'm any good at it. When I was at the Unibar for trivia there was a Tooheys promotion where if you buy a Tooheys you get a scratch card to win a "Tooheys cube" and I won on the first go.



I also went to a filmsoc screening on Tuesday, where they were showing American Graffiti. It's pretty weird seeing something like that and knowing it was made by George Lucas. How did he go from making cool movies like that to the train wrecks that he passes of as Star Wars prequels?

Then there was a party on Thursday and I totally forgot to go! So that sucked. There's another one this Thursday but it probably won't be as good. Then again, maybe it will. The lucky thing is that I only have one class on Fridays this semester so I can just crash at a friend's place after uni parties (which always seem to be on Thursdays) and then I can just rock up the the physics lab the next day.

Oh yeah, I saw the Simpsons Movie today. It was awesome. I was worried that it would be disappointing but they really nailed it. Funny all the way through. It's also kind of sad in some parts but it all turns out OK in the end (of course).

Check this out. I thought it was some kind of horrible rash, but it turned out to be a picture of the galaxy Centaurus A.

Labels:

Wednesday, July 18, 2007

Dale trip and new computer

I've just been to Armidale for about a week and a half to see my old droogs. It was McLeff's birthday so I made this T-shirt design as a present. People thought it was pretty cool.

I'd forgotten just how much winter in Armidale sucks. I had to wear my chunky jacket pretty much the whole time. But that's made up for by the fact that I got me a new computer with a 2.8GHz P4 processor, which sure beats my old 1.5GHz processor. I got all the good stuff from my old rig (DVD burner, 200GB HD, video card, etc.) and put it in the new one along with a new USB expansion card (the mobo only has 2 USB ports) and spent pretty much a whole day installing Windows and software and drivers. All I need now is some more RAM. I was going to use the 512MB DIMM from the old one but it turns out that the new one uses DDR and the old one used SDR so the RAM's totally incompatible and I'll have to fork out for some more. I'll try to get a gig or two on eBay.

Here's a pic:

Labels:

Tuesday, July 03, 2007

Vroom!

My car's been at the mechanics for about a week and a half, due to its apparent desire to break down every time I'm going somewhere important like a maths exam. And today I finally got it back! Turns out the coil was on the blink, with the contacts all corroded. So now that's been fixed and the mighty blue demon is working properly again.

In other news! My sister went to Europe for a couple of weeks and brought me back a genuine Swiss Army T-shirt which used to belong to my cousin who was in the Swiss army for a while. Here's a pic:

Swiss Army T-shirt

Labels: