News for hackers. Stuff that matters.
Re:Mathematics: Came across the following gag. Is it true? by sksksk on Friday October 19, 2012 @06:25AM (#4672937)
If computing ever got powerful enough to compute pi to an nth amount of digits nearly instantaneously, would it be possible to compress everything by just saying "get the digits between x and y"
Re:Mathematics: Came across the following gag. Is it true? by lutusp on Friday October 19, 2012 @06:41AM (#4672964)
Yes, but not in a way that would be useful. For a sufficiently complex message, the index into Pi that matches it might well be longer than the original message. So, yes, but no gain -- the result would be larger than the original.

This would be true for a huge set of Pi digits and some imagined fast way to gain access to the right index -- the index into the set would likely be larger than the message it indexes.

Re:Mathematics: Came across the following gag. Is it true? by tzs on Friday October 19, 2012 @12:53PM (#4674337)
As the other replies have noted, you would generally not actually save anything. Let's put some numbers behind that.

Consider all possible strings of n bits. There are 2^n of these. If each is represented by an index into pi, we have 2^n indexes. The best possible case is that the indexes all point within the first 2^n bits of pi, which allows them to be represented by integers from 0 to 2^n-1. Representing such an integer takes n bits.

Result: representing an n bit string by its index into pi takes in general at least n bits to represent the index. There is no compression to be had here.

Re:Mathematics: Came across the following gag. Is it true? by andreasvc on Friday October 19, 2012 @06:56AM (#4672986)
You can do it but it wouldn't compress most things because the x and y will be larger than the input.