Kolmogorov Complexity
Algorithmic complexity as the length of the shortest program that prints a string; Turing machines, Church's thesis and prefix-free programs; invariance of complexity across universal computers; length-conditional complexity, self-delimiting integer codes and log*; the counting argument that most strings are incompressible; expected complexity equals entropy; complexity of integers; algorithmic randomness, incompressible sequences and their law of large numbers; universal probability, the halting problem, noncomputability and the Berry paradox; Chaitin's Omega; universal gambling; Occam's razor and Laplace's sunrise problem; the equivalence K(x) ≈ log 1/P_U(x); the Kolmogorov structure function and sufficient statistic; and the minimum description length principle
Motivation: send a program, not a codeword
Every compressor so far needed a model. Huffman and Shannon codes need the distribution . Universal codes need a family or at least a stationary ergodic source. Lempel–Ziv works on any individual sequence, but it only exploits repetition. And the universal coding note ended with an unsettled question: for one particular string, with no distribution at all, what is the ultimate limit of compression?
Kolmogorov’s answer (1965) changes what gets sent down the wire. The receiving office isn’t a lookup table but a general-purpose computer, the most general decompressor there is. Instead of a codeword, the sender transmits a program that prints the message. The complexity of a message is the length of the shortest such program.
ExampleThree 64-bit strings
-
0101010101010101010101010101010101010101010101010101010101010101 -
0110101000001001111001100110011111110011101111001100100100001000 -
1101111001110101111101101111101110101101111000101110010100111011
- String 1 is “print
01thirty-two times”, a constant-length program. - String 2 passes most statistical tests for randomness, yet it is the start of the binary expansion of . That is also a constant-length program, and no statistical test would have found it.
- String 3 looks random, but has too few zeros. Describing the number of ones and then the string’s index among strings with ones takes about bits, less than , but growing with .
A string of fair coin flips almost surely has no program shorter than “print the following: …”. There are such strings and not enough short programs to go round.
IntuitionWhat changes compared with entropy
| Entropy | Kolmogorov complexity | |
|---|---|---|
| Object | A random variable | A single string |
| Needs a distribution? | Yes | No |
| Description of | Shannon codeword, bits | Shortest program, bits |
| Computable? | Yes, given | No |
| Connection |
Kolmogorov complexity is a conceptual precursor of entropy: averaged over a random source, the shortest-program length is the entropy, so the shortest program is a universal code good for every distribution at once.
ImportantA way to think, not an algorithm
The shortest program can’t be found in general; that is a theorem, not an engineering obstacle. The value of the theory is conceptual. It underlies universal codes, gives a foundation for inductive inference, formalizes Occam’s razor, and gives a definition of an individual random sequence. In practice we use short, not shortest, programs.
Models of computation
DefinitionTuring machine (informal)
A finite-state machine with three tapes:
- a program tape, read in one direction only, never backing up;
- a work tape it can read and write;
- an output tape it writes on.
At each step it reads a program symbol, changes state according to a finite transition table, possibly writes on the work and output tapes, and advances the program head.
flowchart LR P["Program tape: p1 p2 p3 ... read one way only"] --> M["Finite state machine"] W["Work tape"] <--> M M --> O["Output tape: x1 x2 ..."]
IntuitionTuring’s model of a human computer
In 1936 Turing asked whether a machine could reproduce what a person does when calculating: think, write a little, think some more, write some more. A finite set of states plays the role of the mind. The alphabet is finite, because infinitely many symbols couldn’t be told apart in finite space.
DefinitionChurch’s thesis
Every sufficiently powerful computational model (Turing machines, the -calculus, a desktop computer with unbounded memory) computes the same class of functions. That class agrees with the intuitive notion of effectively computable: a finite recipe followed by finitely many mechanical steps. These are the partial recursive functions . They are “partial” because the computation may never halt, in which case is undefined there.
DefinitionUniversal computer
A computer is universal if it can simulate any other computer , given a finite simulation program describing . All but the most trivial computers are universal.
ImportantHalting programs are prefix-free
The program head only moves forward, and the machine stops reading as soon as it halts. So no halting program can be a prefix of another halting program: the machine would have halted before reading the extension. Programs therefore form an instantaneous code, and that single fact makes Kolmogorov complexity formally parallel to information theory.
Definitions and examples
DefinitionKolmogorov complexity
For a universal computer and a finite binary string , with denoting length,
the length of the shortest program that prints and halts.
| Component | Detail |
|---|---|
| Signature | |
| Domain | One individual finite string, with no distribution attached. |
| Codomain | A number of bits: the length of the best description. |
| Depends on | The choice of universal computer, but only up to an additive constant. |
| Not | Computable: no algorithm outputs for every . |
IntuitionAn upper bound is a conversation
If you can describe a string to someone else so that they can compute it unambiguously in finite time, the number of bits you used is an upper bound on its complexity. For example, “Print out the first 1,239,875,981,825,931 bits of the square root of e” is 73 ASCII characters, or bits. That describes a string of more than a quadrillion bits, while most strings that long have complexity close to their length.
DefinitionLength-conditional complexity
If the computer is told the length in advance,
NoteA convention not used here
The literature often defines as , where is a shortest program for , to remove some small asymmetries. These notes use the plain definition.
Invariance
TheoremUniversality of Kolmogorov complexity
If is universal, then for any computer there is a constant , independent of , such that
ProofPrepend a simulator
Let be a program with . The program makes simulate on , which prints . Its length is with . Minimizing over :
∎
CorollaryTwo universal computers agree up to a constant
If and are both universal, then for all . From now on the computer is fixed and dropped from the notation.
WarningThe constant can be enormous
If is a mainframe with every software package built in and is a bare microprocessor, contains all of that software. The theory only says something about strings long enough that this fixed cost is negligible. For short strings the constants dominate, and "" (actual compression) can’t be decided by the theory.
Bounds from simple programs
TheoremComplexity is at most the length
ProofPrint it literally
“Print the following -bit sequence: .” Since is given, the computer knows where the literal ends, so no punctuation is needed. The length is .
∎
TheoremRemoving the length costs about
ProofSend the length with a doubled-bit comma
Without the computer must be told where the description ends. To send
: write each bit of ‘s binary expansion twice, then end with
01. For example, becomes 11 00 11 01. Doubled pairs are
always 00 or 11, so the pair 01 is an unambiguous end marker. This costs
about bits.
∎
FormulaIterated-log integer code
Describe recursively: first the number of bits in , about , then the bits of ; and describe that length the same way. The total is
summing until the terms stop being positive. So
(Compare the integer code in the LZ77 proof.)
Most strings are complex
TheoremLower bound by counting
ProofThere aren’t enough short programs
The programs of length less than are the empty string, 0, 1, 00,
…, 11…1 ( ones): of them. Each
program prints at most one string, so fewer than strings have
complexity below .
∎
IntuitionPigeonholes, again
This is the same argument behind the McMillan inequality: short descriptions are scarce. Most strings must get long ones.
ConventionBinary entropy function
is this function evaluated at the fraction of ones, not the entropy of a random variable. Where no confusion arises we write .
Examples
Take a computer that accepts unambiguous English commands, with numbers in binary.
| Object | Program idea | Complexity |
|---|---|---|
| zeros | ”Print the specified number of zeros.” | |
| bits of | A series for | |
0101…01 | ”Print copies of 01.” | |
| Mandelbrot fractal | Iterate from , colour by escape time | essentially constant |
| Gotham weather, days, entropy bit/day | Fit a Markov model ( bits), then Shannon-code | |
| Mona Lisa, pixels | An off-the-shelf image compressor, about 3:1 | |
| Integer | Its binary expansion, self-delimited |
IntuitionLooks complex versus is complex
The fractal and look intricate, but both are tiny programs run for a long time. Weather and paintings have structure that a model can exploit, but still need a number of bits proportional to . The difference between apparent and algorithmic complexity is the whole point of the definition.
Example bits with ones
Program: “Generate, in lexicographic order, all sequences with ones; print the -th.” The only variables are and :
using with , , for .
TheoremComplexity of a binary string via its count of ones
This is the two-stage code of universal coding, now read as a program.
Kolmogorov complexity and entropy
LemmaProgram lengths satisfy Kraft
For any computer ,
ProofHalting programs are a prefix code
A halting program can’t be a prefix of another halting program (the machine stops reading once it halts), so the halting programs form a prefix-free set and obey the Kraft inequality.
∎
TheoremExpected complexity equals entropy
Let be i.i.d. on a finite alphabet , with . There is a constant such that for all ,
Consequently .
ProofLower bound from Kraft, upper bound from a two-stage program and Jensen
Lower bound. Assign each its shortest program. These programs are prefix-free, so their lengths are the lengths of a prefix code for , and by the entropy bound
Upper bound, binary case. By the count-of-ones theorem,
The middle step is Jensen: is concave.
Upper bound, general alphabet. Describe the type of (the count of each symbol; the last count follows from the others) with bits, then its index within the type class, which has fewer than members (method of types, Chapter 11):
Take expectations and apply Jensen to the concave .
∎
CorollaryWithout the length
The lower bound holds because shortest programs are again a prefix code. The upper bound uses . So .
ImportantOne universal code for every source
The shortest-program “code” never looks at , yet averaged over any i.i.d. source it achieves that source’s entropy, with only bits of overhead. A universal computer is a universal compressor. The catch is that it is not computable.
Kolmogorov complexity of integers
DefinitionComplexity of an integer
, the complexity of ‘s binary representation.
TheoremBasic properties
- Invariance: .
- Upper bound: .
TheoremInfinitely many integers are complex
There are infinitely many with .
ProofKraft against the harmonic series
By the Kraft lemma, . Suppose instead that for all . Then
which is a contradiction.
∎
RemarkHuge but simple
Some enormous integers are simple: and have short descriptions. The theorem says such integers are the exception.
Algorithmically random and incompressible sequences
TheoremFew fair-coin sequences compress
If are i.i.d. Bernoulli, then
ProofEach sequence has probability ; count the compressible ones
by the counting lower bound.
∎
ExampleFive bits of savings
Fewer than of all -bit strings can be compressed by 5 bits or more.
DefinitionAlgorithmically random; incompressible
- A finite string is algorithmically random if . By counting, at least one exists for every .
- An infinite string is incompressible if .
IntuitionRandomness of an individual sequence
Probability theory can’t call a single string “random”: 0000…0 and any
other particular string have the same probability under a fair coin.
Kolmogorov complexity can. A string is random if it has no description
shorter than itself, so it contains no exploitable pattern.
TheoremStrong law of large numbers for incompressible sequences
If is incompressible, then
ProofAn unbalanced string would have a short description
Step 1: Upper bound. Let . The count-of-ones program describes in bits (with a looser cost for sending ), so
Step 2: Lower bound. Incompressibility gives for large .
Step 3: Combine. . Since reaches its maximum value 1 only at , this pins inside , where (choose with equal to the bound).
∎
ImportantIncompressible strings pass every computable test
The same argument works for any computable statistical test of randomness. If an incompressible failed a test, the test itself would be a way to describe more briefly, which is a contradiction. The algorithmic definition of randomness contains all computable tests at once.
TheoremComplexity concentrates at the entropy
If are i.i.d. Bernoulli, then
This strengthens the expected-value theorem by removing the expectation.
ProofUpper tail from the count-of-ones program, lower tail from the typical set
Upper. , and in probability (weak law). Since is continuous, .
Lower. Split on the typical set . Fewer than strings have complexity below , and each typical string has probability at most :
This is small once and is large.
∎
Universal probability
IntuitionA monkey at a computer
Feed fair coin flips into a universal computer as its program (a monkey at the keyboard). Most inputs produce garbage or an error. But a program of length has probability , so short programs dominate, and short programs print structured strings, not random ones. The output distribution is far from uniform: simple strings are much more likely than complex strings of the same length.
DefinitionUniversal probability
the probability that a program made of fair coin flips prints .
| Component | Detail |
|---|---|
| Signature | |
| Domain | A string. |
| Codomain | Its probability as the output of a randomly programmed universal computer. |
| Total mass | (the shortfall is the chance the program never halts). |
| Not | Computable. |
Theorem dominates every computer’s output distribution
For every computer there is a constant (depending only on and ) such that
ProofEvery -program has a -program only bits longer
For each with , the program makes print and has length . So
∎
ImportantA mixture of all computable distributions
Any computable distribution on strings can be produced by some computer acting on fair coin flips (by inverting its CDF, the reverse of the probability integral transform). So dominates every computable distribution, up to a constant factor. It is the Bayesian mixture from universal coding taken to the limit: a prior over all computable models, weighted by .
RemarkThe universe can’t be shown not to be a monkey at a computer
If both and are universal, the likelihood ratio stays bounded away from 0 and for every . Contrast Bernoulli versus Bernoulli, where the ratio goes to 0 or with more data. So the hypothesis “the data came from ” can never be completely rejected for data from any computable source. “The universe is monkeys at a computer” can’t be ruled out. “The universe is monkeys at a typewriter” can.
ExampleShakespeare
Suppose Shakespeare’s works are about bits. A monkey at a typewriter produces them with probability . At a computer, the probability is about , roughly if the text compresses about 4:1. That is still tiny, but exponentially larger. A computer turns random input into meaningful output far more often than a typewriter does.
NotePreview
Kolmogorov complexity and universal probability proves , so (the ideal Shannon code length for the universal distribution) and are the same complexity measure up to a constant.
The halting problem and noncomputability
IntuitionSelf-reference breaks things
“This statement is false” has no consistent truth value. Neither does the pair “The next statement is false. The preceding statement is true.” In 1931 Gödel encoded statements and proofs as integers and built a statement of this form inside arithmetic, showing that any sufficiently rich mathematical system contains true statements it can’t prove.
TheoremThe halting problem (stated)
There is no algorithm that decides, for every program, whether it halts. This isn’t about any particular program: many can easily be shown to halt or loop. No single procedure works for all of them. The halting problem is a concrete instance of Gödel’s incompleteness theorem, and it marks the boundary between what computers can do with unbounded time and memory and what they can’t do at all.
Theorem is not computable
No algorithm computes for every .
IntuitionWhy the obvious search fails
To find the shortest program for , try all programs in order of length. But at any moment some short programs are still running, and there’s no way to tell whether they will eventually halt and print . So you can never certify that no shorter program exists.
RemarkApproximable from above
Running ever more programs for ever longer gives upper bounds on that converge to the true value. The trouble is that you may already have the shortest program without ever being able to know it.
ExampleThe Berry paradox
“The smallest number not nameable in under ten words.” That phrase has fewer than ten words and names the number, so the number can’t exist, yet some number must fit. The fix is to make “nameable” precise as “describable by a program that prints it”. Then the number exists but is not computable: the phrase describes it but is not a program that computes it. Beckenbach’s version: the smallest “dull” number would be interesting for that very reason.
Chaitin’s
DefinitionHalting probability
for a program made of fair coin flips. By the Kraft lemma, . Write for its first bits.
| Component | Detail |
|---|---|
| Type | A single real number in |
| Meaning | The chance a random program halts |
| Computable? | No: computing it would solve the halting problem |
| Information content | Every bit is incompressible |
is a philosopher’s stone
AlgorithmDovetailing: run all programs “in parallel”
List all programs: (empty), 0, 1, 00, 01, 10, 11, 000, ….
At stage , run each of the first programs for steps. Every program
eventually gets unbounded running time, so every halting program is
eventually observed to halt.
Theorem bits of decide halting for all programs of length
Given , dovetail all programs and add up over those seen to halt, until the running sum reaches . At that point every program of length that will ever halt has already halted.
ProofThe remaining mass is too small for a short program
When the running sum reaches , the mass still to come is at most . A not-yet-halted program of length would contribute at least if it later halted, which is too much. So none will.
∎
ImportantDeciding mathematics with
Many open problems are questions about whether a search halts:
- Fermat’s last theorem: search for , halting on a counterexample.
- Goldbach’s conjecture: search the even numbers for one that is not a sum of two primes.
- Any theorem with a finite proof: search all proofs, halting when one proves it.
So knowing settles every finitely refutable or finitely provable statement expressible in fewer than bits. It may take an arbitrarily long (but finite) time. Without , Gödel says no effective procedure can do this. is an oracle.
RemarkThe most compact oracle
The real number whose -th bit says whether program halts carries the same information, but very diluted: you need about of its bits to settle all programs of length less than . packs the same knowledge into bits.
Theorem is algorithmically random
There is a constant such that
ProofShort would print a complex string cheaply
Step 1: From a shortest program for ( bits), compute . Use it to list every program of length that halts, together with its output.
Step 2: Output the first string that is not on that list. No program of length prints , so .
Step 3: Steps 1–2 form a program for of length . So .
∎
Universal gambling
The problem. A gambler bets sequentially on the bits of a string at fair 2-for-1 odds, with no idea where the string comes from. In the horse-race note, the optimal bet was proportional to the true distribution. With no distribution, what should the gambler use?
DefinitionUniversal gambling scheme
Bet on each whole string . Simple strings get large bets. The bets total ; assume the unused remainder is thrown away. Betting on whole strings is equivalent to sequential betting (red and black). The wealth after seeing collects every bet on strings that extend :
TheoremWealth plus complexity is at least length
ProofKeep only the bet on itself
. Take logarithms.
∎
ImportantThe algorithmic conservation law
This is the counterpart of the horse-race conservation law , now for a single string with no distribution: log-wealth plus complexity covers the length. Every bit of structure in the string is a doubling for the gambler.
ExampleWhat universal gambling earns
- Simple infinite sequences (finite , e.g. the digits of ): for all . Since is the most that fair bets can ever win, this is asymptotically as good as knowing the sequence in advance.
- Bernoulli sequences: , which to first order is the Kelly rate of a gambler who knows .
One scheme, with no model, matches the best model-aware gambler on every computable source. (It is also uncomputable, of course.)
Occam’s razor
ExampleLaplace’s sunrise problem
Laplace modelled sunrises as Bernoulli with uniform on . After sunrises in a row,
That is the Laplace estimator (see also rule of succession), so .
DerivationThe same problem under universal probability
Next bit 1. The probability of followed by more ones is dominated by the shortest program, “print 1s forever”: , independent of .
Next bit 0. Any program printing implicitly describes , so it has length at least for most . Ignoring lower-order terms, .
Ratio.
IntuitionTwo routes to the same answer
Laplace got from an explicit uniform prior. The universal distribution gets about from simplicity alone: a rule that breaks after exactly steps must encode , which costs bits, so it is about times less likely than the rule that never breaks.
DefinitionOccam’s razor
Nunquam ponenda est pluralitas sine necessitate: explanations should not be multiplied beyond necessity. Among explanations consistent with the data, choose the simplest. In this framework, choose the shortest program that produces the data.
ExampleMercury’s perihelion
General relativity explains the precession of Mercury’s perihelion with fewer assumptions than Newtonian gravity patched with an ad hoc correction. The shorter explanation wins.
Kolmogorov complexity and universal probability
TheoremEquivalence of and
There is a constant , independent of , such that
equivalently
IntuitionOne term dominates an infinite sum
Every string has infinitely many programs (pad any program with irrelevant instructions), so is an infinite sum. The theorem says that sum is within a constant factor of its largest term, . This mirrors versus : in both the probabilistic and the algorithmic worlds, is the natural description length.
IntuitionWhy the hard direction should be true
For any computable distribution , a Shannon–Fano–Elias code describes in about bits, so . The difficulty is that is not computable, so its Shannon code can’t be built directly. The proof builds the code tree incrementally from better and better lower estimates of .
ProofEasy direction
If is a shortest program for , .
∎
ProofHard direction: build the code tree as the estimates improve
We need .
Step 1: Enumerate halting programs. Dovetail all programs and list the halting ones in the order they halt, with their outputs, . Keep a running lower estimate of each string’s universal probability:
As more programs for halt, and can only decrease.
Step 2: Winnow. Delete any triple with the same and the same as an earlier triple. Now each string appears at most once per level.
Step 3: Assign nodes. Give each surviving triple the first available node at depth of a binary tree, where “available” means not a descendant or ancestor of an already assigned node. This keeps the assignment prefix-free.
Step 4: Kraft guarantees there is always room. For a fixed , the surviving are distinct integers, each (since ). So
Summing over : . By the Kraft inequality the assignment never runs out of nodes.
Step 5: The tree is a decoder. Describe by the path to its shallowest node. Since eventually exceeds , that node sits at depth at most . To print : rerun the deterministic construction until node is assigned, then output its string. This program has length , so
∎
ExampleThe construction on a short list
Programs halting in this order (string, then program, then estimate):
| Kept? | Node (depth ) | |||||
|---|---|---|---|---|---|---|
| 1 | 10111 | 1110 | 5 | yes | 000000 | |
| 2 | 11 | 10 | 2 | yes | 001 | |
| 3 | 0 | 1110 | 1 | yes | 01 | |
| 4 | 1010 | 1111 | 4 | yes | 00001 | |
| 5 | 101101 | 1110 | 1 | no: repeats | — | |
| 6 | 100 | 1 | 3 | yes | 0001 |
The string 1110 is now described by the path 01. To print it, run the
construction until node 01 is assigned, then execute its program
0. The string 1111 is described by 00001.
flowchart TD
R(("root")) -->|0| A(( ))
A -->|0| B(( ))
A -->|1| N3["01: 1110"]
B -->|0| C(( ))
B -->|1| N2["001: 10"]
C -->|0| D(( ))
C -->|1| N6["0001: 1"]
D -->|0| E(( ))
D -->|1| N4["00001: 1111"]
E -->|0| N1["000000: 1110"]
WarningDecodable, but not encodable
The receiver can rebuild the tree, so this is a genuine program. But the sender has no effective way to find the shallowest node for a given , because that would require knowing when the estimates stop improving. The theorem shows a short program exists; it doesn’t show how to find it.
The Kolmogorov sufficient statistic
The problem. A Bernoulli sample has , much less than , so the string has structure. What structure? Inspecting the shortest program itself doesn’t help: is incompressible (otherwise would have an even shorter description), so it looks random too.
IntuitionSplit the description into structure and noise
The program “it has ones, and it is the -th such string” is optimal to first order, and it is two-stage. The first stage (describe ) names a set and contains all the structure. The second stage (the index, bits) is pure noise: is maximally complex given . Generalize this: look for a simple set that contains , then pay to point inside it.
DefinitionKolmogorov structure function
the log-size of the smallest set containing whose indicator function can be printed by a program of at most bits.
| Component | Detail |
|---|---|
| Signature | , a nonincreasing function of the model budget |
| Input | : bits allowed for describing the model (the set) |
| Output | Bits still needed for the data given the model () |
| At | Only is describable, so |
| At | The singleton is describable, so |
DefinitionKolmogorov minimal sufficient statistic
For a small constant , let be the least with
The program printing the corresponding set is a Kolmogorov minimal sufficient statistic for . Any achieving is “sufficient”; is the shortest of them.
IntuitionReading the structure function
| Range of | Behaviour |
|---|---|
| Each extra model bit captures real structure, and drops faster than grows. | |
| The two-stage description first matches the best one-stage description: model + data . | |
| Slope : each extra model bit just halves the set, encoding noise in the model instead of the data. | |
| : the model is the string. |
is where structure ends and noise begins. Beyond it, extra model complexity is overfitting.
RemarkParallel with statistical sufficiency
A statistic is sufficient for when is a Markov chain (sufficient statistics). Here is sufficient for the structure of : given , what remains is incompressible, so nothing further about the structure can be extracted.
ExampleSufficient statistics for three sources
- Bernoulli. Describing exactly costs bits, but that is more precision than the data supports. Describe only to within its natural fluctuation, a bin of width about , which costs about bits. Then index the string among all strings whose count falls in that bin. The total is still , but now .
- First-order binary Markov chain. The sufficient statistic is the
Markov type: the counts of
00,01,10,11. Only two of these are free once is known, each needing about bits, so . - A noisy grey disc on white (“Mona Lisa”). An -pixel image () shows a disc whose pixels are Bernoulli. The model is the disc’s centre and radius (about distinguishable discs) and its grey level (about levels). That is … the book’s total is , with the disc’s position and size giving and the remaining allotted to the grey level and its precision.
IntuitionHalf a log per parameter, once more
Each real parameter, described to the precision the data can resolve, costs about bits. This is the same overhead found in universal coding, now appearing as the size of the minimal model.
The minimum description length principle
The problem. Data are i.i.d. from some unknown . Maximum likelihood picks the that makes the data most probable. That works for small model classes, but overfits rich ones.
WarningMaximum likelihood over all distributions memorizes the data
If is every distribution on the reals, the maximum likelihood estimate puts mass on each observed value. It reproduces the sample exactly and captures none of the underlying structure. Standard remedies assume a parametric family and test the fit, or smooth the estimate (kernel density estimation).
DefinitionMDL estimate
Choose to minimize the length of a two-stage description of the data:
More generally, the minimum description length principle: given data and a set of models, pick the model for which model description plus conditional data description is shortest.
IntuitionMDL penalizes complexity automatically
A more complex model fits better, so falls, but it costs more to describe, so rises. The memorizing estimate needs about numbers to describe, so its model cost explodes. MDL is the practical version of the structure function: stop adding model bits at , where they stop buying more than they cost. It is also Occam’s razor with a price list.
Quick reference
| Object | Statement | Reads as |
|---|---|---|
| Complexity | Shortest program that prints . | |
| Invariance | The computer matters only up to a constant. | |
| Length bound | Never worse than printing it literally. | |
| Unknown length | Self-delimiting costs about . | |
| Counting | Most strings are incompressible. | |
| Count of ones | Two-stage program. | |
| Kraft | Programs are a prefix code. | |
| Entropy | Expected complexity is entropy. | |
| Integers | ; infinitely often | |
| Fair coin | Random strings are incompressible. | |
| Incompressible | Passes every computable test. | |
| Concentration | in probability | |
| Universal probability | Monkey at a computer. | |
| Dominance | Mixture of all computable distributions. | |
| Equivalence | Complexity is universal surprise. | |
| Noncomputability | and are not computable | Halting problem. |
| ; | Random, and an oracle for mathematics. | |
| Universal gambling | Algorithmic conservation law. | |
| Occam / Laplace | versus | Simplicity as a prior. |
| Structure function | ; sufficient at | Where structure ends and noise begins. |
| MDL | Model cost plus data cost. |
Facts to keep to hand
- Kolmogorov complexity is entropy without a distribution. Halting programs are a prefix code, so all of source-coding theory applies, and averaged over any computable source equals to within .
- Counting is the main tool. There are fewer than programs shorter than . This gives incompressibility of most strings, the tail for fair coins, complex integers, and the randomness of .
- Uncomputable, but approximable from above. You can always find shorter programs; you can never certify that one is shortest. The halting problem is the obstruction, and packages it into one real number.
- . Shortest description and universal probability are the same object, exactly as is the Shannon description length.
- Simplicity is a prior. Universal probability, universal gambling, Laplace’s sunrise, the structure function and MDL are all Occam’s razor made quantitative: each extra bit of description costs a factor of 2 in probability.
References
- Cover & Thomas, Elements of Information Theory — Chapter 14