3 ms·
Shouldn't two programs with the same function but written in different languages zip to (just about) equal size, for a sufficiently powerful version of zip?
by amelius 7y ago
Shouldn't two programs with the same function but written in different languages zip to (just about) equal size, for a sufficiently powerful version of zip?
- tsegratis 7y agojpeg compression works better on photos, gif compression works better for horizontal lines of repeating color One of the easiest things to compress is repetition. After that local effects are going to be easiest Remote effects -- i.e. assignment, is going to be np complete -- i.e. if the best compression for x depends on everything else, then zip is going to have to look at everything else for every single bit it compresses!! So I don't know the details of zip's compression, but I'm sure it doesn't compress side-effects well
- CaptainRuhrpott 7y agoSuch a version of Zip can't exist. If it would, you could decide whether a program calculates a certain thing. According to Rice's theorem something like that can't exist without solving the Halting Problem https://en.wikipedia.org/wiki/Rice%27s_theorem https://en.wikipedia.org/wiki/Rice%27s_theorem