The number of onto functions from the set \(\{1, 2, 3, 4, 5\}\) to the set \(\{a, b, c\}\) is
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → 150
Each of the 5 elements has 3 possible images, so the total number of functions is
\(3^{5} = 243\)
A function is not onto when it misses at least one of a, b, c. Using inclusion-exclusion:
Functions that miss one chosen letter use only the other 2 letters. There are 3 ways to choose the missed letter:
\(3 \times 2^{5} = 96\)
This counts each function that misses two letters (all elements sent to one letter) twice, so these are added back once. There are 3 such functions:
\(3 \times 1^{5} = 3\)
So the number of onto functions is
\(243 - 96 + 3 = 150\)
Why the other options are incorrect
Option (1) 243 — Incorrect. This is the number of all functions, including those that miss a letter.
Option (3) 147 — Incorrect. This is \(243 - 96\): the 3 constant functions are subtracted twice and never added back.
Option (4) 240 — Incorrect. This is \(243 - 3\): it removes only the constant functions, but functions using exactly two letters are not onto either.