Problem
COM-B2-M02-P007 Onto Three Values
#7
★★★☆☆ Level 3 of 5
How many functions from a \(6\)-element set to a \(3\)-element set are onto?
The forbidden event: some value is not used.
There are \(3^6\) functions in total. Subtract functions missing a chosen value: \(3\cdot2^6\). Add back functions missing two chosen values: \(\binom32\cdot1^6\). The answer is \(3^6-3\cdot2^6+3=540\).
Immediately connect this with the word-counting problem.