Exercise 889Combinatorics › Counting principlesOlympiadAdded 3 Nov 2026
Counting onto functions
#onto#surjections#inclusion-exclusion
Statement
Count onto functions from an -element set to a -element set.
Hint
Either the function is constant (not onto) or not. Total .
Show solutionHide solution
Solution
Total. functions.
Not onto. Two constant functions (all to or all to ).
Onto. .
Conclusion. onto functions.
Check for . : the two non-constant functions. ✓