If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Are Shakespeare's plays encoded within pi?

Special thanks to Toby (or not Toby) for playing Dog Hamlet. This cool website lets you search the first 200,000,000 digits of Pi. See if your phone number or encoded name is in there! http://www.angio.net/pi/piquery Seven Sonnets: Are Shakespeare's plays encoded within Pi? The truth is: we don't know, but we suspect They're somewhere in those digits.  Created by Vi Hart.

Want to join the conversation?

Video transcript

Are Shakespeare's plays encoded within Pi? The truth is, we don't know, but we suspect They're somewhere in those digits. And now I Will show why we don't know if we're correct. You see we think the digits do behave As if they were a random sequence, and And so many mathematicians try to brave This question, but we still don't understand. Pi isn't random. Each digit must be Exactly what the definition states. It's pseudo-random as far as we can see, But it's a subject of intense debates. Now I'll explain with this parameter: It's all in iambic pentameter. You may have heard of this scenario: A thousand monkeys type at keyboards 'till They write the words of Shakespeare. Even though, In one life, it's a task they can't fulfill. If you allow their kids to carry on, All through the generations, working hard, They will evolve before they come upon A single sonnet written by the Bard. But still the theory's sound! And it is true That with a random and infinite set Of letters, that eventually you Will find whatever words you want to get. However, on this thing you can depend: Before you do, the universe will end. Pi is a number, and that's why I can completely guarantee no part will be 9-1-3-7-5-2-2-8-ten 4-7-9-H-A-M-L-E-T. You'd have to make up something, like a code Where zero-one is A, Oh-three is C, Or you could also choose some other mode: Oh-2 could be "to be or not to be." But let's go with this system, where a Y Is 2-5, O's one-five, and R's eighteen, And next comes zero-nine, which is an I Oh-three, eleven. Yorick's name is seen! Does Pi say anything? How does it go? 1-4-1-5. I guess the answer's "no." If you desire to search Pi for a thing Like Hamlet, as if you'd 'discover' it, Without a copy used for referencing, You wouldn't know if you'd recovered it. In fact, it's almost certain, so beware: Before you get to Hamlet, if you slog Through all the digits, you'll find versions where There's just one thing changed: Hamlet is a dog. Dog Hamlet is so awesome, and he goes On infinitely many adventures. In this infinite space, everyone knows Dog Hamlet's king. Sometimes he has dentures. Unless Pi isn't normal. I'll admit, Pi might not have a single "Dog Hamlet." A normal number is a number where, If you take any pattern of length Z You'll definitely find the pattern there, And others that length with same frequency. Length 1 would just be every digit, so All digits happen infinity times. And all two-digit numbers also go In there somewhere. If you list all the primes, You get the Copeland-Erdős constant, which is one of few known normal numbers. Or Take every number in order and stitch Them all together. And we know there's more. Most numbers must be of the normal kind. But somehow, they are hard for us to find. We think that Pi is normal. Also e, And square root 2 and other stuff like that. We don't know how to prove that they must be, That Pi contains Macbeth where he's a cat. If you've got every combination of Digits of every length, that will include A Romeo and Juliet in love who meet in time and live and end the feud. And since this string of numbers must occur With equal frequency to other strings Of the same length, it don't matter whether You choose this code or other permutings. Perhaps somewhere, Dog Hamlet and Catbeth Are chillin', bustin' ghosts, avoiding death. There's simple open problems about Pi, Like whether every digit, oh through nine, Keeps happening. We can't figure out why 6 shouldn't stop appearing down the line. It seems ridiculous to think that 2 Occurs finitely many times. I fear, That without proof, we can't say it's not true. Alas, poor Yorick may never appear. But the exciting thing is that I think These problems will be solved before too long. And then this video will really stink, Because all this not knowing will be wrong. Don't worry. I look forward to its fall. Till then, a Happy Pi Day to you all.