I have a hard time to prove if a function is injective and/or surjective when there's ceiling, floor or absolute functions in it like this:
$$ \ u: \mathbb{R} \rightarrow \mathbb{R}, \ u(x) = 3\lfloor x \rfloor + 1 $$
$$ \ v: \mathbb{Z} \rightarrow \mathbb{Z}, \ v(x) = \lceil\dfrac{x}{2} \rceil $$
My teacher only told me that the v(x) is surjective but without further explanation. I don't understand how to handle ceil and floor in algebra, like when I try to prove v(x) or u(x) is injective and/or surjective.
Any help would be very appreciate.
Thanks.