Bijection between $\mathbb{N}$ and the set of finite parts of $\mathbb{N}$

101 Views Asked by At

Let $\mathbb{N} = \{0,1,2,3,...\}$ be the set of natural numbers (with $0$) and $\mathbb{F}$ the set of finite parts of $\mathbb{N}$. I want to find a bijection, as simple as possible, between $\mathbb{N}$ and $\mathbb{F}$. One that I have is $$f : \mathbb{F} \to \mathbb{N}, s \mapsto \sum_{i\in s} 2^i$$ with the convention that the sum over $\emptyset$ is $0$. Do you have other examples which are perhaps more elementary ?

1

There are 1 best solutions below

0
On

The example you give is very elementary. In fact, it is, in a way, “as simple as possible.”

For all $n$, there are $2^{n}$ subsets of $\{0,1,\dots, n-1\}$. Your bijection maps these $2^{n}$ subsets precisely onto the numbers in the set $\{0,1, \dots, 2^{n}-1\}$.

So, we can informally say that your bijection never sends any subsets to numbers larger than it needs to.