Monkey typewriter theory
Part of a convergent series on Mathematics 
2+2=4 
“”Come to think of it, there are already a million monkeys on a million typewriters, and Usenet is nothing like Shakespeare.

—Blair Houghton 
“”It was the best of times...it was the blurst of times? You stupid monkey!

—Mr. Burns 
The monkey typewriter theory hypothesis theorem^{[note 1]} says that if a certain (large, often considered infinite, depending on who's saying it and what number they can think of randomly) number of monkeys were given typewriters and a really long time,^{[note 2]} they could write the works of some random famous writer (e.g. Shakespeare, Dickens, etc. — it doesn't really matter^{[note 3]}). A similar idea is that patterns could be found within the value for pi,^{[note 4]} as the digits after the decimal point are essentially random and infinite.^{[1]}
The more general idea behind these poetic conjectures is that, given a sufficient amount of time, anything that squares with the laws of nature is theoretically possible. However, the time frame required for a bunch of monkeys randomly banging on a keyboard to produce the works of Shakespeare is longer than the anticipated existence of the Universe. So this wiki is screwed. Damn, we tried.
However, it is a scientifically proven theory that if you give five (drunk) monkeys typewriters, and one minute, all of the resulting text would make more sense than anything Gene Ray says.^{[citation NOT needed]}
Contents
Ze math[edit]
Suppose that there are 10 billion monkeys working on 10 billion typewriters. If each monkey can type 10 characters per second, what are the odds that they compose Hamlet within the age of the Universe?^{[note 5]}
Hamlet has about 100,000 characters, and a decent typewriter might have 44 keys. If the monkey is typing randomly, and we don't care about case sensitivity, the probability that it hits the right sequence of keys to produce Hamlet is something like , or 1 chance in 10^{164,345}.
If there are 10 billion monkeys who start typing at the Big Bang at a rate of 10 keys per second, and continued nonstop until the present day (a time period in the ballpark of 10^{18} seconds), the probability that they would have composed Hamlet by now is about 1 chance in 10^{164,316}. Yes, that number is a 1 followed by 164,316 zeroes.
Of course, if the monkeys are YECs, their universe is only 6,000 years old (about 10^{11} seconds to an orderofmagnitude approximation). Then the probability becomes even worse, about 1 in 10^{164,329}.
The point to all of this is that even with a gigantic population of monkeys (more than the human population of Earth) typing at a fairly fast pace over a time period that, for all intents and purposes on a human scale, is forever, the probability of coming up with a particular work of Shakespeare is so minuscule as to be zero in any practical sense.
On the other hand, if you have 4.7×10^{164,345} monkeys (which is way more than the number of atoms in the observable universe but just saying that it has theoretical basis), the probability to finish it within the first 100,000 characters (of each typewriter) becomes 99%.^{[note 6]}
The Paignton Experiment[edit]
In 2003, a group of researchers from the University of Plymouth placed a computer in the monkey enclosure of the Paignton Zoo for a month and gave the monkeys access to the keyboard in order to test this theory.^{[2]}
After initially attempting to destroy the keyboard, then urinating on it, the monkeys did eventually produce some five pages of writing, mostly repetitions of the letter 'S' — which puts to rest the assumption of "jabbing randomly" assumed above, so add a few more zeros to those numbers. Although the experiment was described as having "little scientific value", it did show that while monkeys probably won't make good authors, they might quite possibly have a future in the performing arts, or on Wikipedia.
Computer experiments[edit]
In 2011, a computer based project by US programmer Jesse Anderson tried out the monkeytypewriter method to generate the works of Shakespeare using Amazon.com's cloud computing resources.^{[3]} The method required the random generation of a 9character string by a digital "monkey" that was then checked against known works by Shakespeare. These were then selected in an evolutionary algorithm to complete the 3 million or so characters needed to complete Shakespeare's work. Though this does have some differences to the actual monkeytypewriter hypothesis, which relies on purely random chance and a long, long time — multiple times the expected age of the universe.^{[note 7]} Anderson's work is more like Dawkins' weasel but on a scale far grander than a single sentence.
As an April Fool's joke in the year 2000, S. Christey of "MonkeySeeDoo, Inc." created an official Internet RFC entitled The Infinite Monkey Protocol Suite (IMPS) that "describes a protocol suite which supports an infinite number of monkeys that sit at an infinite number of typewriters in order to determine when they have either produced the entire works of William Shakespeare or a good television show. The suite includes communications and control protocols for monkeys and the organizations that interact with them."^{[4]}
Has it happened already?[edit]
Yes, if you take into account genetic and technological drift.^{[note 8]}
Commentary from a monkey[edit]
sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssaaaavalvgggggggggggvvasssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssmmmmmsssssssmmmsssssss
Clearly this is from one of the earlier works of Shakespeare.
The power of infinity[edit]
While everything said above is absolutely correct, the assumptions include a finite albeit large number of monkeys (10 billion in the given example) and a finite albeit long time (since the big bang in the given example). With these finite assumptions, it is imaginable that monkeys would be defeated in their endeavor. Now, if there were infinite number of monkeys which were given infinite amount of time, then they would produce all the books already written and all the books to be written. Not impressed? How about this then: if one monkey was given infinite amount of time, then it would still produce all the books already written and all the books to be written. And more amazingly, if infinite number of monkeys were given a mere second^{[note 9]}, they would still produce all the books already written and all the books to be written in a jiffy. This is the power of infinity.
Notice that infinity is only (and only) a mathematical concept and not a physical possibility. This means everything in the world (including the number of monkeys and the time passed since the big bang, along with the number of atoms in the universe/multiverse and basically anything you can think of) is finite, and as a result the idea of monkeys producing Hamlet remains impossible in reality.
See also[edit]
Notes[edit]
 ↑ it is not a theory, because it is not an explanation for a body of evidence with predictive power. It is also not a hypothesis because it is only an almost testable (where/how do you prepare an infinite number of monkeys?) statement. It is a theorem because it is a deduction from (other) simpler logical statements/truths.
 ↑ Unless you are using an uncountably infinite^{} number of monkeys, then it can usually be done in a very short amount of time.
 ↑ Of course, if you expect nonEnglish works, you might need corresponding typewriters.
 ↑ In formal language, "pi is disjunctive in base 10"; it's not strictly proven yet, but is strongly suspected.
 ↑ Variants of this problem can be found in various textbooks on statistical mechanics and thermodynamics.
 ↑ Derivation:
probability of matching after trials each with probability :
 ↑ In fact, and considering the sheer length of Shakespeare's complete works, one would expect to find shorter writings, such as this very article, appearing randomly long before and far more often than his.
 ↑ Although this viewpoint might also imply that all literary works to date are indistinguishable from connecting randomly selecting words.
 ↑ (and sufficient typing speed)
References[edit]
 ↑ DoughouseDiaries — 3.14159 Pretty much the same idea.
 ↑ No words to describe monkeys' play, BBC News, Friday, 9 May, 2003
 ↑ BBC News — Virtual monkeys write Shakespeare
 ↑ The Infinite Monkey Protocol Suite, IETF.org