View Single Post
Unread 6 Nov 2003, 15:27   #19
W
Gubbish
 
Join Date: Sep 2000
Location: #FoW
Posts: 2,323
W is a jewel in the roughW is a jewel in the roughW is a jewel in the rough
Re: WARNING: Do NOT calculate Pi in binary

Quote:
Originally Posted by acropolis
if it takes a million digits into pi (binary) to get a twenty bit sequence you want, it will take about 20 bits to state it's location.
I think you missed my point.

If you have a bitstring containing all bitstring of 20 bits lenght, it's impossible that this bitstring be SHORTER than 2^20+20-1 bits long. So to give any subposition within this (optimal) bitstring, you'd need 20 bits. This is if none of the 20-bit strings within it is repeated. In pi, they are, pi has no such guarantee of optimality (as can be shown by noting that the first 10 decimals in decimal are not the 10 different digits)

Even if it was optimal, there'd be no average compression (as with ANY compression algorithm. That's right, no compression algorithm has an average gain on a random file)
__________________
Gubble gubble gubble gubble
W is offline   Reply With Quote