GATE Computer ScienceVery hardGATE CS (PYQ pattern)

How many functions f : {1, …, 6} → {1, …, 6} have an image with exactly 3 elements and no fixed point (f(x) ≠ x for all x)?

  1. A. 3360
  2. B. 10800
  3. C. 4320
  4. D. 2880

Correct answer: A. 3360

Fix the image T (C(6,3) = 20 ways). Maps into T without fixed points: each t ∈ T has 2 choices, the other 3 points 3 choices: 2³·3³ = 216. Those missing a given t₀ ∈ T: t₀ has 2 choices, the other two elements of T have 1, the rest 2: 16, times 3 = 48. Missing two values is impossible (that value would be fixed). 216 − 48 = 168 per T; 20 · 168 = 3360.

More Discrete Mathematics questions

Exams that ask this topic