Search This Blog

A Universe of Monkeys Couldn't Type Hamlet

Get link

Facebook

Twitter

Pinterest

Google+

Email

Other Apps

Really. There's an idea going around that a monkey typing for an infinite time would eventually type the complete works of Shakespeare. In fact the age of the Universe (about 14.7 billion years) is tiny compared to the time it would take for that tireless monkey to peck out Hamlet, never mind all the other great works of the Bard.

A monkey (or machine) picking random letters has one chance in 26 of correctly choosing the first letter of Hamlet, which happens to be an "A" (Actus Primus. Scoena Prima.) There's one chance in 676 (26 X 26) of choosing the first two letters. The probability goes down exponentially, so to get the first 20 letters correct there's already only one chance in 2620 or one in 19,928,148,895,209,409,152,340,197,376. That's about the same as buying four tickets in consecutive lotteries and winning the jackpot each time.

The text of Hamlet, even without punctuation and spaces, contains 133,874 letters which means the probability of a randomly picking them all in the right order is one in 3.4×10183946. That's a very big number. Consider that there are only about 1079 atoms in the observable universe and only 1017 seconds have elapsed since the Big Bang.

Even if the universe were filled with monkeys and they'd been typing since the Big Bang the chance that they would have produced Hamlet would still be less than one chance in 10183800.

But in the 1980s Richard Hardison of Glendale College wrote a computer program that generated phrases randomly while preserving the positions of individual letters that happened to be correctly placed (in effect, selecting for phrases more like Hamlet's). Kinda like how evolution selects for adaptive changes produced by mutations. On average, the program re-created the phrase TOBEORNOTTOBE in just 336 iterations, less than 90 seconds. Even more amazing, it could reconstruct Shakespeare's entire play in just four and a half days. Now that's the power of natural selection.

As Shakepseare wrote: Though this be madness, yet there is method in 't.

Comments

Anonymous said…

Your example confirms why the world is full of stupidity. Was there a computer programmer around at the inception of life? Even Charles Darwin for his theory needed God at the beginning to get things jump started.

I guess you must have religious backgrounds. It's the only reason I can think of for why you would take a simple story, an illustration, twist the facts and then argue against it as it it were literally true. Anyhow, who said anything about a programmer at the inception of life, or for that matter at the Big Bang, which was waaaaaay before life evolved.

I had an idea once to write a program to try to reproduce monlisa random sequences but just and idea. Props to programmer respect. I know that power of myth is way more useful to life then science. Look around there's moden fiction everywhere. I think the debate moot. There's a dynamic world both described by science and myth relish in fact both can exist and does in society!!

Popular posts from this blog

Foolishness! Your DNA would actually stretch to the sun and back about 4 times!

DNA is a fine, spirally coiled thread in the nucleus of every living cell that serves as a guidebook so the cells "know" what they're supposed to do. The strands are so fine you need a high power electron microscopes to see them.

The human genome, the genetic code in each human cell, contains 23 DNA molecules each containing from 500 thousand to 2.5 million nucleotide pairs. DNA molecules of this size are 1.7 to 8.5 cm long when uncoiled, or about 5 cm on average.

You have about 10 trillion cells in your body, so if you stretched the DNA in all the cells out, end to end, they'd stretch over 744 million miles. The moon is only about 250,000 miles away, so all your DNA would stretch to the moon and back alomst 1500 times. The sun is 93,000,000 miles away, so your DNA would reach there and back about 4 times!

Interestingly, no more than 1.5 percent of the human genome contains DNA that help…

Really. Or to use a more “explosive” illustration, multiply the world’s entire nuclear stockpile seven million times and detonate it. That’s also about one second’s solar output. Or put another way … well, you get the point; the Sun puts out a lot of energy.

We only avoid being incinerated by this 800,000 mile wide, 100,000,000 degree inferno because, like a light bulb, the Sun radiates in every direction. That, and the fact that we are 93,000,000 miles away, allows us to experience sunshine as a gentle blessing rather than an incinerating white-hot blast.

But where does so much energy come from? That question stumped scientists from the late 1800’s until the early 1900’s. By then science had come to realize that the earth was billions of years old, not just thousands as previously believed. But they couldn’t figure out what could have powered the Sun that energetically for so long.

The general answer came with the new science of nuclear physics and with Einstein’s postulation of his fam…

Really. The top of towers of the Verrazano - Narrows Bridge at the mouth of the Hudson river in New York City are tilted almost two inches further apart than the base thanks to the curve of the Earth's surface.

Actually, there are a lot of amazing things about that not-so-famous bridge.

When it opened in 1964, at 4260 feet it was the longest suspension bridge in the world, exceeding the Golden gate completed in 1937, by 60 feet. Today it's the longest single span in North America and the seventh longest in the world. (The longest is the 6,529 foot Akashi-Kaikyo Bridge in Japan, completed in 1998.)

The Verrazano - Narrows Bridge contains enough concrete to construct a single lane highway from New York to Washington, and if the wires that make up the suspension cables were laid end-to-end they would reach 143,000 miles, more than halfway to the moon.

On hot days, the double-decker road bed expands almost six feet and sags 12 feet lower, something that ships passing underneath have …