2

Consider the function $F:\mathbb N\times\mathbb N\to \mathbb N$ defined by $$F(a,b)=\frac{(a+b-2)(a+b-1)}{2} +a$$ How can I prove that it is a bijective function? I proved it using Partial derivatives by assuming the function to be continuous and defined on $\mathbb{R}$. But how can I prove it using definition of one-one and onto functions?

humble
  • 430

2 Answers2

1

Here assuming $\mathbb{N}=\{1,2,...\}$.

Notice that $G=2F(a,b)$ always falls between $(a+b-2)^2$ and $(a+b)^2$. In fact $G$ is always greater than the number halfway between $(a+b-2)^2$ and $(a+b-1)^2$ and less than the number halfway between $(a+b-1)^2$ and $(a+b)^2$. This determines $(a+b-1)^2$, hence $a+b$. Furthermore, $G$ is greater than $(a+b-1)^2$ if and only if $a>b$. The exact value of $G$ then determines $a$ and $b$ specifically. This shows it's injective.

To prove it's onto just notice that there are exactly $a+b-1$ many even numbers between those halfway points, i.e. the number of possibilities for $(a,b)$ for $a+b$ fixed.

Zavosh
  • 6,174
0

Here is an argument for injectivity.

Consider the function $f:\mathbb{Z}^{\geq 2}\rightarrow \mathbb{Z}^{\geq 0}$ defined by $f(u) = (u-2)(u-1)/2$. Note that $$\begin{align} 2(f(u+1) - f(u)) &= (u-1)u - (u-2)(u-1) \\ &= u^2 - u - u^2 + 3u - 2 \\ &= 2u - 2 \end{align}$$ so $f(u+1) - f(u) = u-1$. Therefore $f$ is an increasing function, and in general, if $v > u$ we have $$f(v) - f(u) \geq u-1$$

Now suppose that $F(a,b) = F(c,d)$. Consider two cases.

Case 1 $a+b = c+d$

Then $0 = F(a,b) - F(c,d) = a-c$, so $a = c$, and therefore $b = d$.

Case 2 without loss of generality, assume $a+b > c+d$

Then $$\begin{align} 0 &= F(a,b) - F(c,d) \\ &= f(a+b) + a - f(c+d) - c \\ &\geq (c+d-1) + a-c \\ &= a+d - 1 \end{align}$$ so $a + d \leq 1$. But this is impossible since both $a$ and $d$ are $\geq 1$.