Question 07 (b)
In this question, correct answers without proofs are sufficient.
Find a function
which is surjective but not injective.
Make sure you understand the problem fully: What is the question asking you to do? Are there specific conditions or constraints that you should take note of? How will you know if your answer is correct from your work only? Can you rephrase the question in your own words in a way that makes sense to you?
If you are stuck, check the hint below. Consider it for a while. Does it give you a new idea on how to approach the problem? If so, try it!
Recall that surjective means that all integers have to be the image of some integer by the function ƒ and not being injective means that there are at least two integers which are mapped to the same integer.
Checking a solution serves two purposes: helping you if, after having used the hint, you still are stuck on the problem; or if you have solved the problem and would like to check your work.
If we divide all the even integers by two, we obtain all the integers. To turn this into a map, we just need to say what we'll do with the odd integers (anything would work, for example mapping all the odd integers to the number 4 or as we present below, map them to the rounded half).
Proof: recall that this question didn't ask for a proof, just the answer. Since the proofs are of a difficulty that you are expected to be able to handle in this course, we present them here for completeness.
This function is clearly surjective since any integer n is the image of the integer 2n. Now the function is not injective since g(3) = g(2) = 1 (or more generally since g(2k+1) = g(2k) = k for any integer k).