Slashdot Mirror


A Much Bigger Piece Of Pi

Punk_Rock_Johnny points to an AP story on Pi-obsessed Professor Yasumasa Kanada. A snippet from the story: "Kanada and a team of researchers set a new world record by calculating the value of pi to 1.24 trillion places, project team member Makoto Kudo said yesterday. The previous record, set by Kanada in 1999, was 206.158 billion places." Trillion! "

59 of 677 comments (clear)

  1. Well ... what is it? by LoudMusic · · Score: 3, Funny

    How about we see this bad boy!? I'd sure like to paste it into my "info.txt" file for future referance. It could come in handy sometime.

    --
    No sig for you. YOU GET NO SIG!
    1. Re:Well ... what is it? by mfos.org · · Score: 4, Informative

      Actually, since this is not text data, but numbers, you don't need to waste a whole byte to store a number, if my calculations are correct (probably aren't, hey its early) you only need 514 billion bytes

    2. Re:Well ... what is it? by mfos.org · · Score: 5, Informative

      Here's the magic

      You have a 1.24 trillion digit base ten number

      10^1.24e12

      Now we find out how many digits long it'll be in base 2, x

      10^1.24e12 = 2^x
      x = ln(10^1.24e12)/ln(2)

      x = 1.24e12 * ln(10)/ln(2) = 4119190837660.6

      Now divide by 8 to get bytes, and viola!

      515e9

    3. Re:Well ... what is it? by isorox · · Score: 3, Interesting

      Why waste all that space? You can write any number from 0 to 255 in 1 byte, any number from 0 to 65355 in 2 bytes, and 0 to 4.2billion in 4 bytes.

      Anyone care to do the math about how much space you need (uncompressed)? (I cant cause I'm dumb)

      P.S. Does Pi compress very well?

    4. Re:Well ... what is it? by spac · · Score: 3, Interesting

      Actually, to store a number this large it will have to be stored in IEEE 754 format.

      In IEEE 754 a string of either 32 bits is divided into a sign bit, 8 or more bits for the exponent, and 23 or more bits for the mantissa.

      You'll probably need a little more than 4119190837661 bits to tell you the truth.

      Then again, who cares.

      Only on slashdot....

      My Blog: http://gozman.org

    5. Re:Well ... what is it? by Ryan+Amos · · Score: 3, Informative

      He was calculating the size of a text file containing pi, and for that, he was correct. Actually, by its nature, pi should not compress very well, if at all. The numbers in pi have no pattern (I forget the proof, but there is one) so most compression algorithms wouldn't be able to do much with it.

    6. Re:Well ... what is it? by SWPadnos · · Score: 3, Interesting

      With a few extra bits, you can make it easy to extract any digit of the number.

      Split the 1.24TB number into triplets, and store each triplet in 10 bits:

      (leaving off the initial 3):
      141 592 653 ...
      encode into 30 bits:
      0010001101 1001010000 1010001101 ...

      Pack these together (and on and on), and you use only ~517 GB, but you can index to any digit by a simple division, shift, and decimal conversion.

      (assuming you decided to put together a RAID array for the storage in the first place :)

      --
      - The Sigless Wonder
    7. Re:Well ... what is it? by scotch · · Score: 3, Funny
      You only need 1 digit in base 1.24_trillion*!!! I can store it in one byte (for sufficiently large bytes).

      (*) give or take. probably mostly take.

      --
      XML causes global warming.
    8. Re:Well ... what is it? by Jerf · · Score: 5, Insightful

      Pi, like everything else, compresses down to one bit, given the correct decompression algorithm. (It is generally nonsense to talk about how well something compresses without specifying something about the algorithm you mean to use.)

      Usually, "X compresses down to one bit for a correct algorithm" is a snarky answer, but in this case, it actually makes sense. Generally one has to define those algorithms as a table, where "X" is what the decompression function returns for "1", which definately feels like cheating. In this case, though, one can provide a finite algorithm to compute as many digits of pi as you please, so it makes sense.

      In fact, we compress pi down to one or two bytes, with a mathematically defined decompression sequence you can use if you want, all the time. In fact, I've done it three times in this post already, where two different two byte sequences stood in for the infinite series that is that number. Can you find them?

    9. Re:Well ... what is it? by SpinyNorman · · Score: 3, Funny

      The best ASCII representation to send would be "pi".

  2. If Pi were made into a classic video game... by Jace+of+Fuse! · · Score: 3, Funny

    We would have either found the end by now or discovered a pattern.

    heh.

    --

    "Everything you know is wrong. (And stupid.)"

    Moderation Totals: Wrong=2, Stupid=3, Total=5.
  3. Re:One simple question by Nyh · · Score: 3, Funny

    Because pi is there. And they still have found only the tiniest fraction of the total of decimals of pi...

    Nyh!

  4. The 1.24th trillion digit of pi is .. by gargle · · Score: 5, Funny

    The number Six!

  5. math question about pi by selectspec · · Score: 3, Interesting

    Does the problem that pi can't be expressed in decimal notation extend to other base systems? For example, if you tried to write pi out in binary or hex would you encounter the same problem? Is there a special base system (other than base pi) which can describe pi in a finite number of digits?

    --

    Someone you trust is one of us.

    1. Re:math question about pi by Moeses · · Score: 5, Funny

      You can write Pi as 1 (base Pi).

    2. Re:math question about pi by DJPenguin · · Score: 4, Informative

      No - pi is irrational... as far as I know this would be the case for base-n where n is of course an integer.

    3. Re:math question about pi by Dunark · · Score: 5, Informative

      Pi is worse than irrational - it's trascendental. Merely irrational numbers can be expressed as simple expressions with finite numbers of terms, but transcendentals require an infinite number of terms.

    4. Re:math question about pi by isorox · · Score: 3, Funny

      He said other then base Pi.

      You can write it as 0.5 (base 2Pi)

    5. Re:math question about pi by wass · · Score: 5, Informative
      Nope. Do you write the number 2 as '1' in binary (base 2)?
      sorry, but in base pi, pi would be written as 10.

      (fyi, i made the same mistake back in the day also)

      --

      make world, not war

  6. How to calculate PI yourself by renosteve · · Score: 5, Funny
    One way to calculate for yourself the value of pi is to drop a lot of toothpicks onto a large piece of paper that has lines drawn on it!

    Here's how it works. You'll need several boxes of toothpicks. Get a large piece of chart paper, and draw parallel lines on it, from one side to the other. The lines should be separated by a distance just slightly larger than the length of a toothpick.

    From a height of about one metre, drop a measured number of toothpicks onto the chart paper, so that they all fall randomly somewhere on the paper. Count how many toothpicks are touching a line (or would be, if they weren't resting on another toothpick).

    Repeat this process as many times as you can. Lots of people can do it at once. All that's important is that, each time you drop some toothpicks, you write down how many you dropped, and how many of those ended up touching a line. When you're done, find a total for each quantity.

    You now have all the numbers you need to calculate Pi:

    c ... toothpick length (in mm) <BR>
    a ... line separation (in mm) <BR>
    N ... total number of toothpicks dropped <BR>
    M ... total number of intersections <BR>
    (c must be less than a) <BR>

    Now here's the formula you need to calculate Pi:

    PI = 2cN / aM
    Fill them in the formula, and work out your own value of Pi!
    1. Re:How to calculate PI yourself by Jacek+Poplawski · · Score: 5, Funny

      One way to calculate for yourself the value of pi is to drop a lot of toothpicks onto a large piece of paper that has lines drawn on it!

      You are toothpicks seller, aren't you?

  7. Signature of God? by Speare · · Score: 5, Interesting

    In the book version of Contact by Carl Sagan, but skipped in the Jodie Foster movie, was the notion that the aliens had discovered proof that the universe was created by a higher intelligence. A God or society of Gods far higher and more advanced than the aliens. The whole point of dragging Human-kind to that remote beach to talk with daddy was to tell Human-kind that it was time for them to look for God's signature on this universe.

    As any artist, the creator signed the creation. Where? Deep into the insignificant but irrefutably valid digits of several of the fundamental mathematical constants such as pi and e.

    The main character finds one of the signatures at the end of the book: if calculating digits of pi in base 11, after a few million or billion places, a 500x500 digit span is almost entirely zeros. If the span was rendered as a square of pixels, the non-zero digits drew a perfect circle inscribed in the square. A circle in a square. The key concept defining pi, in the digits of pi itself. The whole way the universe works is affected by that constant, so any such 'design' in it has, if you pardon the pun, a transcendental import.

    Why base 11? It's left to the reader to decide, but I expect Sagan wrote it because it is considered one of the possible designs of the universe, one of the string theories is based on an 11-dimensional all-inclusive physics model. As the alien explains to the main character, it wouldn't be base 10, because what's the likelihood that the creator also happened to have ten fingers?

    --
    [ .sig file not found ]
    1. Re:Signature of God? by JanneM · · Score: 5, Insightful

      Well, it seems pi is normal, which means any finite sequence appears somewhere along the expansion of the number. So trivially, that image of a circle is in there somewhere, as is an image of a triangle, the source to Linux 4.0, an image of Bush playing with G.I. Joe dolls on his desk and so on.

      --
      Trust the Computer. The Computer is your friend.
    2. Re:Signature of God? by JanneM · · Score: 4, Interesting

      No. The rearranging of bases, sizes, images and so on is just diluting it even more.

      Say we get a trillion digit sequence. Chances are that if you look long and hard enough, widening your parameters for what's acceptable enough, you will find something. Say you accept not just a perfect (according to some pixellization algorightm) circle exactly filling a 500x500 square in base eleven, but a pretty good approximation of any geometrical figure in any base up to some base and with an image size of anything from 32x32 up to those 500x500 - you suddenly have not just one chance per position in the sequence, but millions. That "Bible Code" scam worked exactly the same way - cast your net wide enough and you can't fail to find something.

      Have fun.

      --
      Trust the Computer. The Computer is your friend.
    3. Re:Signature of God? by Teach · · Score: 3, Informative

      Chances are that if you look long and hard enough, widening your parameters for what's acceptable enough, you will find something.

      Granted. Though a lot of people go from there into assuming that certain things are much more probable than they actually are. For example, though I haven't looked through the digits of pi itself, I feel pretty confident that no 500x500 string of mostly zeros occurs. In fact, the chances of it doing so are so astronomically slim that it would be easier to believe that an intelligent designer had put it there than that it occurred by chance.

      The Mathematics of Monkeys and Shakespeare is one of my favorite articles to point intelligent readers to that believe that whole infinite number of monkeys typing would eventually produce Hamlet idea.

      --
      Graham "Teach" Mitchell, computer science teacher, Leander HS
    4. Re:Signature of God? by superyooser · · Score: 3, Informative
      If you feel there's only one god, then for you, that is true.

      I don't know what it means to "feel" truth. That doesn't make any sense. I study and observe truth which points to further truth which must be taken on faith. It is reasoned belief.

      Reality is not based on belief; it is for belief to be based on reality. I cannot will something into existence by believing in it. If I believe myself to be a physician, will you let me do surgery on you? Won't it be true if I believe in it? According to your reasoning, yes. I'd also like to believe in world peace. Voila! Now it's true! Now I'm believing that Santa Claus is real. This is cool! And grandly delusional.

      It harms me none.

      You and I are standing in a busy street. My point of view is that a Mack truck is ten feet away and driving toward us at 60 MPH. My belief is that if you and I and everybody else in the lane does not immediately run to an area of safety, we will all be run over by the truck and die. Somebody glued to their GameBoy will have a different point of view, but the reality of the situation will affect him as equally as it will affect me. The Mack truck will run over you even if you don't believe it's real or harmful. Other examples: Failure to believe that fire is hot will harm you. Believing that you are using Unix when in fact you are using DOS is sure to drive you nuts. Belief won't change your OS. You have to install an OS to change the reality. This is really common sense.

      Reality is universal and transcendental. You have to adapt your beliefs to reality. Reality will not adapt itself to your beliefs. It couldn't even if it "wanted" to, because people believe different things. It is what it is, and you will be adversely affected if you believe it to be something it's not.

  8. I love this Quote by Rhinobird · · Score: 5, Funny
    I love this quote:
    Among the most puzzling mysteries: Mathematicians are pretty sure, but still cannot prove conclusively, that the numbers following 3.141592 occur randomly.

    "I don't think we're any closer to answering this question than the Greeks were 2,500 years ago," Borwein said.



    Um, you have 1.24 trillion digits of pi. I think you can begin a statisticall analisys now.
    --
    If Mr. Edison had thought smarter he wouldn't sweat as much. --Nikola Tesla
  9. How To Calculate Pi by DrDevil · · Score: 3, Interesting

    You can calculate Pi by doing:

    (1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + ..) x 4

    Obviously the more iterations you do, the closer you will be to the 'true' value of Pi.

  10. OMG! That's 4+2 !!!!! by Anonymous Coward · · Score: 5, Funny

    42 really is the answer to life, the universe, and everything!!!

  11. Re:How? by Gudlyf · · Score: 3, Informative

    You could always just do it with Good ol' Calculus.

    --
    Trolls lurk everywhere. Mod them down.
  12. Re:OK, now this is overkill by DoctorNathaniel · · Score: 4, Insightful

    Hmm..

    size of the proton: ~ 1 fm = 10^-15 m
    age of the universe: ~15 Gyr
    speed of expansion ~ c = 3 x 10^8 m/s

    gives:
    proton/cosmic radius ~ 10^-42

    So you need about 40 places for this. Of course, you might want to calculated it to the Plank scale, so maybe tack on a few more.. say 100 for safety. Yes, a trillion digits does seem a bit like overkill.

  13. Pi info by Omkar · · Score: 4, Informative

    Dr. Math's Pi FAQ. Very informative.

  14. Re:How? by Speare · · Score: 3, Funny

    Here's a program written in BrainF*ck to calculate pi: http://www.people.fas.harvard.edu/~jafowler/pi/pi. b

    Here's the analysis of the program, and a link to what the Turing-inspired BrainF*ck programming language is about.

    --
    [ .sig file not found ]
  15. No, pi is irrational by smcv · · Score: 5, Interesting

    Pi is represented usually by a fraction or relatively simple equation, it's just the division that makes the number go on for ever.

    Nope. If pi was rational (a fraction), it wouldn't go on for ever without repeating. (reference)

    In fact pi is irrational, i.e. there are no integers p, q such that pi = p / q. (proof)

    You can approximate pi as a fraction, which is what projects like this do. (pi is approximately equal to 31/10, or 314/100, or 31416/1000, or ... but these are just approximations; 22/7 is a good enough approximation a lot of the time, but that's just an approximation too)

  16. In other news by isorox · · Score: 5, Funny

    Kanada and a team of researchers

    MPAA forces have today invaded Canada, when asked their reasons they replied:

    "While we were looking through through the binary version of Pi, and one of our special forces noticed that hidden in from digit 12,166,133,883 onwards was a c source to DeCSS. Obviously these terrorists must be stopped!"

    When pointing out that it was Kanada, the researcher, and not Canada the country, the Canadian government sued for trademark violation.

    The case is not expected to hold up, as it is doubtful canada will be able to proove it has the computing power to calculate Pi beyond 4 decimal places - and no confusion can occur.

  17. Re:One simple question by badansible · · Score: 3, Funny

    Damn, if I could only compute e^(i*pi) with a trillion digits precision...

  18. On sale now! by Anarchofascist · · Score: 3

    Buy the complete six DVD set!

    You'll need to insert all six one after the other next time you #include <math.h>

    --
    Once more unto the breach, dear friends, once more, Or close the wall up with our American dead!
  19. Full text of article: by WilliamsDA · · Score: 5, Funny

    3.14159265358979323846264338327950288...... ah, this is gonna take a while :-/

    1. Re:Full text of article: by Anonymous Coward · · Score: 3, Funny

      (314) 159-2653

  20. For comparison... by MarvinMouse · · Score: 5, Interesting

    A google only has 100 zeros, thus 100 places.

    10^trillion is 1 followed by 1 trillions 0's... Assuming we are following the american system that would be equivalent to.

    10^(10^12)

    Okay... now.. let's get some interesting facts with this.

    The absolutely smallest length measurable by quantum theory is the planck length which is approx 10^-34 m. Needless to say, if we have a diameter of an incredibly small perfect circle, we'll know it's circumference beyond what is possible by quantum theory (but since there are no perfect circles, and quantum theory adds probability, this doesn't mean anything really useful. :-P)

    Now, since we know the smallest measurable... lets look at what the estimates for the size of the universe are. Recent estimates put it as 10 billion light years in radius source
    Which works out to about... (assuming american notation on billion)

    10^9 * 300,000,000 m/s* 365*24*3600 ~= 10^25 m

    Okay... now if we were to measure the circumference to as accurate as allowed by quantum theory we'd have.

    pi*2.10^25 ~= 6.28*10^26 10^27 with an accuracy of about 34 decimals...

    So... to get perfect accuracy as allowed by quantum theory we would have at most 35 decimal places afterwards... therefore, we'd need pi with an accuracy of

    ~10^63...

    We have pi with an accuracy of 10^(10^12) which is
    63 : 10^12 ~= 1: 1.59x10^11
    Way more accuracy then we really need. :-)

    That's absolutely insane, but it is fun math.

    Just some food for thought.

    --
    ~ kjrose
    1. Re:For comparison... by Kaz+Riprock · · Score: 4, Funny

      A google only has 100 zeros, thus 100 places

      Not true. From http://www.google.com/press/facts.html:

      Employees:
      More than 500.

      And they're not zeros, they're somebodies and they do an damn fine job at making a search engine.

      --
      Mordor...a magical, mythical land where women are more rare than dragons--but where every man would rather find a dragon
  21. Pi by Alien+Being · · Score: 3, Funny

    is EXACTLY 3.

    Sorry about that. I just wanted to get your attention. Glayvin!

  22. Bah - another incomplete article by SpinyNorman · · Score: 5, Funny

    I can't believe you report this and don't even include the value of Pi he calculated in the article!

    I guess I'll have to wait for one of the page widening trolls to post it.

  23. Re:One simple question by Servants · · Score: 3, Interesting

    Nope. Any number with a recurring pattern is automatically rational, and pi is not.

    This isn't too hard to see. For example, if pi repeated after 1.5 trillion digits, we could write its value (where [1.5tril] represents all those repeating digits:

    pi = 3.14159[1.5tril]..14159[1.5tril]..14159[..]

    Then multiply this number by 10^(1.5 trillion).

    10^(1.5trillion) * pi = 314159[1.5tril].14159[..]

    such that the repeating part starting with .14159 still follows the decimal point.

    Then subtract the top equation from the bottom one, so the repeating part gets subtracted away.

    (10^(1.5 trillion) - 1) * pi = 314159[1.5tril]

    Then just divide both sides by (10^(1.5 trillion) - 1) and you've written pi as a ratio of two integers.

  24. Re:OK, now this is overkill by Ryan+Amos · · Score: 4, Informative

    Hrm.. Well, as one of my Computer Science teachers once told me (in a discrete math class).. Mathemeticians do things because it interests them. The fact that it often has no practical application is why they are often cold, bitter and broke. :)

  25. woo by nomadic · · Score: 3, Funny

    Now I finally have the measurements needed to make my cookies PERFECTLY round.

  26. Re:One simple question by SpaceRook · · Score: 5, Informative

    Why?

    Well, if you read the article, you would know why. Mapping out a very large number like that is useful for testing the accuracy of supercomputers. Also, the research process spins off lots of discoveries. Someone who mapped out pi to 1.24 trillion decimal places probably learned a couple neat tricks along the way.

  27. It's called Buffon's Needle by Flamesplash · · Score: 4, Informative

    You could at least give credit where due ;)

    Here's one of the nicer sites I've seen that has a java applet to simulate this.

    --
    "Not knowing when the dawn will come, I open every door." - Emily Dickinson
  28. Comment removed by account_deleted · · Score: 5, Funny

    Comment removed based on user account deletion

  29. Google nitpick by Anonymous Coward · · Score: 3, Informative

    "Google" - search engine.
    "Googol" - 10^100.

  30. Reminds me of that commercial... by weave · · Score: 4, Funny
    There is a U.S. cable net commercial where the guy is sitting at his computer and all of a sudden a dialog box comes up and says "You've reached the end of the Internet, there are no more pages left to see." and the guy says "Woah, honey, come here..."

    Imagine this program screaming along calculating a few more trillion places when all of a sudden it stops. Pi is NOT infinite after all.

    Imagine the hiliarity that would ensue (oops, wrong web site...)

  31. Re:One simple question by Anonymous Coward · · Score: 3, Informative

    They don't need to do so, as one can prove that Pi is irrational in advance.

  32. Re:One simple question by sco08y · · Score: 3, Funny

    put a disclaimer on these posts moderators ;-)

    I don't need a 20 page proof to tell me the moderators are irrational.

  33. PI = 3 by PrimeNumber · · Score: 3, Informative

    Only in Indiana

  34. Information theory by stud9920 · · Score: 5, Informative

    You, Sir, despite your low member number, would get an F- for information theory at the university I was tought and now teach.

    There is nothing that compresses to one bit. There is such thing as a most efficient way of encoding any message. Counted in bits. and no, not just one bit. One bit would just contain enough information to say "Pi" or "Not Pi". "Not Pi" would according to my intuition not be an acceptable answer, you also have to say "What kind of 'Not Pi'". And that takes bits. You forgot that your algorithm is supposed to possibly generate all possible messages, or else it's "not fair".

    Pi would not compress at all, given it's an infinitely long number. (To be precise, it's length would be reduced from inf to inf/(alphabet entropy) which is still inf, although a "smaller" inf). If you are content with a finite number of digits, its length would be reduced by about a little more than three bits per decimal (because log2(10)=3.???) with any decent entropy encoder. You could try to reduce this further by taking two decimal digits at once, but unfortunately it would not work, as not only are Pi's digits uniformly distributed from 0 to 9, pairs of digits are also distributed uniformly from 0-99, so you would remain with 6.???? bits (log2(100)) per decimal digits pair.

    Another approach you might take, if you want infinite precision (silly on a finite machine), or more generally random precision, is to write a code in a predetermined programming language, in this case a series developement, or whatever the number thorists use nowadays to calculate pi, and decide that the "decompression algorithm" is a compiler (that is perfectly legal, as any finite message can be passed that way, eg "#include <iostream> int main(){cout << "The message";}").

    My idea is that the c compression algorithm would be beat by a perl compression. Maybe try in BrainFuck, it might beat perl, but BF sucks at multiplications.

    Anyway, the most optimal compression for pi is probably saying "Pi" by itself. Any decent geek knows at least one way to calculate that/ find it on project gutenberg/whatever. But don't ever think that you could compress it to two bytes or less : you gotta be sure that I will not understand "the string of decimal digits a.k.a. Pi, do write it in numbers when decompressing", not just "mu turned over", "Pi the string" or "Private investigator". This certainty takes bytes.

    Another example is : "you cannot encode '3 4 8 15 3.141592653 78 54' as '3 4 8 15 pi 78 54', because that would increase the number of symbols in the alphabet, and all the other symbols would have to contain more bits as a result, so the compressed message length would suffer- hope there are a lot of 'pi' in the compresed message".

    I must leave now, gotta go bowling with friends. Start your flames, I can see blatant holes in my reasonments. Hope you get the point. Mailing a link to the message to my signal theory professor (formally one of my bosses), so I will suffer if I told bullshit.

    1. Re:Information theory by Jerf · · Score: 5, Informative

      A compression function is a mapping from input to output. A decompression function maps from all possible outputs of the compression function, back to all possible inputs (though there may be some illegal input to the decompression function). As long as decode(code(x)) = x for any x in the domain, it's a "compression" function, even if possibly a really bad one. There's an infinite number of such functions but most of them are terribly uninteresting. For instance, a particular 'code' might repeat x twice and one of its corresponding 'decode's might cut the input in half again; it meets the definition but we'd never be interested in that.

      Different functions perform better or worse in different domains, which is why we have "zip", "gzip", "bz2", "shl" or whatever the lossless audio encoder is, and all kinds of other compressions.

      It is trivial to define a function that maps one bit to pi, even if pi is defined as some infinite sequence, instead of a finite symbol representing the infinite concept. You just do it.

      Where all numbers are in binary:

      decompress(x) = { (the infinite binary encode of pi) if x == 1
      what gunzip would do if x != 1 }


      Perfectly permissible since "1" isn't a legit gunzip file.

      compress(x) = { 1 if x == (the infinite binary encoding of pi)
      what gzip would do if x != pi }


      For your choice of binary encodings of real numbers that makes sense in this domain.

      You seem to have neglected that strings have length, and that just because a given thing compresses down to one bit, does not mean that all things the compression scheme produces will be one bit. In fact, that's impossible for obvious reasons.

      There's a perfectly well defined mapping that exists. Of course you can't implement this directly since x can be infinite in this case, and would thence take an infinite amount of time to check if x is pi for the compression case, but it's the same kinda thing as "you can't implement a Turing Machine because you can't have an infinite tape." The function itself, like Turing Machines, is perfectly well defined.

      There's nothing unrealistic about this, either; the same principles underly the proof that no compression algorithm can compress all input. You forget that there is no "one true representation" of anything; we can define symbols to mean whatever the hell we want.

      (This assumes gzip is defined for infinite input, which IIRC it is, since it's a stream-based compressor; conceptually, there's no reason that gunzip won't perfectly happily run forever on an infinite input, giving perfectly well-defined output, as long as the machine in question has infinite memory.)

      Pi would not compress at all, given it's an infinitely long number.

      Trivially wrong anyhow, even with your misunderstandings. The people in the article who generated over a trillion digits of pi did not pull them out of their ass; there's a mathematical procedure that produces the digits of pi, as many as you have time to compute. Realistically, that means that pi is compressed as the Turing Machine that spits these digits out, and this Turing Machine is fed to the Universal Turing Machine, which "decrypts" (normally we wouldn't use that word, but a UTM fits into the definition of a decryption function, mapping input to output) the output into the string of numbers. The Pi TM is finite, the output is not. Again, you can't run in finite time, but conceptually, the TM represents all of Pi, given enough time. (It "limits" to it, if you like, as time goes to infinity.)

      (The corresponding encryption routine for UTM as a decryption routine is much, much tougher, beyond human capability to perform optimally, and often at all; many interesting things about that have been proven.)

      A friend of mine has toyed with a theory of "computable" numbers, lying somewhere between the reals and the rationals. A "computable" number is one where there exists a Turing Machine that will output it, as time goes to infinity. Since there are fewer TMs then real numbers, it's clearly smaller then the set of reals, yet equally clearly, it's larger then the rationals, since it includes things like Pi, e, and, most interestingly, any number we could ever conceivably communicate to each other in such a way that we could construct it. That's the most interesting part of it; it's not the full reals, yet you can't point to a real number or reference one that is not in this "computable" set. Not directly germane, but perhaps interesting to anybody following the posts this deeply.

      Anyway, the most optimal compression for pi is probably saying "Pi" by itself.

      Ironically, you further demonstrate a decompression algorithm ("simplifying an expression into its decimal equivalent according to the corpus of human mathematical knowlege") that decompresses the sixteen-bit phrase "Pi" into the infinite decimal sequence.

      My idea is that the c compression algorithm would be beat by a perl compression.

      And what is that supposed to mean, anyhow? Algorithms exist independently of their implementation in a given language!

      Your understanding of information theory is skin deep; you recall some of the results but you do not understand the deeper logic. I'm not an expert but I'm pretty confident that this post is accurate enough for Slashdot. (I'd be a bit more careful with definitions and domain specifications for a class assignment, but this isn't, and it's long enough.) The exactly compressions techniques you learned are just a special case that happens to be useful in the real world, not the be-all end-all of compression.

  35. Re:Yes, but... by matrix29 · · Score: 3, Informative

    while it's true (I think) that any fininte sequence of digits will eventually appear in a non-repeating, infinite sequence, I think the point in the book was that the odds of our being able to find it, given the tiny tiny tiny tiny tiny tiny portion of the number space we're able to search with our extremely finite computing power, would be evidence that it was placed there if we ever did manage to find it.

    Put another way, it would have to be hanging in easy reach for us to be able to find such an insanely improbable thing as (say) a 500x500 block of pre-arranged digits. In base 11, that would be 11^(25,000), a number too hideous to contemplate, and think of the size of the space you'd need to search before such a number would be found just based on probability. So if we found such a thing, we either beat bazillion^bazillion-to-one odds, or we found something that was left there for us. Interesting.


    Actually, base converting Pi in to Base 11 is actually pretty damn EASY.

    Here is the number
    3.1415926535897932384626433832795
    3 in Base 11 = 3
    Now the rest is simple.
    Multiply 0.1415926535897932384626433832795 by 11
    Take the number past to the left of the decimal point and use this as your first digit of Base 11 Pi. In this case it is = 1.
    Subtract that number and multiply by 11 again.
    The number you get is 6.

    Now if you Wash - Rinse - Repeat you'll arrive at the number in Base 11 (3.16150702865A485235215...)
    Pretty simple? You can do this quickly with other bases without hitting negative powers of the base number. You can also convert a number in another base quickly using the technique from my earlier post in this Slashdot chat. The trick is to convert your target base number into the base that you're converting from. It works for all decimals just like RADIX works for all integers. Do a find for "matrix29" on this page and you'll hit my previous post right off.

    You can also convert to non-integer bases (ergo Base 7.886) but the method is a tad more awkward.

    --
    "Face it, a nation that maintains a 72% approval rating on George W. Bush is a nation with a very loose grip on reality.
  36. If you don't think Pie recurrs... by telstar · · Score: 3, Funny

    aparently you've never eaten Thanksgiving dinner at my place. Give it an hour or two, and you're bound to see it make a reappearance...

  37. Think about it more... by efuseekay · · Score: 4, Informative

    Dude, they measure it to 1.24 Trillion, not 10^(Trillion).Someone had pointed that out, but...

    If you think about it, you could not have fitted the entire observable universe with enough paper to record (even if you write in very very very very small fonts) the number of decimals if you know PI to 10^(Trillion).

    In fact the entire observable universe had about 10^120 atoms. So you are out of luck very soon. (You can imagine packing more atoms, but then the universe will become too dense and collapse on herself so fast you won't have time to expand to her current volume).

    --
    Mode (3) smart-aleck mode. Press * to return to main menu.