-1

In my last question, I asked for a proof of "Are the set of all finite subsets in $\mathbb{Z}$ countable?" . I had a good answer that showed me that it is an $f: \mathbb{N} \to \{\text{finite subsets of }\mathbb{Z}\}$. So knowing that there exists a bijection $\mathbb{N} \leftrightarrow \mathbb{Z}$, then it is proved.

But I am curious about an example (if it exists) of a function $f: \mathbb{Z} \to \{\text{finite subsets of }\mathbb{Z}\}$ Does such an example exist?

Pedro
  • 379

1 Answers1

0

To prove that the set of all finite subsets of $\mathbb{Z}$ is countable, it is enough to show that there is a function $f : \mathbb{N} \xrightarrow{onto} \{\text{finite subsets of }\mathbb{N}\}$. (It is easier to work with $\mathbb{N}$ and there is a bijection $\mathbb{N} \leftrightarrow \mathbb{Z}$.)

An example of such function could be:

$$f\left(\prod_{k=0}^\infty p_k^{\alpha_k}\right) = \{ k \mid \alpha_k \text{ is odd}\},$$

where $\{p_0, p_1, \ldots\}$ is the set of prime numbers and $\prod_{k=0}^\infty p_k^{\alpha_k}$ is the unique factorization of the input.

I hope this helps ;-)

dtldarek
  • 37,381