Countable set · Exercise-COUNTABLE-SET-010
Step-by-step solved exercise: Cardinals
Which of these functions is a bijection from \(\displaystyle \mathbb{N}\times\mathbb{N}\) onto \(\displaystyle \mathbb{N}\)?
Countable set · Exercise-COUNTABLE-SET-010
Which of these functions is a bijection from \(\displaystyle \mathbb{N}\times\mathbb{N}\) onto \(\displaystyle \mathbb{N}\)?
A bijection from \(\displaystyle \mathbb{N}\times\mathbb{N}\) onto \(\displaystyle \mathbb{N}\) must be injective and surjective.
For each \(\displaystyle k\), the pairs with \(\displaystyle m+n=k\) form a finite block of \(\displaystyle k+1\) elements.
The blocks before block \(\displaystyle k\) have sizes \(\displaystyle 1,2,\dots,k\), so before it there are \(\displaystyle 1+2+\dots+k=\frac{k(k+1)}{2}\) terms.
Within the block, \(\displaystyle n\) gives the position, so the resulting function is Cantor's.
Therefore, Cantor's function is a bijection from \(\displaystyle \mathbb{N}\times\mathbb{N}\) onto \(\displaystyle \mathbb{N}\).
\(\displaystyle f(m,n)=\frac{(m+n)(m+n+1)}{2}+n\)