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

That's a tricky question. I'll start with a couple ground limitations.

First off, you can't have an algorithm to make incompressible strings of an arbitrary length, because then you could tell it to make an string larger than your algorithm, aka larger than its own complexity.

You also can't measure the complexity of arbitrary strings or you could loop over all possible strings and use it to build a generator.

But if you use the rules of your execution environment you can make sufficiently small incompressible strings. For example, if we used python, "abc" can't be compressed. There just aren't any operations that we can use to shrink it. But "abcabc" could be written as "abc"*2

Any algorithm you use is going to have to depend highly on whatever environment you choose, and it won't be able to produce very long strings, so I don't know if anyone has really bothered.

In comparison, it's really easy to use random numbers such that the chance of being able to remove n bits is 1/2^n. If you have even a few bytes of overhead, as shell scripting has, you're safe from luck.



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

Search: