3 ms·
This is yet another case where "prime" is bolted onto something for no particular reason to make it superficially more interesting. IMO this confused mathematic
by lonelappde 7y ago
This is yet another case where "prime" is bolted onto something for no particular reason to make it superficially more interesting. IMO this confused mathematical understanding.
Approximately 1/n of all n-bit pieces of data (including bimaps) are prime.
- mc3 7y agoIt's like a magic trick. Amazing at first, then you sort of realize how they did it.
- tromp 7y agoIf you take a binary image, of length n bits, then the probability of some single bit flip producing a prime, is approximately 1 - (1 - 1/ln(2^n))^n ~ 0.76. Allowing 2 bit flips makes finding a prime as good as certain.
- tromp 7y agoIf you take any binary image, of length n bits, then the probability of some single bit flip producing a prime, is approximately 1 - (1 - 1/ln(2^n))^n ~ 1 - e^{-1 / ln(2)} ~ 0.76.