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?

Printable View

- Feb 28th 2012, 05:14 PMmulaosmanovicbenOne to one and onto function from R^3 to N
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? - Feb 29th 2012, 10:06 AMemakarovRe: One to one and onto function from R^3 to N
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$.

- Mar 1st 2012, 12:36 PMmulaosmanovicbenRe: One to one and onto function from R^3 to N
Wow thank you so much! That is such a beautiful result :)