Mathematics (JEE)Very hardGATE CS

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

  1. A. 36
  2. B. 30
  3. C. 81
  4. D. 27

Correct answer: B. 30

Enumerating the 81 functions from {1,2,3,4} to {1,2,3}, keeping those that attain all three values and have f(1) != f(2), leaves 30.

More Permutations, Combinations and Probability questions

Exams that ask this topic