Not sure if this is the appropriate place. Seems like an aglebraic topic.
I would like a one to one and onto function f that goes from N^3 to N. Something like
f(x,y,z) -> n.
Any ideas?
Not sure if this is the appropriate place. Seems like an aglebraic topic.
I would like a one to one and onto function f that goes from N^3 to N. Something like
f(x,y,z) -> n.
Any ideas?
For every bijection $\displaystyle f:\mathbb{N}\times\mathbb{N}\to\mathbb{N}$, $\displaystyle g(x,y,z)=f(x,f(y,z))$ is a bijection from $\displaystyle \mathbb{N}\times\mathbb{N}\times\mathbb{N}$ to $\displaystyle \mathbb{N}$. For a bijection from $\displaystyle \mathbb{N}\times\mathbb{N}$ to $\displaystyle \mathbb{N}$ you can take the Cantor pairing function or $\displaystyle f(x,y)=2^x(2y+1)-1$.