All Topics  
Infinite monkey theorem

 
Infinite Monkey Theorem

   Email Print
   Bookmark   Link






 

Infinite monkey theorem



 
 
The infinite monkey theorem states that a monkey
Monkey

A monkey is a nonhuman primate mammal with the exception usually of the lemurs and tarsiers. More specifically, the term monkey refers to a subset of monkeys: any of the smaller longer-tailed catarrhine or platyrrhine primates as contrasted with the apes....
 hitting keys at random on a typewriter keyboard for an infinite amount of time will almost surely type a given text, such as the complete works of William Shakespeare
William Shakespeare

William Shakespeare was an English people poet and playwright, widely regarded as the greatest writer in the English language and the world's preeminent dramatist....
.

In this context, "almost surely
Almost surely

In probability theory, one says that an event happens almost surely if it happens with probability one. The concept is analogous to the concept of "almost everywhere" in measure theory....
" is a mathematical term with a precise meaning, and the "monkey" is not an actual monkey; rather, it is a metaphor for an abstract device that produces a random sequence
Random sequence

A random sequence is a kind of stochastic process. In short, a random sequence is a sequence of random variables.Random sequences are essential in statistics....
 of letters ad infinitum
Ad infinitum

Ad infinitum is a Latin List of Latin phrases meaning "to infinity."In context, it usually means "continue forever, without limit" and thus can be used to describe a non-terminating process, a non-terminating repeating process, or a set of instructions to be repeated "forever", among other uses....
.






Discussion
Ask a question about 'Infinite monkey theorem'
Start a new discussion about 'Infinite monkey theorem'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Monkey Typing
The infinite monkey theorem states that a monkey
Monkey

A monkey is a nonhuman primate mammal with the exception usually of the lemurs and tarsiers. More specifically, the term monkey refers to a subset of monkeys: any of the smaller longer-tailed catarrhine or platyrrhine primates as contrasted with the apes....
 hitting keys at random on a typewriter keyboard for an infinite amount of time will almost surely type a given text, such as the complete works of William Shakespeare
William Shakespeare

William Shakespeare was an English people poet and playwright, widely regarded as the greatest writer in the English language and the world's preeminent dramatist....
.

In this context, "almost surely
Almost surely

In probability theory, one says that an event happens almost surely if it happens with probability one. The concept is analogous to the concept of "almost everywhere" in measure theory....
" is a mathematical term with a precise meaning, and the "monkey" is not an actual monkey; rather, it is a metaphor for an abstract device that produces a random sequence
Random sequence

A random sequence is a kind of stochastic process. In short, a random sequence is a sequence of random variables.Random sequences are essential in statistics....
 of letters ad infinitum
Ad infinitum

Ad infinitum is a Latin List of Latin phrases meaning "to infinity."In context, it usually means "continue forever, without limit" and thus can be used to describe a non-terminating process, a non-terminating repeating process, or a set of instructions to be repeated "forever", among other uses....
. The theorem illustrates the perils of reasoning about infinity by imagining a vast but finite number, and vice versa. The probability
Probability

Probability, or wikt:chance, is a way of expressing knowledge or belief that an Event will occur or has occurred. In mathematics the concept has been given an exact meaning in probability theory, that is used extensively in such areas of study as mathematics, statistics, finance, gambling, science, and philosophy to draw conclusions about t...
 of a monkey typing a given string of text exactly, as long as, for example, Shakespeare's Hamlet
Hamlet

Hamlet is a tragedy by William Shakespeare, believed to have been written between 1599 and 1601. The play, set in Denmark, recounts how Prince Hamlet exacts revenge on his uncle King Claudius, who has murdered King Hamlet, the King, and then taken the throne and married Gertrude ....
, is so tiny that, were the experiment conducted, the chance of it actually occurring during a span of time of the order of the age of the universe
Age of the universe

The age of the universe is the time elapsed between the Big Bang and the present day. Current theory and observations suggest that this is between 13.61 and 13.85 1000000000 years....
 is minuscule but not zero.

Variants of the theorem include multiple and even infinitely many typists, and the target text varies between an entire library and a single sentence. The history of these statements can be traced back to Aristotle
Aristotle

Aristotle was a Greeks philosopher, a student of Plato and teacher of Alexander the Great. He wrote on many subjects, including physics, metaphysics, Poetics , theater, music, logic, rhetoric, politics, government, ethics, biology and zoology....
's On Generation and Corruption and Cicero
Cicero

Marcus Tullius Cicero was a Ancient Rome philosopher, statesman, lawyer, political theorist, and Constitution of the Roman Republic. Cicero is widely considered one of Rome's greatest rhetoric and prose stylists....
's De natura deorum, through Blaise Pascal
Blaise Pascal

Blaise Pascal , was a France mathematician, physicist, and religion philosopher. He was a child prodigy who was educated by his father, a civil servant....
 and Jonathan Swift
Jonathan Swift

Jonathan Swift was an Anglo-Irish satire, essayist, political pamphleteer , poet and cleric who became Dean of St. Patrick's Cathedral, Dublin, Dublin....
, and finally to modern statements with their iconic typewriters. In the early 20th century, Émile Borel
Émile Borel

F?lix ?douard Justin ?mile Borel was a France mathematician and politician.Along with Ren?-Louis Baire and Henri Lebesgue, he was among the pioneers of measure and its application to probability theory....
 and Arthur Eddington used the theorem to illustrate the timescales implicit in the foundations of statistical mechanics
Statistical mechanics

Statistical mechanics is the application of probability theory, which includes Mathematics tools for dealing with large populations, to the field of mechanics, which is concerned with the motion of particles or objects when subjected to a force....
. Various Christian apologists on the one hand, and Richard Dawkins
Richard Dawkins

Clinton Richard Dawkins, Royal Society#Fellowship, Royal Society of Literature is a United Kingdom ethology, evolutionary biology and popular science author....
 on the other, have argued about the appropriateness of the monkeys as a metaphor for evolution
Evolution

In biology, evolution is change in the heritability trait of a population of organisms from one generation to the next. These changes are caused by a combination of three main processes: variation, reproduction, and selection....
.

Today, popular interest in the typing monkeys is sustained by numerous appearances in literature, television, radio, music, and the Internet. In 2003, an experiment was performed with six Celebes Crested Macaque
Celebes Crested Macaque

The Celebes Crested Macaque , also known as the Crested Black Macaque, Sulawesi Crested Macaque, or the Black "Ape", is an Old World monkey that lives in the northeast of the Indonesian island of Sulawesi as well as on smaller neighboring islands....
s, but their literary contribution was five pages consisting largely of the letter 'S'.

Solution


Direct proof

There is a straightforward proof of this theorem. If two events are statistically independent, (i.e. neither affects the outcome of the other), then the probability
Probability

Probability, or wikt:chance, is a way of expressing knowledge or belief that an Event will occur or has occurred. In mathematics the concept has been given an exact meaning in probability theory, that is used extensively in such areas of study as mathematics, statistics, finance, gambling, science, and philosophy to draw conclusions about t...
 of both happening equals the product of the probabilities of each one happening independently. For example, if the chance of rain in Sydney on a particular day is 0.3 and the chance of an earthquake in San Francisco on that day is 0.008, then the chance of both happening on that same day is 0.3 × 0.008 = 0.0024.

Suppose the typewriter
Typewriter

A typewriter is a Machine or electromechanical device with a set of "keys" that, when pressed, cause Typeface to be printed on a medium, usually paper....
 has 50 keys, and the word to be typed is "banana". Typing at random, the chance that the first letter typed is b is 1/50, and the chance that the second letter typed is a is also 1/50, and so on, because events are independent. So the chance of the first six letters matching banana is × (1/50) × (1/50) × (1/50) × (1/50) × (1/50) = (1/50)6. For the same reason, the chance that the next 6 letters match banana is also (1/50)6, and so on.

From the above, the chance of not typing banana in a given block of 6 letters is 1 − (1/50)6. Because each block is typed independently, the chance Xn of not typing banana in any of the first n blocks of 6 letters is As n grows, Xn gets smaller. For an n of a million, Xn is roughly 0.9999 (i.e. the chance of not typing banana is roughly 99.99%), but for an n of 10 billion Xn is roughly 0.53 (i.e. the chance of not typing banana is roughly 53%) and for an n of 100 billion it is roughly 0.0017 (i.e. the chance of not typing banana is roughly 0.17%). As n approaches infinity, the probability Xn approaches
Limit (mathematics)

In mathematics, the concept of a "limit" is used to describe the behavior of a Function as its argument or input either "gets close" to some point, or as the argument becomes arbitrarily large; or the behavior of a sequence's elements as their index increases indefinitely....
 zero; that is, by making n large enough, Xn can be made as small as one likes.

The same argument shows why at least one of infinitely many monkeys will (almost surely) produce a text as quickly as it would be produced by a perfectly accurate human typist copying it from the original. In this case Xn = (1 − (1/50)6)n where Xn represents the probability that none of the first n monkeys types banana correctly on their first try. When we consider 100 billion monkeys, the probability falls to 0.17%, and as the number of monkeys n increases, the value of Xn—the probability of the monkeys failing to reproduce the given text—approaches zero arbitrarily closely. The limit, for n going to infinity, is zero.

Infinite strings

The two statements above can be stated more generally and compactly in terms of string
String (computer science)

In computer programming and some branches of mathematics, a string is an ordered sequence of symbols. These symbols are chosen from a predetermined set or alphabet....
s, which are sequences of characters chosen from some finite alphabet:
  • Given an infinite string where each character is chosen uniformly at random
    Uniform distribution (discrete)

    In probability theory and statistics, the discrete uniform distribution is a discrete probability distribution that can be characterized by saying that all values of a finite set of possible values are equally probable....
    , any given finite string almost surely occurs as a substring at some position (and indeed, infinitely many positions).
  • Given an infinite sequence of infinite strings, where each character of each string is chosen uniformly at random, any given finite string almost surely occurs as a prefix of one of these strings (and indeed, as a prefix of infinitely many of these strings in the sequence).


Both follow easily from the second Borel–Cantelli lemma. For the second theorem, let Ek be the event
Event (probability theory)

In probability theory, an event is a Set of outcomes to which a probability is assigned. Typically, when the sample space is finite, any subset of the sample space is an event ....
 that the kth string begins with the given text. Because this has some fixed nonzero probability p of occurring, the Ek are independent, and the below sum diverges, the probability that infinitely many of the Ek occur is 1. The first theorem is shown similarly; one can divide the random string into nonoverlapping blocks matching the size of the desired text, and make Ek the event where the kth block equals the desired string.

Probabilities

Ignoring punctuation
Punctuation

Punctuation is everything in written language other than the actual letters or numbers, including punctuation marks , Interword separation and indentation....
, spacing, and capitalization, a monkey typing letters uniformly at random has a chance of one in 26 of correctly typing the first letter of Hamlet
Hamlet

Hamlet is a tragedy by William Shakespeare, believed to have been written between 1599 and 1601. The play, set in Denmark, recounts how Prince Hamlet exacts revenge on his uncle King Claudius, who has murdered King Hamlet, the King, and then taken the throne and married Gertrude ....
.
It has a chance of one in 676 (26 × 26) of typing the first two letters. Because the probability shrinks exponential
Exponential growth

Exponential growth occurs when the growth rate of a mathematical function is proportionality to the function's current value. In the case of a discrete domain of definition with equal intervals it is also called geometric growth or geometric decay ....
ly, at 20 letters it already has only a chance of one in 2620 = 19,928,148,895,209,409,152,340,197,376 (almost 2 × 1028). In the case of the entire text of Hamlet, the probabilities are so vanishingly small they can barely be conceived in human terms. The text of Hamlet contains approximately 130,000 letters. Thus there is a probability of one in 3.4 × 10183,946 to get the text right at the first trial. The average number of letters that needs to be typed until the text appears is also 3.4 × 10183,946.

Even if the observable universe were filled with monkeys typing for all time, their total probability to produce a single instance of Hamlet would still be less than one in 10183,800. As Kittel
Charles Kittel

Charles Kittel is an United States physicist. He was a Professor at University of California, Berkeley from 1951 and has been Professor Emeritus since 1978....
 and Kroemer
Herbert Kroemer

Herbert Kroemer , a professor of electrical and computer engineering at the University of California, Santa Barbara, received his Ph.D. in theoretical physics in 1952 from the University of G?ttingen, Germany, with a dissertation on hot electron effects in the then-new transistor, setting the stage for a career in research on the physics of s...
 put it, "The probability of Hamlet is therefore zero in any operational sense of an event…", and the statement that the monkeys must eventually succeed "gives a misleading conclusion about very, very large numbers." This is from their textbook on thermodynamics
Thermodynamics

In physics, thermodynamics is the study of the conversion of heat energy into different forms of energy ; different energy conversions into heat energy; and its relation to macroscopic variables such as temperature, pressure, and volume....
, the field whose statistical foundations motivated the first known expositions of typing monkeys.

History


Statistical mechanics


In one of the forms in which probabilists now know this theorem, with its "dactylographic" [i.e., typewriting] monkeys (; the French word singe covers both the monkey
Monkey

A monkey is a nonhuman primate mammal with the exception usually of the lemurs and tarsiers. More specifically, the term monkey refers to a subset of monkeys: any of the smaller longer-tailed catarrhine or platyrrhine primates as contrasted with the apes....
s and the ape
Ape

An ape is any member of the Hominoidea superfamily of primates. In less scientific language, it has various meanings, although it often excludes humans....
s), appeared in Émile Borel's 1913 article "Mécanique Statistique et Irréversibilité" (Statistical mechanics
Statistical mechanics

Statistical mechanics is the application of probability theory, which includes Mathematics tools for dealing with large populations, to the field of mechanics, which is concerned with the motion of particles or objects when subjected to a force....
 and irreversibility
), and in his book "Le Hasard" in 1914. His "monkeys" are not actual monkeys; rather, they are a metaphor for an imaginary way to produce a large, random sequence
Random sequence

A random sequence is a kind of stochastic process. In short, a random sequence is a sequence of random variables.Random sequences are essential in statistics....
 of letters. Borel said that if a million monkeys typed ten hours a day, it was extremely unlikely that their output would exactly equal all the books of the richest libraries of the world; and yet, in comparison, it was even more unlikely that the laws of statistical mechanics would ever be violated, even briefly.

The physicist Arthur Eddington drew on Borel's image further in The Nature of the Physical World (1928), writing:

These images invite the reader to consider the incredible improbability of a large but finite number of monkeys working for a large but finite amount of time producing a significant work, and compare this with the even greater improbability of certain physical events. Any physical process that is even less likely than such monkeys' success is effectively impossible, and it may safely be said that such a process will never happen.

Origins and "The Total Library"

In a 1939 essay entitled "The Total Library", Argentine writer Jorge Luis Borges
Jorge Luis Borges

Jorge Francisco Isidoro Luis Borges was an Argentina writer born in Buenos Aires. He was brought up bilingual in Spanish and English. In 1914, his family moved to Switzerland where he attended school, then traveled around Spain....
 traced the infinite-monkey concept back to Aristotle
Aristotle

Aristotle was a Greeks philosopher, a student of Plato and teacher of Alexander the Great. He wrote on many subjects, including physics, metaphysics, Poetics , theater, music, logic, rhetoric, politics, government, ethics, biology and zoology....
's Metaphysics. Explaining the views of Leucippus
Leucippus

Leucippus or Leukippos was the first to develop the theory of atomism ? the idea that everything is composed entirely of various imperishable, indivisible elements called atoms ? which was elaborated in far greater detail by his pupil and successor, Democritus....
, who held that the world arose through the random combination of atom
Atom

|-! bgcolor=gray | Properties|-||}The atom is a basic unit of matter consisting of a dense, central atomic nucleus surrounded by a electron cloud of electric charge electrons....
s, Aristotle notes that the atoms themselves are homogeneous and their possible arrangements only differ in shape, position and ordering. In De Generatione et Corruptione (On Generation and Corruption), the Greek philosopher compares this to the way that a tragedy and a comedy consist of the same "atoms", i.e., alphabetic characters. Three centuries later, Cicero
Cicero

Marcus Tullius Cicero was a Ancient Rome philosopher, statesman, lawyer, political theorist, and Constitution of the Roman Republic. Cicero is widely considered one of Rome's greatest rhetoric and prose stylists....
's De natura deorum (On the Nature of the Gods) argued against the atomist worldview:

Borges follows the history of this argument through Blaise Pascal
Blaise Pascal

Blaise Pascal , was a France mathematician, physicist, and religion philosopher. He was a child prodigy who was educated by his father, a civil servant....
 and Jonathan Swift
Jonathan Swift

Jonathan Swift was an Anglo-Irish satire, essayist, political pamphleteer , poet and cleric who became Dean of St. Patrick's Cathedral, Dublin, Dublin....
, then observes that in his own time, the vocabulary had changed. By 1939, the idiom was "that a half-dozen monkeys provided with typewriters would, in a few eternities, produce all the books in the British Museum." (To which Borges adds, "Strictly speaking, one immortal monkey would suffice.") Borges then imagines the contents of the Total Library which this enterprise would produce if carried to its fullest extreme:

Borges's total library concept was the main theme of his widely-read 1941 short story "The Library of Babel
The Library of Babel

"The Library of Babel" is a short story by Argentina author and librarian Jorge Luis Borges , conceiving of a universe in the form of a vast library containing all possible 410-page books of a certain format....
", which describes an unimaginably vast library consisting of interlocking hexagonal chambers, together containing every possible volume that could be composed from the letters of the alphabet and some punctuation characters.

Applications and criticisms


Evolution

Thomas Henry Huxley   Project Gutenberg Etext 16935
In his 1931 book The Mysterious Universe, Eddington's rival James Jeans
James Hopwood Jeans

Sir James Hopwood Jeans Order of Merit Royal Society MA DSc ScD LLD was an England physicist, astronomer and mathematician....
 attributed the monkey parable to a "Huxley", presumably meaning Thomas Henry Huxley. This attribution is incorrect. Today, it is sometimes further reported that Huxley applied the example in a now-legendary debate
1860 Oxford evolution debate

The 1860 Oxford evolution debate took place at the Oxford University Museum of Natural History on 30 June 1860, seven months after the publication of Charles Darwin's On the Origin of Species....
 over Charles Darwin
Charles Darwin

Charles Robert Darwin Royal Society was an English people natural history who realised and presented compelling evidence that all species of life have evolution over time from common descent, through the process he called natural selection....
's Origin of Species with the Anglican Bishop of Oxford, Samuel Wilberforce
Samuel Wilberforce

Samuel Wilberforce was an England bishop in the Church of England, third son of William Wilberforce. Known as "Soapy Sam", Wilberforce was one of the greatest public speakers of his day....
, held at a meeting of the British Association for the Advancement of Science
British Association for the Advancement of Science

The British Association for the Advancement of Science or the British Science Association, formally known as the BA, is a learned society with the object of promoting science, directing general attention to scientific matters, and facilitating interaction between scientific workers....
 at Oxford in June 30, 1860. This story suffers not only from a lack of evidence, but the fact that in 1860 the typewriter itself had yet to emerge. Primates were still a sensitive topic for other reasons, and the Huxley-Wilberforce debate did include byplay about apes: the bishop asked whether Huxley was descended from an ape on his grandmother's or his grandfather's side, and Huxley responded something to the effect that he would rather be descended from an ape than from someone who argued as dishonestly as the bishop.

Despite the original mix-up, monkey-and-typewriter arguments are now common in arguments over evolution. For example, Doug Powell argues as a Christian apologist that even if a monkey accidentally types the letters of Hamlet, it has failed to produce Hamlet because it lacked the intention to communicate. His parallel implication is that natural laws could not produce the information content in DNA
DNA

Deoxyribonucleic acid is a nucleic acid that contains the genetics instructions used in the development and functioning of all known living organisms and some viruses....
. A more common argument is represented by Reverend John F. MacArthur
John F. MacArthur

John Fullerton MacArthur, Jr. is a United States Calvinism evangelicalism writer and Minister of religion, noted for his radio program entitled Grace to You and as the editor of the Gold Medallion Book Award winning MacArthur Study Bible....
, who claims that the genetic mutations necessary to produce a tapeworm from an amoeba are as unlikely as a monkey typing Hamlet's soliloquy, and hence the odds against the evolution of all life are impossible to overcome.

Evolutionary biologist
Evolutionary biology

Evolutionary biology is a sub-field of biology concerned with the origin of species from a common descent and descent of species, as well as their evolution, multiplication and diversity over time....
 Richard Dawkins
Richard Dawkins

Clinton Richard Dawkins, Royal Society#Fellowship, Royal Society of Literature is a United Kingdom ethology, evolutionary biology and popular science author....
 employs the typing monkey concept in his 1986 book The Blind Watchmaker
The Blind Watchmaker

The Blind Watchmaker is a 1986 book by Richard Dawkins in which he presents an explanation of, and argument for, the theory of evolution by means of natural selection....
 to demonstrate the abilities of natural selection
Natural selection

Natural selection is the process by which favorable heritable trait become more common in successive generations of a population of Reproduction organisms, and unfavorable heritable traits become less common, due to differential reproduction of genotypes....
 in producing biological complexity
Complexity

In general usage, complexity tends to be used to characterize something with many parts in intricate arrangement. In science there are at this time a number of approaches to characterizing complexity, many of which are reflected in this article....
 out of random mutation
Mutation

In biology, mutations are changes to the nucleotide sequence of the genetic material of an organism. Mutations can be caused by copying errors in the genetic material during cell division, by exposure to ultraviolet or ionizing radiation, chemical mutagens, or virus , or can be induced by the organism, itself, by cellular processes such as s...
s. In the simulation experiment he describes, Dawkins has his Weasel program
Weasel program

The weasel program is a computer software simulation written by Ethology Richard Dawkins in order to demonstrate the relative power of cumulative selection in natural and artificial evolutionary systems....
 produce the Hamlet phrase METHINKS IT IS LIKE A WEASEL by typing random phrases but constantly freezing those parts of the output which already match the goal. The point is that random string generation merely serves to furnish raw materials, while selection imparts the information.

A different avenue for rejecting the analogy between evolution and an unconstrained monkey lies in the problem that the monkey types only one letter at a time, independently of the other letters. Hugh Petrie argues that a more sophisticated setup is required, in his case not for biological evolution but the evolution of ideas:

James W. Valentine
James W. Valentine

James W. Valentine is an American evolutionary biologist and Professor Emeritus in the Department of Integrative Biology at the University of California, Berkeley....
, while admitting that the classic monkey's task is impossible, finds that there is a worthwhile analogy between written English and the metazoan genome in this other sense: both have "combinatorial, hierarchical structures" that greatly constrain the immense number of combinations at the alphabet level.

Literary theory

R. G. Collingwood
R. G. Collingwood

Robin George Collingwood was a British philosopher and historian. He was born at Cartmel Fell in Lancashire, the son of the academic W. G. Collingwood, and was educated at Rugby School and at University College, Oxford, where he read Greats....
 argued in 1938 that art cannot be produced by accident, and wrote as a sarcastic aside to his critics,

Nelson Goodman
Nelson Goodman

Henry Nelson Goodman was an United States philosopher, known for his work on counterfactuals, mereology, the problem of induction, Irrealism and aesthetics....
 took the contrary position, illustrating his point along with Catherine Elgin by the example of Borges' “Pierre Menard, Author of the Quixote”,

In another writing, Goodman elaborates, "That the monkey may be supposed to have produced his copy randomly makes no difference. It is the same text, and it is open to all the same interpretations…." Gérard Genette
Gérard Genette

G?rard Genette is a France literary theory, associated in particular with the structuralist movement and such figures as Roland Barthes and Claude L?vi-Strauss, from whom he adapted the concept of bricolage....
 dismisses Goodman's argument as begging the question.

For Jorge J. E. Gracia
Jorge J. E. Gracia

Jorge J. E. Gracia is a professor of philosophy at the University at Buffalo, The State University of New York. He holds the Samuel P. Capen Chair in Philosophy and is State University of New York Distinguished Professor....
, the question of the identity of texts leads to a different question, that of author
Author

An author is defined both as "the person who originates or gives existence to anything" and that authorship determines responsibility for what is created....
. If a monkey is capable of typing Hamlet, despite having no intention of meaning and therefore disqualifying itself as an author, then it appears that texts do not require authors. Possible solutions include saying that whoever finds the text and identifies it as Hamlet is the author; or that Shakespeare is the author, the monkey his agent, and the finder merely a user of the text. These solutions have their own difficulties, in that the text appears to have a meaning separate from the other agents: what if the monkey operates before Shakespeare is born, or if Shakespeare is never born, or if no one ever finds the monkey's typescript?

Random number generation

The theorem concerns a thought experiment
Thought experiment

A thought experiment , sometimes called a Gedanken experiment, is a proposal for an experiment that would test or illuminate a hypothesis or theory....
 which cannot be fully carried out in practice, since it is predicted to require prohibitive amounts of time and resources. Nonetheless, it has inspired efforts in finite random text generation.

One computer program run by Dan Oliver of Scottsdale, Arizona, according to an article in The New Yorker
The New Yorker

The New Yorker is an United States magazine that publishes reportage, commentary, criticism, essays, fiction, satire, cartoons, and poetry. Starting as a weekly in the mid-1920s, the magazine is now published 47 times per year, with five of these issues covering two-week spans....
, came up with a result on August 4, 2004: After the group had worked for 42,162,500,000 billion billion monkey-years, one of the "monkeys" typed, “VALENTINE. Cease toIdor:eFLP0FRjWK78aXzVOwm)-‘;8.t" The first 19 letters of this sequence can be found in "The Two Gentlemen of Verona". Other teams have reproduced 18 characters from "Timon of Athens", 17 from "Troilus and Cressida", and 16 from "Richard II".

A website entitled The Monkey Shakespeare Simulator, launched on July 1, 2003, contained a Java applet
Java applet

A Java applet is an applet delivered to the users in the form of Java bytecode. Java applets can run in a Web browser using a Java Virtual Machine , or in Sun Microsystems's AppletViewer, a stand-alone tool for testing applets....
 that simulates a large population of monkeys typing randomly, with the stated intention of seeing how long it takes the virtual monkeys to produce a complete Shakespearean play from beginning to end. For example, it produced this partial line from Henry IV, Part 2
Henry IV, Part 2

Henry IV, Part 2 is a history play by William Shakespeare, believed written between 1596 and 1599. It is the third part of a tetralogy, preceded by Richard II and Henry IV, Part 1 and succeeded by Henry V ....
, reporting that it took "2,737,850 million billion billion billion monkey-years" to reach 24 matching characters:
RUMOUR. Open your ears; 9r"5j5&?OWTY Z0d...


Due to processing power limitations, the program uses a probabilistic model (by using a random number generator or RNG) instead of actually generating random text and comparing it to Shakespeare. When the simulator "detects a match" (that is, the RNG generates a certain value or a value within a certain range), the simulator simulates the match by generating matched text.

Questions about the statistics describing how often an ideal monkey should type certain strings can motivate practical tests for random number generators as well; these range from the simple to the "quite sophisticated". Computer science professors George Marsaglia
George Marsaglia

George Marsaglia is a mathematician and computer scientist. He is perhaps best known for establishing the lattice structure of congruential random number generators in the paper "Random numbers fall mainly in the planes",...
 and Arif Zaman
Arif Zaman

Dr. Arif Zaman was a member of the Statistics Department at Purdue University and later at Florida State University for 12 years before he joined LUMS in 1994....
 report that they used to call such tests "overlapping m-tuple
Tuple

In mathematics, a tuple is a sequence of a specific number of values, called the components of the tuple. These components can be any kind of mathematical objects, where each component of a tuple is a value of a specified type....
 tests" in lecture, since they concern overlapping m-tuples of successive elements in a random sequence. But they found that calling them "monkey tests" helped to motivate the idea with students. They published a report on the class of tests and their results for various RNGs in 1993.

Popular culture

The infinite monkey theorem and its associated imagery is considered a popular
Popular culture

Popular culture is the totality of Distinction memes, ideas, Perspective s and Attitude s that are deemed preferred per an informal consensus within the mainstream of a given culture....
 and proverb
Proverb

A proverb , also called a byword or nayword, is a simple and concrete saying popularly known and repeated, which expresses a truth, based on common sense or the practical experience of humanity....
ial illustration of the mathematics of probability, widely known to the general public because of its transmission through popular culture
Popular culture

Popular culture is the totality of Distinction memes, ideas, Perspective s and Attitude s that are deemed preferred per an informal consensus within the mainstream of a given culture....
 rather than because of its transmission via the classroom.

This theorem was mentioned in part (and worded differently) and used as a joke in the book "A Hitchhiker's Guide To The Galaxy" by Douglas Adams. In The Simpsons episode "Last Exit to Springfield," first aired on 3/11/1993, Mr Burns states "This is a thousand monkeys working at a thousand typewriters. Soon they'll have written the greatest novel known to man. Lets see. It was the best of times, it was the "blurst" of times! You stupid monkey!" The enduring, widespread and popular nature of the knowledge of the theorem was noted in the introduction to a 2001 paper, "Monkeys, Typewriters and Networks — the Internet in the Light of the Theory of Accidental Excellence" (Hoffmann and Hofmann). In 2002, a Washington Post article said: "Plenty of people have had fun with the famous notion that an infinite number of monkeys with an infinite number of typewriters and an infinite amount of time could eventually write the works of Shakespeare." In 2003, the previously mentioned Arts Council
Arts Council England

Arts Council England was formed in 1994 when the Arts Council of Great Britain was divided into three separate bodies for England, Scotland and Wales....
 funded experiment involving real monkeys and a computer keyboard received widespread press coverage. In 2007, the theorem was listed by
Wired
Wired (magazine)

Wired is a full-color monthly United States magazine and on-line periodical, published since March 1993, that reports on how technology affects culture, the economy, and politics....
magazine in a list of eight classic thought experiment
Thought experiment

A thought experiment , sometimes called a Gedanken experiment, is a proposal for an experiment that would test or illuminate a hypothesis or theory....
s.

The cartoonist Ruben Bolling
Ruben Bolling

Ruben Bolling is a pseudonym for Ken Fisher, a cartoonist, the author of Tom the Dancing Bug....
 satirized the thought experiment in his
Tom the Dancing Bug
Tom the Dancing Bug

Tom the Dancing Bug is a weekly comic strip by Ruben Bolling which presents critical commentary on modern life, current events, and conventional wisdom and clich?s....
 cartoon, with a monkey asking "How can I credibly delay Hamlet's revenge until Act V" in the final frame.

External links

  • , October 2008, a satirical essay by D.R. Belz from The Baltimore Examiner
  • , August 1998, Adam Bridge
  • , a bibliography with quotations
  • (in Monash University's Virtual Lab)
  • - The Infinite Monkey Protocol Suite (IMPS)
  • , on populating the cosmos with monkey particles