Sunday, August 4, 2019

functions - How to write down a bijection from mathbbN onto mathbbNtimesmathbbNtimesmathbbN?



I'm looking for a bijection from N to N×N×N.





  • I know it exists

  • I know an informal way to define one, ordering the triplets of natural numbers in a 3D array an counting them diagonally as they do here with 2D array.

  • And I know a bijection from N×N×N to N from this answer which uses factorization



But how to write it explicitly?



Thank you very much.


Answer




Use Cantor's pairing function ,:N×NN twice: (a,b,c)a,b,c. Cantor's pairing function has an inverse which is easily-stated if a bit fiddly (see the proof of bijectivity on the linked Wikipedia page).


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection f:AB and I want to get bijection. Can I just resting codomain to f(A)? I know that every function i...