# 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

**Answer:** **(B)** **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

## Recommended Posts:

- GATE | GATE-CS-2015 (Mock Test) | Question 10
- GATE | GATE-CS-2015 (Mock Test) | Question 10
- GATE | GATE-CS-2015 (Mock Test) | Question 8
- GATE | GATE-CS-2015 (Mock Test) | Question 9
- GATE | GATE-CS-2015 (Mock Test) | Question 10
- GATE | GATE-CS-2015 (Mock Test) | Question 11
- GATE | GATE-CS-2015 (Mock Test) | Question 17
- GATE | GATE-CS-2015 (Mock Test) | Question 13
- GATE | GATE-CS-2015 (Mock Test) | Question 14
- GATE | GATE-CS-2015 (Mock Test) | Question 17
- GATE | GATE-CS-2015 (Mock Test) | Question 16
- GATE | GATE-CS-2015 (Mock Test) | Question 5
- GATE | GATE-CS-2015 (Mock Test) | Question 2
- GATE | GATE-CS-2015 (Mock Test) | Question 17
- GATE | GATE-CS-2015 (Mock Test) | Question 4