20. Give an example of a function from N to N that is a) one-to-one but not onto. b) onto but not one-to-one. c) both onto and one-to-one (but different from the identity function). d) neither one-to-one nor onto.

Respuesta :

Answer:

Step-by-step explanation:

a) To provide an example of a function N → N that is one-to-one but not onto.

Suppose [tex]f:N\to N[/tex]  to be [tex]f(n)=n^2[/tex]

Then; [tex]\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.[/tex]

[tex]\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}[/tex]

Now, assuming [tex]a \ \Big {\varepsilon} \ N \& \ b \ \epsilon \ N;[/tex]

Then [tex]f(a) = f(b)[/tex]

[tex]a^2 = b^2 \\ \\ a = b[/tex]

The above function is said to be one-to-one

[tex]\text{it is equally understandable that not every natural number is the square of a natural number}[/tex]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  [tex]f(n) = n^2[/tex] is one-to-one but not onto

b)

[tex]Suppose f: N \to N[/tex] be

[tex]f(n) = [n/2] \\ \\ For \ n =1, f(1) = [1/2] = [0.5] = 1 \\ \\ For \ n=2 , f(2) = [2/2] = [1] = 1[/tex]

It implies that the function is not one-to-one since there exist different natural no. having the same image.

So, for [tex]n \epsilon N[/tex] , there exists an image of 2n in N

i.e.

[tex]f(2n) = [2n/2] = [n] = n[/tex]

Hence, the function is onto

We thereby conclude that the function [tex]f(n) = [n/2] \text{ is onto but not one-to-one}[/tex]

c)

[tex]let f: N\to N[/tex] be  [tex]f(n) = \left \{ {{n+1, \ if \ n \ is \ even } \atop n-1 , \ if \ n \ is \ odd} \right.[/tex]

So, if n, m is odd:

Then:

[tex]f(n) = f(m) \\ \\ n-1 = m-1 \\ \\ n = m[/tex]

Likewise, if n, m is even:

Then;

[tex]f(n) = f(m) \\ \\ n+1 = m+ 1 \\ \\ n = m[/tex]

The function is then said to be one-to-one.

However, For [tex]n \epsilon N[/tex] and is odd, there exists an image of [tex]n - 1[/tex]that is even;

[tex]f(n - 1) = n -1 + 1 =n[/tex]

For [tex]n \epsilon N[/tex] and is even, there exists an image of [tex]n + 1[/tex]that is odd;

[tex]f(n - 1) = n +1 - 1 = n[/tex]

where(; implies such that)

Hence, this function is said to be onto.

We can therefore conclude that the function [tex]f(n) = \left \{ {{n+1, \ if \ n \ is \ even } \atop n-1 , \ if \ n \ is \ odd} \right.[/tex] is both onto and one-to-one.

d)

Here, to provide an example where the [tex]f:N \to N[/tex] is neither one-to-one nor onto.

SO;

Let [tex]f : N \to N[/tex] is defined to be [tex]f(n)=0[/tex]

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 [tex]f(n)=0[/tex] is neither one-to-one nor onto.

ACCESS MORE