1
$\begingroup$

I came across this question when doing an online test about onto function. Here's the question and the correct answer given. However, for $b = -1$ $\in$ $B$ $\{-1, 0, 1, 2, 3, ..\}$ I can't find any $a$ $\in$ $\{0, 1, 2, 3, ..\}$ such that $f(a)=b=-1$.

What I am misunderstanding here? Thanks in advance for any help you are able to provide.

$\endgroup$
2
  • $\begingroup$ What is $f(0)$? $\endgroup$
    – vadim123
    Commented Dec 30, 2015 at 17:07
  • $\begingroup$ Floor (x) is the largest integer not exceeding x. In the pre-computer age it was written [x]. $\endgroup$ Commented Dec 30, 2015 at 19:23

1 Answer 1

1
$\begingroup$

They're using the floor function, so $f(0)=\lfloor-1/2\rfloor=-1$

They also give a helpful hint that if $a=2(b+1)$ then $f(a)=b$, so checking $2(-1+1)=0$ you can see that $f(0)=-1$

$\endgroup$
1
  • $\begingroup$ Actually I didn't know about the floor / ceiling function things. Thank you very much for clarifying it for me. $\endgroup$ Commented Dec 31, 2015 at 2:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .