Mathematics (JEE)Very hardGATE CS

How many functions f from {1, 2, 3, 4, 5, 6} onto {1, 2, 3} (every value attained) satisfy f(i) != i for i = 1, 2, 3?

  1. A. 540
  2. B. 360
  3. C. 168
  4. D. 729

Correct answer: C. 168

Enumerating the 3^6 = 729 functions and keeping those that are onto and avoid f(i) = i for i = 1, 2, 3 leaves 168.

More Permutations, Combinations and Probability questions

Exams that ask this topic