Numbered 1,2,3,4,......N elements in a column, if each element is different from its corresponding number, it is said that the arrangement is an n different elements of a wrong row,
Explain:
An error row of n different elements can be completed in the following two steps:
The first step, "staggered" element number 1th (ranked element 1th in one of the 2nd to nth position), there are n–1 methods.
The second step, "n–1" the rest of the elements, in the following order. As a result of the first step, if the 1th element falls in the K position, the second step is to first put the K element "wrong row" good, the k element of different row will lead to two different types of situations occur:
1, the K element is ranked in the 1th position, leaving the n–2 elements in the same position set as their numbering set "wrong row", there are f (n-2) method;
2, k element does not rank 1th position, at this time can be the 1th position "as" the K position (that is, originally prepared to put the K position as an element, can be placed in 1 position), so that the formation (including the k element) n–1 elements of the "wrong row", there are f (n–1) method. According to the principle of addition, complete the second step of a total of f (n–2) +f (n–1) method.
According to the multiplication principle, the number of wrong rows of n different elements
F (n) = (n-1) [F (n-2) +f (n-1)] (n>2).
Wrong row formula