# GATE | GATE-CS-2014-(Set-3) | Question 62

Consider the set of all functions f: {0,1, … ,2014} → {0,1, … ,2014} such that f(f(i)) = i,
for all 0 ≤ i ≤ 2014. Consider the following statements:

```P. For each such function it must be the case that
for every i, f(i) = i.
Q. For each such function it must be the case that
for some i, f(i) = i.
R. Each such function must be onto. ```

Which one of the following is CORRECT?
(A) P, Q and R are true
(B) Only Q and R are true
(C) Only P and Q are true
(D) Only R is true

Explanation: This kind of functions are called identity functions.

We assume f(i) = k. So, f(k) = i. Now, since the values of ‘ i ‘ and ‘ j ‘ would be same for atleast some values if the domain and co – domain intersect, which is true for the given question, Q is definitely true. But this might not happen for all the values of ‘ i ‘, hence, P is not always true.

Now, ‘ i ‘ ranges from 0 to 2014, so, it takes 2015 possible values. From the definition of a function, we know that for each input to the function, we have a unique output. Also, in the given question, domain and co – domain are exactly same. Therefore, the function is onto and hence, R is definitely true.

Thus, the correct option is B.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.