Staggered arrangement, also known as permutation problem, is one of the problems in combinatorial mathematics.
Question: There are ten different books on the shelf. Now it has been rearranged, so each book is not in its original position. How many ways are there?
To sum up this problem is the dislocation problem, which is one of the problems in combinatorial mathematics. Consider an arrangement with n elements. If all the elements in an arrangement are not in the original position, then this arrangement is called staggered arrangement of the original arrangement. The number of interlaces of n elements is recorded as D(n). In this paper, the arrangement problem of staggered rows is studied, which is called staggered row problem or even row problem.
The misplacing problem was first studied by Nicolaus Bernoulli and Euler, so it is also called Bernoulli-Euler envelope misplacing problem in history. There are many specific versions of this question, such as putting n letters in n different envelopes when writing letters. How many situations can envelopes be completely wrong?
Another example is that four people each write a New Year card and give it to each other. How many ways are there to give? You can't send your own New Year card to yourself, so it is also a typical problem of misplacing it.
Recursive formula:
When N numbered elements are placed in N numbered positions, D(N) indicates the number of methods with different element numbers and position numbers, then D(n- 1) indicates that N- 1 numbered elements are placed in N-1numbered positions, the number of methods with different numbers, and so on.
Refer to the above content: Baidu Encyclopedia-Dislocation Formula