Cite

This course has no released version yet: the text at this address may change. Cite a released version when one exists.

/courses/kolmogorov-complexity/initial-segments
@misc{kolmogorov-complexity-initial-segments,
  title = {{Complexity of initial segments}},
  howpublished = {Lesson 2 of \emph{Kolmogorov complexity}, Computability Theory course notes},
  url = {/courses/kolmogorov-complexity/initial-segments},
  note = {Unreleased working version}
}

To cite a single statement, use the # link that appears next to its heading.

Lesson 2 of 4

Complexity of initial segments

The complexity of the initial segments of an infinite sequence; computable sequences have minimal complexity; every sequence has prefixes compressible by any constant; the lower envelope of the complexity of numbers.

35 min3 questions
Before this lesson:Plain Kolmogorov complexity
Kolmogorov complexity · lesson 2 of 4
  1. Plain Kolmogorov complexity
  2. Complexity of initial segments
  3. Prefix-free complexity
  4. The KC theorem and the coding theorem

An infinite binary sequence XX is described by its initial segments X ⁣↾nX \uh n. If XX is computable, these segments carry no more information than their length. One would like to call XX random when, on the contrary, its initial segments are incompressible. This lesson shows that plain complexity is not suited to this purpose: every sequence, however irregular, has initial segments compressible by any given constant. The reason is that a description of length ℓ\ell also conveys the number ℓ\ell; the next lesson removes this effect.

2.1 Computable sequences

Proposition 2.1.#

If XX is computable, then C(X ⁣↾n)=+C(n)C(X \uh n) =^+ C(n). In particular C(X ⁣↾n)≤+log⁡nC(X \uh n) \leq^+ \log n for n≥1n \geq 1.

Proof of Proposition 2.1.

The function n↦X ⁣↾nn \mapsto X \uh n is computable, so C(X ⁣↾n)≤+C(n)C(X \uh n) \leq^+ C(n) by Proposition 1.4. The function σ↦∣σ∣\sigma \mapsto |\sigma| is computable, so C(n)≤+C(X ⁣↾n)C(n) \leq^+ C(X \uh n).

Chaitin proved the converse, a characterization of the computable sequences by the complexity of their initial segments. Its proof requires a counting lemma on the number of descriptions of a string and a careful analysis of c.e. trees of bounded width; it is admitted here.

Theorem 2.2 (Chaitin).#

For a sequence XX, the following are equivalent:

  1. XX is computable;
  2. C(X ⁣↾n)≤+C(n)C(X \uh n) \leq^+ C(n);
  3. C(X ⁣↾n)≤+log⁡nC(X \uh n) \leq^+ \log n, for n≥1n \geq 1.

The implications (1 ⇒ 2 ⇒ 3) follow from Proposition 2.1 and C(n)≤+log⁡nC(n) \leq^+ \log n. For (3 ⇒ 1), see the book of Downey and Hirschfeldt, Section 3.4. An exercise below shows that log⁡n\log n cannot be replaced by 2log⁡n2 \log n: the characteristic sequence of a c.e. set satisfies C(A ⁣↾n)≤+2log⁡nC(A \uh n) \leq^+ 2 \log n.

2.2 Oscillation

Theorem 2.3 (Martin-Löf).#

For every sequence XX and every kk, there are infinitely many nn with C(X ⁣↾n)≤n−kC(X \uh n) \leq n - k.

Proof of Theorem 2.3.

Let MM be the machine that, on input α\alpha, outputs βα\beta\alpha, where β\beta is the string associated with the number ∣α∣|\alpha|. Let cc be such that C≤CM+cC \leq C_M + c.

Let m≥k+cm \geq k + c. Let β=X ⁣↾m\beta = X \uh m, and let NN be the number associated with β\beta, so that N≥2m−1N \geq 2^m - 1. Let α\alpha be the string of length NN such that βα=X ⁣↾(m+N)\beta\alpha = X \uh (m + N). Since the string associated with ∣α∣=N|\alpha| = N is β\beta, M(α)=βα=X ⁣↾(m+N)M(\alpha) = \beta\alpha = X \uh (m + N). Hence

C(X ⁣↾(m+N))≤N+c=(m+N)−m+c≤(m+N)−k.C(X \uh (m + N)) \leq N + c = (m + N) - m + c \leq (m + N) - k.

Each m≥k+cm \geq k + c gives a length n=m+N≥m+2m−1n = m + N \geq m + 2^m - 1; these lengths are unbounded, so there are infinitely many of them.

The prefix X ⁣↾mX \uh m, read as a number NN, announces the length of the next block. A description of the block alone then suffices, since its length restores the prefix. The proof gives more: the deficiency at length n=m+Nn = m + N is m−cm - c, and mm is about log⁡N\log N, so C(X ⁣↾n)≤n−log⁡n+O(1)C(X \uh n) \leq n - \log n + O(1) for infinitely many nn.

Corollary 2.4.#

No sequence XX satisfies C(X ⁣↾n)≥n−cC(X \uh n) \geq n - c for every nn, whatever the constant cc.

The incompressible strings of Proposition 1.6 cannot be the initial segments of a single sequence at all lengths. A definition of random sequences through compressibility must use another complexity. Prefix-free complexity, introduced in the next lesson, does not suffer from this effect, and a sequence is random in the sense of the following course when K(X ⁣↾n)≥n−cK(X \uh n) \geq n - c for all nn.

2.3 The lower envelope of the complexity of numbers

For each kk, only finitely many numbers nn satisfy C(n)≤kC(n) \leq k, since they have descriptions of length at most kk. So C(n)C(n) tends to infinity. It does so more slowly than any computable function tending to infinity.

Theorem 2.5 (Kolmogorov).#

Let μ(n)=min⁡{C(m):m≥n}\mu(n) = \min \{ C(m) : m \geq n \}. Then μ\mu is non-decreasing and unbounded. For every total computable non-decreasing unbounded function φ\varphi, μ(n)<φ(n)\mu(n) < \varphi(n) for all large enough nn.

Proof of Theorem 2.5.

The function μ\mu is non-decreasing by definition, and unbounded since {m:C(m)≤k}\{ m : C(m) \leq k \} is finite for each kk.

Let h(k)h(k) be the least xx with φ(x)>k\varphi(x) > k; it is total computable, since φ\varphi is unbounded. By Proposition 1.4, there is cc with C(h(k))≤log⁡(k+1)+cC(h(k)) \leq \log (k + 1) + c for every kk. Let n≥h(0)n \geq h(0), and let kk be such that h(k)≤n<h(k+1)h(k) \leq n < h(k+1); it exists since hh is non-decreasing and unbounded. Then φ(n)>k\varphi(n) > k, since n≥h(k)n \geq h(k), and h(k+1)≥nh(k+1) \geq n, so μ(n)≤C(h(k+1))≤log⁡(k+2)+c\mu(n) \leq C(h(k+1)) \leq \log(k + 2) + c. For nn large, kk is large, and log⁡(k+2)+c<k<φ(n)\log(k + 2) + c < k < \varphi(n).

For instance, C(n)C(n) is small for infinitely many nn in a range where log⁡n\log n is large: C(22j)≤+C(j)≤+log⁡jC(2^{2^j}) \leq^+ C(j) \leq^+ \log j for j≥1j \geq 1. The function μ\mu is a typical example of a function that tends to infinity, but slower than every computable function tending to infinity; it is computable in ∅′\emptyset', since μ(n)<v\mu(n) < v holds if and only if some string of length less than vv is a UU-description of a number m≥nm \geq n, a c.e. condition.

2.4 Exercises

Exercise 2.6 ★.

Show that for every cc there are strings σ\sigma, τ\tau with C(στ)>C(σ)+C(τ)+cC(\sigma\tau) > C(\sigma) + C(\tau) + c.

Solution

Let MM and cMc_M be as in the proof of Theorem 2.3, and dd such that C(ρ)≤∣ρ∣+dC(\rho) \leq |\rho| + d for every ρ\rho. Let m>c+cM+dm > c + c_M + d and L=m+2m+1L = m + 2^{m+1}. Let γ\gamma be a string of length LL with C(γ)≥LC(\gamma) \geq L (Proposition 1.6). Let NN be the number associated with γ ⁣↾m\gamma \uh m; then N<2m+1−1N < 2^{m+1} - 1, so m+N≤Lm + N \leq L. Write γ=στ\gamma = \sigma\tau with ∣σ∣=m+N|\sigma| = m + N. As in the proof of the theorem, C(σ)≤∣σ∣−m+cMC(\sigma) \leq |\sigma| - m + c_M, and C(τ)≤∣τ∣+dC(\tau) \leq |\tau| + d. Hence C(σ)+C(τ)+c≤L−m+cM+d+c<L≤C(στ)C(\sigma) + C(\tau) + c \leq L - m + c_M + d + c < L \leq C(\sigma\tau).

Exercise 2.7 ★★.

Let AA be a c.e. set. Show that C(A ⁣↾n)≤+2log⁡nC(A \uh n) \leq^+ 2 \log n for n≥1n \geq 1.

Hint

A ⁣↾nA \uh n is determined by nn and the number of elements of AA below nn. Code these two numbers by two strings whose lengths are linked, so that no separator is needed.

Solution

Let k=∣A∩{0,…,n−1}∣k = |A \cap \{0, \dots, n-1\}|. Given nn and kk, enumerate AA until kk elements smaller than nn have appeared; these are exactly the elements of AA below nn, so A ⁣↾nA \uh n is computed. Let β\beta be the string associated with nn, of length ℓ=⌊log⁡(n+1)⌋\ell = \lfloor \log(n+1) \rfloor, and let κ\kappa be the binary representation of kk padded with leading zeros to length ℓ+1\ell + 1; this is possible since k≤n<2ℓ+1k \leq n < 2^{\ell + 1}. The machine that, on an input of odd length 2ℓ+12\ell + 1, splits it into β\beta of length ℓ\ell and κ\kappa of length ℓ+1\ell + 1, and runs the enumeration above, outputs A ⁣↾nA \uh n on the input βκ\beta\kappa. So C(A ⁣↾n)≤+2ℓ+1≤+2log⁡nC(A \uh n) \leq^+ 2\ell + 1 \leq^+ 2 \log n. Since non-computable c.e. sets exist, this shows that the bound log⁡n\log n of Theorem 2.2 cannot be replaced by 2log⁡n2 \log n.

2.5 Notes and references

The oscillation theorem is due to Martin-Löf (1966), who introduced at the same time the definition of randomness through effective tests, treated in the next course. Chaitin’s characterization of the computable sequences dates from 1976; a form with conditional complexity is due to Loveland (1969). The bound for c.e. sets is due to Barzdin (1968). The lower envelope theorem is in Zvonkin and Levin’s survey (1970).

  • P. Martin-Löf, The definition of random sequences, Information and Control 9 (1966), 602–619.
  • G. J. Chaitin, Information-theoretic characterizations of recursive infinite strings, Theoretical Computer Science 2 (1976), 45–48.
  • A. K. Zvonkin and L. A. Levin, The complexity of finite objects and the development of the concepts of information and randomness by means of the theory of algorithms, Russian Mathematical Surveys 25 (1970), 83–124.
  • R. G. Downey and D. R. Hirschfeldt, Algorithmic Randomness and Complexity, Springer, 2010.