Do copies of Hamlet exist embedded in the digits of pi?

I know Vi Hart discussed it, but she may have not been the first to entertain the idea. Not sure. The question is do they digits of pi contain copies of hamlet?

Yes, yes they do. Not just copies of Hamlet, but actually copies of every book imaginable are contained within the digits of pi an infinite number of times.

Using software package pi and simple shell commands,

pastebin of shell commands

I found that any N digit sequence probably appears within the first 10^N digits of pi [1]; moreover, the sequence would appear about 10 times in the first 10^(N+1) digits of pi, 100 times in the first 10^(N+2) digits, etc.

For example, lets say our sequence is the last 4 digits of my phone number – 1345
That’s 4 digits, so if I scan the first 104 digits of pi, sure enough, my phone number occurs 1 time. If I scan 105 digits, it occurs 12 times. For 109 digits, it occures like 98 times. Its clockwork. See below.

altoidnerd@HADRON:~$ pi 10000|grep -o 1345|grep -c 1345
1
altoidnerd@HADRON:~$ pi 100000|grep -o 1345|grep -c 1345
12
altoidnerd@HADRON:~$ pi 1000000|grep -o 1345|grep -c 1345
114
altoidnerd@HADRON:~$ pi 10000000|grep -o 1345|grep -c 1345
1020

Anyway, so the question is how many digits of pi would we need to search through to likely find about 1 or 2 copies of hamlet in the sequence?




So I got hamlet in plaintext from 2 sources. I found that hamlet when compressed from plain text to a tar.gz archive, the average size was 69 KiB. Therefore, (I think?) that means to represent hamlet as just a binary integer, it would have 69 x 8 x 1024 digits = 565248 digits.

To get the number of digits in base 10, we multiply by log_10 (2) +~ .69 so the base ten hamlet would be like a sequence of about ~390,000 digitsm (0-9).

Ok so back to pi. How many digits of pi must we scan to probably find a string of length 390,000? That would be 10^390000 digits. That’s a lot of pi, but pi has got enough digits to spare. We should see approximately 1 copy of hamlet in the first 10^390000 digits of pi.




Even cooler is that if we just increase the power by 1, we should see 10 hamlets; increase the power by 2, and we should get 100 copies of hamlet. So quickly, we end up with infinite hamlets in the digits of pi. And not only hamlet … this argument should would for any book.

[1] This is not too surprising since pi is believed to be a normal number, though this is unproven.



What is bitcoin mining, really? What “math problems” do the bitcoin miners solve?

It is often said by journalists that bitcoin miners are rewarded blocks of bitcoin for solving hard math problems as fast as they can.  The math problems always get harder and harder too.

And that is how we know exactly where most journalists’ understanding of bitcoin ends.

Unfortunately, this rumor is spreading, and the editorials are getting more and more careless about the very details that make bitcoin so reliable.  A few days ago, I read a very dismissive editorial on  bitcoin in the New York Times by Andrew Sorkin in which the author appeared to be just guessing when he described bitcoin and its properties.  As usual, I giggled when I read yet another powerful journalist stumble through issues such as bitcoin’s price volatility, utility to merchants, and even the concept of currency itself. But I was particularly worried when he”rolled his eyes” at the notion of mining bitcoin.

Let’s clear this up once and for all.

The bitcoin miners verify all bitcoin transactions. Furthermore, the miners must ensure that everyone on earth agrees at all times about the entire transaction history of bitcoin from its inception. That is what they are doing. It is hard to keep the entire planet synced, so they are rewarded for doing so.  So to all journalists: you no longer have an excuse to miss this important detail.  Myth ended – please stop projecting the image that the miners earn bitcoin playing computer games and Magic the Gathering.

 

Questions?  Comments?

If you liked something here, donations:

BTC: 13xdMqkaVKkHKT3ZZx5ikAvQUEkzqpDkDb

LTC: LQ1XbTGMiNfL4tQoqA3doVKwUDEuddSpRx

PPC: PQzT1tFMB5ECbQPhp41R5cTc7jpbgGUDfb

XPM: AejVQ34ntJAwUhebe7GMtC8aQ2oPg4bHDf