Analyzing 1 billion digits of Pi



The number pi, which always reminds of pie, happens to be one of the most widely used symbol in mathematics, both in high school and university. As you know, it is nothing more than an irrational number (it can't be written as a fraction) which starts with 3.14159 and it is the heart of all geometry and trigonometry.


Many have calculated billions of digits of pi, the record (last I checked) is at 105 trillion digits, but it is all done just for the sake of curiosity, there is no practical application since you only need the know the first few dozens of digits in order to perform any calculation in the universe.


However I'm sure you've seen on Facebook that famous post in which they explain the digits of pi are non-repeating, meaning any possible number combination may be found if you keep digging deep enough, therefore you may run into a combination of numbers which are your birthday, another combination of numbers which spell your name in ASCII format and maybe even a combination of numbers which, if converted into pixels values, form a picture of you being born.


It is unproven if the above statement is true, nobody knows if you will eventually find any possible number combination simply by calculating trillions of digits of pi. Which is why I decided to do my own experiment, after downloading a text file with a billion digits of pi (it was a 1GB text file), I wrote a software which scans the digits of pi and turns them into pixels, which are in turn put together to form images. Later I wrote another software which turns them into ASCII characters, which are in turn put together to form words.


The results were disappointing, unfortunately I was unable to find any pattern in the images, they were all totally random, like the image below.

 


With the letters, however, I had a different result, many words were formed and I was able to notice certain letters appeared way more often than others, certain words would also appear with a frequency much bigger than others.


Letter 'e' was the winner, appearing 20,009,439 times, whereas letter 'y' was the loser, appearing only 15,001,237 times. Words with few letters (such as "add") obviously appeared way more often than those with many letters (such as "adjust").


If you want to know more then follow the link below, it will take you to the Github page where you can download all results, along with the source code to be able to run the software on your own computer, just keep in mind you will have to look for the text file with 1 billion digits of pi, it was 1GB in size, too large for me to upload it to Github, a Google search will help you. Let me know if you find something interesting.


Github link to the whole project: https://github.com/MuriloMir/Pi-analyzer

Comments