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?
-
The function is defined on $\mathbb{N} \times \mathbb{N}$. In order to prove that it is bijective, you have to prove that it is one-to-one and onto. No partial derivatives here ! – pitchounet Sep 09 '14 at 16:57
-
If $0\in\mathbb N$, then $F$ is not injective, e.g. $F(1,0)=F(0,3)$. – Frunobulax Sep 09 '14 at 17:01
-
This is almost the same question as this one, the only difference is that there integers start with 0. – Martin Sleziak Sep 09 '14 at 19:03
2 Answers
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.
- 6,174
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$.