117k views
1 vote
Consider the function f(x) = round(x), which rounds the input, x, to the nearest integer. Is this function one-to-one? Explain or justify your answer.

User Lives
by
5.4k points

1 Answer

3 votes

Answer: The function is not one-to-one

Explanation:

An one-to-one function is such that no two elements in the domain correspond to the same element in the range.

Now, we have the function:

y = f(x) = round(x)

Which rounds x to the nearest whole number.

Now, to round to the next whole number we must look at the first number after the decimal point.

If that number is 5 or larger, we round up

If that number is smaller than 5, we round down.

Then, for example:

f(1.2) = 1

because the first number after the decimal point is smaller than 5.

and:

f(1.1) = 1

f(1.2) = 1

f(1.2423) = 1

f(1.348) = 1

So we have a lot (if x is real, we have infinite) values of x that are maped into the same value in the range.

Then this can not be an one-to-one function.

User ATJ
by
5.4k points