4

I know that is possible to build a bijection between the set of natural numbers $\mathbb{N}$ and the natural plane (the cartesian product of $\mathbb{N}$ by itself, $\mathbb{N} \times \mathbb{N} = \mathbb{N}^2$. This is done by diagonally traversing the plane from zero upwards with triangles of growing size.

Is there a simple algebraic form for that bijection? That is, is it possible to write explicitly some invertible $f(i, j): \mathbb{N} \times \mathbb{N} \leftrightarrow \mathbb{N}$?

I need to index in a simple way couples of natural numbers.

Matteo Monti
  • 341
  • 2
  • 9

1 Answers1

3

A bijection is:

$$f(m,n)=2^m(2n+1)-1$$