1

One of the problems in my discrete math course states that we need to prove that $\mathcal{N}\times\mathcal{N}$ is countable specifically when there's a function $f:\mathcal{N}\times\mathcal{N}\to\mathcal{N}$ defined as follows: $$f(a,b)=\frac{1}{2}(a+b+1)(a+b)+a$$ where $a,b \in \mathcal{N}$. The solution uses the function definition in order to prove that the function is bijective as shown below: $$f(a,b+1)=\frac{1}{2}(a+b+1+1)(a+b+1)+a=$$ $$=\frac{1}{2}(a+b+1)(a+b)+a+\frac{1}{2}(a+b+1)\cdot2$$ How is the transition achieved? I tried all kinds of arithmetics and couldn't arrive to the expression after the equal sign.

Yos
  • 2,663

2 Answers2

1

How is the transition achieved?

$$f(a,b+1)=\color{red}{ \dfrac{1}{2}}(\color{green}{a+b+1}\color{blue}{+1})(a+b+1)+a=$$

$$=\color{red}{ \dfrac{1}{2}}(\color{green}{a+b+1})(a+b+1) + \color{red}{\dfrac{1}{2}}(\color{blue}{+1})(a+b+1)+a$$

$$=\color{red}{ \dfrac{1}{2}}(\color{green}{a+b+1})(a+b\color{orange}{+1}) + \color{red}{\dfrac{1}{2}}(\color{blue}{+1})(a+b+1)+a$$

$$=\color{red}{ \dfrac{1}{2}}(\color{green}{a+b+1})(a+b) + \underbrace{\color{red}{ \dfrac{1}{2}}(\color{green}{a+b+1})(\color{orange}{+1}) + \color{red}{\dfrac{1}{2}}(\color{blue}{+1})(a+b+1)}_{\color{purple}{\text{two copies}}}+a$$

$$=\color{red}{ \dfrac{1}{2}}(\color{green}{a+b+1})(a+b) +\color{purple}{ \dfrac{1}{2}(a+b+1)\cdot 2}+a$$

David P
  • 12,320
0

$\frac{1}{2}(a+b+1+1)(a+b+1)+a=\frac{a^2+ab+a+ba+b^2+b+a+b+1+a+b+1}{2}+a=\frac{a^2+b^2+2ab+3a+3b+2}{2}+a=\frac{a^2+b^2+2ab+5a+3b+2}{2}$

$\frac{1}{2}(a+b+1)(a+b)+a+\frac{1}{2}(a+b+1)\cdot 2=\frac{a^2+ab+ba+b^2+a+b}{2}+a+\frac{2a+2b+2}{1}=\frac{a^2+b^2+2ab+5a+3b+2}{2}$

Asinomás
  • 105,651