Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



It's like a magic trick. Amazing at first, then you sort of realize how they did it.


If 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.


If 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.




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

Search: