1

Possible Duplicate:
How does one get the formula for this bijection from $\mathbb{N}\times\mathbb{N}$ onto $\mathbb{N}$?
Countability of cartesian product of $\mathbb{N} \times \mathbb{N}$

How does one come up with an explicit function that maps $\mathbb N\times \mathbb N$ to $\mathbb N$ in order to show that $\mathbb N\times \mathbb N$ is countable?

1 Answers1

3

Let $n\ge 1$ is natural number. By fundamental theorem of arithmetic, there exists $k\ge 1$, $m\ge 1$ satisfy that $n=2^{k-1}(2m-1)$ uniquely.

Let define $f:\mathbb{N}\to\mathbb{N}\times \mathbb{N}$ such that $f(n)=(m,k)$. Then $f$ is surjection because $f(2^{k+1}(2m+1))=(k,m)$, and $f$ is injection because if $(m_1,k_1)=(m_2,k_2)$ then $2^{k_1-1}(2m_1-1)=2^{k_2-1}(2m_2-1)$.

Hanul Jeon
  • 27,376