You are not logged in.
Pages: 1
Hello,
How can I prove that the following function is surjective?
f : N → Z such that :
f(x) = x/2 if x is even
f(x) = -(x+1)/2 if x is odd
Many thanks!
Offline
Hi ziabing,
Welcome to the forum. I will assume here the natural numbers include 0 -- otherwise there is no for which To show that this function is surjective, you need to show that every element can be 'hit' by some under your function . So first consider the case where . Can you always find an such that ?Yes, because we can just take in which case -- because must be even -- And since then it's clear that and so it must be that That takes care of the positive integers (and 0) in -- now you just need to do the same for the negative integers in and you're done. So let's consider the case where So, given can you find an such that we'll always have ?I will leave you to finish this off -- but please do post back if you need more help.
Offline
Thanks so much!
Offline
Pages: 1