The
infinite monkey theorem states that a
monkey hitting keys at
random on a
typewriter keyboard for an infinite amount of time will almost surely type or create a particular chosen text, such as the complete works of
William Shakespeare. Note that "
almost surely" in this context is a mathematical term with a specific meaning, and that the "monkey" is not an actual monkey; rather, it is a vivid metaphor for an abstract device that produces a large, random sequence of letters.
The theorem graphically illustrates the perils of reasoning about infinity by imagining a vast but finite number. If every atom in the visible universe were a monkey producing a billion keystrokes a second from the Big Bang until today, it is still very unlikely that any monkey would get as far as "slings and arrows" in Hamlet's most famous soliloquy. The infinite monkey theorem is straightforward to prove, even without appealing to more advanced results.