OT: The first 4,000,000 digits of Pi, visualized in a single image



#2

4,000,000 Digits of Pi


#3

HI,

I really wonder how they keep 4'000'000 digits in a JPG picture of 960 x 540 pixels. If the compression rate is one pixel per digit of PI, the maximum of digits store in such an image size it at maximum 518'400.
It's only 12.96% of the advertize count!

Moreover, the JPG is a losy compressing process, so most of the PI digit are lost there!

OK. I always surprise how in the nowadays digital world, peoples have lost elementary notion of what a digit is!

Here a bunch of question following this remarkable link.

What will be the pixel Height and Width of an standard 4/5 proportion bitmap picture (standard) needed to store then 4'000'000 first digits of PI at the rate of one colored pixel per digit?

And for a 16/9 sized picture?

What, will be the bit depth to code for the 10 digits code (0 to 9) ?

What will be the minimal size of the corresponding bitmap image?
What make it impossible to share it on the Web ?

What is the pixel surface of the large black PI draws in the middle of the bitmap?
What is the consequence of the Height and Width adjustment to guaranty the 4’000’000 digits representation?


#4

Quote:
I really wonder how they keep 4'000'000 digits in a JPG picture of 960 x 540 pixels. If the compression rate is one pixel per digit of PI, the maximum of digits store in such an image size it at maximum 518'400. It's only 12.96% of the advertize count!

You're right, but go to the APP page

PI App

and you'll see that they show it as a 500,000 digit section of the total 4 million. You can use the right hand scroller to move to any 500,000 digit section.

Bill


#5

Thank you very much for the link !

It is well done. And the used color set (for coding digits) is of a great effet making the whole image green/blue !

#6

That's not the real image. The real image is here:

http://two-n.com/pi/

#7

Along the lines of your questions, I would like to see the visualization with more compressed mappings to the digits.

How about mapping three digits to 10% increments of RGB?

Or, given 8-bit JPEG depth, how about mapping two digits at a time to each of RGB?

Somehow I think a little ImageMagick is in order.

#8

Hello all.

Please help me figure this out. Yes, it is quite amazing and fascinating that in our technical and machine age, we can devise computational methods to unravel Pi to more and more digits every year. Obviously, as Pi is an irrational value with no repeat in sight, what's the point of finding its value to the umpteen billionth decimal place? What further puzzles me is that even with the best computers, they can only process calculation with double or triple precision, so again, what's the point of Pi to the seven millionth, etc. decimal place? And, even so, people can only comprehend and use Pi to a handful of digits for both regular usage and even in the sciences.

Just wondering


#9

The same reason people climb mountains. Because it is there.


#10

Quote:
The same reason people climb mountains. Because it is there.

No, not Capt. Kirk. The quotation is from a 1930's British mountaineer Eric Shipton who was asked why he was trying to climb Mt Everest.

#11

This quote is always attributed to George Mallory, also a great British explorer who died in his attempt to climb Mt. Everest.


#12

Quote:
This quote is always attributed to George Mallory
You may be right. Memory fallible but it says I have seen the saying attributed to Shipton in a book by one of his contemporary mountaineers. According to Wikipaedia on Mallory there is doubt about the attribution to him.

#13

I wasn't aware of the controversy. It appears we'll never know who really said it.

#14

Thanks for quoting James T. Kirk (yes, from 'Star Trek V: The Final Frontier.' I can see the point of the challenge as with computer programming. I guess I was looking too closely at the practicality of Pi's multi-million digit string and not seeing it as a challenge to be fascinated by.

Thanks


#15

Ha ha, that reminds me of an early episode of Star Trek where Spock tasks the Enterprise's onboard computer to calculate the last digit of pi, causing it to channel all it's resources to the problem thus diverting it from doing something bad. Although I was still quite young, it left an impression on me as it was the first time the endlessness of pi dawned on me (my maths teacher probably had mentioned it, but it just doesn't carry the same impact as your favourite sci-fi program :-).


#16

The purpose of Spock's assignment was to drive an evil entity (which had been various incarnations of evil throughout history including Jack the Ripper) from the ship's computer. Of course one might call being able to give the computer a problem to which it would devote more and more resources until it could do nothing else a serious security flaw.

(season 2 Episode, "Wolf in the Fold", original air date 12/22/67, episode Stardate 3614.9)


#17

I must have seen it a dozen or so years after it's first air date (I would have been 1 at the time :-). Apart from that flaw, I think these days we would expect a futuristic computer to be programmed with an intelligent response that it would be futile to attempt that sort of task :-).


#18

Hi Bart,

I was not really expecting a response :-) I guess I posted because a lot of otherwise useless Star Trek information is rattling around my head, so I let it out whenever I get the chance. (I did have to look up the exact episode name, air date and star date.)

Quote:
I must have seen it a dozen or so years after it's first air date (I would have been 1 at the time :-).

I won't give my exact age, but I'm pretty sure that I saw it on its original air date.

Edited: 28 Apr 2012, 5:06 p.m.

#19

I'm pretty sure Spock is a system admin :)

-- Pete (a system admin)

#20

I was born on February 4th, 1956. If I put that in mmddyyyy format, it's 02041956. That sequence doesn't occur in the first 4 X 106 digits of Pi, according to the search function on the java applet linked to in the referenced article. If I code my birthday as ddmmyyyy, I get 04021956, which also doesn't appear. 241956 does show up, however. (The applet says it handles up to 6 digits, but it will actually accept 8, and find other 8 digit strings.)

What is the probability that a given 8 digit sequence will be found in the first 4 million digits of Pi? How many digits of Pi would you need to reach a probability of, say, 80% that such a sequence would appear? Given a particular eight digit sequence, what is the probability that the first sequence and another sequence formed by transposing 2 arbitrary digits in the original will both appear in 4 million digits of Pi?

Please show your work because I have no freakin' idea how to find the answers. :)


#21

Quote:
I was born on February 4th, 1956. If I put that in mmddyyyy format, it's 02041956. That sequence doesn't occur in the first 4 X 106 digits of Pi

Well, I would say you are just too old for Pi. ;-)

For me it's even worse: birthyear 1955. :-(

#22

Howard:

Quote:
What is the probability that a given 8 digit sequence will be found in the first 4 million digits of Pi?

Well, I'm not a mathematician, but I would say that it would be reasonable to assume that the digits of 'pi' are random for this sort of thing. The probability that a given *random* digit was the same as your first "given" digit would be 1 in 10. The next digit would be independent of the first, so the probability would again be 1 in 10. Therefore, the probability that any 8 random digits exactly matches your "given" 8-digit number would be 1 in 10^8 (or 1e-8). So the probability that the first 8 "random" digits in 'pi' do *not* match yours is (1 - 1e-8). So the probability that 4 million (4e6) consecutive tries do *not* match is ((1 - 1e-8) ^ 4e6). So:

P = (1 - 1e-8) ^ 4e6
ln(P) = 4e6 ln(1 - 1e-8)
ln(P) = -4e-2
P = e^(ln(P)) = e^(-4e-2) = 0.961 (approximately)
That means there is a 96% chance of *not* matching the "given" 8 digits; so I would say you have about a 4% chance of finding any given 8-digit sequence in the first 4-million digits of 'pi'.


Quote:
How many digits of Pi would you need to reach a probability of, say, 80% that such a sequence would appear?

Well, that would mean how many digits do you need to have only a 20% chance of *not* finding your given 8-digit sequence, so from above:
0.20 = (1 - 1e-8) ^ N
ln(0.20) = N ln(1 - 1e-8)
N = 1.61e8 (approximately)
So I would say that you would need to have 161 million digits of 'pi' to have an 80% chance of finding your given 8-digit sequence in there.

I gotta go, so I can't look at the other question(s).

I *really* hope that I didn't embarrass myself!

Bruce.


#23

So your formula states that the probability p that an n-digit sequence appears in the first N digits of pi is

p = 1 - (1 - 10-n)N
This matches the examples in a table in
The Pi-Search Page.
Number Length	Chance of Finding (in the first 100 million digits of pi)
1-5 100%
6 Nearly 100%
7 99.995%
8 63%
9 9.5%
10 0.995%%
11 0.09995%

Well done!

Gerson.

#24

it accepts only 6 digits for searching ...


#25

It says it only accepts six, but it actually accepts eight. It just occurred to me that the stated limit might be because (per Gerson's formulation of Bruce's procedure) the probability of an eight digit sequence being found in the first 4 X 106 digits of Pi is 3.9%, whereas a six digit string has a probability of 98% of occurring.

Six digits would limit the birthday format to mmddyy, or ddmmyy. Using the first format, my birthday appears 4 times in the given data set.

001 LBL 'PIP
002 'PI DIGITS?
003 PROMPT
004 'N SIZE?
005 PROMPT
006 10
007 X<>Y
008 CHS
009 Y^X
010 1
011 X<>Y
012 -
013 X<>Y
014 Y^X
015 1
016 X<>Y
017 -
018 END


#26

The table says 100% for n=1 to 5 (in the first 100 million digits of pi). That's true for the digits 0 through 9, since this is verified in the first 33 digits of pi. For 2, 3, 4 and 5-digit sequences the probability is very close to 100%, but not exactly 100%.

Any particular reason for not using 10^X?

001 LBL 'PIP
002 'PI DIGITS?
003 PROMPT
004 'N SIZE?
005 PROMPT
006 CHS
007 10^X
008 CHS
009 1
010 +
011 X<>Y
012 Y^X
013 CHS
014 1
015 +
016 END
or, more accurately,
001 LBL 'PIP
002 'PI DIGITS?
003 PROMPT
004 'N SIZE?
005 PROMPT
006 CHS
007 10^X
008 CHS
009 LN1+X
010 *
011 E^X-1
012 CHS
013 END


#27

Quote:
The table says 100% for n=1 to 5 (in the first 100 million digits of pi). That's true for the digits 0 through 9, since this is verified in the first 33 digits of pi. For 2, 3, 4 and 5-digit sequences the probability is very close to 100%, but not exactly 100%.

Unless, of course, all such sequences really do occur in the digits available. In this case the probability is 1.


- Pauli


#28

Yes, but until all 111,100 sequences have been checked we cannot take that for granted.

Gerson.


#29

I suspect they have been :-)
Of course, I don't know for sure and am too lazy to write a program to do such a check...


- Pauli


#30

Most likely all sequences are there:

http://www.wolframalpha.com/input/?i=100%281-%281-10%5E-5%29%5E1e8%29

Click four times on 'More digits'.

Gerson.

#31

You'll find the first occurrence of the sequence 02041956 at position 252,431,153, according to Pi Explorer.

Gerson.


#32

Good to know, Gerson! Now, what exactly can I do with this information? :)

It's a leading question. Be nice. :)


#33

Just thought you'd like to know, since you appeared to be somewhat disappointed because your birthday string would not show up in the first few million digits of pi.
In theory even the complete works of Shakespeare might be found inside pi, considering the constant behaves as it has been doing thus far. However no one will ever know where they start. How many digits should be looked at before the string "the undiscover’d country from whose bourn no traveller returns" appears, for instance?


#34

Quote:
Just thought you'd like to know, since you appeared to be somewhat disappointed because your birthday string would not show up in the first few million digits of pi.

Helping me to understand the probabilities reduced my disappointment considerably. :)

Quote:
How many digits should be looked at before the string "the undiscover’d country from whose bourn no traveller returns" appears, for instance?

Along the same lines, Here are some strings I'd like to see in Pi:

  • Turn back! Here there be dragons!
  • My other irrational constant is a Volkswagen.
  • Keep it up. The answer to everything appears starting at digit numbhYfd]9uf8
  • There's no meaning in Pi other than the fact that it's a constant of nature, or at least of nature with a flat topology.

Apologies, slow afternoon. :)

#35

If you like PI visualized in color, there's also PI visualized as music. There are plenty of videos showing it, but I like he following:

Musical PI

Bill

#36

They always said, there is no secret to be found within the number of Pi - but it seems that they were wrong. I can see a huge "pi"-Sign right in the middle of the chaos. Did someone else notice this as well?

#37

Actually, looks like they got the very first digit wrong:


#38

I am unable to reproduce this string when I place my cursor at the upper leftmost position. I get the decimal portion of Pi starting with 141592...

Has anyone else gotten this result?

Jeff


Possibly Related Threads...
Thread Author Replies Views Last Post
  [OT] Mathematica free for Raspberry PI BruceH 32 2,052 11-23-2013, 05:24 AM
Last Post: Nick_S
  How to add image to HP Forum Posting Harold A Climer 2 365 11-20-2013, 02:28 PM
Last Post: Han
  Prime: Placing more than 1 item on the RPN stack in a single program? John Colvin 4 457 11-19-2013, 08:59 AM
Last Post: Miguel Toro
  Computing pi with the PC-1300S Kiyoshi Akima 0 207 11-17-2013, 12:24 AM
Last Post: Kiyoshi Akima
  Calculating Pi LHH 9 631 09-27-2013, 10:50 PM
Last Post: Gerson W. Barbosa
  Visualization of pi Bruce Bergman 13 843 08-17-2013, 05:00 PM
Last Post: Howard Owen
  OT: Happy Pi Day! Eddie W. Shore 13 852 03-22-2013, 10:44 AM
Last Post: Les Koller
  Totally OT ... Pi Day for my car Maximilian Hohmann 18 1,081 03-10-2013, 01:15 PM
Last Post: chris smith
  [WP34S] A funny bug in Pi (prod) Eduardo Duenez 3 383 01-28-2013, 03:41 AM
Last Post: Walter B
  [41CL] Repairing an image in Flash Monte Dalrymple 0 199 01-24-2013, 07:01 PM
Last Post: Monte Dalrymple

Forum Jump: