Mathematics (JEE)Very hardGATE CS

How many functions from {1, 2, 3, 4} to {1, 2, 3} are onto and satisfy f(1) ≠ f(2)?

  1. A. 18
  2. B. 30
  3. C. 12
  4. D. 24

Correct answer: B. 30

Enumerating the 81 functions and keeping the onto ones with f(1) ≠ f(2) gives 30. Option 36 counts all onto functions, which is 36.

More Permutations, Combinations and Probability questions

Exams that ask this topic