How many infinities?
The question
There are infinitely many counting numbers and infinitely many infinite 0–1 sequences. Are these two infinities the same size?
Try the experiment before reading on. There’s no wrong way to explore.
Experiment
The diagonal machine
Here is a list of infinite 0–1 sequences (we can only show the start). The gold sequence d flips the diagonal.
| s1 | … | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| s2 | … | ||||||||||
| s3 | … | ||||||||||
| s4 | … | ||||||||||
| s5 | … | ||||||||||
| s6 | … | ||||||||||
| d | 1 | 0 | 1 | 0 | 0 | 1 | ? | ? | ? | ? | … |
Point at (or tab to) a row to see where d differs from it. Click any digit to change the list.
Add d to the list and a new d appears that is different again. No list — however long — can contain every sequence.
Hints, if you want them
What’s going on
What’s going on
Two sets have the same size — the same cardinality — when their elements can be paired off one-to-one, by a bijection. For finite sets this is just counting. For infinite sets it gives surprises: the even numbers can be paired with all counting numbers by , so there are "as many" even numbers as counting numbers. A set that can be listed as is called countable.
Are all infinite sets countable? In 1891 Georg Cantor gave a famous argument that the answer is no.
Suppose someone hands us a list of infinite 0–1 sequences. Build a new sequence by flipping the diagonal: let the -th digit of be the opposite of the -th digit of . Then differs from in position , from in position , and in general from in position . So is not anywhere on the list.
Since every list misses some sequence, the set of all infinite 0–1 sequences is uncountable: it is a strictly bigger infinity than the counting numbers.
Note
The experiment shows the mechanism on a finite part of a list. It illustrates the idea; the argument above — which works for any list whatsoever — is the proof.
The same diagonal idea reappears across mathematics and computer science: in showing that the real numbers are uncountable, in Gödel's incompleteness theorems, and in Turing's proof that no program can decide whether every program halts.