65

Some explanations:

A set S is countable if there exists an injective function $f$ from $S$ to the natural numbers ($f:S \rightarrow \mathbb{N}$).

$\{1,2,3,4\}, \mathbb{N},\mathbb{Z}, \mathbb{Q}$ are all countable.

$\mathbb{R}$ is not countable.

The power set $\mathcal P(A) $ is defined as a set of all possible subsets of A, including the empty set and the whole set.

$\mathcal P (\{\})=\{\{\}\}, \mathcal P (\mathcal P(\{\}))=\{\{\}, \{\{\}\}\} $

$\mathcal P(\{1,2\})=\{\{\}, \{1\},\{2\},\{1,2\}\}$

My question is:

Is $\mathcal P(\mathbb{N})$ countable? How would an injective function $f:S \rightarrow \mathbb{N}$ look like?

Martin Thoma
  • 10,157
  • 4
    It isn't countable. To prove this, you can use diagonalization directly, or use the fact, which presumably has been proved by now, that the reals are uncountable. – André Nicolas Oct 31 '11 at 23:16
  • This question has been asked before. – Asaf Karagila Oct 31 '11 at 23:19
  • 3
    The cardinality of the power $\mathcal P (A)$ of any set A is always higher than the cardinality of a set A (Source: "Lineare Algebra", ISBN 978-3-528-66508-1, page 14) – Martin Thoma Apr 04 '12 at 09:53
  • As a footnote to the answers already given, you should also see a useful result known variously as the Schroeder-Bernstein, Cantor-Bernstein, or Cantor-Schroeder-Bernstein theorem. Some books present the easy proof; some others have the hard proof of it. – DanielWainfleet Aug 24 '16 at 18:36
  • It's not countable, as provable by diagonal argument, but the set of all FINITE subsets, and even ordered sequences, of natural numbers, or even integers or rational numbers, is, which I first realized by using extended definitions of prime factorization as ordered sequences of exponents to first however-many primes, though there may be an easier proof. – Mr. Nichan Feb 17 '24 at 21:28

6 Answers6

109

Cantor's Theorem states that for any set $A$ there is no surjective function $A\to\mathcal P(A)$. With $A=\mathbb N$ this implies that $\mathcal P(\mathbb N)$ is not countable.

(But where on earth did you find those nice explanations of countability and power sets that didn't also tell you this?)

  • 14
    Those nice explanations of countability and power sets were written by myself. Thanks for the compliment ;-) I just wanted to make sure that everybody who reads this question knows what I'm talking about – Martin Thoma Oct 31 '11 at 23:58
  • 1
    Today I thought about this again and I am a little bit confused. The powerset $\mathcal{P}(A_n)$ with $A_n := {1, ..., n}$ is finite for every $n$. So can't I simply count up for every $A_n$ (so first $\mathcal{P}(A_1)$, then $\mathcal{P}(A_2)$, $\mathcal{P}(A_3)$, ...? Where does it break? – Martin Thoma Nov 08 '14 at 21:41
  • 15
    @moose: You're going to miss every subset of $\mathbb N$ that is not finite, such as the set of all even numbers. – hmakholm left over Monica Nov 08 '14 at 21:45
  • Thank you! It's so obvious when you read it ... I ask because I have an application where I need (theoretically; it is a generator) every finite subset of $\mathbb{N}$ and this is something that bothered me. – Martin Thoma Nov 08 '14 at 21:47
  • 3
    @moose: Bonus hint: The binary representation of a natural number provides a nice enumeration of the finite subsets of $\mathbb N$. – hmakholm left over Monica Nov 08 '14 at 21:50
  • would this be true for the rationals and integers as well? – Jared Mar 17 '15 at 22:55
12

Power set of natural numbers has the same cardinality with the real numbers. So, it is uncountable.

In order to be rigorous, here's a proof of this.

2

Here is my favorite proof that $$|\mathcal{P}(M)| > |M|, \quad\forall M.$$

Proof

$$\big[\exists\phi:M \stackrel{\mathrm{on}}{\to}\mathcal{P}(M)\big]$$ $$\Downarrow$$ $$\Big[\big[A_{\not\phi} := \{m|m\in M, m\notin\phi(m)\}\big]\Rightarrow A_{\not\phi}\in\mathcal{P}(M)\Rightarrow\exists p\in M:\phi(p) = A_{\not\phi}\Big]$$ $$\Downarrow$$ $$\Big[\big[p\in A_{\not\phi}\Rightarrow p\notin A_{\not\phi}\big]\quad \mathrm{and}\quad\big[p\notin A_{\not\phi}\Rightarrow p\in A_{\not\phi}\big]\Big]$$ $$Q.E.D.$$

LRDPRDX
  • 1,326
1

Cantor's Theorem tells us that for every set $A$, there is no surjection from $A$ to $\mathcal P(A)$. In particular, there is no surjection from $\mathbb N$ to $\mathcal P(\mathbb N)$, and so $\mathcal P(\mathbb N)$ is not countable.* For completeness, I will give the standard proof of Cantor's Theorem here.

Suppose $f:A\to\mathcal P(A)$ is a function, and consider the set $B=\{x\in A:x\not\in f(x)\}$. We shall show that $B$ is not in the range of $f$, and so $f$ is not surjective. Suppose, to the contrary, that $B$ is in the range of $f$. Then, there is an $x_0\in A$ such that $f(x_0)=B$.

Now consider the question of whether $x_0$ is an element of $B$. If $x_0\in B$, then $x_0\not\in f(x_0)$, so $x_0\notin B$; contradiction. On the other hand, if $x_0\not\in B$, then $x_0\in f(x_0)$, so $x_0\in B$; contradiction. Therefore, $B$ is not in the range of $f$, and the proof is complete.


*This means that there is no injection from $\mathcal P(\mathbb N)$ to $\mathbb N$ either, for if $f:\mathcal P(\mathbb N)\to\mathbb N$ were an injection, then $f$ would have a left inverse, and such a left inverse would be a surjection from $\mathbb N$ to $\mathcal P(\mathbb N)$.

Joe
  • 22,603
0

No the power set of the Natural numbers is not countable and there is a very nice argument to show it is indeed uncountable.

Assume the contrary and we can list out all possible subsets of the naturals.

Draw a table listing out all the subsets and next to each subset have an infinite binary number where if the $i^{th}$ position being a $0$ means that $i\in \mathbb{N}$ does not belong to the subset and if it is 1 then it belongs to the subset.

Now go along the list where in the $j^{th}$ subset flip the $j^{th}$ digit and putting it all together we get a binary sequence that has not been listed out as it differs from every subset in atleast one position by construction. Thus this is a contradiction hence we would not be able to list out all subsets of naturals hence it is uncountable.

In fact it has the same cardinality as Reals as in some sense we are trying to count all the possible binary numbers in the above argument. If we look at Reals in the binary form the above argument follows to show uncountability and each binary representation of a real number would also represent the subset of a Natural number.

0

The easiest proof that the subsets of naturals has the same cardinality as the reals, is:

Associate a subset with the characteristic function: 1, if the number is in a subset, 0 otherwise. Write these as dyadic fractions, starting at zero, so:

0.1010000.. . represents the set {1,3}

The correspondence is not unique, because 0.1111... = 1, but - modulus a countable set (of rational numbers) the interval [0,1] maps to the subsets, "almost" one-to-one.