Answer:
Step-by-step explanation:
a) To provide an example of a function N → N that is one-to-one but not onto.
Suppose
to be ![f(n)=n^2](https://tex.z-dn.net/?f=f%28n%29%3Dn%5E2)
Then; ![\text{a function } \ f: A \to B\ \text{is one-to-one if and only if } f(a) = f(b) \implies a = b \ for \ a, b \ \epsilon \ A.](https://tex.z-dn.net/?f=%5Ctext%7Ba%20function%20%7D%20%5C%20f%3A%20A%20%5Cto%20B%5C%20%20%5Ctext%7Bis%20one-to-one%20if%20and%20only%20if%20%7D%20f%28a%29%20%3D%20f%28b%29%20%5Cimplies%20a%20%3D%20b%20%5C%20for%20%5C%20a%2C%20b%20%20%5C%20%5Cepsilon%20%5C%20A.)
![\text{a function } \ f: A \to B\ \text{is onto if and only if for every element } b \ \epsilon \ B \\ \text{there exist an element a} \ \epsilon\ A \ such \ that f(a) = b}](https://tex.z-dn.net/?f=%5Ctext%7Ba%20function%20%7D%20%5C%20f%3A%20A%20%5Cto%20B%5C%20%20%5Ctext%7Bis%20onto%20if%20and%20only%20if%20%20for%20every%20element%20%7D%20b%20%20%5C%20%5Cepsilon%20%5C%20B%20%20%5C%5C%20%5Ctext%7Bthere%20exist%20an%20element%20a%7D%20%20%5C%20%5Cepsilon%5C%20%20A%20%5C%20such%20%5C%20%20that%20f%28a%29%20%3D%20b%7D)
Now, assuming ![a \ \Big {\varepsilon} \ N \& \ b \ \epsilon \ N;](https://tex.z-dn.net/?f=a%20%5C%20%5CBig%20%7B%5Cvarepsilon%7D%20%20%5C%20N%20%5C%26%20%20%5C%20b%20%20%5C%20%5Cepsilon%20%20%5C%20N%3B)
Then ![f(a) = f(b)](https://tex.z-dn.net/?f=f%28a%29%20%3D%20f%28b%29)
![a^2 = b^2 \\ \\ a = b](https://tex.z-dn.net/?f=a%5E2%20%3D%20%20b%5E2%20%5C%5C%20%5C%5C%20a%20%3D%20b)
The above function is said to be one-to-one
e.g
2 is not a perfect square, hence, it is not regarded as the image of any natural no.
As such, f is not onto.
We can thereby conclude that the function
is one-to-one but not onto
b)
be
![f(n) = [n/2] \\ \\ For \ n =1, f(1) = [1/2] = [0.5] = 1 \\ \\ For \ n=2 , f(2) = [2/2] = [1] = 1](https://tex.z-dn.net/?f=f%28n%29%20%3D%20%5Bn%2F2%5D%20%5C%5C%20%5C%5C%20%20For%20%5C%20n%20%3D1%2C%20f%281%29%20%3D%20%5B1%2F2%5D%20%3D%20%5B0.5%5D%20%3D%201%20%5C%5C%20%5C%5C%20For%20%5C%20n%3D2%20%2C%20f%282%29%20%3D%20%5B2%2F2%5D%20%3D%20%5B1%5D%20%3D%201)
It implies that the function is not one-to-one since there exist different natural no. having the same image.
So, for
, there exists an image of 2n in N
i.e.
![f(2n) = [2n/2] = [n] = n](https://tex.z-dn.net/?f=f%282n%29%20%3D%20%5B2n%2F2%5D%20%3D%20%5Bn%5D%20%3D%20n)
Hence, the function is onto
We thereby conclude that the function ![f(n) = [n/2] \text{ is onto but not one-to-one}](https://tex.z-dn.net/?f=f%28n%29%20%3D%20%5Bn%2F2%5D%20%5Ctext%7B%20is%20onto%20but%20not%20one-to-one%7D)
c)
be ![f(n) = \left \{ {{n+1, \ if \ n \ is \ even } \atop n-1 , \ if \ n \ is \ odd} \right.](https://tex.z-dn.net/?f=f%28n%29%20%3D%20%5Cleft%20%5C%7B%20%7B%7Bn%2B1%2C%20%5C%20if%20%5C%20n%20%5C%20is%20%5C%20even%20%7D%20%5Catop%20n-1%20%2C%20%5C%20if%20%5C%20n%20%5C%20is%20%5C%20odd%7D%20%5Cright.)
So, if n, m is odd:
Then:
![f(n) = f(m) \\ \\ n-1 = m-1 \\ \\ n = m](https://tex.z-dn.net/?f=f%28n%29%20%3D%20f%28m%29%20%5C%5C%20%5C%5C%20n-1%20%3D%20m-1%20%5C%5C%20%5C%5C%20n%20%3D%20m)
Likewise, if n, m is even:
Then;
![f(n) = f(m) \\ \\ n+1 = m+ 1 \\ \\ n = m](https://tex.z-dn.net/?f=f%28n%29%20%3D%20f%28m%29%20%5C%5C%20%5C%5C%20n%2B1%20%3D%20m%2B%201%20%20%5C%5C%20%5C%5C%20n%20%3D%20m)
The function is then said to be one-to-one.
However, For
and is odd, there exists an image of
that is even;
![f(n - 1) = n -1 + 1 =n](https://tex.z-dn.net/?f=f%28n%20-%201%29%20%3D%20n%20-1%20%2B%201%20%3Dn)
For
and is even, there exists an image of
that is odd;
![f(n - 1) = n +1 - 1 = n](https://tex.z-dn.net/?f=f%28n%20-%201%29%20%3D%20n%20%2B1%20-%201%20%3D%20n)
where(; implies such that)
Hence, this function is said to be onto.
We can therefore conclude that the function
is both onto and one-to-one.
d)
Here, to provide an example where the
is neither one-to-one nor onto.
SO;
Let
is defined to be ![f(n)=0](https://tex.z-dn.net/?f=f%28n%29%3D0)
Then, since every integer has the same image as zero(0), the function is not one-to-one.
Similarly, the function is not onto since every positive integer is not an image of any natural number.
We, therefore conclude that, the function
is neither one-to-one nor onto.