- What does the "8" stand for in the Cantor pairing function (which assigns a natural number to each pair of natural numbers)?
- Can I change it, or is it constant?
- The other function for getting the unique number when you use the two inputs, doesn't use "8" in its calculations, so why did the 8 gives us the right answer?
Below is the formula to find x and y such that π(x, y) = 1432:
8 × 1432 = 11456,
11456 + 1 = 11457,
√11457 = 107.037,
107.037 − 1 = 106.037,
106.037 ÷ 2 = 53.019,
⌊53.019⌋ = 53,
so w = 53;
53 + 1 = 54,
53 × 54 = 2862,
2862 ÷ 2 = 1431,
so t = 1431;
1432 − 1431 = 1,
so y = 1;
53 − 1 = 52,
so x = 52; thus π(52, 1) = 1432.
To calculate π(52, 1):
52 + 1 = 79,
53 + 1 = 54,
53 × 54 = 2862,
2862 ÷ 2 = 1431,
1431 + 1 = 1432,
so π(52, 1) = 1432.