Let $O$ be the set of positive odd integers:
A) Give an example of a function $g: O \to O$ that is surjective but not injective.
B) Prove that $\;|Z| = |O|\;$ by describing a witness for the bijection.
I’ve been attempting this exercise for a while now but have no clue on how to do it. Could anyone help me please?
OP: Posts should look a bit like this
Problem
details...
Attempt
details...
Now, with problems such as these it is easier to try to do things a bit piecewise. That is, we only need to break injectivity once for it to be false. It helps to write the first few members out $O=\{1,3,5,7,\dots\}$Define the map $\phi:O \to O$ as follows:
$$\phi(1)=1 \text{ and } \phi(x)=x-2$$
Then $\phi(1)=\phi(3)$ and for any odd integer $y>1$ we have $\phi(y+2)=y$.
For the second part, consider the bijections from $\mathbb{N} \to O$ and from $\mathbb{N} \to \mathbb{Z}$ and you should be able to figure out how to write the bijection. Since you have two bijections you can they have well-defined inverses which you can compose to get the desired bijection.