Skip to content

A complexidade de Kolmogorov

Hoje aprendim o que é a complexidade de Kolmogorov:

The Kolmogorov complexity of an object, such as a piece of text, is the length of a shortest computer program (in a predetermined programming language) that produces the object as output. It is a measure of the computational resources needed to specify the object.

[…]

Consider the following two strings of 32 lowercase letters and digits:abababababababababababababababab , and4c1j5b2p0cv4w1x8rx2y39umgw5q85s7

The first string has a short English-language description, namely “write ab 16 times”, which consists of 17 characters. The second one has no obvious simple description (using the same character set) other than writing down the string itself, i.e., “write 4c1j5b2p0cv4w1x8rx2y39umgw5q85s7” which has 38 characters. Hence the operation of writing the first string can be said to have “less complexity” than writing the second.

More formally, the complexity of a string is the length of the shortest possible description of the string in some fixed universal description language (the sensitivity of complexity relative to the choice of description language is discussed below). It can be shown that the Kolmogorov complexity of any string cannot be more than a few bytes larger than the length of the string itself. Strings like the abab example above, whose Kolmogorov complexity is small relative to the string’s size, are not considered to be complex.

[…]

Any string s has at least one description. For example, the second string above is output by the pseudo-code:

function GenerateString2()
    return "4c1j5b2p0cv4w1x8rx2y39umgw5q85s7"

whereas the first string is output by the (much shorter) pseudo-code:

function GenerateString1()
    return "ab" × 16

If a description d(s) of a string s is of minimal length (i.e., using the fewest bits), it is called a minimal description of s, and the length of d(s) (i.e. the number of bits in the minimal description) is the Kolmogorov complexity of s, written K(s). Symbolically,K(s) = |d(s)|.

The length of the shortest description will depend on the choice of description language; but the effect of changing languages is bounded (a result called the invariance theorem).

Wikiwand

Publicado originalmente en Twitter.

Podes interaxir con esta entrada de moitas formas: con pingbacks, con webmentions ou simplemente respondendo a través do Fediverso, por exemplo visitándela en Mastodon.