Wrong row formula

Source: Internet
Author: User
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.