Let and . Total number of onto functions such that , is equal to ______.
Solution
Core idea. When the values are interchangeable, a condition on one element removes an equal share of the functions.
Concept refresher. The number of onto functions from a set of elements to a set of 4 elements is, by inclusion and exclusion,
Picture the situation. An onto function from the 5 elements of to the 4 elements of uses every value at least once. Among all onto functions, the values 1, 2, 3 and 4 are interchangeable, so equals each of them in the same number of functions.
Approach. Count the onto functions by inclusion and exclusion, then remove a quarter of them.
Step 1: Onto functions
Removing the functions that miss at least one value gives
Step 2: The condition
By symmetry in of them, so the number with is .
Answer. 180
Sanity check. Directly, an onto function from 5 elements to 4 values has one value used twice: .
Common wrong answers
- 240: Counting all onto functions without the condition gives 240.
- 768: Ignoring the onto condition gives .
Key takeaway
The trap. The onto condition and the forbidden value must both hold for the same function.
How toppers think. They use symmetry in place of a second inclusion and exclusion.
Remember.