GATE Computer ScienceVery hardGATE CSE · NIELIT

How many onto (surjective) functions f from {1,…,8} to {a,b,c,d} satisfy f(1) ≠ f(2)?

  1. A. 40824
  2. B. 8400
  3. C. 32424
  4. D. 36000

Correct answer: C. 32424

Total surjections 4!·S(8,4) = 40824; those with f(1)=f(2) correspond to surjections from 7 points = 8400; the difference is 32424.

More Discrete Mathematics questions

Exams that ask this topic