Kolmogorov complexity relative to a description method #
A description method runs binary programs: M.run p is the computation of the program p, a
Mathlib Computation, which may or may not terminate with an object. The computation comes with a
clock: (M.run p).runFor t is the output of p after t steps, or none if p has not
halted by then. A computation has at most one result, so every program describes at most one
object. The plain Kolmogorov complexity M.ecomplexity x of an object x is the length of a
shortest program that eventually outputs x, and its time-bounded Kolmogorov complexity
M.etimeBoundedComplexity t x is the length of a shortest program that outputs x within t steps
Li and Vitányi, Chapters 2 and 7. Both take values in ℕ∞, and are ⊤ when no
program describes x; as for cslib's circuit complexity Cslib.Circuits.ecomplexity, the prefix
e stands for "extended".
Nothing here depends on a machine model. A multi-tape Turing machine gives a description method
(Cslib.Kolmogorov.DescriptionMethod.ofMultiTapeTM), and so does any other model with a clocked
semantics. The usual machine-independent complexity is the complexity of a method that simulates
every other one with constant program overhead (Cslib.Kolmogorov.DescriptionMethod.Simulation);
for the partial recursive description methods, Cslib.Kolmogorov.DescriptionMethod.universal is
such a method.
Main definitions #
Cslib.Kolmogorov.DescriptionMethod: binary programs run as computations.Cslib.Kolmogorov.DescriptionMethod.Produces: a program eventually outputs an object.Cslib.Kolmogorov.DescriptionMethod.ecomplexity: the plain complexityC_M(x).Cslib.Kolmogorov.DescriptionMethod.etimeBoundedComplexity: the time-bounded complexityC_M^t(x).Cslib.Kolmogorov.DescriptionMethod.complexity: the plain complexity as a natural number, for objects with a description.Cslib.Kolmogorov.DescriptionMethod.literal: the method in which every program prints itself.Cslib.Kolmogorov.DescriptionMethod.map: pushforward of a description method alongf : α → β.
Main results #
Cslib.Kolmogorov.DescriptionMethod.Produces.unique: a program describes at most one object.Cslib.Kolmogorov.DescriptionMethod.ecomplexity_le_natCast_iff,Cslib.Kolmogorov.DescriptionMethod.etimeBoundedComplexity_le_natCast_iff: the complexity is at mostkexactly when some program of length at mostkdescribes the object (within the time bound); the strict versions areecomplexity_lt_natCast_iffandetimeBoundedComplexity_lt_natCast_iff.Cslib.Kolmogorov.DescriptionMethod.exists_length_eq_ecomplexity: a finite complexity is the length of a describing program.Cslib.Kolmogorov.DescriptionMethod.etimeBoundedComplexity_antitone: more time cannot increase the time-bounded complexity.Cslib.Kolmogorov.DescriptionMethod.iInf_etimeBoundedComplexity,Cslib.Kolmogorov.DescriptionMethod.exists_etimeBoundedComplexity_eq_ecomplexity: the plain complexity is the time-bounded complexity for a large enough time bound.Cslib.Kolmogorov.DescriptionMethod.ecomplexity_map_le,Cslib.Kolmogorov.DescriptionMethod.ecomplexity_map_eq_of_injective: pushing forward a description method cannot increase complexity and preserves it under injective maps.
References #
A description method for objects of type α: run p is the computation of the binary
program p, which may or may not terminate with an object. Its clock is that of the computation:
(run p).runFor t is the output of p after t steps, if p has halted by then. This is the
clocked analogue of a partial function from programs to objects
Li and Vitányi, Chapter 2.
- run : List Bool → Computation α
The computation of the program
p.
Instances For
The program p eventually outputs x.
Instances For
The plain Kolmogorov complexity C_M(x) of x: the length of a shortest program that
outputs x, or ⊤ if there is none Sipser, Section 6.4.
Instances For
The time-bounded Kolmogorov complexity C_M^t(x) of x: the length of a shortest program
that outputs x within t steps, or ⊤ if there is none
Li and Vitányi, Chapter 7.
Instances For
The plain complexity C_M(x) as a natural number. It is 0 for an object without a
description, so it is the plain complexity only when M.ecomplexity x ≠ ⊤
(natCast_complexity).
Instances For
Programs and their outputs #
A program describes at most one object.
Plain complexity #
The complexity is below r exactly when a program shorter than r describes the object.
The complexity is below k exactly when a program of length below k describes the
object.
Threshold characterization. The complexity is at most k exactly when a program of
length at most k describes the object.
A finite complexity is the length of a describing program.
Time-bounded complexity #
Threshold characterization. The time-bounded complexity C_M^t(x) is at most k exactly
when a program of length at most k outputs x within t steps.
A finite time-bounded complexity is the length of a program outputting the object in time.
Monotonicity in the time bound. More time cannot increase the time-bounded complexity.
Dropping the time bound cannot increase the complexity.
A large enough time bound attains the plain complexity.
The plain complexity is the limit of the time-bounded complexities.
The literal description method #
The description method for binary strings in which every program prints itself, taking one step per bit.
Instances For
Every string is its own shortest literal description.
Mapping outputs #
Mapping a function over the outputs of a description method, taking no steps of its own.
Instances For
Mapping f over the outputs does not increase complexity: f x has complexity under
M.map f at most that of x under M.
Mapping an injective f over the outputs preserves complexity: f x has the same
complexity under M.map f as x under M.