Clear Notion Academy

Permutations and Combinations (Beyond Advanced) Practice: How many functions f: 1,2,3,4,5,6 a,b,c,d are onto (every element of the codomain is hit)…

Question

How many functions f:{1,2,3,4,5,6}→{a,b,c,d}f:\{1,2,3,4,5,6\}\to\{a,b,c,d\} are onto (every element of the codomain is hit) and satisfy f(1)≠f(2)f(1)\ne f(2)?

Options

  1. 15601560
  2. 13201320
  3. 11701170
  4. 240240

Answer

Correct option: B

Hint

Count all onto functions, then count those with f(1)=f(2)f(1)=f(2) by merging 11 and 22 into one object.

Solution

Onto functions from a 66-set to a 44-set: 46−4⋅36+6⋅26−4=4096−2916+384−4=15604^6-4\cdot3^6+6\cdot2^6-4=4096-2916+384-4=1560. Those with f(1)=f(2)f(1)=f(2): treat 1,21,2 as a single object; onto functions from 55 objects to 44 elements: 45−4⋅35+6⋅25−4=1024−972+192−4=2404^5-4\cdot3^5+6\cdot2^5-4=1024-972+192-4=240. So the required number is 1560−240=13201560-240=1320. (The guess 34⋅1560=1170\frac34\cdot1560=1170 assumes the images of 11 and 22 are independent of the onto condition, which they are not.)

More questions from Permutations and Combinations (Beyond Advanced) Practice

Practise the full set: Permutations and Combinations — Beyond Advanced