If I have a set $\{1,2,...,m\}$, how do I find the cardinality of the set $\{\pi \in S_m : |{\rm supp}(\pi)|=k\}$ where $0 \leqslant k \leqslant m$.
I ask because I previously thought I found the answer. But all I had found was the number of $k$-cycles. I forgot to take into account that a permutation can be written as a product of distinct cycles.
I’m not sure how to calculate this now that $\pi$ could be the product of any number of distinct cycles.
The correct aswer is $C_m^k\cdot D_k$, because you have to choose $k$ elements between $m$ elements and compute the numbers of permutations such each element is not in the initial position. Thus, the answer will be $$\frac{m!}{(m-k)!}\left(\frac{1}{2!}-\frac{1}{3!}+\cdots+\frac{(-1)^k}{k!}\right).$$