For convenience, we first use the serial number 1, 2, …, n to number n different elements and their corresponding positions, and stipulate that in the arrangement of n different elements,
1 If the element number is I (I = 1, 2, ..., n), it is said that the element I is in the original position; Otherwise, element I is said to be inappropriate.
If all elements are not in situ, this arrangement is called a staggered arrangement of n different elements (if each element is in situ, it is called a sequential arrangement).
According to the above convention, the "error envelope problem" is a problem in which n different elements are arranged incorrectly, so the mathematical model of the "error envelope problem" can be constructed as follows.
How many different dislocations are there in the complete arrangement of n different elements?
3? Model solving
By applying the principle of inclusion and exclusion in sets, the formula for solving the mathematical model of "error envelope problem" can be obtained.
Let I represent a completely arranged set of n different elements.
Ai (I = 1, 2, ..., n) is a set of elements I arranged in situ.
Ai ∩ aj (1 ≤ I < j ≤ n) is a set of elements I and J arranged in situ. ...
A 1 ∩ A2 ∩...∩ an is a group arrangement of n elements.
Then their arrangement numbers (that is, the number of elements in each group) are respectively
|I|=n!
|Ai|=(n- 1)!
|Ai∩Aj|=(n-2)!
……
……
|A 1∩A2∩…∩An|=(n-n)! =0!
According to the principle of inclusion and exclusion, the formula for solving the mathematical model of "error envelope problem" (that is, the number of interlaced n different elements) is f(n)? =? n! [ 1- 1/ 1! + 1/2! - 1/3! +……+(- 1)^n* 1/n! ]?
If you don't understand the above solution, there are the following simple and easy-to-understand methods.
Let n letters and envelopes have one (n) packing method. Form a sequence {A(n)}
It is obvious that A (1) = 0 and A (2) = 1.
And n+ 1 letters and envelopes can be regarded as two cases:
1. is a method of misplacing n letters and envelopes, and the letter of n+ 1 is interchanged with one of the previous n letters.
2. One of the n letters and envelopes was installed correctly, and the other n- 1 letters and envelopes were installed incorrectly. Then, the letter n+ 1 is exchanged with the right letter in the previous n letters.
1. There are n*A(n) cases.
2. There are n*A(n- 1) cases.
So a (n+1) = n * a (n)+n * a (n-1) = n * (a (n)+a (n-1))
This can be analogized in reverse, but it is not easy to find the general formula.
You can ask: