View worked solution
Answer: 36
We need to find the number of onto (surjective) functions from a set of size to a set of size .
We can solve this using two standard methods:
Method 1: Principle of Inclusion-Exclusion (PIE)
The total number of onto functions from a set of size to a set of size is given by the formula:
Substituting and :
Method 2: Partitioning (Stirling Numbers of the Second Kind)
An onto function maps elements of to elements of such that no element in is left empty. This is equivalent to partitioning the elements of into non-empty subsets, and then assigning each subset to a unique element in .
- The only way to partition elements into non-empty groups is of the size distribution .
- The number of ways to partition distinct elements into unlabeled groups of sizes is given by the Stirling number of the second kind, :
- Since the target set has labeled elements, we can assign these groups to the elements of in ways:
Thus, the number of onto functions is 36.
Free practice · Your answers on this page are not saved.
