Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

1.6 Prefix Complexity

1.6.1 Incompressibility

Recall the universal oracle machine U\mathbf{U} from Section 1.4. The universality of U\mathbf{U} implies some invariance and minimality properties in the following senses. Let σ\sigma and τ\tau be finite binary strings and MM to be an oracle Turing machine on finite binary strings. By universality, it holds that there exists a string νM\nu_M which may be prepended to the input σ\sigma to allow U\mathbf{U} to simulate MM on σ\sigma given any oracle BB, i.e., UB(νM ⌢σ)=MB(σ)\mathbf{U}^B(\nu_M\ ^\smallfrown \sigma) = M^B(\sigma). Define the conditional plain Kolmogorov complexity of σ\sigma given τ\tau in MM to be

CM(σ∣τ)=min⁡{len⁡(π):Mτ‾(π)↓=σ},\begin{aligned} C_M(\sigma \mid \tau) = \min \set{\operatorname{len}(\pi)}{M^{\overline{\tau}}(\pi) \downarrow= \sigma}, \end{aligned}

or +∞+\infty when minimizing over an empty set; where we map the condition τ\tau into a prefix-free set of strings via τ‾=τ0τ0τ1τ1⋯τlen⁡(τ)−1τlen⁡(τ)−101\overline{\tau} = \tau_0 \tau_0 \tau_1 \tau_1 \cdots \tau_{\operatorname{len}(\tau) - 1} \tau_{\operatorname{len}(\tau) - 1} 01 (on account of the fact that the set of oracles on which a machine MM may converge on a fixed input σ\sigma must be prefix-free; see Downey & Hirschfeldt (2010) for more details). Then, call C(σ∣τ):=CU(σ∣τ)C(\sigma \mid \tau) := C_{\mathbf{U}}(\sigma \mid \tau) the conditional plain Kolmogorov complexity of σ\sigma given τ\tau. Under any other choice of universal machine U\mathbf{U}, this quantity is invariant up to an additive constant independent of σ\sigma and τ\tau. Conditional plain complexity also satisfies minimality, in that for any MM:

C(σ∣τ)≤CM(σ∣τ)+OM(1).\begin{aligned} C(\sigma \mid \tau) \leq C_M(\sigma \mid \tau) + O_M(1). \end{aligned}

for some constant term depending on MM. The plain Kolmogorov complexity of a string σ\sigma is simply C(σ)=C(σ∣⟨⟩)C(\sigma) = C(\sigma \mid \langle \rangle). We call any finitary object π\pi satisfying Mτ‾(π)↓=σM^{\overline{\tau}}(\pi) \downarrow = \sigma an MM-description for “σ∣τ\sigma \mid \tau”. Any MM-description π\pi of σ∣τ\sigma \mid \tau for which len⁡(π)=CM(σ∣τ)\operatorname{len}(\pi) = C_M(\sigma \mid \tau) is also called minimal.

A prefix-free (PF) oracle machine is an oracle machine on finite binary strings with prefix-free domain for any oracle. Any PF oracle machine MM computes a prefix-free partial function ΨM:⊆2<ω→2<ω\Psi_M :\subseteq 2^{<\omega} \to 2^{<\omega} as before. Again, by the Enumeration Theorem, there exists a universal PF oracle machine UPF⁡\mathbf{U}_{\operatorname{PF}}. That is, for each PF oracle machine MM, there exists a coding string νM∈2<ω\nu_M \in 2^{<\omega} such that given any oracle BB and input σ∈2<ω\sigma \in 2^{<\omega}, we have UPF⁡B(νM ⌢σ)=MB(σ)\mathbf{U}_{\operatorname{PF}}^B(\nu_M\ ^\smallfrown \sigma) = M^B(\sigma). Once again, UPF⁡\mathbf{U}_{\operatorname{PF}} admits an invariant and minimal complexity notion in the sense that for any other PF oracle machine MM, there exists an additive constant term OM(1)O_M(1) such that for any σ,τ∈2<ω\sigma, \tau \in 2^{<\omega},

CUPF⁡(σ∣τ)≤CM(σ∣τ)+OM(1).\begin{aligned} C_{\mathbf{U}_{\operatorname{PF}}}(\sigma \mid \tau) \leq C_M(\sigma \mid \tau) + O_M(1). \end{aligned}

We let K(σ∣τ)=CUPF⁡(σ∣τ)K(\sigma \mid \tau) = C_{\mathbf{U}_{\operatorname{PF}}}(\sigma \mid \tau) denote the conditional prefix Kolmogorov complexity of σ\sigma given τ\tau. Both plain and prefix complexities may be relativized to any oracle by pairing the oracle and the condition string (see Downey & Hirschfeldt, 2010 for more details). Then KB(σ∣τ):=CUPF⁡B(σ∣τ)K^B(\sigma \mid \tau) := C^B_{\mathbf{U}_{\operatorname{PF}}}(\sigma \mid \tau) denotes the conditional prefix Kolmogorov complexity of σ\sigma given τ\tau relative to BB.

These complexity notions may also be extended to any other standard collection of finitary objects N\mathscr{N} with a constant amount of overhead, meaning we would only need to sacrifice at most a constant number of bits to describe the computable bijection between 2<ω2^{<\omega} and N\mathscr{N}.

1.6.2 Results on Prefix Complexity

We review some standard results on prefix complexity.

First, one might refer to the following result as either the symmetry of information or the chain rule for conditional prefix Kolmogorov complexity. It was first shown by P. Gács Gács, 1974. The first equation is the strong form and is a property specific to prefix complexity; whereas the second equation is a weak form (where equality holds up to logarithmic terms in the string lengths) shared by many Kolmogorov complexity notions.

An easy consequence of the chain rule is the subadditivity of KK: i.e., for any σ,τ∈2<ω\sigma, \tau \in 2^{<\omega},

K(σ⌢τ)≤K(σ,τ)≤K(σ)+K(τ)+O(1).\begin{aligned} K(\sigma^\smallfrown \tau) \leq K(\sigma, \tau) \leq K(\sigma) + K(\tau) + O(1). \end{aligned}

We may also say something about the growth-rate of KK as an integer function. Write len⁡(n)+len⁡(len⁡(n))+⋯\operatorname{len}(n) + \operatorname{len}(\operatorname{len}(n)) + \cdots for the sum of nested applications of len⁡\operatorname{len}, including only those terms which are positive. Let log⁡∗(n)\log^*(n) denote the number of such terms in that sum. Thenm, for any natural number n∈ωn \in \omega, the optimized prefix-codes in equation (3.2) of Li & Vitányi (2008) demonstrate

K(n)≤log⁡∗n+len⁡(n)+len⁡(n))+len⁡(len⁡(len⁡(n)))+⋯+O(1)≤log⁡(1+n)+2log⁡log⁡(2+n)+O(1)=O(log⁡n)+O(1).\begin{aligned} \K{n} &\leq \log^* n + \operatorname{len}(n) + \operatorname{len}(n)) + \operatorname{len}(\operatorname{len}(\operatorname{len}(n))) + \cdots + O(1) \\ &\leq \log(1 + n) + 2 \log \log (2 + n) + O(1) \\ &= O(\log n) + O(1) . \end{aligned}

Intuitively, we consider nn to be a finite binary string of length len⁡(n)\operatorname{len}(n). One description of nn involves storing an index (of length no more than len⁡(n)\operatorname{len}(n)) of where nn appears among all other strings of length len⁡(n)\operatorname{len}(n) when ordered lexicographically. This algorithm requires a description for len⁡(n)\operatorname{len}(n) to work, so we might iterate the argument on len⁡(n)\operatorname{len}(n) as appearing somewhere in the list of all strings of length len⁡(len⁡(n))\operatorname{len}(\operatorname{len}(n)), and so on. The log⁡∗n\log^* n term is necessary because our machine must be prefix-free.

Together, the chain rule 1.6.1 and the inequality in (1.6.2) imply the results of Example 3.1.6 of Li & Vitányi (2008). Namely, that for any finitary n∈ωn \in \omega,

K(n)≤K(n∣len⁡(n))+K(len⁡(n))+O(1)≤K(n∣len⁡(n))+log⁡∗len⁡(n)+len⁡(len⁡(n))+⋯+O(1)≤K(n∣len⁡(n))+log⁡(1+len⁡(n))+2log⁡log⁡(2+len⁡(n))+O(1)=K(n∣len⁡(n))+O(log⁡len⁡(n))+O(1).\begin{aligned} \K{n} &\leq \Kc{n}{\operatorname{len}(n)} + \K{\operatorname{len}(n)} + O(1) \\ &\leq \Kc{n}{\operatorname{len}(n)} + \log^* \operatorname{len}(n) + \operatorname{len}(\operatorname{len}(n))+ \cdots + O(1) \\ &\leq \Kc{n}{\operatorname{len}(n)} + \log \p{1 + \operatorname{len}(n)} + 2 \log \log (2 + \operatorname{len}(n)) + O(1) \\ &= \Kc{n}{\operatorname{len}(n)} + O(\log \operatorname{len}(n)) + O(1). \end{aligned}

This fact extends to a complexity bound for any integer tuple based on its Euclidean length (see Observation A.3 of Lutz & Lutz (2018)): for any tuple-length m∈ωm \in \omega and integer tuple z∈Zmz \in \mathbb{Z}^m,

K(z)≤m⋅log⁡(1+∣∣z∣∣)+2⋅log⁡log⁡(2+∣∣z∣∣)+Om(1).\begin{aligned} K(z) &\leq m \cdot \log \p{1 + \norm{z}} + 2 \cdot \log \log \p{2 + \norm{z}} + O_m(1). \end{aligned}

The form of this inequality extends to any rr-dyadic rational tuple q∈Drmq \in \mathbb{D}^m_r, where the constant term may depend on both mm and rr.

We include here the conditional version of another standard observation for Kolmogorov complexity: that the complexity of the output of an algorithm is bounded from above by the the complexity of the input plus some overhead to describe the algorithm. This follows from the universality of UPF⁡\mathbf{U}_{\operatorname{PF}}.

As a consequence, as noted on page 218 of Li & Vitányi (2008), one may conclude that KK is continuous as an integer function. That is, for any natural numbers n,Δn∈ωn, \Delta n \in \omega,

∣K(n+Δn)−K(n)∣≤K(Δn)+O(1).\begin{aligned} \abs{\K{n + \Delta n} - \K{n}} \leq \K{\Delta n} + O(1). \end{aligned}

We might extend this and Theorem 1.6.2 as follows. Define Φ:⊆2<ω→2<ω\Phi : \subseteq 2^{<\omega} \to 2^{<\omega} to be partial co-computable (p.c.c.) if Φ\Phi is injective and has a partial computable inverse defined on the range of Φ\Phi. And Φ\Phi is called partial bi-computable (p.b.c.) if Φ\Phi is both partial computable and partial co-computable.

Let us describe a general scheme for proving bounds for prefix complexity. Suppose we would like to prove a bound of the form:

K(a∣b)≤K(a1∣b1)+⋯+K(ak∣bk)+O(1),\begin{aligned} K(a \mid b) \leq K(a_1 \mid b_1) + \cdots + K(a_k \mid b_k) + O(1), \end{aligned}

where a,ba, b and a1,b1,...,ak,bka_1, b_1, ..., a_k, b_k are some finitary arguments and O(1)O(1) may depend on kk. In plainer language, this would read as “one may produce a description for aa given bb and given descriptions for each aia_i given bib_i.”

Formally, to prove a bound of this form, one should construct an appropriate PF oracle machine exhibiting it. The machine MM should interpret its input as a tuple of kk strings: ⟨πa^1∣b^1,...,πa^k∣b^k⟩\langle \pi_{\widehat{a}_1 \mid \widehat{b}_1}, ..., \pi_{\widehat{a}_k \mid \widehat{b}_k} \rangle, and read a string b^\widehat{b} from its oracle tape. The machine may use b^\widehat{b} and any other results stored along the course of the computation to produce some strings called b^i\widehat{b}_i for any of the 1≤i≤k1 \leq i \leq k. Also, for any 1≤i≤k1 \leq i \leq k for which b^i\widehat{b}_i is defined, the machine may also simulate UPF⁡\mathbf{U}_{\operatorname{PF}} with oracle b^i\widehat{b}_i and input πa^i∣b^i\pi_{\widehat{a}_i \mid \widehat{b}_i} to compute and report a string called a^i\widehat{a}_i if the computation converges. Of course, it depends on the specific argument how exactly the machine will operate.

With this oracle machine now defined, one would pass into MM the oracle bb and the input consisting of minimal UPF⁡\mathbf{U}_{\operatorname{PF}}-descriptions πai∣bi\pi_{a_i \mid b_i} for aia_i given bib_i for each 1≤i≤k1 \leq i \leq k. Supposing that MM was properly defined so as to halt on this choice of oracle and input and to correctly report aa, we may then conclude:

K(a∣b)≤CMb(a1,...,ak∣b1,...,bk,k)+O(1)≤len⁡(πa1∣b1)+⋯+len⁡(πak∣bk)+K(k)+O(1)=K(a1∣b1)+⋯+K(ak∣bk)+K(k)+O(1).\begin{aligned} K(a \mid b) &\leq C^b_M(a_1, ..., a_k \mid b_1, ..., b_k, k) + O(1)\\ &\leq \operatorname{len}(\pi_{a_1 \mid b_1}) + \cdots + \operatorname{len}(\pi_{a_k \mid b_k}) + K(k) + O(1)\\ &= K(a_1 \mid b_1) + \cdots + K(a_k \mid b_k) + K(k) + O(1). \end{aligned}

It is standard practice to instead verbally explain an (intuitive) algorithm which produces aa from bb and the other descriptions ai∣bia_i \mid b_i, and then to appeal to the Church-Turing thesis to conclude there exists a prefix-free oracle machine simulating that process. Several of the proofs provided here follow this form for the sake of clarity.

One may use this scheme to prove Proposition 1.6.3. It also works for two-part descriptions. Let N\mathscr{N} be any standard collection of finitary objects and n∈Nn \in \mathscr{N}. Given n∈An \in A for some finite set A⊂NA \subset \mathscr{N}, we have that K(n)≤K(A)+log⁡∣A∣+O(1)K(n) \leq K(A) + \log \abs{A} + O(1). That is, a description (of a computable enumeration) of AA, together with a description for the index ii when nn appears in that enumeration of AA, suffice to describe nn as the ii-th element enumerated into AA. In this sense, the pair (A,i)(A, i) forms a two-part description for nn. Two-part descriptions are also important in the study of algorithmic statistics Vereshchagin & Shen, 2017.

An easy consequence of UPF⁡\mathbf{U}_{\operatorname{PF}} being prefix-free is the Kraft Inequality.

Next, Chaitin’s Counting Theorem offers useful bounds for the behavior of KK on the strings of some fixed length. This essentially follows from the universality of UPF⁡\mathbf{U}_{\operatorname{PF}}.

It is interesting to note that the theory of prefix complexity (an algorithmic entropy notion) mimics that of Shannon entropy Kolmogorov, 1968, and that KK satisfies the same linear inequalities true for all inputs as Shannon entropy HH up to a logarithmic term in the sum of the lengths of the strings involved. This may be made precise by translating between random variables with finite range and finite binary strings, as is done in Hammer et al. (2000).

References
  1. Downey, R. G., & Hirschfeldt, D. R. (2010). Algorithmic Randomness and Complexity. Springer New York, NY.
  2. Gács, P. (1974). On the symmetry of algorithmic information. Soviet Math. Dokl., 15, 1477–1480.
  3. Li, M., & Vitányi, P. (2008). An Introduction to Kolmogorov Complexity and Its Applications. Springer.
  4. Lutz, J. H., & Lutz, N. J. (2018). Algorithmic information, plane Kakeya sets, and conditional dimension. ACM Trans. Comput. Theory, 10(2), Art. 7, 22. 10.1145/3201783
  5. Vereshchagin, N., & Shen, A. (2017). Algorithmic statistics: forty years later.
  6. Chaitin, G. J. (1976). Information-theoretic characterizations of recursive infinite strings. Theoretical Computer Science, 2(1), 45–48. https://doi.org/10.1016/0304-3975(76)90005-0
  7. Kolmogorov, A. N. (1968). Three approaches to the quantitative definition of information. International Journal of Computer Mathematics, 2(1–4), 157–168. 10.1080/00207166808803030
  8. Hammer, D., Romashchenko, A., Shen, A., & Vereshchagin, N. (2000). Inequalities for Shannon Entropy and Kolmogorov Complexity. Journal of Computer and System Sciences, 60(2), 442–464. https://doi.org/10.1006/jcss.1999.1677