Вы находитесь на странице: 1из 3

Consider the following two strings of 32 lowercase letters and digits.

Example 1: abababababababababababababababab

Example 2: 4c1j5b2p0cv4w1x8rx2y39umgw5q85s7

The first string has a short English-language description, namely "ab 16 times", which consists of 11
characters. The second one has no obvious simple description (using the same character set) other than
writing down the string itself, which has 32 characters.

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.

The Kolmogorov complexity can be defined for any mathematical object, but for simplicity the scope of
this article is restricted to strings. We must first specify a description language for strings. Such a
description language can be based on any computer programming language, such as Lisp, Pascal, or Java
virtual machine bytecode. If P is a program which outputs a string x, then P is a description of x. The
length of the description is just the length of P as a character string, multiplied by the number of bits in a
character (e.g. 7 for ASCII).

We could, alternatively, choose an encoding for Turing machines, where an encoding is a function which
associates to each Turing Machine M a bitstring <M>. If M is a Turing Machine which, on input w,
outputs string x, then the concatenated string <M> w is a description of x. For theoretical analysis, this
approach is more suited for constructing detailed formal proofs and is generally preferred in the
research literature. In this article, an informal approach is discussed.

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

function GenerateExample2String()

return "4c1j5b2p0cv4w1x8rx2y39umgw5q85s7"
where the first string is output by the (much shorter) pseudo-code:

function GenerateExample1String()

return "ab" * 16

If a description d(s) of a string s is of minimal length (i.e. it uses the fewest bits), it is called a minimal
description of s. Thus, the length of d(s) (i.e. the number of bits in the 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). The standard textbook is
authored by Ming Li and Paul Vitanyi in the references.

There are some description languages which are optimal, in the following sense: given any description of
an object in a description language, said description may be used in the optimal description language
with a constant overhead. The constant depends only on the languages involved, not on the description
of the object, nor the object being described.

Here is an example of an optimal description language. A description will have two parts:

The first part describes another description language.

The second part is a description of the object in that language.

In more technical terms, the first part of a description is a computer program, with the second part
being the input to that computer program which produces the object as output.

The invariance theorem follows: Given any description language L, the optimal description language is at
least as efficient as L, with some constant overhead.

Proof: Any description D in L can be converted into a description in the optimal language by first
describing L as a computer program P (part 1), and then using the original description D as input to that
program (part 2). The total length of this new description D′ is (approximately):
|D′| = |P| + |D|

The length of P is a constant that doesn't depend on D. So, there is at most a constant overhead,
regardless of the object described. Therefore, the optimal language is universal up to this additive
constant.

A more formal treatment

Theorem: If K1 and K2 are the complexity functions relative to Turing complete description languages L1
and L2, then there is a constant c – which depends only on the languages L1 and L2 chosen – such that

∀s. −c ≤ K1(s) − K2(s) ≤ c.

Proof: By symmetry, it suffices to prove that there is some constant c such that for all strings s

K1(s) ≤ K2(s) + c.

Now, suppose there is a program in the language L1 which acts as an interpreter for L2:

function InterpretLanguage(string p)

where p is a program in L2. The interpreter is characterized by the following property:

Running InterpretLanguage on input p returns the result of running p.

Thus, if P is a program in L2 which is a minimal description of s, then InterpretLanguage(P) returns the


string s. The length of this description of s is the sum of

The length of the program InterpretLanguage, which we can take to be the constant c.

The length of P which by definition is K2(s).

This proves the desired upper bound.

Вам также может понравиться