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}\)?

Step by step with comments, a check and common mistakes.

Step-by-step solution

  1. A bijection from \(\displaystyle \mathbb{N}\times\mathbb{N}\) onto \(\displaystyle \mathbb{N}\) must be injective and surjective.

    \[\displaystyle f \text{ inyectiva y sobreyectiva}\]
  2. For each \(\displaystyle k\), the pairs with \(\displaystyle m+n=k\) form a finite block of \(\displaystyle k+1\) elements.

    \[\displaystyle |\{(m,n): m+n=k\}|=k+1\]
  3. 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.

    \[\displaystyle 1+2+\dots+k=\frac{k(k+1)}{2}\]
  4. Within the block, \(\displaystyle n\) gives the position, so the resulting function is Cantor's.

    \[\displaystyle f(m,n)=\frac{(m+n)(m+n+1)}{2}+n\]
  5. 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\]

Answer

\(\displaystyle f(m,n)=\frac{(m+n)(m+n+1)}{2}+n\)

🎯 Build my path to this exercise