Invariance #
A simulation of a description method M by a description method N compiles every M-program
p into an N-program of length at most |p| + c with the same output, and if p halts within
t steps, then the compiled program halts within τ |p| t steps. Then N is at most c worse
than M: C_N(x) ≤ C_M(x) + c, and a description of length k within time t under M gives a
description of length k + c within time τ k t under N, provided the overhead τ is monotone
in the program length. This is the invariance theorem of Kolmogorov complexity
Li and Vitányi, Chapters 2 and 7, Sipser, Section 6.4, relative to
the simulation: a method of a class that simulates every method of the class with constant program
overhead is additively optimal for the class, and two additively optimal methods of the class
agree up to an additive constant.
For plain complexity only the outputs matter: a compiler that preserves outputs and adds at most
c bits is a simulation for some time overhead, because there are finitely many programs of
each length (Cslib.Kolmogorov.DescriptionMethod.exists_simulation_of_produces).
Main definitions #
Cslib.Kolmogorov.DescriptionMethod.Simulation: a simulation ofMbyNwith program overheadcand time overheadτ.Cslib.Kolmogorov.DescriptionMethod.IsAdditivelyOptimal: a method of a class that is at most a constant worse than every method of the class.
Main results #
Cslib.Kolmogorov.DescriptionMethod.Simulation.ecomplexity_le:C_N(x) ≤ C_M(x) + c.Cslib.Kolmogorov.DescriptionMethod.Simulation.etimeBoundedComplexity_le_of_le: ifC_M^t(x) ≤ kthenC_N^{τ k t}(x) ≤ k + c, for a time overhead monotone in the program length.Cslib.Kolmogorov.DescriptionMethod.Simulation.etimeBoundedComplexity_le:C_N^{σ t}(x) ≤ C_M^t(x) + cfor a time overheadσindependent of the program.Cslib.Kolmogorov.DescriptionMethod.Simulation.etimeBoundedComplexity_le_of_polynomial: the transfer under a polynomial time overhead.Cslib.Kolmogorov.DescriptionMethod.exists_simulation_of_produces: an output-preserving compiler is a simulation for some time overhead.Cslib.Kolmogorov.DescriptionMethod.IsAdditivelyOptimal.invariance: two additively optimal methods of a class have complexities within an additive constant of each other.
References #
A simulation of the description method M by the description method N, with program
overhead c and time overhead τ: a compiler from M-programs to N-programs that adds at most
c bits, such that a program halting with output x within t steps compiles to a program halting
with output x within τ |p| t steps.
The compiler from
M-programs toN-programs.Compiling adds at most
cbits.- mem_runFor_compile {p : List Bool} {t : ℕ} {x : α} : x ∈ (M.run p).runFor t → x ∈ (N.run (self.compile p)).runFor (τ p.length t)
A compiled program outputs what the original one does, within the time overhead.
Instances For
Every description method simulates itself.
Instances For
A simulation with larger overheads.
Instances For
Simulations compose, provided the second time overhead is monotone in the program length.
Instances For
Mapping a function over the outputs of a simulation.
Instances For
Invariance. A method that simulates M with program overhead c is at most c worse
than M.
Time-bounded invariance. If M describes x with at most k bits within t steps, then
N describes x with at most k + c bits within τ k t steps, for a time overhead τ monotone
in the program length.
Time-bounded invariance for a time overhead σ that does not depend on the program:
C_N^{σ t}(x) ≤ C_M^t(x) + c.
Time-bounded invariance under a polynomial time overhead. If the compiled programs run in
time at most a (|p| + t + 1) ^ e, a description of x by M with at most k bits within t
steps gives one by N with at most k + c bits within a (k + t + 1) ^ e steps.
A compiler that preserves outputs and adds at most c bits is a simulation for some time
overhead: there are finitely many programs of each length, so the halting times of the compiled
programs of a given length are bounded. The time overhead is not explicit, so this is useful for
plain complexity only.
Additive optimality #
The description method U is additively optimal for the class 𝓜 of description methods
Li and Vitányi, Section 2.1: U belongs to the class, and for every method M
of the class, U is at most a constant worse than M.
The optimal method belongs to the class.
- exists_ecomplexity_le (M : DescriptionMethod α) : M ∈ 𝓜 → ∃ (c : ℕ), ∀ (x : α), U.ecomplexity x ≤ M.ecomplexity x + ↑c
The optimal method is at most a constant worse than every method of the class.
Instances For
A method of a class that simulates every method of the class, each with a constant program overhead, is additively optimal for the class.
Invariance theorem Li and Vitányi, Section 2.1. Two additively optimal methods of a class have complexities within an additive constant of each other.