Let be a set with exactly 5 elements and be a set with exactly 7 elements. If is the number of one-one functions from to and is the number of onto functions from to , then the value of is _____.
Solution
Core idea. An onto function is an unlabelled partition into nonempty fibres followed by an assignment of target labels.
Concept refresher. A function is one-one if distinct inputs have distinct images. It is onto if every element of the stated codomain has at least one preimage. These conditions depend on the direction of the map and the sizes of domain and codomain.
For a domain of size and codomain of size , the number of one-one maps, when , is
An onto map can instead be described by its fibres: the subsets of inputs sent to each target. The fibres must be disjoint, nonempty and cover the entire domain. First partition the inputs into unlabelled nonempty groups, then assign the distinct target labels to those groups. For a codomain with elements this final labelling has possibilities. Equal group sizes do not make equal groups: their actual member elements still distinguish them.
Picture the situation. For the one-one count, five inputs choose different images among seven possible targets. For the onto count, the direction reverses: seven inputs must fill five target fibres. Placing one input in each nonempty fibre uses five inputs, leaving two extra inputs.
The teaching map shows the only two fibre-size patterns for the onto part. Its dots represent distinct domain elements schematically; their identities are chosen by the combinatorial counts, not fixed by the picture. The source prints no figure.
Approach. Calculate the injection count and divide it by the factorial in the question. For the onto part, divide by that factorial first, so the target labels disappear and only unlabelled partitions need counting. Classify those partitions by how the two extra inputs are distributed. Finally subtract the two normalized counts.
Step 1: Count the one-one maps in the correct direction
The five inputs of have seven, six, five, four and three choices successively, since images cannot repeat. Thus
Equivalently, choose five images in the seven-element target set and permute them among the five distinct inputs. After division by the specified factorial,
The direction matters. A one-one map from a seven-element set into a five-element set would be impossible, but that is not the map counted by the source's first quantity.
Step 2: Interpret the normalized onto count
The onto maps go from to : seven distinct inputs must be split into five nonempty fibres. Each partition into five unlabelled fibres becomes an onto map in exactly five factorial ways by assigning the five target elements to the fibres. Therefore
The fibre sizes are positive integers adding to seven. Relative to one element per fibre there are only two extras. They either both join one fibre or join two separate fibres. The only size patterns are
and
For the first pattern, choose the three elements of the triple. All remaining elements are singleton fibres, so the number of unlabelled partitions is
There is no additional permutation of the singleton fibres at this stage: the groups are unlabelled. All assignments to the five target elements will be accounted for by the same factorial factor already removed.
Step 3: Count the two-pair pattern without duplication
Choose one pair from seven elements and another from the five remaining elements. This gives ordered choices of the two pairs. Interchanging which pair was selected first leaves the same partition into fibres. Divide by two:
The three remaining elements form singleton fibres automatically. There is no other pattern: a fibre of size four would already use three extra elements, while only two extras exist. The two counted classes are disjoint and exhaustive. Hence
This is a count of partitions, not yet the requested difference. Restoring the target labels would give
Step 4: Form the requested difference
Subtract the normalized injection count from the normalized onto count:
Thus the numerical answer is
Answer.
Sanity check. Using the unnormalized counts gives the same result:
For a separate check on the onto count, start with all assignments of seven inputs to five labelled targets, then use inclusion and exclusion to remove assignments missing one or more targets:
Numerically these terms are
This matches the fibre count. The onto number is smaller than all possible assignments, and both counts used in the final difference are positive. Each partition has exactly five factorial labellings even when some fibres have equal sizes, because disjoint nonempty fibres are different subsets and the five target labels are distinct.
Smart method. Normalize first. The injection count divided by five factorial is simply the number of five-element image subsets among seven targets. The onto count divided by five factorial is the number of partitions of seven inputs into five fibres. Count one triple or two unordered pairs, giving thirty-five plus one hundred and five, then subtract twenty-one. This avoids writing large factorials, but it does not remove the need to justify why pair order is irrelevant and why the target labels contribute the same factorial.
Common wrong answers
- 140: Reporting 140 correctly counts but omits the subtraction of . The source asks for the difference, not just the normalized onto count.
- 224: Reporting 224 counts the two pairs in order, using instead of 105. That gives . Each partition has two indistinguishable choices for which pair was chosen first, so divide that term by two.
- 139: Reporting 139 uses and therefore subtracts only one from 140. That fixes one five-element image subset and forgets the ways of choosing that subset in the seven-element codomain. The normalized injection count is 21, not one.
Key takeaway
The trap. Counting two equal-sized fibres in order, reversing domain and codomain, or forgetting the final subtraction.
How toppers think. They use the factorial already present in the question to remove labels before counting.
Remember. Count the member subsets first; label their target values only once.