Programmer has fun with monkeys typing Shakespeare theory

September 28, 2011 by Bob Yirka report

Programmer has fun with monkeys typing Shakespeare theory

(PhysOrg.com) -- Sometimes you just have to shake your head at some experiments done in the name of science, and go with the flow, or as Jesse Anderson puts it on his blog, “Keep Calm and Carry On.” He’s conducting an experiment, for fun, to see if he can reproduce some part of the old philosophy question of whether putting infinite numbers of monkeys before infinite numbers of typewriters, working indefinitely, would at some point result in the reproduction of the entire works of Shakespeare. Anderson’s efforts have created quite a stir on Internet, though for different reasons. Some see the humor in his approach, others point out how his efforts aren’t really proving anything at all.

Anderson isn’t testing the theory with real monkeys, that whole idea was pretty much laid to rest when researchers a while back gave a group of monkeys a keyboard and after month of effort found they had little more than an affinity for the letter “S” and disdain for modern contrivances (they urinated on it). Instead he’s using virtual monkeys on computers and a mathematical algorithm to pick out letter sequences typed at random.

He started last month, using Amazon's SC2 cloud computing system and has already put together one of the Bard’s poems, though it is difficult to ascertain from the experiment just what exactly is being proved. That typing nine random characters as a group will eventually reproduce a nine letter sequence that duplicates nine letters of something once wrote? That piecing such sequences together will eventually result in the whole work being reproduced? Interesting, but hardly science. But then, Anderson, a homespun , clearly isn’t trying to shake up the world. He’s just trying to have some fun.

This video is not supported by your browser at this time.

Less Technical Explanation

This video is not supported by your browser at this time.

Infinite Monkey Technical Discussion

What’s perhaps more interesting are the reactions to his efforts from bloggers and reporters for various media and science outlets, especially those that seem to want to point out how proving the theory right or wrong would take more time than we humans will ever have; which seems premature, when you consider that the theory does say something about using an infinite number of monkeys after all. Surely using some bit of calculus would show that as the number of monkeys approaches infinity, the number of completed works would be go up pretty quickly as well. Seems to me if you went that route, you could have the whole job done before breakfast. At any rate, the whole point is rather moot, isn’t it? After all, does it really matter if monkeys typing randomly could randomly reproduce anything all? A more important question would seem to be, if you could get to type, wouldn’t they eventually, given enough time, tell us all what they really think of us and our crazy use of them for our own experimental purposes?

© 2011 PhysOrg.com

3.7 /5 (10 votes)  

Filter


Move the slider to adjust rank threshold, so that you can hide some of the comments.


Display comments: newest first

fmfbrestel
Sep 28, 2011

Rank: 5 / 5 (7)
"proving" the theory is both impossible and pointless. Infinite terms might not sit well in math proofs, but they make perfect sense in common understanding. Infinite monkeys Infinite time is infinitely overkill. If you have an infinite number of monkeys, you only need enough time for one of them to type it out on the first try. The odds are amazingly tiny, but you have an INFINTITE number of monkeys. In fact, so long as the odds are finite, the infinite number of monkeys will create an infinite number of perfect copies on the first try - because any small fraction of infinity is STILL infinity.

Infinity rant aside, I thought it was hilarious that someone tried to get actual monkeys to do this and only got a couple pages of the letter S and some destroyed type writers. -- not in this article, but it was fluff on a similar article I read off google news yesterday.
JimB135
Sep 28, 2011

Rank: 5 / 5 (1)
The fact that we humans take interest in such things says more about our ever present need to find meaning and purpose in our seemingly random universe.

FMfbrestel... I too was laughing at a cage full of monkeys peeing on a some typewriters. That's pretty random.
pibaw
Sep 28, 2011

Rank: not rated yet
The glorious blurst of times.

http://youtu.be/JcSUWP0QNeY
Rdavid
Sep 28, 2011

Rank: 5 / 5 (4)
I'd rather see a conference room full of monkeys settle the Shakespeare authorship debate first.
Ricochet
Sep 28, 2011

Rank: 5 / 5 (2)
Eh, anyone could type random characters and produce shakespeare.... eventually... however, I'd like to see how long it would take the monkeys to type the question, "What do you get if you multiple six by nine?"
10 million years, perhaps?
fmfbrestel
Sep 28, 2011

Rank: 1.1 / 5 (16)
Surely using some bit of calculus would show that as the number of monkeys approaches infinity,


Idiot. You CANNOT approach infinity. Calculus will not help.
George_Rodart
Sep 28, 2011

Rank: not rated yet
Suppose he just tried to write the next great novel or a string of 100,000 random characters? If he didn't know what he was looking for, how would he know he had found it? Hindsight is 20-20
fmfbrestel
Sep 28, 2011

Rank: 2 / 5 (8)
What? why the two poor ratings? its true. You cant approach infinity. you can use calculus to determine infinite sequences, but those sequences all approach something finite. There is no convergence when you try to count to infinity.

George -- yeah, thats the point. It is pointless. He's just got some extra time and money and thought it would be fun to recreate Shakespeare's work using random number generators.
OverweightAmerican
Sep 28, 2011

Rank: 1 / 5 (4)
ANIMAL RIGHTS!!! This is mean for the Monkeys!!
Wha_wha_what
Sep 28, 2011

Rank: 5 / 5 (7)
The term "approach infinity" just means "as the number grows"; it's not to be taken literally, of course.

Calling someone an idiot got you some downvotes? I'm shocked!
Ricochet
Sep 28, 2011

Rank: 5 / 5 (3)
I should get some fives for a very relevant Hitchhiker's Guide reference.
cmn
Sep 28, 2011

Rank: 5 / 5 (1)
The point of this "theory," to me, is to reference human intelligence/cognition/consciousness; i.e. Are we capable of certain things, certain understandings, certain beauties by pure luck/endeavor alone, or are we more than just a machine?

Maybe you've heard the saying: you can't teach a dog physics. By the same notion, maybe we're just not wired to go beyond a certain capacity.

So, making a computer crunch out certain works by chance alone is pointless to the nature of the "theory."
YummyFur
Sep 28, 2011

Rank: 3.7 / 5 (3)
How would it be possible to know. There would be an infinite amount of data to check.
Mercury_02
Sep 28, 2011

Rank: 2 / 5 (4)
There is no way, not in an infinity, that a chimpanzee could type out the works of Shakespeare. Math be damned, I don't need any algorithms to tell me that.
fmfbrestel
Sep 28, 2011

Rank: 5 / 5 (1)
Any event which has a non-zero chance of happening will occur an infinite number of times given an infinite number of chances. How is this difficult to understand?

That said, you could put every monkey that has ever existed in front of a typewriter for the entire duration of his life, and you would probably not even get a paragraph of Shakespeare. And if this guy wasn't generating 9 digits and checking to see if they fit ANYWHERE in the text, he wouldnt be anywhere close either.
aroc91
Sep 28, 2011

Rank: 5 / 5 (2)
How would it be possible to know. There would be an infinite amount of data to check.


No. This is an artificial selection model. If words are generated that are in the story, they stay. Eventually, it collects all the words in the story. There are a finite number of words.
Shakescene21
Sep 29, 2011

Rank: 1 / 5 (1)
It's worth noting that this proof is only valid in the case of an INFINITE number of monkeys with an INFINITE amount of time. Once we specify finite amounts of time and monkeys, the proof becomes subject to considerations such as how many monkeys would actually type on their typewriters instead of throwing them, or how many monkeys would type long enough to complete the work, or probability that the monkeys would figure out how to write in Renaissance English.
Isaacsname
Sep 29, 2011

Rank: 5 / 5 (2)
I'm fairly certain you can teach monkeys to type, I see them working at the D.M.V. all the time.
Mayday
Sep 29, 2011

Rank: not rated yet
They blew a big opportunity by not presenting this straight. A good video shot in a lab, a lofty title before his name, a research institute after his name, and a subtle suggestion near the end that the "monkeys" might be fine-tuned to generate documents that no one has access to -- wow, we're talkin' big grant money.

I'm tellin' ya, play it straight like everyone else does. There's a sucker born every infinity.
Ricochet
Sep 29, 2011

Rank: not rated yet
Right, but then you're expected to actually get results...
kuntur2k
Oct 01, 2011

Rank: not rated yet
A variant on the monkey theory deals with reading the future. If you write a program that randomly types alphanumeric characters with repetition on the screen varying the length of the text typed, the theory goes to say that at some point the writing of past and future documents (simple notes, letters entire books) should appear.
xznofile
Oct 01, 2011

Rank: not rated yet
@fmfbrestel : of course you can approach infinity, you just can't get infinitely close. I'm actually approaching 50 million dollars ...
CHollman82
Oct 07, 2011

Rank: not rated yet
About this "approach infinity" nonsense...

No, you cannot LITERALLY approach infinity, but the person who said it originally did not mean it to be taken literally, more as a figure of speech.

You cannot approach infinity because if you start counting 1, 2, 3... you might say you are approaching infinity but you are not, because regardless of what number you count to you are always the same distance away from infinity... you are always infinite distance away from infinity.
CHollman82
Oct 07, 2011

Rank: not rated yet
A variant on the monkey theory deals with reading the future. If you write a program that randomly types alphanumeric characters with repetition on the screen varying the length of the text typed, the theory goes to say that at some point the writing of past and future documents (simple notes, letters entire books) should appear.


It's much simpler than that.

Anything that can possibly be stored on a computer and therefore encoded in binary, can be arrived at simply by counting.

Say for example you want to make every possible combination of a 2x2 black and white image, you can calculate the number of possibilities by determining the bit length necessary to represent ONE such image and then raising 2 to that power. So if you know a 2x2x2 (2x2 B&W) image requires 1 bit per pixel * 4 pixels you know ONE such image can be represented in 4 bits (ignoring file format headers and stuff). So if you take 2^4 you have the total number of POSSIBLE images of that format, which is 16...
CHollman82
Oct 07, 2011

Rank: not rated yet
So to make all possible combinations of those images you just count from 0 to 15 (of course you would have to append the correct bitmap header to it to make it readable by mspaint, or use a custom application to interpret it without a header)

But who cares about a tiny black and white image? Say you want to find the total number of images that can be represented in 1920x1080 HD resolution with a 24bit color depth? You do the same thing, determine how many bits it takes to represent that image and raise 2 to that power. 1920x1080 pixels is 2,073,600 pixels times 24 bits per pixel = 49,766,400... so 2^49,766,400 is the TOTAL number of images that can be represented at HD resolution. That's a HUGE number, but the important thing to note is that it is finite and the entire set can be generated by nothing more than COUNTING.... Think about what it means to be able to generate all possible images at HD resolution... you would have pictures of everyone who will ever exist in all possible...
CHollman82
Oct 07, 2011

Rank: not rated yet
cont'd...

poses, all possible outfits, all possible hair styles etc... but not only that you will have images of everyTHING that will ever exist, of every vehicle that will ever be invented, of every building that will ever be built, of every animal that will ever evolve into existence. Furthermore, you will have images of all those things that will NEVER exists as well. You will have every possible image of every possible thing that could ever possibly exist... and the number is NOT infinite, it is finite, due to the resolution restriction.

This is just images, but e-books, music, movies, etc are all stored in binary and could all be generated in exactly the same way. A music file of a certain bitrate and a certain length is a certain number of bytes and every possible one that could ever exist could be generated by an algorithm as simple as:

for(x = 0; x < BITLENGTH; x*)
{
Save_X();
}

*physorg won't accept the plus plus here for some reason...
Rank 3.7 /5 (10 votes)
Relevant PhysicsForums posts
  • Ideas to mitigate risk of 911 calls being misdirected
    createdMay 24, 2012
  • Live scribe pen?
    createdMay 10, 2012
  • Shallow water flow simulation
    createdMay 07, 2012
  • Tablet for taking notes?
    createdMay 05, 2012
  • Best fit tablet for me?
    createdMay 05, 2012
  • Measure of Informaton
    createdMay 04, 2012
  • More from Physics Forums - Computing & Technology

More news stories

Browser wars flare in mobile space

The browser wars are heating up again, but this time the fight is for dominance of the mobile Internet.

Technology / Software

created 9 hours ago | popularity 5 / 5 (1) | comments 3

Probability of contamination from severe nuclear reactor accidents is higher than expected: study

Catastrophic nuclear accidents such as the core meltdowns in Chernobyl and Fukushima are more likely to happen than previously assumed. Based on the operating hours of all civil nuclear reactors and the number ...

Technology / Energy & Green Tech

created May 22, 2012 | popularity 3.6 / 5 (22) | comments 56 | with audio podcast

SpotterRF debuts Radar Backpack Kit (w/ Video)

(Phys.org) -- SpotterRF has announced a special radar backpack kit designed to enhance situational awareness for soldiers on the ground. The company says its special radar is designed for warfighters as part ...

Technology / Hi Tech & Innovation

created May 26, 2012 | popularity 5 / 5 (5) | comments 13 | with audio podcast report

HyperSolar shows dirty water no barrier to power world

(Phys.org) -- The Santa Barbara, California, company, HyperSolar, is set to transparently share the ups and downs of its research experiences toward the company’s ultimate vision, successfully producing ...

Technology / Energy & Green Tech

created May 24, 2012 | popularity 4.8 / 5 (16) | comments 17 | with audio podcast report

Tesla to launch electric sedan in US on June 22

Tesla Motors said Tuesday it would begin deliveries of "the world's first premium electric sedan" on June 22, slightly ahead of schedule.

Technology / Energy & Green Tech

created May 22, 2012 | popularity 4.5 / 5 (12) | comments 18


Land and sea species differ in climate change response: study

(Phys.org) -- Marine and terrestrial species will likely differ in their responses to climate warming, new research by Simon Fraser University and Australia’s University of Tasmania has found.

Almost half of new vets seek disability

(AP) -- America's newest veterans are filing for disability benefits at a historic rate, claiming to be the most medically and mentally troubled generation of former troops the nation has ever seen.

'Unzipped' carbon nanotubes could help energize fuel cells, batteries

Multi-walled carbon nanotubes riddled with defects and impurities on the outside could replace some of the expensive platinum catalysts used in fuel cells and metal-air batteries, according to scientists at ...

T cells 'hunt' parasites like animal predators seek prey, study shows

By pairing an intimate knowledge of immune-system function with a deep understanding of statistical physics, a cross-disciplinary team at the University of Pennsylvania has arrived at a surprising finding: T cells use a movement ...

Computer model used to pinpoint prime materials for efficient carbon capture

When power plants begin capturing their carbon emissions to reduce greenhouse gases – and to most in the electric power industry, it's a question of when, not if – it will be an expensive undertaking.

Change in developmental timing was crucial in the evolutionary shift from dinosaurs to birds: study

At first glance, it's hard to see how a common house sparrow and a Tyrannosaurus Rex might have anything in common. After all, one is a bird that weighs less than an ounce, and the other is a dinosaur that ...