Pairing is caring /
Dear thinking people,
letN denote the natural numbers and let [n] denote a set with n elements.Fix a natural number
m.
I'm looking for a bijection between N x N, and the function space [3] --> [m] x [6].
In other word, I need a one-one mapping between the pairs of natural numbers and the key-value pairs with 3 different possible keys that take values in the set of pairs from [m] x [6].
It might be simpler to even relax the problem and replace [m] with N, although I'll only be really interested in functions that map into the first m integers in that pair.
On a related note, since I know there are bored strong programmers out there, how are such small function spaces best encoded in the language C#, for example? If anyone is up for a challenge, try coding up the back and forth of the related Cantor pairing function:
https://en.wikipedia.org/wiki/Pairing_function
Best Regards
qed
Leave Pairing is caring / to:
Read more #math posts
Best Posts From qed
We have not curated any of qed's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From qed
- "The limit x to c of (c^n-x^n)/(c-x)" : YSBATST 2
- 2 * 1.5 * 1.33333333 * 1.25 = 5 : YSBATST 1
- web-apps and dapps explained / NEO 8
- Installing the developer graphical user interface and invoking smart contracts / NEO 3
- Compiling a Hello World smart contract / Neo 2
- Open source community ecosystem / Neo 1
- Dependent types for smart contracts at Zen / Blockchain 4
- Smart contracts in Python (and C# and Java) /
- Pairing is caring /
- The 2015 Experience /