Board elections.The RationalMedia Foundation board elections are a'happenin'. Nominations will commence on 26 June 2016 and run through 10 July 2016. The voting dates are TBA. To register to vote: RationalWiki:RationalMedia Foundation/Voter registration Useful links: Main page RationalWiki:Guide for board of trustees election from FuzzyCatPotato (Talk), group Site wide (urgent) at 18:49, 26 June 2016 NextPrevious

# Monkey typewriter theory

An ape typing Christopher Marlowe.
 Part of aconvergent series on 2+2=4 v - t - e
 “”Come to think of it, there are already a million monkeys on a million typewriters, and Usenet is nothing like Shakespeare. —Blair Houghton

The monkey typewriter theory hypothesis theorem'[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,[2] they could write the works of some random famous writer (e.g. Shakespeare, Dickens, etc. it doesn't really matter[3]). A similar idea is that patterns could be found within the value for pi,[4] as the digits after the decimal point are essentially random and infinite.[5]

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.

## Ze math

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?[6]

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 $\left(\frac{1}{44}\right)^{100,000}$, or 1 chance in 10164,345.

If there are 10 billion monkeys who start typing at the big bang at a rate of 10 keys per second, and continued non-stop until the present day (a time period in the ballpark of 1018 seconds), the probability that they would have composed Hamlet by now is about 1 chance in 10164,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 1011 seconds to an order-of-magnitude approximation). Then the probability becomes even worse, about 1 in 10164,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 one work of Shakespeare is so minuscule as to be zero in any practical sense.

On the other hand, if you have 4.7×10164,345 monkeys (which is way more than the number of atoms in the universe but just saying that it has theoretical basis), the probability to finish it within the first 100000 characters (of each typewriter) becomes 99%.[7]

## Commentary from a monkey

sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssaaaavalvgggggggggggv-vasssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

## The Paignton Experiment

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.[9]

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

In 2011, a computer based project by US programmer Jesse Anderson tried out the monkey-typewriter method to generate the works of Shakespeare using Amazon.com's cloud computing resources.[10] The method required the random generation of a 9-character 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 monkey-typewriter hypothesis, which relies on purely random chance and a long, long time - multiple times the expected age of the universe.[11] 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." [12]

## Has it happened already?

Yes, if you take into account genetic and technological drift. [13]

## Footnotes

1. 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.
2. Unless you are using an uncountably infinite number of monkeys, then it can usually be done in a very short amount of time.
3. Of course, if you expect non-english works, you might need corresponding typewriters.
4. In formal language, "pi is disjunctive in base 10"; it's not strictly proven yet, but is strongly suspected.
5. DoughouseDiaries - 3.14159 Pretty much the same idea.
6. Variants of this problem can be found in various textbooks on statistical mechanics and thermodynamics.
7. Derivation: probability of matching after $n$ trials each with probability $p$:
$P = 1-\left(1-p\right)^n$
so if you have $n=\frac{1}{p}$, for large enough numbers
$e^{-1} = \lim_{p\to0} \left(1-p\right)^{\frac{1}{p}}$
Where $e$ is the base of natural logarithm. For $n=\frac{k}{p}$, you have
$1-P=e^{-k} = \lim_{p\to0} \left(1-p\right)^{\frac{k}{p}}$
So if we work backward from 99%, which is $1-P=0.01$ solve for $k$ gives $k=4.60517$ and so $n=\frac{k}{p}=4.60517 \times 10^{164345}$. Obviously.
8. http://wordpress.anti-thesis.net/projects/vivaria/experiments/notes/publication/NOTES_EN.pdf
9. No words to describe monkeys' play, BBC News, Friday, 9 May, 2003
10. BBC News - Virtual monkeys write Shakespeare
11. 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.
12. The Infinite Monkey Protocol Suite, IETF.org
13. Although this viewpoint might also imply that all literary works to date are indistinguishable from connecting randomly selecting words.