The Cantor pairing function is an explicit bijection between and , with the natural numbers numbered from zero:
If , there are pairs on earlier diagonals, and the pair is at offset along diagonal . The formula therefore gives exactly the enumeration above. For example, .
For the inverse at an index , find the unique satisfying , then put and . At , these are , , and . Thus both the encoding and decoding are explicit. The bijection is useful for assigning a single natural number to a pair of indices, and iterating it does the same for fixed-length tuples.

Ancestors (7)

  1. Countable set
  2. Cardinal number
  3. Set theory
  4. Foundations of mathematics
  5. Area of mathematics
  6. Mathematics
  7. Home

Discussion (0) New discussion

There are no discussions about this article yet.

Articles by others on the same topic (0)

There are currently no matching articles.