The Uncomputable Length of the Shortest Program: Why Kolmogorov Complexity Proves That True Randomness Cannot Be Distinguished From Complexity
Algorithmic information theory reveals that the shortest code required to generate a sequence cannot be calculated. Consequently, mathematics can never definitively prove whether a dataset is truly random or simply the output of a deeply complex hidden rule.
By Rohan Kapoor
- Algorithmic Information Theorists
- Argue that randomness is defined by incompressibility, and because the shortest program is uncomputable, true randomness can never be mathematically proven.
- Applied Cryptographers
- Focus on empirical heuristic tests, arguing that while true randomness is unprovable, statistical unpredictability is sufficient for secure communications.
- Quantum Physicists
- Maintain that physical quantum processes generate ontological randomness that supersedes the theoretical limits of deterministic algorithms.
Perspectives this story doesn't cover
- Hardware engineers designing physical random number generators
Key terms
- Kolmogorov Complexity
- The length of the shortest possible computer program that produces a specific sequence of data as its output.
- Incompressibility
- The property of a data sequence where no algorithm can describe it using fewer bits than the sequence itself; the algorithmic definition of randomness.
- Halting Problem
- A foundational theorem in computer science proving that no general algorithm can determine whether every possible computer program will eventually stop running or run forever.
- Pseudorandom Number Generator (PRNG)
- An algorithm that uses mathematical formulas to produce sequences of numbers that appear random but are actually deterministic and repeatable.
Key points
- Kolmogorov complexity defines the complexity of a dataset as the length of the shortest computer program that can generate it.
- A sequence is considered algorithmically random if it is incompressible, meaning the shortest program is just the sequence itself.
- Because of Alan Turing's Halting Problem, it is mathematically impossible to calculate the absolute shortest program for any given data.
- Modern cryptographic standards rely on statistical tests to certify randomness, but these tests can only prove a sequence lacks simple patterns.
- It is impossible to mathematically prove that any dataset is truly random; we can only prove that we have not yet found the pattern.
In 1965, within the pages of the Soviet journal Problems of Information Transmission, mathematician Andrey Kolmogorov published a paper that fundamentally broke our ability to define a mess. The 11-page document, filled with dense Cyrillic mathematics under the title "Three approaches to the quantitative definition of information," proposed a simple measure that would permanently alter computer science. Kolmogorov argued that the true complexity of any string of data is exactly the length of the shortest computer program capable of reproducing it.[2]
The argument is straightforward but devastating to our understanding of randomness. Consider a string of one million ones. The program required to generate it is tiny: a simple loop instructing the computer to print the number "1" one million times. Because the output can be compressed into a set of instructions much smaller than the output itself, the string is highly compressible and therefore possesses low Kolmogorov complexity.
Now consider a string of one million coin flips. There is no mathematical shortcut to describe it. The shortest possible program to generate that specific sequence is simply a print command containing the entire one-million-character string. This became the formal definition of true algorithmic randomness: a sequence is random if it is incompressible, meaning it cannot be generated by a program shorter than the sequence itself.[3]
But here is the transparent catch, the reason this theory breaks cryptography and philosophy alike: you can never know if you have actually found the shortest program. Suppose you are handed a one-gigabyte file of seemingly random static. You run every known compression algorithm on it, and none reduce its size by a single byte. Is the file random?[1]
You might reasonably conclude that it is. But what if the file is actually the first billion digits of Pi? The program required to generate Pi is only a few lines of code. What looks to human eyes and standard algorithms like absolute randomness is actually pure, deterministic complexity. The pattern is simply hidden behind a mathematical operation you did not think to check.[1]
Kolmogorov, alongside independent researchers Ray Solomonoff in 1960 and Gregory Chaitin in 1966, proved that calculating the absolute minimum program length for an arbitrary string is mathematically impossible. As the Stanford Encyclopedia of Philosophy notes, defining "the length of the shortest computer program that prints the string and then halts" creates a paradox that cannot be solved by any algorithm.[3][4]
This uncomputability is a direct descendant of Alan Turing’s 1936 Halting Problem. If a master algorithm existed to find the absolute shortest program for any data, it would also have to definitively solve whether every possible shorter program eventually halts and produces an output, or runs in an infinite loop forever. Because Turing proved the Halting Problem has no general solution, Kolmogorov complexity inherits the exact same hard limit.
This uncomputability is a direct descendant of Alan Turing’s 1936 Halting Problem.
This is not just a theoretical curiosity for mathematicians; it is the foundational problem of modern cybersecurity. The National Institute of Standards and Technology (NIST) publishes Special Publication 800-22, a 131-page suite of statistical tests used globally to certify random number generators for military, banking, and web cryptography.
The NIST suite runs 15 distinct empirical tests on a sequence of numbers, checking for frequency imbalances, block patterns, and linear complexity. If a sequence passes these 15 tests, it is certified as "random enough" for secure applications. However, the document itself acknowledges the epistemic gap, noting that "A sequence that is generated by a PRNG is not truly random, but it can be designed to appear random."
As algorithmic information theory insists, passing the NIST tests only proves that the sequence lacks simple, known patterns. It cannot prove the absence of a deeply complex pattern. A pseudorandom number generator (PRNG) is, by definition, a short program producing a long sequence. Therefore, its output has low Kolmogorov complexity and is entirely non-random, even if it easily passes all 15 NIST statistical checks.[1]
The strongest counter-argument to this algorithmic pessimism comes from quantum mechanics. Hardware random number generators measure physical quantum phenomena—like radioactive decay or the phase noise of a laser—which physicists argue are ontologically random, not just algorithmically complex. In this view, the universe itself provides true randomness that supersedes the limits of Turing machines.[1]
However, even if the universe produces true physical randomness, the moment that data is digitized and recorded as a binary sequence on a hard drive, Kolmogorov's limit applies to the output. We can test the hardware to ensure it is functioning correctly, but we cannot mathematically prove the resulting string of ones and zeros isn't secretly compressible.[1]
This leaves computer science with a profound epistemic boundary. We can prove that a sequence is predictable by successfully finding the rule that generates it. But we can never prove a sequence is random, because the absence of evidence for a pattern is not evidence of its absence. The shortest program remains forever uncomputable.[1][2]
Sources
[1]Factlen Editorial TeamQuantum PhysicistsSynthesis by Factlen editorial team
Read on Factlen Editorial Team →
[2]Problems of Information TransmissionAlgorithmic Information TheoristsThree approaches to the quantitative definition of information
Read on Problems of Information Transmission →
[3]Journal of the ACMAlgorithmic Information TheoristsOn the Length of Programs for Computing Finite Binary Sequences
Read on Journal of the ACM →
[4]Information and ControlAlgorithmic Information TheoristsA preliminary report on a general theory of inductive inference
Read on Information and Control →
Comments
More in Opinion
See all →Storage Physics
The Superparamagnetic Limit: Why Thermal Stability, Not Manufacturing, Sets the Ultimate Boundary on Hard Drive Storage Density
8 sources
Cryptography
Kerckhoffs's Principle: Why the Security of a Cryptosystem Must Rely on the Secrecy of the Key, Not the Algorithm
8 sources
Materials Science
The σ ∝ 1/√c Relationship: Why the Strength of Brittle Materials Is a Function of Flaw Size, Not Atomic Bonds
6 sources
Urban Forestry
The Evidence Pack: Do Miyawaki Urban Micro-Forests Actually Work?
7 sources
Every angle. Every day.
Get Opinion stories with full source coverage and perspective breakdowns delivered to your inbox.




