13 ms·
> So yes, you can find any data in π. But storing the location of that data will on average take the same amount of space as the data itself. Not on average. N
by BugsJustFindMe 3y ago
> So yes, you can find any data in π. But storing the location of that data will on average take the same amount of space as the data itself.
Not on average. Not even at minimum. Since the leading values of pi are definitely _not_ so compact (and we have yet to identify any contiguous segment that is), the absolute minimum is N + plus the overhead to support the optimization of sometimes only using single-byte offsets by declaring the offset size as a header.
- kevincox 3y agoI don't think this is true. If I coincidentally want to store the first million of digits of Pi then my offset is 0 which is certainly smaller than the data. So you can get lucky.
- BugsJustFindMe 3y agoNot here, because this mechanism stores offsets to individual bytes not large blobs. Storing the first N bytes of Pi (it makes more sense to talk about bytes than digits) requires N offsets plus either a header indicating how big each offset needed to be or variable-length delimited offsets, which necessarily likewise increases the offset size. In the absolute smallest case that's N+1 bytes.