Following our normal procedure to solve this type of exercise, we start with the definitions.
Definition: “A function f from A to B is called onto, or a surjection, if and only if for every element b∈B there is an element a∈A with f(a)=b. A function f is called surjective if it is onto.” Discrete mathematics and its applications By Rosen.
Remark: “A function f is onto if ∀y∃x(f (x) = y), where the domain for x is the domain of the function and the domain for y is the codomain of the function.” Discrete mathematics and its applications By Rosen.
Now, we need to know what are the functions defined in Exercise 12.
Exercise 12: Determine whether each of these functions from Z to Z is one-to-one:
a) f(n)=n−1
b) f(n)=n2 +1
c) f(n) = n3
d) f(n) = ⌈n/2⌉
Now we have all we need to solve the exercise.
Table of Contents
a) f(n)=n−1
As per the definition, we need to prove that every element in the range or image, has a corresponding element in the domain. Notice that the range of all the functions in this exercise is Z.
For every element n∈Z of the range, we can have a corresponding element in the domain n+1.
Therefore, this function is onto.
b) f(n)=n^2 +1
There is no integer n, such that n2+1=3.
n2+1=3
n2=3-1=2
n = √2, and the square root of 2 is not an integer ∎
Here, we found an element of the image (the integer 3), that does not have a corresponding value in the domain.
Therefore, this function is not onto.
c) f(n) = n^3
Similarly to the previous exercise b), there is no integer n in the domain, such that n3 = 2.
Therefore, this function is not onto.
d) f(n) = ⌈n/2⌉
In this case, we have the ceiling function of the division of an integer by 2.
For every integer value y in the range or image, we can find an integer value x in the domain, such that f(x)=y. Notice that f(x)=y if and only if x = ⌈y/2⌉.
Let’s examine some of the values:
- f(1) = 1
- f(2) = 1
- f(3) = 2
- f(4) = 2
- f(5) = 3
- f(6) = 3
- f(7) = 4
- f(8) = 4
…
As you can see, all the values of the image, have a corresponding value in the domain. Notice that if we choose negative values of the domain, we will have the negative values of the range or image.
Therefore, this function is onto.
Related posts:
- Determine whether each of these functions from Z to Z is one-to-one
- Consider these functions from the set of teachers in a school. Under what conditions is the function one-to-one if it assigns to a teacher his or her:
- Find the domain and range of these functions
- Why is f not a function from R to R if