Hacker News new | past | comments | ask | show | jobs | submit login

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"



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.


You can do it but it wouldn't compress most things because the x and y will be larger than the input.


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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: