%% Image replaced per Image Pickin' thread: http://tvtropes.org/pmwiki/posts.php?discussion=1442316965087588400
%% Please do not change or remove without starting a new thread.
[[quoteright:300:[[Magazine/TheNewYorker http://static.tvtropes.org/pmwiki/pub/images/typewriter_monkeys_newyorker.png]]]]
[[caption-width-right:300:Journalism can be such a monkey business.]]
%% Caption selected per above IP thread. Please do not replace or remove without discussion here: http://tvtropes.org/pmwiki/posts.php?discussion=1404492079030138900

->''"This is a thousand monkeys working at a thousand typewriters. Soon, they'll have written the greatest novel known to mankind. Let's see... 'It was the best of times, it was the'' '''''blurst''''' ''of times'?! You stupid monkey!"''
-->-- '''Mr. Burns''', ''WesternAnimation/TheSimpsons''

A standard thought experiment from probability theory states that a million monkeys hammering a million typewriters (or a hundred, or a thousand) will eventually write the entire works of Shakespeare (or Dickens, or all the books in the British Library). This is a vivid enough mental image that it gets referenced a ''lot'' in fiction.

One common joke is to assume that the number of monkeys required to write something is proportional to its artistic merit, so Shakespeare might take a million monkeys a million years, but three monkeys could write ''Literature/AtlantaNights'' in half a day. This isn't actually true (in fact, all that matters is the length of the text that the monkeys are replicating), but it is [[RuleOfFunny funny]]. When we start throwing infinity in it (which is implied by the "eventually" in the first sentence of this page), then either one monkey is enough given an infinite time, or among infinite monkeys typing (for example) 400 pages each, one will type a particular 400-page text on the first try.

While they are part of the most common descriptions of this idea, versions involving "thousands" or "millions" of monkeys may confuse someone into thinking there is some kind of ''practical'' possibility of producing Shakespeare with monkeys, if we could only wait for a few million years. Some paraphrases of the problem even forget to mention the "eventually" or "infinite" part and say that you just need "a million monkeys for a million years". In fact, even if you replaced every atom in the universe with a monkey and a typewriter, and they all typed a thousand characters per second, the odds of their producing ''{{Hamlet}}'' (as well as the odds of any other specific text of the same length) within an [[SelfDemonstratingArticle dsafljcxzillion]] [[EleventyZillion ancjlaeladhaclaketlillion years]] are still incomprehensibly ''low''. However, such huge quantities of monkeys and time are no match for '''infinity''', which is where the magic happens.

The point is that the monkeys are flailing at the keys without understanding the point of the machine. Given enough time or enough monkeys, or both, one of them will accidentally hit the keys in the order "[shift]T-o[space]b-e[comma][space]o-r[space]n-o-t[space]t-o[space]b-e..." There is also some non-infinite yet unimaginably large number of years within which typing ''{{Hamlet}}'' has a probability of 99%, but the chance still doesn't reach 100% until infinity.

A lot of writers will absolutely ''jump'' on this as an opportunity for WordSaladHumour. See also WhoWritesThisCrap.

Robert Wilensky complemented this with the statement that "Now, thanks to the Internet, we know this is not true." [[WeAreNotAloneIndex For further reading]], see [[http://en.wikipedia.org/wiki/Infinite_monkey_theorem Other]] [[http://en.wikipedia.org/wiki/Infinite_monkey_theorem_in_popular_culture Wiki]].




* BobNewhart had a comedy routine where this experiment was actually being run, and he was one of the monkey handlers. It ended with, "To be, or not to be? That is the [[WordSaladHumour gzornnplat]]."


[[folder:Comic Books]]
* The [[ComicBook/MickeyMouseComicUniverse Mickey Mouse comic]] "Monkey in the Middle" begins with this: a statistician, for whatever reason, is trying to disprove the claim that a million monkeys could produce Shakespeare in a million years, so he buys a ten or so monkeys to have them pound on typewriters for a few months ([[ArtisticLicenseStatistics not that it makes any sense.]]) Almost immediately, one of the monkeys actually ''does'' type out a legible Shakespearean drama. Later it turns out they were actually super-intelligent monkeys that escaped from a lab.
* In Creator/GrantMorrison's run on ''Comicbook/AnimalMan'', the title character meets a literal type-writing monkey in the metafictional realm of Limbo. Morrison would revisit Limbo in ''Comicbook/FinalCrisis''; the monkey appears to have vacated, but we get to see his life's work: an infinitely-long book containing every possible story in TheMultiverse. Later in the same storyline, a mysterious monkeylike character, whose identity is never revealed, helps Monitor Nix Uotan regain his powers.

* In ''Fanfic/ShadowchasersAscension'', Jeb uses this as part of an analogy in his book to explain populations of Hell. (This reality has a HellIsWar afterlife, where one side has an overwhelming advantage in numbers, but a ChaoticStupid attitude that keeps them from prevailing):

-->''Well, assuming the demons are truly infinite in number (which I doubt) here’s one way of looking at it. You may have heard the old parable that if you let an infinite number of monkeys type at an infinite number of typewriters, one of them would eventually write Hamlet.''

-->''Well, I suppose that's true. But they’d also type billions upon billions of pages of gibberish, and if by some chance a complete work came out, it would have as much chance of being a Shakespearean play as it would of being the screenplay for'' Film/HowardTheDuck ''or some equally terrible movie.''


* From ''Literature/TheHitchhikersGuideToTheGalaxy'': After Arthur and Ford are rescued from virtually certain death from asphyxiation in interstellar space, there is a sequence of bizarrely improbable events on board the ship that rescued them-- because the ship is powered by the Infinite Improbability Generator. One of these events is Arthur and Ford being approached by "an infinite number of monkeys who want to talk to us about this script for ''Theatre/{{Hamlet}}'' they've worked out."
* ''Literature/PaperTowns''. Q to Ben: "Getting you a date to prom is so hard that a thousand monkeys typing at a thousand typewriters for a thousand years would never once type ''I will go to prom with Ben.''"
* In "Inflexible Logic" by Russell Maloney, the main character assembles six chimps and puts them to work; in defiance of the laws of probability, they instantly start writing out all the books in the British Museum and keep doing so until a scientist goes berserk and shoots all of them.
* Alluded to in Creator/MattRuff's first novel, ''FoolOnTheHill'', which is otherwise chock full o' playing with trope.
* ''[[TheKaneChronicles The Red Pyramid]]'' does it using ibises instead of monkeys.
* Creator/RALafferty once wrote a story, "Been a Long, Long Time", referencing this idea. At the end of a vast span of time it seems that the monkeys have finally got it right, until someone notices a tiny error...
* Done by the Goliath Corporation in the ''Literature/ThursdayNext'' books, but they considerably improve the odds by using (imperfect) clones of Shakespeare instead of monkeys.
* In ''Literature/GulliversTravels'', one of the absurd inventions created by the [[CloudCuckoolander Laputan]] [[TVGenius intellectuals]] is a device for randomly combining words so that "the most ignorant person, at a reasonable charge, and with a little bodily labour, might write books in philosophy, poetry, politics, laws, mathematics, and theology, without the least assistance from genius or study".
* Sort of inverted in ''Literature/TheNeverendingStory'', where Bastian gets to see several mindless humans setting up heavy stones with letters on them repeatedly, as an entertainment for an intelligent monkey.
* Brought up in ''{{Literature/Dinoverse}}'' when characters start wondering how Betram ''accidentally'' made a time machine - he brings up this trope and says he must have stumbled on the right combination by pure chance.


[[folder: Live Action TV ]]

* ''Series/TheColbertReport'' has a segment about how many different monkeys it takes to produce different authors' works. Apparently it's a million monkeys typing for all eternity to get Shakespeare, ten thousand drunk monkeys typing for ten thousand years to get [[Creator/ErnestHemingway Hemingway]], and ten monkeys for three days to get Creator/DanBrown.
* In the ''Series/DoctorWho'' episode "[[Recap/DoctorWhoS20E3MawdrynUndead Mawdryn Undead]]", the Doctor and Tegan discuss this trope as it applies to "a treeful of monkeys".
-->'''Doctor''': You and I both know, at the end of a millennium they'd still be tapping out gibberish.\\
'''Tegan''': And you'd be right there tapping it out with them.
* ''Series/MockTheWeek'' - ''Unlikely Things to hear on a History Documentary''
--> "On Time Team tonight, we're in Stratford on Avon, where we've uncovered loads of monkey skeletons and some typewriters."
* In one episode of ''Series/MuppetsTonight'', we learn that the show's scripters are actual Muppet monkeys, mindlessly pounding at typewriters going "Ook-ack-ook!". Once they come up with a satisfactory script, Kermit lets them [[Film/TwoThousandOneASpaceOdyssey go touch the monolith]].
-->'''Kermit:''' I'll never know what they see in that thing.
* In the ''Series/That70sShow'' episode "Battle of the Sexists", after Donna manages to score in a basketball game, Eric yells, "[[LastNameBasis Pinciotti]] actually scores! Hell freezes over! A monkey types Hamlet!"
* In ''Series/VeronicaMars'', Veronica gets hauled into the police station for questioning about the death of "Curly" Moran, who she thinks she's never heard of. When she realizes that she actually does know him -- in a seemingly totally different context -- she [[LemonyNarrator thinks]]:
-->"Somewhere, those million chimps, with their million typewriters, must've written King Lear."
* ''Series/WhoseLineIsItAnyway'': Colin started off a game of Weird Newscasters this way:
-->'''Colin''': Our top story, an infinite number of monkeys came up with [[TakeThat the Fox fall line-up.]]


* The band Music/{{Chumbawumba}} was supposedly named after a word typed by a monkey when somebody actually tried to do this in real life. (This was cited on ''Series/NevermindTheBuzzcocks'', but it later turned out it was only one of several false explanations the band would say in interviews to troll the interviewers).
* British band The Mekons released an album ''The Quality of Mercy is not Strnen''. The cover shows one monkey sitting by one typewriter.
* Referenced in the ''Music/TheyMightBeGiants'' song "We Live In a Dump", which opens with the line "Hanging out while the monkeys type away."


[[folder: Newspaper Comics ]]

* In ''ComicStrip/{{Dilbert}}'':
** The title character writes a poem, and Dogbert says something along the lines of "You know, an infinite number of monkeys in an infinite amount of time could type out the complete works of Shakespeare. Your poem? Three monkeys, ten minutes."
** Another joke was "if you take an infinite number of monkeys on typewriters and give them an infinite amount of time, sooner or later you'll have a room full of dead monkeys. Turns out monkeys need feeding."
* Referenced in a ''ComicStrip/FoxTrot'' strip where Peter gets a program to assemble random letters, his logic being that if you put enough monkeys on typewriters to produce ''Hamlet'', then you can surely use a random letter generator to create a ''Hamlet'' book report. Paige then asks about one page which is even more nonsensical that turns out to have been Peter's attempt.
* The monkeys in the May 7th, 2010 comic of ''ComicStrip/{{Bizarro}}'' end up producing ''Literature/TheGreatGatsby'' rather than a work of Shakespeare, much to their supervisor's frustration.


* ''TheRickyGervaisShow'' has a segment in which Karl refuses to believe that the monkeys can ever actually write anything, so stubbornly that Ricky ends up storming out on him.
* ''Radio/TheInfiniteMonkeyCage'' is named after this. If you have an infinite numbers of monkeys on an infinite number of typewriters in the hope that they'll eventually give you Shakespeare's works, you do need to keep them in a cage big enough for all of the monkeys: an infinite monkey cage. The metaphor is occasionally analysed on the show itself:
** One listener once wrote in to ask what the ACTUAL dimensions of the hypothetical cage were, since it'd still be an infinitely sized cage if two dimensions were fixed but smaller than a monkey and the final dimension infinitely big.
** The [[https://www.youtube.com/watch?v=1tdN5uEjnKs full lyrics]] to Creator/EricIdle's theme tune also wonders about it:
--->''If infinite monkeys typed every day,\\
They may accidentally write ''Hamlet'' the play,\\
But they'd probably just shit on it and throw it away,\\
In the infinite monkey cage!''



* The one-act play "Words, Words, Words", belonging to the collection ''All in The Timing'', by Creator/DavidIves, is set in a laboratory where somebody is actually trying out the thought experiment. The only characters who appear on-stage are three of the monkeys, who are naturally rather bemused about the whole business.


[[folder:Web Original]]

* ''LetsPlay/TwitchPlaysPokemon'' is described in its page quote on ThisVeryWiki as tens of thousands of monkeys fighting over ''one'' typewriter, [[{{Metaphorgotten}} half of them desperately trying to progress in the game and the other half throwing shit everywhere]]. They beat Pokemon Red in only sixteen days.


[[folder: Web Comics ]]

* The "Infinite Monkeys" arc of ''Webcomic/{{Goats}}''.
* ''Webcomic/UserFriendly'': "[[http://ars.userfriendly.org/cartoons/?id=20051201 These Terrans are sharp.]]"
* ''Webcomic/SchlockMercenary'', in the [[ExactlyWhatItSaysOnTheTin Big Haunted Battleship]] Arc, eventually leads to Kevin citing this trope, but with the "Great works of Howard Tayler." [[TakeThatMe The narrator claims this can actually be done with 3 monkeys in 15 minutes]].

[[folder: Western Animation ]]

* ''WesternAnimation/TheSimpsons'':
** In "Last Exit to Springfield", C. Montgomery Burns has a bunch of monkeys at typewriters.
--->'''Burns:''' This is a thousand monkeys working at a thousand typewriters. Soon they will have written the greatest novel known to man. ''(takes paper)'' Let's see..." It was the best of times, it was the '''blurst''' of times!?!" You stupid monkey!
** Also from the episode "Children of a Lesser Clod."
--->'''Krusty''': Now, every year we find one good Samaritan so deserving that not recognizing him would make Santa Claus himself vomit with rage... mmm... [[WhoWritesThisCrap who writes this stuff?]]\\
''(Cut to Mr. Teeny on a typewriter.)''\\
'''Mr. Teeny''': ''(subtitles)'' I think it's remarkable I wrote anything.
* The ''WesternAnimation/{{Histeria}}'' episode "Super Writers" has a short sketch about this.
* The ''WesternAnimation/IAmWeasel'' episode "A Troo Storee" has a scene where several monkeys with typewriters are trying to write a novel. Weasel manages to insult them by offering to pay them in bananas, and only I.R. Baboon is left to finish the book.
* In the ''WesternAnimation/FamilyGuy'' episode "The King is Dead", Peter uses a monkeys-on-typewriters reference to belittle the importance of art. [[CutawayGag This is followed by a scene in which several monkeys argue over which flower would best fit in the "rose by any other name" line from]] ''Theatre/RomeoAndJuliet''.
* In ''WesternAnimation/PhineasAndFerb'', "Cliptastic Countdown" combines this with WhoWritesThisCrap. Major Monogram demands who wrote the lines, to which Carl the intern replies, "Agent M, sir." We then see a monkey in a fedora at a typewriter, causing Dr. Doofenshmirtz to complain how [[WhatAreRecords none of the kids watching will know what a typewriter is]]. Monogram tries to excuse it by say it was cheaper that way, but Doof just continues ranting on the point that they would have to find a typewriter from an antiques dealer.


[[folder: Real Life ]]
* This was actually tried in the Paignton Zoo in Devon in 2002, where six macaques were given free access to a (protected) computer. Their initial reaction was to pee on it or bash it with a rock; but in time they did start to get the hang of typing. After several months the results were several pages of gibberish, but the letter ''S'' as in ''Shakespeare'' was more prominent than others.
* A popular PlayByPostGame is to try randomly mashing on the keyboard and see if you get a pronounceable result, or else try to type a specific word with a specific external organ, such as your nose, chin, or elbow. [[MediumAwareness Go on, try it. We won't tell anyone]].
%% * There is an argument which has been used by evolutionists which uses this thought experiment in an attempt to explain how it's possible for evolution to work despite the horrendous difficulties placed in its way by nature. The problem with this idea is that the currently estimated age of the entire Universe is only a very tiny fraction of the length of time required to make the evolution of human beings even remotely likely. Adding to the problem is the age of the Earth, which is far younger than the entire Universe, making this a DiscreditedTrope for explaining evolution.
* A [[http://www.bbc.co.uk/news/technology-15060310 virtual monkey cage]] has been created by a programmer called Jesse Anderson. It's not strictly random, however, since the "monkeys" keep track of whether a given section is part of Shakespeare's works, and put the relevant ones together, thereby dramatically reducing the amount of time required.