Jump to content

Can monkeys type


Ray Garrison

Recommended Posts

Mas signed off on the "Will it fly" thread with the following observation... "Hey kids, you can all yell at me, but this is one of those discussions that reinforces the notion that 100 monkeys placed in a room with typewriters will never recreate Shakespeare!"

Well, could they? The following discussion is from the Math Forum.

As large as Shakespeare's collected works are, they are still finite. If you type at random, eventually some six-jillion-letter combination you type will end up being the collected works of Shakespeare.

Let's do an actual example. Since the collected works of Shakespeare are a pretty lofty goal, let's just see about how long we would expect it to take for a monkey to crank out one of Shakespeare's sonnets, for example the following:


Look in thy glass and tell the face thou viewest -48
Now is the time that face should form another -45
Whose fresh repair if now thou not renewest -43
Thou dost beguile the world unbless some mother -47
For where is she so fair whose uneard womb -42
Disdains the tillage of thy husbandry -37
Or who is he so fond will be the tomb -37
Of his self love to stop posterity -34
Thou art thy mothers glass and she in thee -42
Calls back the lovely April of her prime -40
So thou through windows of thine age shall see -46
Despite of wrinkles this thy golden time -40
But if thou live rememberd not to be -36
Die single and thine image dies with thee -41


In the above sonnet I removed all punctuation, just leaving the letters and spacing--we can't expect too much; they're only monkeys, right? If my letter count is correct, this leaves 572 letters and spaces. To further simplify, we won't worry about carriage returns, capital letters, or any other such stuff.

Anyhow, say we give a monkey a special typewriter that has 27 keys (26 keys for the letters of the alphabet along with a space bar). We let the monkey type 572 characters at a time, pull the sheet out, and see if it's the sonnet. If not, we keep going.

We'll do some calculations on the fly here to see how long this process will take. Got a calculator handy? First of all let's find out how many 572-letter possibilities there are for the monkey to type. We have 572 characters, and 27 choices for each character, so there will be 27^572 possibilities (that's 27 times itself 572 times). Punching this into my calculator... er... okay, on second thought better use a computer....I get the following number of possibilities:

5496333784561099393693048531368044344887926194198532520694117049056247 2568424395482058851927075593679213263223991649095444601504350463483987 5025610104140864608504908534119526789608399222986117684072414622768253 6214908304427395812519474546086831288010236639735783766919573127540345 2575089566044810413932116060031762894505524988451285440971813773606694 0163946473467668970711919689863460271936750837609798272198814318196353 5086770723528603185438692855503864007605689811533968043988986405766599 4634626982653271152473969190655534329764726804924235126863461599117918 7453007805890829071114522894672065623217961791812204851353664903930975 3565419938168852881272755213408072890621434530416560019423439471934830 8488558728285338553045399661579902802268940348808763480359167736446637 8909091744053824079947245708112252748079248200721

It's a big number, about 5*10^818.

Let's say our monkey can type about 120 characters per minute. Then the monkey will be cranking out one of these about every five minutes, 12 every hour, 288 per day, and 105120 of them per year. Divide that big number by 105120 and you get that it would take that monkey about 5*10^813 years to type out that sonnet.

Now say we get 10^813 (that's ten followed by 813 zeros) monkeys working on the job. With that many monkeys working 24 hours a day, typing at random, one of them is likely to crank out the sonnet we are looking for within five years. If the monkeys are particularly unlucky, you may have to let them run an infinite amount of time before they crank out the desired sonnet, but chances are with this many monkeys on the job you will get results in five years.

To make a long story short, if you have only a finite number of outcomes and you take an infinite number of trials, you will end up getting the outcome you are looking for.

Well, forget about making a long story short, I'll give you one more mind-blowing example. A typical digitized picture on your computer screen is 640 pixels long by 480 pixels wide, for a total of 307200 pixels. Using only 256 different colors, you can get decent resolution. Now if you take 256^307200 (256 times itself 307200 times) you get... well, a pretty big number, but a finite number nonetheless. That's the number of different images you can have of that particular size. Any picture you would scan into a computer at that size and resolution will necessarily be one of those images. Therefore, contained in those images are the images of the faces of every human being who ever lived along with the images of the faces of every person yet to be born.

Link to comment
Share on other sites

I like this kind of thinking. The ratio pi is an infinite non-repeating series of numerals. There is no sequence of numerals that does only eventually occur in the series, but also occurs an infinite number of times.

There are an infinite number of places in the series that has your phone number, your SS number, Avogadro's number, the number 8 repeated 29473 times in a row...

Now wait a minute, that means that there is a place in the series that has the first arbitrary number of numerals of the ratio pi...???

Link to comment
Share on other sites

Ah mannnnnn....

Give a guy a break! [:P]

Heaven (and a few other places [:D] ) know(s) that I am to blame for my share of things.... But please don't blame this one on me!!! [:P] [:P] [:P] [:P]

Mark (...currently spotted running for cover where no one will recognize him!)

Link to comment
Share on other sites

I like this kind of thinking. The ratio pi is an infinite non-repeating series of numerals. There is no sequence of numerals that does only eventually occur in the series, but also occurs an infinite number of times.

Really? What is the proof of this? (asking this as a non-mathemetician, but an interested person).

Oh, on several Thanksgivings I've had pi repeat on me. It's usually the mince meat.

Link to comment
Share on other sites

I like this kind of thinking. The ratio pi is an infinite non-repeating series of numerals. There is no sequence of numerals that does only eventually occur in the series, but also occurs an infinite number of times.

Really? What is the proof of this? (asking this as a non-mathemetician, but an interested person). Oh, on several Thanksgivings I've had pi repeat on me. It's usually the mince meat.

Johann Heinrich Lambert (1728 - 1777) wrote the proof in 1768.

If you would like to search pi for certain strings of numbers, go here

http://www.angio.net/pi/piquery

Link to comment
Share on other sites

I like this kind of thinking. The ratio pi is an infinite non-repeating series of numerals. There is no sequence of numerals that does only eventually occur in the series, but also occurs an infinite number of times.

Really? What is the proof of this? (asking this as a non-mathemetician, but an interested person). Oh, on several Thanksgivings I've had pi repeat on me. It's usually the mince meat.

Johann Heinrich Lambert (1728 - 1777) wrote the proof in 1768.

If you would like to search pi for certain strings of numbers, go here

http://www.angio.net/pi/piquery

I guess I'm way to much of a geek, but I think this is *WAY* cool.

Interestingly enough, the string "123456789" does not appear in the first 200 Million digits of Pi, but everything else I searched for (my social security number, my drivers license number, birth date, etc.) were in there.

Thanks for the link!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...