It’s called “infinite monkey theorem.” The premise is that, given an unlimited amount of time, any number of primates with keyboards will “almost surely” pound out a comprehensive edition of Shakespeare’s works just by mindless, chance button-pushing.
Well, seeing as how actual monkeys won't hit the keys in a truly random fashion, the theorem's been tested both ways, with the real thing and with computer-synthesized “monkeys” (i.e. random letter generators). But I'm only barely here for the math. The point is that the Bard, the consummate artist, amounts to a kind of statistical incident. The point is that poetry is ultimately a systematized arrangement of the alphabet; tragedy is a matter of time and data; creative output is a conspiracy of luck, and so on. Kind of.
Like I said, we’ve tried it. Thirteen years ago, the Arts Council for England recruited six monkeys and staged a proof of concept, but in a month’s time, the animals only typed several pages of mostly repeated S’s, then set to destroying the computer. So, in 2011, the Million Monkey Project happened. A code-writer generated millions of virtual “monkeys” that “typed” randomized nonsense nine characters at a time while another program cross-referenced those nonsense snippets and recognized if/when they matched phrases from Shakespeare. The "monkeys" didn’t reproduce Shakespeare’s words in written order, but they did reproduce them. All of them. It took more than 7 trillion different nine-character trials -- and that with the added accommodation of filing away matches as they occurred to eliminate redundancy.
So, that's definitely a win for math, but is it a loss for the arts? Not really. Maybe it proves art can be imitated, or reconstructed, but it can't be created by coincidence. Maybe creation is a process whose results can be equal to the sum of an unthinkable number of coincidental attempts -- or a few miraculous strokes of real, Shakespearean genius. In practice, the "infinite monkey theorem" is still an illustration that art is special; if it is statistically inevitable then it is only to the most infinitesimal degree. And those are odds I can live with.