0

Let $f:\mathbb{Z}^+\times\mathbb{Z}^+\to\mathbb{Z}^+$ be defined by $f(i,j)=\frac{(i+j-2)(i+j-1)}{2}+i$.

How can I prove that this function is bijective? I tried to find an inverse by playing around with the equation $y=\frac{(i+j-2)(i+j-1)}{2}+i$ and trying to solve for $i$ and $j$, but I couldn't. In general, is it possible to solve for two variables if you have just one equation? When is it not possible?

1 Answers1

0

Hint:

$i\ \smallsetminus \ j$ 1 2 3 4 $\dots$
1 1 2 4 7 11
2 3 5 8 12 $\ddots$
3 6 9 13 $\ddots$
4 10 14 $\ddots$
$\vdots$ 15 $\ddots$

Try proving that each set $\{f(i,j)\mid i + j = k\}$ is equal to $\{T_{k-2} + 1, T_{k - 2} + 2,\dots,T_{k-1}\}$ where $T_{k} = \frac{k(k+1)}{2}$ is the $k$th triangular number.

Joshua Wang
  • 6,103