OT: The first 4,000,000 digits of Pi, visualized in a single image « Next Oldest | Next Newest »

 ▼ Jeff Kearns Member Posts: 222 Threads: 21 Joined: Oct 2006 04-26-2012, 11:19 AM ▼ C.Ret Senior Member Posts: 260 Threads: 0 Joined: Oct 2008 04-26-2012, 12:01 PM 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? ▼ Bill (Smithville, NJ) Senior Member Posts: 614 Threads: 66 Joined: Jul 2006 04-26-2012, 12:19 PM 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 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 ▼ C.Ret Senior Member Posts: 260 Threads: 0 Joined: Oct 2008 04-26-2012, 12:27 PM 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 ! Crawl Senior Member Posts: 306 Threads: 3 Joined: Sep 2009 04-26-2012, 12:29 PM That's not the real image. The real image is here: http://two-n.com/pi/ Pete Wilson Member Posts: 74 Threads: 1 Joined: Nov 2011 04-26-2012, 07:15 PM 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. Matt Agajanian Posting Freak Posts: 980 Threads: 239 Joined: Aug 2006 04-26-2012, 03:17 PM 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 ▼ Steve Simpkin Member Posts: 225 Threads: 9 Joined: Jul 2008 04-26-2012, 03:46 PM The same reason people climb mountains. Because it is there. ▼ P.Hart Junior Member Posts: 21 Threads: 4 Joined: Oct 2007 04-26-2012, 07:28 PM 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. ▼ Ed Wright Junior Member Posts: 29 Threads: 4 Joined: Jan 2012 04-30-2012, 08:40 AM This quote is always attributed to George Mallory, also a great British explorer who died in his attempt to climb Mt. Everest. ▼ P.Hart Junior Member Posts: 21 Threads: 4 Joined: Oct 2007 04-30-2012, 10:36 AM 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. ▼ Ed Wright Junior Member Posts: 29 Threads: 4 Joined: Jan 2012 04-30-2012, 01:44 PM I wasn't aware of the controversy. It appears we'll never know who really said it. Matt Agajanian Posting Freak Posts: 980 Threads: 239 Joined: Aug 2006 04-26-2012, 04:12 PM 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 ▼ Bart (UK) Posting Freak Posts: 850 Threads: 10 Joined: Mar 2009 04-26-2012, 07:24 PM 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 :-). ▼ Jeff O. Posting Freak Posts: 875 Threads: 37 Joined: Jul 2005 04-27-2012, 08:52 AM 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) ▼ Bart (UK) Posting Freak Posts: 850 Threads: 10 Joined: Mar 2009 04-28-2012, 12:56 PM 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 :-). ▼ Jeff O. Posting Freak Posts: 875 Threads: 37 Joined: Jul 2005 04-28-2012, 05:05 PM 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. Pete Wilson Member Posts: 74 Threads: 1 Joined: Nov 2011 04-28-2012, 05:45 PM I'm pretty sure Spock is a system admin :) -- Pete (a system admin) Howard Owen Posting Freak Posts: 1,830 Threads: 113 Joined: Aug 2005 04-26-2012, 05:16 PM 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. :) ▼ fhub Posting Freak Posts: 1,216 Threads: 75 Joined: Jun 2011 04-26-2012, 05:23 PM 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. :-( W. Bruce Maguire II Member Posts: 180 Threads: 23 Joined: Apr 2012 04-26-2012, 08:24 PM 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. ▼ Gerson W. Barbosa Posting Freak Posts: 2,761 Threads: 100 Joined: Jul 2005 04-27-2012, 07:27 AM 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. nina scholz Junior Member Posts: 20 Threads: 3 Joined: Mar 2012 04-27-2012, 03:43 AM it accepts only 6 digits for searching ... ▼ Howard Owen Posting Freak Posts: 1,830 Threads: 113 Joined: Aug 2005 04-27-2012, 12:51 PM 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 ``` ▼ Gerson W. Barbosa Posting Freak Posts: 2,761 Threads: 100 Joined: Jul 2005 04-27-2012, 07:27 PM 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 ``` ▼ Paul Dale Posting Freak Posts: 3,229 Threads: 42 Joined: Jul 2006 04-27-2012, 07:37 PM 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 ▼ Gerson W. Barbosa Posting Freak Posts: 2,761 Threads: 100 Joined: Jul 2005 04-27-2012, 08:34 PM Yes, but until all 111,100 sequences have been checked we cannot take that for granted. Gerson. ▼ Paul Dale Posting Freak Posts: 3,229 Threads: 42 Joined: Jul 2006 04-27-2012, 09:15 PM 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 ▼ Gerson W. Barbosa Posting Freak Posts: 2,761 Threads: 100 Joined: Jul 2005 04-27-2012, 09:51 PM Most likely all sequences are there: Click four times on 'More digits'. Gerson. Gerson W. Barbosa Posting Freak Posts: 2,761 Threads: 100 Joined: Jul 2005 04-28-2012, 02:41 AM You'll find the first occurrence of the sequence 02041956 at position 252,431,153, according to Pi Explorer. Gerson. ▼ Howard Owen Posting Freak Posts: 1,830 Threads: 113 Joined: Aug 2005 04-28-2012, 06:23 PM Good to know, Gerson! Now, what exactly can I do with this information? :) It's a leading question. Be nice. :) ▼ Gerson W. Barbosa Posting Freak Posts: 2,761 Threads: 100 Joined: Jul 2005 04-28-2012, 07:09 PM 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? ▼ Howard Owen Posting Freak Posts: 1,830 Threads: 113 Joined: Aug 2005 04-28-2012, 07:49 PM 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. :) Bill (Smithville, NJ) Senior Member Posts: 614 Threads: 66 Joined: Jul 2006 04-26-2012, 07:24 PM 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: Bill Frank Boehm (Germany) Senior Member Posts: 415 Threads: 19 Joined: Jan 2005 04-27-2012, 07:52 AM 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? Crawl Senior Member Posts: 306 Threads: 3 Joined: Sep 2009 04-29-2012, 08:51 PM Actually, looks like they got the very first digit wrong: ▼ Jeff Kearns Member Posts: 222 Threads: 21 Joined: Oct 2006 04-29-2012, 11:06 PM 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 5,999 11-23-2013, 05:24 AM Last Post: Nick_S How to add image to HP Forum Posting Harold A Climer 2 1,065 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 1,521 11-19-2013, 08:59 AM Last Post: Miguel Toro Computing pi with the PC-1300S Kiyoshi Akima 0 771 11-17-2013, 12:24 AM Last Post: Kiyoshi Akima Calculating Pi LHH 9 2,127 09-27-2013, 10:50 PM Last Post: Gerson W. Barbosa Visualization of pi Bruce Bergman 13 2,763 08-17-2013, 05:00 PM Last Post: Howard Owen OT: Happy Pi Day! Eddie W. Shore 13 2,588 03-22-2013, 10:44 AM Last Post: Les Koller Totally OT ... Pi Day for my car Maximilian Hohmann 18 3,237 03-10-2013, 01:15 PM Last Post: chris smith [WP34S] A funny bug in Pi (prod) Eduardo Duenez 3 1,047 01-28-2013, 03:41 AM Last Post: Walter B [41CL] Repairing an image in Flash Monte Dalrymple 0 648 01-24-2013, 07:01 PM Last Post: Monte Dalrymple

Forum Jump: