在集合论中可以用任何配对函数来证明整数和有理数有同自然数相同的基数。在理论计算机科学中用它们把定义在自然数的矢量上的函数 f:N → N 编码成一个新函数 g:N → N。
英语百科
Pairing function 配对函数
In mathematics a pairing function is a process to uniquely encode two natural numbers into a single natural number.
Any pairing function can be used in set theory to prove that integers and rational numbers have the same cardinality as natural numbers. In theoretical computer science they are used to encode a function defined on a vector of natural numbers f:N → N into a new function g:N → N.