Derangements question

175 Views Asked by At

Let $D_n$ be the number of derangements of $n$ objects and $P_{n,k}$ be the number of permutations of $n$ objects with exactly $k$ fixed points. Give a formula for $P_{n,k}$ in terms of $D_{n−k}$.

In case someone wants the definition of derangements:

Permutations with no fixed points are called derangements. A fixed point is a cycle of length $1$.

I am very stuck on this, but this is what I think it is. The total number of permutations on $n$ objects is $n!$, and since there are $k$ fixed points, there must be $n-k$ non-fixed points. So the number of derangements on $n-k$ points is $D_{n-k}$. So $P_{n,k} = n!- D_{n-k}$? I feel like this is wrong and I am undercounting.

I have a feeling the answer is $P_{n,k} = n!- {n \choose k }D_{n-k}$ but I don't know why.