Definition:Cantor Pairing Function

Definition
The Cantor pairing function is the mapping $\pi : \N^2 \to \N$ defined as:


 * $\map \pi {m, n} = \frac 1 2 \paren {m + n} \paren {m + n + 1} + m$

Also see

 * Cantor Pairing Function is Well-Defined
 * Cantor Pairing Function is Bijection
 * Cantor Pairing Function is Primitive Recursive