Question

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

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

Which one of the following is CORRECT?

Choose one option
Official answer and solution
Official answer
B
From
Official GATE 2014 answer key

Solution

Analyze permutations whose square is the identity (involutions) on a finite set of odd cardinality.

Let S={0,1,…,2014}S = \{0, 1, \dots, 2014\}. The size of SS is ∣S∣=2014−0+1=2015|S| = 2014 - 0 + 1 = 2015, which is an odd integer.
We are given f(f(i))=if(f(i)) = i for all i∈Si \in S, meaning f∘f=idSf \circ f = \text{id}_S.

  1. Statement R (Each such function must be onto):

    • Because f∘f=idSf \circ f = \text{id}_S, ff has a two-sided inverse (namely ff itself).
    • Any function with a two-sided inverse is a bijection (both one-to-one and onto).
    • Hence, ff must be onto. Statement R is TRUE.
  2. Statement P (For every ii, f(i)=if(i) = i):

    • Consider a function that swaps 00 and 11 (f(0)=1,f(1)=0f(0) = 1, f(1) = 0) and fixes all other elements (f(i)=if(i) = i for all i≥2i \ge 2).
    • Here f(f(i))=if(f(i)) = i holds for all ii, but f(0)≠0f(0) \ne 0.
    • Thus, f(i)=if(i) = i is not required for every ii. Statement P is FALSE.
  3. Statement Q (For some ii, f(i)=if(i) = i):

    • In cycle notation, any permutation satisfying f2=idf^2 = \text{id} can only contain cycles of length 1 (fixed points, f(i)=if(i) = i) or length 2 (transpositions, f(a)=bf(a) = b and f(b)=af(b) = a).
    • Let kk be the number of fixed points, and mm be the number of 2-cycles.
    • The total number of elements in SS is:
      k+2m=2015.k + 2m = 2015.
    • Since 2m2m is even and 20152015 is odd, kk must be an odd integer (k≥1k \ge 1).
    • Hence, there must exist at least one fixed point (f(i)=if(i) = i for some ii).
    • Therefore, Statement Q is TRUE.
  4. Thus, only Q and R are true (option B).

Final answer

B

Common trap

Overlooking that the total number of elements is 2015 (odd), which guarantees at least one fixed point.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2014 Computer Science and Information Technology (CS) Session 3
Question
59 of 65, printed as CS Q.49
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.