Sets, Relations & Functions



Answer & solution
Answer: n(m−1)!/(m−n)! = C(m−1,n−1)n!. (no official key was published)
Because f is one-to-one, the codomain value 1 can occur at exactly one domain position if it occurs at all. Choose that position i in n ways. The remaining n−1 domain elements must receive distinct values from the other m−1 codomain values, giving (m−1)!/(m−n)! assignments. Thus the total is
n·(m−1)!/(m−n)!.
There is no double-counting: each satisfying function has a unique preimage of 1, so it appears in exactly one of the n cases. Equivalently, choose its image set to contain 1 and n−1 other values, then order the n image values over the domain. This gives C(m−1,n−1)n!, equal to the first expression.
As a probability check, divide by all m!/(m−n)! injections. The fraction whose image contains a specified codomain value is n/m, consistent with an image set containing n out of m values symmetrically. At n=1 there is only one satisfying function, f(1)=1. At n=m every injection is a bijection, so all n! functions qualify. These checks also show why simply multiplying the total by 1/m would be wrong: any of n domain positions, not a fixed one, may map to 1.