Determining if a function is surjective and injective

49 Views Asked by At

Consider the function $f\colon\mathbb{Z}\times\{0,1\}\rightarrow \mathbb{Z}$ defined by: $$ f(n,m)=n+2^m. $$

For injective: Let $f(a,b)=f(c,d)$. Therefore, $a+2^b=c+2^d$.

I am unsure how to prove surjectivity and to how to prove the rest of my injective proof.

2

There are 2 best solutions below

0
On

Injectivity:

Suppose $a+2^b=c+2^d$ and $b \ne d$. We can assume (symmetry) that $b = 0$ and $d = 1$. Then

$\quad a+1=c+2$

So we have, for example, $f(1,0) = f(0,1) = 2$ and $f$ is not injective.

Surjectivity:

Solve

$\quad a+2^b = n$.

OK,

$\quad f(n-1, 0) = n$

and so $f$ is surjective.

0
On

To prove injectivity, we need to show that $f(a,b) = f(c,d)$ only if a=c and b = d. However, it is not the case as questionned in the comment. Since we can have $f(0,1)$ = $f(1,0)$, where a $\neq$ c and b $\neq$ d!!! So, $f$ cannot be injective by definition.

Regarding surjectivity, we need to ensure that for every z $\in$ $\mathbb{Z}$, we can find a couple
$(a,b)$ $\in$ $\mathbb{Z}$ $\times$ $\{$$0,1$$\}$.

So, we need to find a map $\phi$ : $\mathbb{Z}$ $\rightarrow$ $\mathbb{Z}$ $\times$ $\{$$0,1$$\}$.

Hopefully, such map does exist! We need to create a map like this one below.

$$\phi(z)=\begin{cases} (\frac{z}{2},0)&\text{if}\, z\text{ is even } \\ (\frac{(z-1)}{2},1)&\text{if}\, z\text{ is odd}\\ \end{cases}$$

The existence of such map ensure that we can map every element of the domain into a desired couple of the image of the function $f$. Therefore, this shows that the function $f$ is surjective by definition.