A bijection from N^2 to N that is not Cantor's pairing function

246 Views Asked by At

Is there any other bijection from $\mathbb{N}^{2}$ to $\mathbb{N}$ other than the pairing function? My search so far has come up empty.

1

There are 1 best solutions below

10
On

Yes. Here's an example. Let$$S=\{2^a3^b\mid a,b\in\mathbb N\}=\{6,12,18,\ldots\}.$$There is a bijection $\beta\colon\mathbb N\longrightarrow S$: just define $\beta(n)$ as the $n$th element of $S$. And there is a bijection $\varphi\colon\mathbb N^2\longrightarrow S$: $\varphi(a,b)=2^a3^b$. Now take $\varphi^{-1}\circ\beta$.