Example of Bijection Function from Z+ X Z+ to N X ODDz

53 Views Asked by At

I was wondering if anyone could give me some ideas for a bijective function from $Z^{+} \times Z^{+} \rightarrow N \times O D D$ (Natural number include 0 in this case.)

One idea I had was to define as $ f(x)= gcd(a, b),$ if $x=2^{a} b,$ b odd. But this is Z+ to N instead of $Z^{+} \times Z^{+}$ to N

1

There are 1 best solutions below

0
On

Your already basically have an idea of a function between $\mathbb{Z}_+$ and $\mathbb{N} \times \mathbb{ODD}$. It is $2^ab \leftrightarrow (a,b)$.

Next just find a function between $\mathbb{Z}_+ \times \mathbb{Z}_+$ and $\mathbb{Z}_+$.

Hint: go diagonally.