5 ms·
I think it would probably take forever for the initial lookup, because the probability of matching any 3 byte sequence is higher than matching a 200 bytes seque
by ch4ch4 12y ago
I think it would probably take forever for the initial lookup, because the probability of matching any 3 byte sequence is higher than matching a 200 bytes sequence?
- zaroth 12y agoLiterally forever, right? It's basically scanning a random byte-stream for a 200-byte long exact match. 200 bytes, 1600 bits, or 2^1600 different possible sequences, making the odds 1/2^1600 that any particular 200 bytes pulled out will match the bytes you are looking for.
- pndmnm 12y agoIn fact, it's still not known if pi is normal (contains all finite patterns of numbers[π]), so you can't guarantee that any search will terminate. π: Not quite the definition of normal, but equivalent.
- calvins 12y agoEven if pi isn't normal, there are plenty of normal numbers to choose from (almost all of the reals are normal, in fact), including some really simple and predictable ones like Champernowne's constant (in base 10: 0.1234567891011121314...) that would support simpler index calculations than pi.