A new study reveals it would take far longer than the lifespan of our universe for a typing monkey to randomly produce Shakespeare. So, while the Infinite Monkey Theorem is true, it is also somewhat misleading.
The question that everyone has been dying to know has been answered. Finally! What will scientists study next?
Infinite time is undefined though. We are not sure there was time before the Big Bang. Before anyone says “but there must have been,” consider that it’s just as paradoxical and mind blowing to imagine that time never had a beginning and just stretches infinitely into the past. How can that be so? It means it would have taken an infinite amount of time for us to reach this moment in time, and that means we never would have.
Why must the concept of time before the big bang (or after our heat death) exist in our physical reality for us to speculate about theoretical infinities past those? The thought experiment is about infinite time, not all the time in our limited universe. A lot of things happen at infinity that break down as soon as you add a limit, but we're not talking limits when we're talking infinity.
I think the implications behind there being infinite time in the past are fun if you assume that the universe works like a stochastic state machine. It means that either every finite event that has happened and will happen has already happened an infinite number of times or the universe is infinitely large.
I can't remember the author or title, but that was the idea for a story I once read.
God sends an angel and the monkeys to do the job. They get close, but when the angel is doing the final read through he sees "...to be, or not to beee, Damn the 'E' key is sticking. " And they have to start over
So, while the Infinite Monkey Theorem is true, it is also somewhat misleading.
Is it though? The Monkey Theorem should make it understandable how long infinity really is. That the lifetime of the universe is not long enough is nothing unexpected IMHO, infinity is much (infinitely) longer. And that's what the theorem is about, isn't it?!
Except the lifetime of the universe is quite small when compared to infinity, so it doesn't really convey how large infinity is because it's so much more.
The thought experiment suggests that over a long enough period of time, every possible combination of letters would be typed out on a keyboard, including Hamlet.
They are not arguing about randomness, as it is inherent to the thought experiment. Randomness is necessary for the experiment to occur.
They are arguing that the universe would be dead before the time criteria is met. It is a bitter and sarcastic conclusion to the thought experiment, and is supposed to be funny.
In conversation, it would be delivered like this:
"You know, over a long enough period of time, monkeys smashing typewriters randomly would eventually produce Hamlet"
It’s not a “study”, it’s just 2 mathematicians having some fun. The paper is a good read, and as a math teacher I see a lot of pedagogical values in such publications.
Have the monkey write down a single character. Just one. 29/30 of the time, it won't be the same character as the first one in Shakespeare's complete works; discard that sheet of paper, then try again. 1/30 of the time the monkey will type out the right character; when they do it, keep that sheet of paper and make copies out of it.
Now, instead of giving a completely blank sheet to the monkey, give them one of those copies. And let them type the second character. If different from the actual second character in Shakespeare's works, discard that sheet and give him a new copy (with the right 1st char still there - the monkey did type it out!). Do this until the monkey types the correct second character. Keep that sheet with 2 correct chars, make copies out of it, and repeat the process for the third character.
And then the fourth, the fifth, so goes on.
Since swapping sheets all the time takes more time than letting the monkey go wild, let's increase the time per typed character (right or wrong), from 1 second to... let's say, 60 times more. A whole minute. And since the monkey will type junk 29/30 of the time, it'll take around 30min to type the right character.
It would take even longer, right? Well... not really. Shakespeare's complete works have around 5 million characters, so the process should take 5*10⁶ * 30min = 2.5 million hours, or 285 years.
But we could do it even better. This approach has a single monkey doing all the work; the paper has 200k of them. We could split Shakespeare's complete works into 200k strings of 25 chars each, and assign each string to a monkey. Each monkey would complete their assignment, on average, after 12h30min; some will take a bit longer, but now we aren't talking about the thermal death of the universe or even centuries, it'll take at most a few days.
Why am I sharing this? I'm not invalidating the paper, mind you, it's cool maths.
I've found this metaphor of monkeys typing Shakespeare quite a bit in my teen years, when I still arsed myself to discuss with creationists. You know, the sort of people who thinks that complex life can't appear due to random mutations, just like a monkey can't type the full works of Shakespeare.
Complex life is not the result of a single "big" mutation, like a monkey typing the full thing out of the blue; it involves selection and inheritance, as the sheets of paper being copied or discarded.
And just like assigning tasks to different monkeys, multiple mutations can pop up independently and get recombined. Not just among sexual beings; even bacteria can transmit genes horizontally.
Already back then (inb4 yes, I was a weird teen...) I developed the skeleton of this reasoning. Now I just plopped the numbers that the paper uses, and here we go.
I think the point is less about any kind of route to Hamlet, and more about the absurdity of infinite tries in a finite space(time). There are a finite (but extremely large) number of configurations of English characters in a work the length of Hamlet. If you have truly an infinite number of attempts (monkeys, time, or both are actually infinite) and the trials are all truly random (every character is guaranteed to have the same chance as every other) then you will necessarily arrive at that configuration eventually.
As far as your process, of procedurally generating each letter one by one until you have the completed works, we actually have a monkey who more or less did that already. His name is William.
This changes the rules though from check at the end to check at every letter. That's where the real efficiency gain is.... The insertion of an all knowing checker who could have written it himself anyway. The math of permutations vs combinations changes drastically if we change the rules.
The insertion of an all knowing checker who could have written it himself anyway
The checker does make all the difference, but he doesn't need to be able to write it by himself. It could be even a brainless process, such as natural selection.
Among other problems, this fails to account for non-typing activities performed by the monkey, such as damaging the typewriter or attacking the researcher.
285 years increases to a few thousand if you alarmingly frequently have to clean the contents of a monkey's colon out of a typewriter.
And at some point you'd want to further "refine" your selection process by "repairing" the typewriter to have fewer keys and/or causing the typewriter to jam after the required key press. Monkeys like to press the same key over and over again. Good luck getting them to stop once they've pressed a key once.
TL;DR monkeys are chaos, and this will not be easy.
...what? No it isn't. Restricting the premise from infinite to any finite amount of time completely negates it. That doesn't prove it's "misleading", it proves anyone that thinks it does has no idea what they're talking about.
Ignoring the obvious flaw of throwing out the importance of infinity here, they would be exceedingly unlikely but technically not unable. A random occurrence is just as likely to happen on try number 1 as it is on try number 10 billion. It doesn't become any more or less likely as iterations occur. This is an all too common failure of understanding how probabilities work.
The results reveal that it is possible (around a 5% chance) for a single chimp to type the word "bananas" in its own lifetime.
That sounds a little low to me. B and N are right next to each other, so I'd expect them to mash left and right among similar keys a lot of the time. Then again, I think we're expecting some randomness here, not an actual chimp at a typewriter, but that's probably more likely to reproduce longer works than an actual chimp.
I get annoyed when websites say something like, ´Using a password of this strength will take a a hacker one million years to brute force.´
No, it’ll take a million years to try every combination and permutation of allowed characters. Chances are your password will be tried much sooner than that.
When they say such things, the are probably talking about the expected value, where those chances are taken into account, just like the number calculated in this article.
Lifetime of the universe is infinitely less than infinite time. So they solved for the wrong problem. Of course it may take longer than the life of the universe, or it may happen in a year. That's the whole point of the concepts of infinity and true randomness. Once you put a limit on time or a restriction on randomness, then the thought experiment is broken. You've totally changed the equation.
As such, we have to conclude that Shakespeare himself inadvertently provided the answer as to whether monkey labour could meaningfully be a replacement for human endeavour as a source of scholarship or creativity.
To quote Hamlet, Act 3, Scene 3, Line 87: “No”.
Well you're not supposed to just have one. It's supposed to be a thousand monkies at a thousand typewriters.
Now do the Mythbusters thing and figure out how many monkies and typewriters it would take for them to write Hamlet in just under a year. Don't just solve the myth; put it to the test!
I thought it was supposed to be an infinite amount of monkeys, since it's known as "infinite monkey theorem", but apparently, according to Wikipedia,
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 any given text, including the complete works of William Shakespeare. [...]
[...] can be generalized to state that any sequence of events that has a non-zero probability of happening will almost certainly occur an infinite number of times, given an infinite amount of time or a universe that is infinite in size.
However, I think, as long as either the timeframe or monkey amount is infinite, it should lead to the same results. So, why even limit one of them on this theoretical level after all?
The linked study even seems to limit both, so they're not quite investigating the actual classic theorem of one monkey with infinite time, it seems.
As well as a single monkey, they also did the calculations using the current global population of around 200,000 chimpanzees, and they assumed a rather productive typing speed of one key every second until the end of the universe in about 10100 years.
They did 200k monkeys, so a little overkill from your expectations.
I would place money on some enthusiast somewhere having typed up Hamlet on a typewriter just for kicks. Surely in the hundreds of years of overlap between humanity, Hamlet, and typewriters, it's happened once. I'd be more concerned with typos.
There was a plank computer post here last couple of days. It showed an atomic sized computer performing one crack attempt every 10^-44 seconds would take a 95 character alphabet 100 years to crack a 121 character password.
Monkeys take up 1m^3. 10^105 bigger than a plank length. Typing 120wpm is 10^43 slower. Ignoring punctuation and spaces and capitalization, a 26 character alphabet allows for about 52 more characters than a 95 character alphabet.
Bottom line, monkeys can't come anywhere close to being able to crack a 100 character password from a 26 character alphabet.
Okay but here me out, what if we 10^43 more monkeys to balance out the speed?
In fact, let's push this to an extreme. We get enough monkeys that their mass turns them all into one black hole. Inside the black hole, the laws of physics get all fucked. Next we need to somehow dissolve the event horizon as explained in This Kurzgesagt video. Once that happens and we are left with a bare singularity, anything can pop out of it, including a copy of Hamlet.
So the secret to this thought experiment is to understand that infinite is big. Really big. You just won't believe how vastly, hugely, mind-bogglingly big it is...
The lifespan of the universe from big bang to heat death (the longest scenario) is a blink of an eye to eternity. The breadth and size of the universe -- not just what we can see, but how big it is with all the inflation bits, even as its expanding faster than the speed of light -- just a mote in a sunbeam compared to infinity.
Infinity itself looks flat and uninteresting. Looking up into the night sky is looking into infinity – distance is incomprehensible and therefore meaningless. And thus we don't imagine just how vast and literally impossible infinity is.
With an infinite number of monkeys, not only will you get one that will write out a Hamlet script perfectly the first time, formatted exactly as you need it, but you'll have an infinite number of them. Yes, the percentage of the total will be very small (though not infinitesimally so), and even if you do a partial search you're going to get a lot of false hits. But 0.000001% of ∞ is still ∞. ∞ / [Graham's Number] = ∞
It's a lot of monkeys.
Now, because the monkeys and typewriters and Shakespeare thought experiment isn't super useful unless you're dealing with angels and devils (they get to play with infinities. The real world is all normal numbers) the model has been paired down in Dawkin's Weasel ( on Wikipedia ) and Weasel Programs which demonstrate how evolution (specifically biological evolution) isn't random rather has random features, but natural selection is informed by, well, selection. Specifically survivability in a harsh environment. When slow rabbits fail to breed, the rabbits will mutate to be faster over generations.
The original thought experiment had to do with playing around with infinity, which is a whole field of mathematics with a lot of crossover. It raises questions like whether we can assume any fixed-length sequence of digits can be found somewhere in the mantissa of a given irrational number (say, π).
I feel like there has to be more to this problem than pure probability. We ought to consider practical nuances like the tendency to randomly mash keys that are closer together rather than assume a uniform distribution.
Doesn't matter in the real infinite monkeys thought experiment. The chance of an infinite number of monkeys at an infinite number of typewriters producing Shakespeare is 100%. That's how infinity works.
I've read there are so many permutations of a standard deck of 52 playing cards, that in all the times decks have been shuffled through history, there's almost no chance any given arrangement has ever been repeated. If we could teach monkeys to shuffle cards I wonder how long it would take them to do it.
There are 8.0658*10^67 orders you can shuffle a card deck in.
The math is easy. It's just 52! if your calculator has that function which is really 525150...32*1. There are 52 possibilities for the first card 51 for the second since you've already used one card and so on.
How many decks of cards have been shuffled over human history, or will be is beyond me.
I just listened to a podcast about assembly theory and I think that it kind of relates here too, though maybe not. If we start randomly generating text that is the lenght of the Hamlet, then Hamlet itself would be one of the possible, finite number of possibilities that could be generated within these parameters. Interesting theory nevertheless.
If we think about a screwdriver, the theory would argue that it couldn’t simply appear out of nowhere because its structure is too specific and complex to have come into existence by chance alone. For that screwdriver to exist, a multitude of precise processes are required: extracting raw materials, refining them, shaping metal, designing the handle, etc. The probability of all these steps happening in the right order, spontaneously, is essentially zero. Assembly theory would say that each stage in the creation of a screwdriver represents a selection event, where choices are made, materials are transformed, and functions are refined.
What makes assembly theory especially intriguing is that it offers a framework to distinguish between things that could arise naturally, like a rock or even an organic molecule, and things that bear the hallmarks of a directed process. To put it simply, a screwdriver couldn't exist without a long sequence of assembly steps that are improbable to arise by chance, thereby making its existence a hallmark of intentional design or, at the very least, a directed process.
In 2002, lecturers and students from the University of Plymouth MediaLab Arts course used a £2,000 grant from the Arts Council to study the literary output of real monkeys. They left a computer keyboard in the enclosure of six Celebes crested macaques in Paignton Zoo in Devon, England from May 1 to June 22, with a radio link to broadcast the results on a website.
Not only did the monkeys produce nothing but five total pages largely consisting of the letter "S",the lead male began striking the keyboard with a stone, and other monkeys followed by urinating and defecating on the machine
Mike Phillips, director of the university's Institute of Digital Arts and Technology (i-DAT), said that the artist-funded project was primarily performance art, and they had learned "an awful lot" from it. He concluded that monkeys "are not random generators. They're more complex than that