The set of problems which are computationally decidable has measure 0
Fix a finite alphabet
.
View each language
as its characteristic function
or, after fixing an effective enumeration of
(say
),
as an infinite binary sequence
Equip the space
(Cantor space) with the standard product (fair-coin) probability measure
defined on basic cylinder sets by
Claim. The set of decidable languages (equivalently, the set of characteristic sequences of decidable languages) has
-measure
.
Proof
-
Countability of decidable languages.
There are only countably many Turing machines (or any fixed model of effective computation), because each machine can be encoded by a finite string over a finite alphabet. Every decidable language is decided by at least one (total, halting-on-all-inputs) Turing machine, so the collection of decidable languages is the image of a countable set under the map “machine
language it decides.” The image of a countable set is at most countable. Hence the set
of decidable languages is countable:
-
Singletons have measure zero.
Fix any binary sequence
.
For each
let
denote the cylinder set of all sequences beginning with the length-
prefix of
.
By definition
.
Clearly
so by countable continuity (or monotone continuity) of measure,
-
Countable union of measure-zero sets has measure zero.
Since
is countable we can write
Each singleton
has measure
by step 2, so the countable union has measure
:
Therefore the set of decidable languages (viewed as points in Cantor space) has measure 0.
Remarks, alternatives, and possible objections
-
Dependence on the measure / encoding. The proof used the standard product (fair-coin) measure on
.
This is the usual and natural choice when asking about the “measure” of sets of languages, and it corresponds to uniform random choice of membership for each string independently. If one chose a wildly different probability measure that assigns positive mass to single points, then a countable set need not have measure
.
So the statement must be read with an understood ambient measure (here: the standard product measure / Lebesgue measure via binary expansion). Under that standard measure the result holds and is robust.
-
Equivalence with Lebesgue measure on
.
Mapping sequences to real numbers in
by binary expansion gives an equivalent statement (except for the countable set of dyadic rationals which is measure-zero technicality). The image of the set of computable sequences is countable, hence measure
in
with Lebesgue measure as well.
-
Stronger topological facts. Beyond measure-zero, the set of computable sequences is also meager (a countable set in a complete metric space is nowhere dense and of the first category). In algorithmic randomness terms, “almost all” sequences (w.r.t. measure) are non-computable and in fact Martin-Löf random sequences have many typical properties—computable sequences form a null
set in that effective sense as well.
-
About c.e. (recursively enumerable) languages. The same cardinality argument shows the class of c.e. languages is also countable, so it too has measure zero in Cantor space under the same product measure.
Conclusion
With the natural identification of languages with infinite binary sequences and with the standard fair-coin product measure on Cantor space, the collection of decidable languages is countable, hence a countable union of singletons each of measure 0; therefore the set of decidable problems has measure 0. This formalizes and proves the intended claim.