Cardinality

Finite & infinite sets

A finite set is any non-infinite set with the following properties:

  • AB|A| \le |B| iff there exists an injection f:ABf: A \to B.
  • A=B|A| = |B| iff there exists a bijection f:ABf: A \to B.

Countable sets

A set SS is called countably infinite iff it has the same cardinality as the positive integers. A set is called countable iff it is either finite or countably infinite.

To show a set is countably infinite, construct a bijection from the positive integers to the set. For example, the set of even numbers can be defined by:

E=2nnNE = \\{2n | n \in \Bbb{N}\\}

Finite strings

The set Σ\Sigma^* of all finite strings over alphabet Σ\Sigma is countably infinite. To prove this, define an alphabetical ordering on the symbols in Σ\Sigma. The strings can be listed in sequence:

  • First ϵ\epsilon of length 0
  • Then all strings of length 1 in lexicographic order
  • Then all strings of length 1 in lexicographic order
  • And so on for a countable number of lengths

Each of these sets is countable and so their union is also countable.

Uncountable sets

Imagine an infinite length string of bits 10010…

This string is a function d:Z+0,1d: \Bbb{Z}^+ \to \\{0,1\\}.

The set of infinite binary strings is uncountable. This can be proved using diagonalization.

We have a set XX of infinite binary strings:

X=dd:Z+0,1X = \\{d | d : \Bbb{Z}^+ \to \\{0,1\\} \\}

The function of dd has the property dm=d(m)d_m = d(m) is the mmth symbol.

Assume there is a bijection from Z+X\Bbb{Z}^+ \to X. Suppose f(i)=dif(i) = d^i so X=d1,d2,...,dn,...X = \\{d^1, d^2, ... , d^n, ...\\}. So each did^i is each diid^i_i is a digit.

d1=d11,d21,...,dn1,...d2=d12,d22,...,dn2,...dn=d1n,d2n,...,dnn,...d^1 = d^1_1 \\, d^1_2 \\, ... \\, d^1_n \\, ... \\\\ d^2 = d^2_1 \\, d^2_2 \\, ... \\, d^2_n \\, ... \\\\ \vdots \\\\ d^n = d^n_1 \\, d^n_2 \\, ... \\, d^n_n \\, ... \\\\ \vdots \\\\

Consider taking the diagonal of these dnd^ns and creating a new binary string with them. We would be able to form a dXd \in X and d,/=did \mathrlap{\\,/}{=} d^i by creating the string with the diagonal dnd^ns and flipping them.

So d=(dii+1)mod2d = (d^i_i + 1) \bmod 2. Every did^i would have at least one digit different to dd. Thus dXd \in X and d,/=did \mathrlap{\\,/}{=} d^i is a contradiction. There is no bijection Z+X\Bbb{Z}^+ \to X and the set of infinite binary strings is uncountable.

A similar argument shows that R\Bbb{R} via [0,1][0,1] is uncountable using infinite decimal strings, as seen in the textbook.

Theorems

  • Schröder-Bernstein theorem
    If AB|A| \le |B| and BA|B| \le |A| then A=B|A| = |B|.

  • Cantor’s theorem
    A<P(A)|A| \lt |P(A)|

Cantor’s theorem has some implications:

  • P(N)P(\Bbb{N}) is not countable, in fact P(N)=R|P(\Bbb{N})| = |\Bbb{R}|.

  • The continuum Hypothesis claims there is no set SS with N<S<R|\Bbb{N}| \lt |S| \lt |\Bbb{R}|.

  • There exists an infinite hierarchy of sets of even larger cardinality:

S0=NSi+1=P(Si)S_0 = \Bbb{N} \qquad \qquad S_{i+1} = P(S_i)

S0<S1<...<Si<Si+1|S_0| \lt |S_1| \lt ... \lt |S_i| \lt |S_{i+1}|