4 ms·
Wow! I'm impressed at how such an image can be decoded from only 4 KB. Would any mathematicians be able to take it an order of magnitude further? The legendary
by peterburkimsher 6y ago
Wow! I'm impressed at how such an image can be decoded from only 4 KB.
Would any mathematicians be able to take it an order of magnitude further? The legendary DeCSS code is only 433 bytes, and can be represented as a prime number [0]. Imagine if images could be represented as prime numbers.
[0] https://en.wikipedia.org/wiki/Illegal_prime https://en.wikipedia.org/wiki/Illegal_prime
- twoscomplement_ 6y agoAny image is just a long string of bits, which is easy to interpret as a number in base 2. It would then be a straightforward step to designate that n by the nth prime. So in theory there is nothing complicated about encoding any binary file as a prime. (There are undoubtedly more efficient ways to do it.)
- recursive 6y ago> Imagine if images could be represented as prime numbers. Any information can be represented by primes. Or composites for that matter.
- a_e_k 6y agoAs the sibling comments here say, that should certainly be possible. However, I don't think that would result in any real compression. At 433 bytes, the DeCSS code takes 3464 bits. Reading the Wikipedia page you linked tells me that the smallest of the prime representations for it was 1401 decimal digits. That's worth 1401 log2(10) ≈ 4654 bits of information. So I believe that encoding it as a prime represents an increase in size in this case.
- peterburkimsher 6y agoYes, it's an increase in storage size. However, it might be a decrease in network bandwidth. It doesn't take many bits for me to send you the illegal prime in decimal exponent representation: k*256^211+99 With a sufficiently powerful CPU on the receiving end, you can decode that into DeCSS. I would enjoy being able to send you a picture just by telling you a prime number like that.