Countable and Uncountable Sets
Countable and Uncountable Sets
A set A is countable if it is finite, or if there is a bijection f:N→A; that is, we can list its elements as x1,x2,x3,… so that every element appears exactly once, eventually, at some finite position. A set that is not countable is uncountable.
Building enumerations
Z is countable: the zig-zag rule f(n)=n/2 for even n and f(n)=−(n−1)/2 for odd n lists 0,1,−1,2,−2,3,−3,…, hitting every integer exactly once.
N×N (and hence Q+, since every positive rational is a pair p/q) is countable by the diagonal listing shown in the figure: sweep through the grid along the anti-diagonals p+q=2,3,4,…, assigning the next natural number to each pair as you meet it.
Every pair sits on some finite diagonal, so every pair receives a finite position − even though the running count grows like (2s), the enumeration never "gets stuck."
Diagonal enumeration of N×N: the number beside each filled dot is the position assigned to that pair (p,q) as the grid is swept along the diagonals p+q=constant. The q axis is labelled and increases downward; open dots mark grid points whose positions are not shown.
Cumulative pairs listed by the Cantor pairing enumeration
Showing a set is uncountable
To show (0,1) is uncountable, suppose (for contradiction) it could be listed as x1,x2,x3,…, each written as an infinite decimal. Construct y=0.y1y2y3… by setting yn=4 when the nth digit of xn is not 4, and yn=5 when it is 4.
Thus every digit of y is 4 or 5, so y neither terminates nor has an eventually repeating tail of 9s; its decimal expansion is unambiguous.
For every n, y differs from xn in digit n, so y=xn. Therefore y was left off the list, a contradiction. This is the diagonalization technique.
The figure shows the diagonal enumeration of N×N: position 1 is assigned to (1,1), and positions increase along successive diagonals p+q=constant, with p increasing within each diagonal. What position number is assigned to the pair (2,3)?
Diagonal enumeration of N×N: the number beside each filled dot is the position assigned to that pair (p,q) as the grid is swept along the diagonals p+q=constant. The q axis is labelled and increases downward; open dots mark grid points whose positions are not shown.
Cumulative pairs listed by the Cantor pairing enumeration
The bijection f:N→Z defined by f(n)=n/2 when n is even and f(n)=−(n−1)/2 when n is odd is used to show Z is countable. Using this formula, what is f(15)?