Para's question: There are ten different books on the shelf. Now it has been rearranged, so every book is not in its original position. How many ways are there?
To sum up this problem, it is the dislocation problem: n ordered elements should have n! Different arrangements. If all the elements of an arrangement are not in the original position, it is called staggered arrangement.
The following formula is derived by recursive method:
When n numbered elements are placed in n numbered positions, and the number of methods with different element numbers and position numbers is represented by M(n), then M(n- 1) means that n- 1 numbered elements are placed in n- 1 numbered positions, and so on.
The first step is to put the nth element in a location, such as location k, where there are n- 1 methods.
The second step is to put the element numbered K. At this time, there are two situations. 1, put in the n position, then there are m (n-2) methods for the remaining n-2 elements. 2, don't put it in the n position. At this time, the n- 1 element has m (n- 1) methods;
In summary
M(n)=(n- 1)[M(n-2)+M(n- 1)]
Boundary M( 1)=0, M(2)= 1.
So M(3)=2.
M(4)=9
M(5)=44
***44 situations