When n numbered elements are placed in n numbered positions, the number of methods that do not correspond to the element number and position number is represented by D (N), then D (n-1) indicates that the n-1 number element is placed in the n-1 numbered position, each of which does not correspond to the number of methods, Other analogy. The first step, put the nth element in a position, such as position k, there is a total of n-1 method, the second step, put the element number K, there are two cases: ⑴ put it to position N, then, for the remaining n-1 elements, because the K element is placed in position n, the remaining n-2 elements have D ( N-2) method; ⑵ k element does not put it to position N, at this time, for this n-1 element, there is a D (n-1) method; fully obtained d (n) = (n-1) [D (n-2) + D (n-1)]
Derivation of the wrong-line formula