Prove that the function is surjective, where is defined by
Is the function injective? Justify your answer.
Confirming your payment
Previous Year Questions · Question 28 of 37
Prove that the function is surjective, where is defined by
Is the function injective? Justify your answer.
is surjective. We must show that every is an output of , i.e. that some has .
Let be arbitrary and choose
This is a legitimate choice: gives , so ; and is even, so is odd. Being odd, is handled by the first branch of the definition:
So for every there is an with . Hence is surjective (onto). Note that the odd branch alone already produces every natural number, which is what leaves the even branch free to repeat values.
is not injective. Injectivity would require distinct inputs to give distinct outputs. Use one input from each branch:
So while . Two different natural numbers share the same image, so is not injective (not one-one).