How many permutations of [9] are there in which exactly 5 numbers are in their original position?

391 Views Asked by At

How many permutations of [9] are there in which exactly 5 numbers are in their original position?

My professor does not mean equivalence class, she means the set of positive integers less than or equal to 9: so {${1,2,3,4,5,6,7,8,9}$}.

This looks like a derangement problem. So my first intuition is to count the number of possible permutations of all 9 numbers, which is simply $9!$, then subtract the number of derangements which would be $D_5$. So my answer would be $9!-D_5$.

Am I thinking of this the correct way? What's a better way of going about solving problems like this Any tips?

1

There are 1 best solutions below

6
On

Hint: First choose the five numbers which will be in their original positions. How many ways to do that? Then you need a derangement of the remaining four. How many of those are there?