Math Problem (Level 3) : Number of inverse order (HHH6)

I arrange four number of 1,2,3,4 to one line. 

For example, I arrange it as "2,4,1,3". 

Considering a set of two numbers, there are three cases that big number is on the left side than small number which is "2 and 1", "4 and 1", and "4 and 3". 

This case is called that “the number of  inverse order of “2,4,1,3” is 3.” 

The table shows the number of inverse order and arrangement ways of each number of inverse order about all 24 ways of arrangement of 1,2,3,4.


When I arrange five numbers of 1,2,3,4,5 to one line, I think about the number of inverse order in the same way as a case of the number of four.


Answer the following questions.

(1) What is the number of inverse order when I arrange it as "5,2,4,1,3"?

(2) In reference to an upper table, considering 120 arrangement ways of 1,2,3,4,5, how many ways are there the number of inverse order is 5?










Answer
(1) 7
(2) 22 ways

Solution
(1) The set of two numbers that big number is on the left than small number is "5 and 2", "5 and 4", "5 and 1", "5 and 3", "2 and 1", "4 and 1",and "4 and 3".

The number of inverse order is 7.

(2) Consider by case analysis by the position 5.

That is, in the case of ① 5XXXX, ② X5XXX, ③ XX5XX, ④ XXX5X and ⑤ XXXX5.

Since 5 is the biggest number in five numbers, all numbers which are on the right side of 5 are counted as the number of inverse order.

① According to (1), the number of reverse order is four in case of 5 being in the leftmost.

Thus, the number of reverse order to become five in total, the number of inverse order in the arrangement of numbers of four other than 5, it is 5-4 = 1. 

How arranged in such a case, there are three ways from the table above.

② As there are three numbers on the right side of 5, the number of reverse order of 5 is found 3. 

Then the number of reverse order of how to arrange in the numbers of other four numbers of 1 ~ 4 should be 5 - 3 = 2. 

According to the table, there are five ways in case the number of reverse order is 2.

③ As there are two numbers on the right side of 5, the number of reverse order of 5 is found 2. 

Then the number of reverse order of how to arrange in the numbers of other four numbers of 1 ~ 4 should be 5 - 2 = 3. 

According to the table, there are six ways in case the number of reverse order is 3.

④ As there are one number on the right side of 5, the number of reverse order of 5 is found 1. 

Then the number of reverse order of how to arrange in the numbers of other four numbers of 1 ~ 4 should be 5 - 1 = 4. 

According to the table, there are five ways in case the number of reverse order is 4.

⑤ As there are no number on the right side of 5 which is on the rightmost, the number of reverse order of 5 is found 0. 

Then the number of reverse order of how to arrange in the numbers of other four numbers of 1 ~ 4 should be 5 - 0 = 5. 

According to the table, there are three ways in case the number of reverse order is 5.

In total there are 3 + 5 + 6 + 5 + 3 = 22 ways.