Mathematics (JEE)Very hardJEE Advanced

The number of functions f: {1, 2, 3, 4, 5} → {1, 2, 3, 4} for which f(1) + f(2) + f(3) + f(4) + f(5) is divisible by 3 is:

  1. A. 342
  2. B. 341
  3. C. 340
  4. D. 333

Correct answer: B. 341

Using the cube-root-of-unity filter, the count is (4⁵ + (1 + 2ω + ω²)⁵ + (1 + 2ω² + ω)⁵)/3. Here 1 + 2ω + ω² = ω and 1 + 2ω² + ω = ω², so the terms are ω⁵ + ω¹⁰ = −1, giving (1024 − 1)/3 = 341.

More Sets, Relations and Functions questions

Exams that ask this topic