TITLE: Show that the set of all finite subsets of $\mathbb{N}$ is countable.
QUESTION [86 upvotes]: Show that the set of all finite subsets of $\mathbb{N}$ is countable. 
I'm not sure how to do this problem. I keep trying to think of an explicit formula for 1-1 correspondence like adding all the elements in each subset and sending that sum to itself in the natural numbers, but that wouldn't be 1-1 because, for example, the set {1,2,3} would send to 6 and so would the set {2,4}.  Multiplying all the elements in each subset and sending that product to itself in the natural numbers wouldn't work either since, for example, {2,3} would send to 5 and so would the set {1,5}. Any ideas?

REPLY [10 votes]: If $S$ is the set of all finite subsets of $\mathbb{N}$, define $f:S\rightarrow \mathbb{Q}$ by 
$f(A)=.x_1x_2x_3x_4\cdots$ 
where 
$x_{i}=\begin{cases}1 &\mbox{, if }i\in A\\0 &\mbox{, if } i\not\in A \end{cases}$.
Then $f$ is clearly injective, so $S$ is countable since $\mathbb{Q}$ is countable and any subset of a countable set is countable.