experimental math part ii_ the naughty, naughty life of pi

3
14/12/13 Ex peri mental Math Par t II: The Naughty , Naughty Li fe of Pi » Ti meBl i mp ti meblimp.com/?page i d=1223 1/3  YOU ST OLE OUR L UNCH MONEY, BUT WE FORG IVE Y OU  Ar tic les  » Math » Experimental Math » Experimental Math Part II: The Naughty, Naught  y Li fe of Pi Experimental Math Part II: The Naughty, Naughty Life of P i  Nicholas Cage found this chart when he exposed the Constitution to an open  flame What the h ell did you put in my Pi?  Sea rching for naughty (tee hee!) words in the world’s most famous transcendental number I’m seeing a lot of buzz about the number Pi lately – must be with Pi day coming up (March 14 , 3- 14 , get it?). Or maybe it’s a more general love affair with transcendental numbers. Lots of interesting facto ids (or as I call the m, “Factwads”) are being bandied about, and one of them caught my eye – it has to do with the interesting fact that Pi is a never-ending stream of seemingly -random digits. They’re not really random, of c ourse, but they look random – if you read the first 100 digits of Pi, it will look like someone picked digits out of thin air. So what’s so co ol about that? This means that eventually yo u’ll find an y combination of numbers in a row that  y ou want – somewhere along the string of decimal places, you’ll find “12345” for example. You will also fin d  y our birthday, somewhere. It might take a whi le to find it, but given y ou’ve got an infinite series to look through, yo u’ll find it eventually . Somewhere in there is your cholesterol score, today’s winning lottery number, tomorrow’s winning lo ttery number, t he bank acco unt balances of eve ryo ne on the planet, the 68 prime number – an  y string of digits you can think of is in there somewhere.  What’s cooler is if y ou try enco ding words, English text, into numbers – which can then be found somewhere in Pi. That means that any string of wor ds, can be found (afte r suitable conversion t o numbers) somewhere in the digi ts of P i. Any phras e you’ve ev er uttered, any book ever written , even books not y et wri tten, are in ther e somew here. Somewhere along Pi, is a copy of this very essay! The digi ts of Pi are essential ly an ex ampl e of the famous “monkeys on a typewriter” producing infinite possible strings of text, and it’s right there inside the geometry of a circle.  So natural ly, I decided I wan ted to try to look for swea r words in Pi. The Recipe So how do w e actuall y go about this ? There are lots of ways to encode letters into numbers – you probably remember doing simple ciph ers like A = 1, B = 2, etc. as a kid. That never got y ou that coveted job a t th e CIA, di d it? Tsk. For this exercis e, I’m using the ASCII encoding – for the purpose of computer typing, every letter (an d in fact every bit o f punctua tion you can type on a computer) has been assi gned a number. For example, the letter ‘A’ gets assign ed the two-digit number 65. Lowercase gets a different number – ‘a’ is assigned to 97. If yo u’re curious, the perce nt sig n ‘%’ gets assig ned to 37. The table to the right sh ows the w hole  ASCII code, if you’re interested. So now we can c onve rt any word into a string of numbers, by just stringing along the numeric ASCII codes for each letter. So for ex ampl e, the word ‘FART’ becomes F = 70, A = 65, R = 82 , T = 84 = ‘706582 84’. That four letter word expands in to an 8-dig it number. Note that yo u don’t have to use this encoding, and if you use a different one you’ll get different results than I have. If y ou use an encoding that gets by with fewer numeric digits, you’ll have better luck finding whatever phrase you  want i n Pi, for reasons we’ll discuss below. th th Search  Search Home  Wha t’s Ne w  Ar tic les Math Science Nature History People Culture Just What The Hell Is… Opinion Original Research  We Rev iew Stu ff Boo k Review s Music Review s Beer Review s Other Detritus  Abou t Us  Ar tic le Dork ine ss Ratin g Sy stem Contact Us Frequently Asked Ques tions  Ack nowl edgem ent s Coo l Lin ks Serious Words @timeblimp on twitter Where am I? Follow Timeblimp on Twitter Timeblimp on Twitter Boo k Review : The Music of the Primes, by Marcu s du Sautoy  “Quick! Everyone get in the TimeBlimp!!!” Home Wh ats New Articles  We Review Stuff  Ot her Det ri tu s Abou t Us  @Timebli mp On Tw itter 

Upload: bilstefan

Post on 04-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

8/13/2019 Experimental Math Part II_ The Naughty, Naughty Life of Pi

http://slidepdf.com/reader/full/experimental-math-part-ii-the-naughty-naughty-life-of-pi 1/3

14/12/13 Experimental Math Part II: The Naughty, Naughty Life of Pi » TimeBlimp

timeblimp.com/?page_id=1223 1/3

 YOU ST OLE OUR LUNCH MONEY, BUT WE FORGIVE YOU

 Ar tic les  » Math » Experimental Math » Experimental Math Part II: The Naughty, Naught y Li fe of Pi

Experimental Math Part II: The Naughty, Naughty Life of Pi

 Nicholas Cage found this chart when heexposed the Constitution to an open

 flame

What the hell did you put in my Pi?

 Searching for naughty (tee hee!) words in  the  world’s most famoustranscendental number

I’m seeing a lot of buzz about the number Pi lately – must be with Pi day coming up(March 14 , 3-14 , get it?). Or maybe it’s a more general love affair with

transcendental numbers. Lots of interesting facto ids (or as I call them, “Factwads”)

are being bandied about, and one of them caught my eye – it has to do with the

interesting fact that Pi is a never-ending stream of seemingly -random digits.

They’re not really random, of c ourse, but they look random – if you read the first

100 digits of Pi, it will look like someone picked digits out of thin air.

So what’s so cool about that? This means that eventually you’ll find any combination of numbers in a row that

 y ou want – somewhere along the string of decimal places, you’ll find “12345” for example. You will also find

 y our birthday, somewhere. It might take a while to find it, but given y ou’ve got an infinite series to look 

through, you’ll find it eventually . Somewhere in there is your cholesterol score, today’s winning lottery 

number, tomorrow’s winning lottery number, the bank account balances of everyone on the planet, the 68

prime number – an y string of digits you can think of is in there somewhere.

 What’s cooler is if y ou try encodingwords, English text, into numbers – which can then be found somewhere in

Pi. That means that any string of words, can be found (after suitable conversion to numbers) somewhere in the

digits of P i. Any phrase you’ve ev er uttered, any book ever written, even books not y et written, are in there

somewhere. Somewhere along Pi, is a copy of this very essay! The digits of Pi are essentially an ex ample of the

famous “monkeys on a typewriter” producing infinite possible strings of text, and it’s right there inside the

geometry of a circle.

  So naturally, I decided I wanted to try to look for swear words in Pi.

The Recipe

So how do we actually go about this? There are lots of ways toencode letters into numbers – you probably remember doing

simple ciphers like A = 1, B = 2, etc. as a kid. That never got y ou

that coveted job at the CIA, did it? Tsk. For this exercise, I’m

using the ASCII encoding – for the purpose of computer typing,

every letter (and in fact every bit o f punctuation you can type on a

computer) has been assigned a number. For example, the letter ‘A’

gets assigned the two-digit number 65. Lowercase gets a different

number – ‘a’ is assigned to 97. If you’re curious, the percent sign

‘%’ gets assigned to 37. The table to the right shows the whole

 ASCII code, if you’re interested. So now we can convert any word

into a string of numbers, by just stringing along the numeric ASCII

codes for each letter. So for ex ample, the word ‘FART’ becomes F

= 70, A = 65, R = 82, T = 84 = ‘70658284’. That four letter word

expands into an 8-digit number. Note that you don’t have to use

this encoding, and if you use a different one you’ll get different

results than I have. If you use an encoding that gets by with fewer

numeric digits, you’ll have better luck finding whatever phrase you

 want in Pi, for reasons we’ll discuss below.

th

th

Search  

Search

Home

 Wha t’s New 

 Ar tic les

Math

Science

Nature

History 

People

Culture

Just What The Hell Is…

Opinion

Original Research

 We Rev iew Stu ff 

Book Review s

Music Review s

Beer Review s

Other Detritus

 Abou t Us Ar tic le Dork iness Ratin g Sy stem

Contact Us

Frequently Asked Questions

 Ack nowl edgem ent s

Cool Lin ks

Serious Words

@timeblimp on twitter

Where am I?

Follow Timeblimp on

Twitter

Timeblimp on Twitter 

Book Review : The Music of the

Primes, by Marcu s du Sautoy 

 “Quick! Everyone get in theTimeBlimp!!!”

Home W hat’s New Articles 

We Review Stuff  

Other Detritus About Us 

@Timeblimp On Tw itter 

8/13/2019 Experimental Math Part II_ The Naughty, Naughty Life of Pi

http://slidepdf.com/reader/full/experimental-math-part-ii-the-naughty-naughty-life-of-pi 2/3

14/12/13 Experimental Math Part II: The Naughty, Naughty Life of Pi » TimeBlimp

timeblimp.com/?page_id=1223 2/3

Now, I need to get my hands on some Pi. Easy – a quick internet search turned up many copies of Pi out to

millions of digits, and I selected one that goes out to 100 million, available here

(http://archive.org/details/Pi_to_100000000_places). (Note that I didn’t check accuracy – once

timeblimp.com becomes a paying enterprise, I’ll double back and chec k his numbers.) Ideally I’d like to search

even farther along Pi, as I may need to search untold billions until I come across the phrases I want. But we’re

also limited by practical aspects of computing and time, so for now I’m limiting myself to 100 million decimal

places. Now it’s simple to write a computer program to search for any arbitrary string of letters in the entire

100-million sequence of digits. It doesn’t take quite as long as you’d think, so I was able to find a dictionary of 

17 0 thousand English words, which I could then search for in Pi, one by one. With particular attention on

certain four-letter words….

The Results

So what happened? Well, I can’t find shit in Pi, but I can sure find plenty of o ther interesting words. The f irst

mildly naughty word we come across is ‘SUCK’, at position 3,833,07 2. That might sound like a pretty large

number of decimal places, but that’s actually relatively early along for a four-letter word. We also come across

‘BARF’ at 4 ,843,188. The quite useful word ‘CRAP’ appears at 51,557 ,663, and my personal favorite, ‘JIZZ’

appears at position 18,953,642. So now I can say that I found some jizz in my Pi.

Here are all the four-letter words I could think of that I managed to find in the first 100 million digits of Pi:

  suck 3,833,072

  barf 4,843,188

  jizz 18,953,642

  crap 51,557 ,663

  damn 56,877,107

  cunt 69,223,089

  cock 80,511,580

  blow 82,475,138

  darn 87,773,859

 While it’s a theoretical certainty that some longer phrase (e.g. ‘I got your Pi right HERE’) appears in the digits of 

Pi, as a practical matter it will be very difficult to find. We find two-letter words all over the place, three letter

 words fairly commonly, but the first commonly-known four-letter word to show up in Pi according to my 

scheme is ‘RUTS’, at position 17,34 6. I can’t find a five-letter word until almost 3 million positions in, the word

‘FLOWN’ at position 2,860,850. Not surprisingly, the difficulty of finding any given N-letter word grows

exponentially as N increases.

To illustrate this, below is a plot showing the results I got in trying to find about 170,000 English words in the

first 5 million digits of Pi. We see tons of 3-letter words, a fair portion of 4-letter words (though far less than 3-

letter words), and just a couple of 5-letter words. As you might have guessed, the longer the word, the harder it

is to find.

So if you’re looking for your favorite swear word in Pi, and it happens to be pretty long (like my friend

@peterwoodward, who continues to pester me to find “FUCKFACE” in Pi), you better be prepared to hunt for a

 while. As a rule of thumb, for my encoding scheme y ou’ll need to hunt through 10^(2N) digits of Pi to have a

8/13/2019 Experimental Math Part II_ The Naughty, Naughty Life of Pi

http://slidepdf.com/reader/full/experimental-math-part-ii-the-naughty-naughty-life-of-pi 3/3

14/12/13 Experimental Math Part II: The Naughty, Naughty Life of Pi » TimeBlimp

timeblimp.com/?page_id=1223 3/3

© 2 01 1 Tim eBlim p Th ith ith a pith y sta tem en t. Su ffu sion th em e by Say on ta n Sin h a

Posted by t imeadmin  at 8:52 pm

reasonable chance at finding a string of letters of length N. For this essay, which is about 10,000 letters long,

 you’d have to hunt through 10^20,000 digits in Pi, which is a gogol raised to the 200 power. Keep in mind

that the number of atoms in the universe ismuch less than one gogol . So there’s nowhere near enough material

in the universe to form a piece of paper (or computer) large enough to store the digits of Pi you’d need to

eventually stumble across this particular essay!

That’s pretty nerdy… but can you really go overboard with all this stuff? 

Me? No, I’m stopping here. Other people? Oh, you betcha! I’ve learned by this point in my career that when I

take something to a nerdy ex treme, someone else surely has outdone me by a mile. And for Pi, probably the

most famous transcendental number of them all? There are endless fascinating topics to explore about the

 wonders of Pi. Here are a few other folks exploring the search for patterns in Pi, to whet your whistle.

If you’re wondering if there’s any way you could look up your favorite word in the digits of Pi (aside fro

contacting me on twitter, @timeblimp), head on over to the Search For Pi page, mathematician David Bailey 

has set up a webpage where you can search any word you want in the first four billion digits of Pi. With that kind

of room, you can fairly easily find words up to 7 or 8 letters long, which makes the usual four-letter swear words

a piece of cake to f ind.

Over at The Pi Code, Mike Keith has taken my amateurish fumbling and made it the real deal. He’s followed

up on the observation that a more efficient coding of letters-to-numbers than the ASCII Code might be more

fruitful, by using Base 26 for the conversion – much more natural for our 26-letter alphabet. For his encoding

scheme, he’s estimated how often we’d expect to see an N-letter word show up in the digits of pi, and it clearly 

shows the exponential growth I observed – we should see 4-letter words every 81 positions, but 8-letter words

every 5.7 million positions. The first six-letter word he found was “OXYGEN”, which is appropriate, as that’s

 what nerds like us need after walking up a flight of stairs.

Keith takes it up a notch by then considering Pi in TWO DIMENSIONS (cue epic music) – specifically , write out

the digits of Pi in a grid, then look for words in the old word-search style, up, down, left, right, and diagonally.

This gives you a little more chance to find something interesting (more “degrees of freedom” for interesting

coincidences to happen), and sure enough, he’s able to find lots of examples of words, including spooky 

examples such as “ALPHA”, “OMEGA”, and “GOD” appearing all in the same little grid about 150k positions in,

and of course “DEMON” and “SATAN” in another grid at ~250k.

Finally, Keith points out that if you do another simple substitution-type conversion of letters to numbers, by 

using the old substitution cipher A = 1, B = 2, the first few digits of Pi are:

  3 . 14 15 9 26 5 …

 Which decodes to “C.NOIZE” – get it? You’re “Seeing noise” when you look at digits in Pi! Hmmm, that’s kind

of mean of Pi to rub it in our faces like that. What a fuckface.

Check out Keith’s page for lots more interesting discoveries in the hunt for English words in Pi, using his base-

26 scheme.

If this is all too mathy for you, you might want to explore the humanities side of Pi, and look into Writing in

Pilish. The idea is to write a story about any topic y ou want, with one important constraint – each word in

 your story has to be of length exac tly equal to the corresponding digit in Pi. So y our f irst five words need to

have lengths 3, 1 , 4 , 1, and 5, and you try to keep going as long as you can, sticking to the pattern. How far do

 you think y ou could keep it up? Maybe 6 or 7 words? Maybe eke out a sentence? Well sit down, friend,

 because Mike Keith has written a 10,000-word novella called “Not A Wake“, written entirely in Pilish. Pick up

his book on Amazon, for the low low list price of Pi^2 + Pi/2 !

th