Math 2.0

Mathematical logic and foundations Example

Cantor pairing function

Builds on Bijective functionCartesian product

Example

The Cantor pairing function is the function π ⁣:ℕ×ℕ→ℕ\pi \colon \mathbb{N} \times \mathbb{N} \to \mathbb{N} with π(x,y)=(x+y)(x+y+1)2+y.\pi(x, y) = \frac{(x + y)(x + y + 1)}{2} + y. It is a bijection. It lists the pairs along the diagonals x+y=0,1,2,…x + y = 0, 1, 2, \dots: π(0,0)=0\pi(0, 0) = 0, π(1,0)=1\pi(1, 0) = 1, π(0,1)=2\pi(0, 1) = 2, π(2,0)=3\pi(2, 0) = 3.

Remarks

So ℕ×ℕ\mathbb{N} \times \mathbb{N} is countably infinite. See product of countable sets is countable. The value (x+y)(x+y+1)/2(x + y)(x + y + 1)/2 is the number of pairs on the earlier diagonals, and yy is the position on the diagonal.

Reading path

To understand this page from the ground up, read these 18 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Element definition
  2. Proposition concept
  3. Set definition
  4. Implication definition
  5. Predicate definition
  6. Ordered pair definition
  7. Existential quantifier definition
  8. Universal quantifier definition
  9. Cartesian product definition
  10. Subset definition
  11. Uniqueness quantifier definition
  12. Binary relation definition
  13. Function definition
  14. Codomain definition
  15. Injective function definition
  16. Surjective function definition
  17. Bijective function definition
  18. Cantor pairing function example

Where this leads

3 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Pairing_function, Cantor pairing function
About this page
Tag0NP5N5PYW5
URIm2://0NP5N5PYW5
Aliasescantor-pairing
Kindexample
WritingW2 usable
MSC03E10
Instance ofBijective function
UsesBijective function, Cartesian product
Same as

Markdown · JSON · Edit on GitHub

What this page needs for W3

  • a person confirmed each agent-written section: rule P04 (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

Used by