Question 21 (Choice 2) Prove that the function f is surjective, where 𝑓: 𝑁 → 𝑁 such that 𝑓(𝑛)={█((𝑛 + 1)/2, 𝑖𝑓 𝑛 𝑖𝑠 𝑜𝑑𝑑@&𝑛/2, 𝑖𝑓 𝑛 𝑖𝑠 𝑒𝑣𝑒𝑛)┤ Is the function injective? Justify your answer.
Check onto (surjective)
f (n) = {█((𝑛 + 1)/2 ", if n is odd" @𝑛/2 ", if n is even" )┤ for all n ∈ N
Let f(x) = y , such that y ∈ N
When n is odd
y = (𝑛 + 1)/2
2y = n + 1
2y – 1 = n
n = 2y – 1
Hence, for y is a natural number ,
n = 2y – 1 is also a natural number
When n is even
y = 𝑛/2
2y = n
n = 2y
Hence for y is a natural number ,
n = 2y is also a natural number
Thus,
for every y ∈ N, there exists x ∈ N such that
f(n) = y
Hence, f is onto (surjective)
Check one-one (injective)
f (n) = {█((𝑛 + 1)/2 ", if n is odd" @𝑛/2 ", if n is even" )┤ for all n ∈ N.
f(1) = (1 + 1)/2 = 2/2 = 1
f(2) = 2/2 = 1
Since, f(1) = f(2) but 1 ≠ 2
Both f(1) & f(2) have same image 1
∴ f is not one-one (not injective)
Made by
Davneet Singh
Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science and Computer Science at Teachoo
Hi, it looks like you're using AdBlock :(
Displaying ads are our only source of revenue. To help Teachoo create more content, and view the ad-free version of Teachooo... please purchase Teachoo Black subscription.
Please login to view more pages. It's free :)
Teachoo gives you a better experience when you're logged in. Please login :)
Solve all your doubts with Teachoo Black!
Teachoo answers all your questions if you are a Black user!