Infinite Monkey Theorem

Posted on June 12, 2023


A line drawing of a monkey at a typwriter.

Today’s Morning Buzz is brought to you by Shane Stone, Police Executive Administrator in Maricopa, AZ. Connect with Shane on Twitter and LinkedIn.

What I’m Learning: A few weeks into working in a Police Department, a million things every day

What I’m Listening to: Summertime means Spotify’s ‘Poolside Lounge’ playlist

What I’m Watching: Due to an incredible run, I am still watching the Vegas Golden Knights!


Today we’re talking about the Infinite Monkey Theorem!

I know, this is the moment we’ve all been waiting for, but a few of us may be asking, “Could you describe the Infinite Monkey Theorem, for anybody else who may not know what it is?”

The Infinite Monkey Theorem is this idea that if you put monkeys in front of typewriters, perhaps infinite monkeys with infinite typewriters and certainly with infinite time, they will eventually crank out every single literary possibility. That means at some point in the stream of scrambled characters you will find the text of Hamlet, Harry Potter and the Prisoner of Azkaban, and even the entire Captain Underpants anthology. In a truly infinite and endless universe, everything that can possibly ever happen will happen. You just have to wait.

While you leisurely lounge the infinite monkeys will eventually type your term papers from college, they’ll produce that report you have sitting on your desk, they’ll even complete your passport application and write to your family back home. The world we live in is even more random and vast than monkeys with typewriters, this can leave you wondering what impact you actually have as an individual.

Fear not, because if you thought the philosophical theory was fun, then just wait until we introduce a little math!

Including the space bar, my keyboard has 48 keys not accounting for the possibility of using the shift key to change characters. The chance that any given letter, number, space, or other character would pop up would be 1 in 48 for every keystroke. My full name ‘Shane Lewis Stone’ has 17 characters including the spaces which means the odds that a randomizing monkey would type my name in any given sequence of 17 characters would be 1:4817 or 1 in every 38,115,448,583,970,000,000,000,000,000 attempts. All of the sudden, these infinite monkeys don’t seem so adept.

Intention

We all know the problem with the monkeys is that they lack a writer’s intention, typing your name isn’t difficult unless you aren’t even trying to type your name as you mash the buttons on the keyboard. The first thing the Infinite Monkey Theorem teaches us is that eventually things will come to pass, but with intention on top of the elbow grease you can find the results you seek much more quickly. But this is the obvious and boring moral to the story, so back to the math!

Is There Only One Solution?

A road tunnel viewed from inside a vehicle, with the hood visible and lights streaking past on the tunnel walls.When we’re writing, crafting, producing, or building something we always want things to just be perfect. In a perfect solution everything is correct, and all of the pertinent bells and whistles are included. Let’s go back to my name, “Shane Lewis Stone.” That is exactly how it’s supposed to be.

Does “ShaneLewisStone” change the practical outcome of you reading that? How about “5haneLewi55tone” or even “5haneLewi55t0ne”?

In my humble opinion, the first example is the best, it’s how I like to see my name, but if a monkey types any of the variations up randomly on a typewriter I am going to be impressed and a little honored. Truthfully, we can tinker with any of these and turn them into the ideal presentation of my name, and odds are we are going to reach the imperfect solutions long before we stumble upon the perfect solution.

But how much more quickly can we move the project (of typing my name) forward if we start with the imperfect spellings?

In today’s verbiage, the spacebar is “extra.” If we eliminate this key and focus on the core of the matter (the letters) we increase the odds of finding a solution from 1:4817 to 1:4715. Both are astronomical, but you can see the impact when we type the numbers out.

1 in 38,115,448,583,970,000,000,000,000,000 with spaces
1 in 12,063,348,350,820,000,000,000,000 without spaces

Our odds of success are roughly 3,000 times better when we accept the smallest of imperfections. Instead of “Shane Lewis Stone” we are looking for “ShaneLewisStone.”

What if we are okay with a few letters being replaced by numbers? If every “S” could be a “5” and the “o” in “Stone” could be “0” instead, we double the chances of success when randomly typing those characters. Instead of the odds of success being 1:4715 we are now at 1:4711 x 1:23.54. The math is getting weird but hang with me and I’ll do it for you.

1 in 38,115,448,583,970,000,000,000,000,000 with spaces
1 in 12,063,348,350,820,000,000,000,000 without spaces
1 in 753,959,117,416,318,300,000,000 in without spaces and OK with numbers

The monkeys are back in business. Now our odds of success are 16 times better than the previous round, and about 50,000 times better than where we started. For every time the monkeys type my name perfectly on a typewriter, they could type it very well 50,000 times. When you are looking only for perfect solutions, and you start with a single possibility in mind, you are greatly reducing your chance of finding efficient success. Especially when you consider your first solution to be a starting point with a willingness to iterate.

Get Rid of the Noise

A photo illustration of a person holding their heads to their ears. A duplicate mouth also appears on their forehead.

But let’s do one last exercise, what if we took all of the keys off the keyboard that we were never going to use? My name has 11 distinct characters: a, e, h, i, l, n, o, r, s, t, and w. That gets rid of 37 of our 48 original keys on the keyboard, leaving us with odds of 1:1115, and you know we have to take a look at it.

1 in 38,115,448,583,970,000,000,000,000,000 with spaces
1 in 12,063,348,350,820,000,000,000,000 without spaces
1 in 753,959,117,416,318,300,000,000 in without spaces and OK with numbers
1 in 4,177,248,169,415,700 without spaces, with only possible letters on the keyboard

Our odds of success are now 9.5 trillion times better than they originally were. We didn’t leave the keys on the board that would never be used, and the monkeys are so much more efficient because of it.

The greatest way to enhance your odds of success is to act with intention, with that small step you will type circles around the randomness of the Infinite Monkey Theorem. But we still have a few more lessons to learn from the mental exercise.

  • Perfection is not a starting point: We all want to be perfect. But if you are spending three times the effort (or 50,000 times the effort) to go directly to perfection, rather than starting with the practical building blocks and iterating towards that perfection, you are wasting your valuable time and effort.
  • There is more than one solution: My whole life I’ve typed my name the same way, but if I need to work with the randomness of the world, or monkeys with a typewriter, it will serve me well to be open to new ideas. Even if “5han3 Lew15 5t0n3” leads people to believe that Elon Musk named me.
  • Eliminate superfluous options: If you attempt to ponder every possible action, and how it will impact every aspect of your work, it will stop all progress. Focus on the problem at hand, and start with the solutions you can reasonably implement. It will feel like you are working 9.5 trillion times faster.

Are these morals to the story presented with rough math and hyperbole? Of course they are, but what did you expect to get from me randomly mashing the buttons of my keyboard?

Close window