Similar questions 1 more → · asked again: GATE 1993, Q8.6
Sets, Relations & Functions


Answer & solution
Answer: m!/(m−n)! = C(m,n)n!. (no official key was published)
Choose the values of the function in domain order. There are m choices for f(1). Once it is chosen, injectivity excludes that value for f(2), leaving m−1 choices. In general f(i) has m−i+1 choices after the preceding i−1 images have been fixed. The multiplication principle gives
|F| = m(m−1)…(m−n+1) = m!/(m−n)!.
Another way is to choose the n-element image set, in C(m,n) ways, then assign its distinct members to the n labelled domain elements, in n! ways. Hence |F|=C(m,n)n!, the same result.
The distinction between a function and an image set matters: C(m,n) alone discards the order in which the n selected values are assigned to 1,…,n. For n=2,m=3, the image set {1,2} supplies both f(1)=1,f(2)=2 and f(1)=2,f(2)=1. There are six injections overall, not three. At n=1 the answer is m, and at m=n it is n!, the number of permutations, providing simple boundary checks.