Competition for 25 horses

Source: Internet
Author: User

The problem is: there are a total of 25 horses, there is a stadium, there are 5 tracks, that is to say, a maximum of 5 horses can be played together at the same time. Assuming that each horse runs very stably and does not use any other tools, only through the competition between the horse and the horse, you can know the minimum number of matches to know the fastest five horses.

Note: "If every horse runs very stably" means that in the last game, A is faster than B, and A is still faster than B in the next game.

For a moment, we can adopt a kind of idea of competing sort (tournament sort.

(1) divide the 25 horses into five groups and sort the rankings after each of the five matches as follows:

Group A: [a1 A2 A3 A4 A5]

Group B: [B1 B2 B3 B4 B5]

Group C: [C1 C2 C3 C4 C5]

Group D: [D1 D2 D3 D4 D5]

Group E: [E1 E2 E3 E4 E5]

Among them, the fastest horse in each group is [A1, B1, C1, D1, E1].

(2) Conduct 6th [A1, B1, C1, D1, and E1] and select 1st horses, set A1> B1> C1> d1> E1. at this time, 1st horses are A1.

(3) Conduct 7th games for [A2, B1, C1, D1, and E1]. At this time, the selected 2nd horses must be considered B1. Because these five horses are the fastest horse in each group except A1.

(3) In 8th games, select [A2, B2, C1, D1, and E1] to compete for 3rd horses.

(4) and so on. Can and 10 matches decide the fourth and fifth places respectively.

Therefore, according to this sort of competition idea, the first five of the 10 games are required.

 

Think about it. If you need to reduce the number of matches, you must decide two places in a certain game at the same time, and after each game, there are some horses that cannot enter the top five to be out in advance.Of course, to do this, you must be careful when selecting the horse for each game. Based on the above method, we hope this problem can be solved.

(1) It is absolutely necessary to use five matches to compete for the ranking order of each group.

(2) Selecting 6th horses in 1st games is also essential. If it is still A1. (A1> B1> C1> d1> E1 ). Now we can come to an important conclusion: some horses decide the fate of the game after the first six games (the green font below marks the game out ).

Group A: [a1 A2 A3 A4 A5]

Group B: [B1 B2 B3 B4 B5]

Group C: [C1 C2 C3 C4 C5]

Group D: [D1 D2 D3 D4 D5]

Group E: [E1 E2 E3 E4 E5]

(3) 7th games are the key. Can you decide the second or second horse? First, let's perform the following analysis:

In the above method, 7th games [A2, B1, C1, D1, and E1] were used to determine the 2nd horses. However, we have obtained (b1> C1> d1> E1) in 6th matches. How can this problem be solved? Can C1, D1, and E1 compete for 2nd in a B1? Of course, this is impossible. That is to say, 2nd names can only appear in A2 and B1. In fact, we only need two runways to determine 2nd. Can the three runways C1, D1, and E1 be used only for fun?

The key to optimization is coming out. Can we use the remaining three runways to determine the number of 3rd? Of course. Can we further analyze the situation of 3rd people?

● If A2> B1 (that is, 2nd is named A2), it is based on (b1> C1> d1> E1) in the 6th match ). It can be concluded that 3rd names can only be generated in A3 and B1.

● If b1> A2 (2nd is B1), we can conclude that 3rd names can only be generated in A2, B2, and C1.

Well, the conclusion is also come out. As long as we use [A2, B1, A3, B2, C1] as the horse for 7th matches, so the second and second names of the competition must be the second and second names of the 25 horses.

Here we will list all possible situations of 7th places and 2 places:

① 2nd = a2, 3rd = A3

② 2nd = a2, 3rd = b1

③ 2nd = b1, 3rd = a2

④ 2nd = b1, 3rd = b2

⑤ 2nd = b1, 3rd = C1

(4) 8th games are complex. We need to analyze all possible matches in 7th games.

① 2nd = a2, 3rd = A3. In this case, the 4th names can only be generated in A4 and B1.

● If 4th are A4, 5th are only generated in A5 and B1.

● If 4th = b1, 5th names can only be generated in A4, B2, and C1.

Regardless of the outcome, 4th and 5 members can be determined in 8th matches. Among them, the competition horse is [A4, A5, B1, B2, C1]

② 2nd = a2, 3rd = b1. In this case, the 4th names can only be generated in A3, B2, and C1.

● If 4th = A3, 5th names can only be generated in A4, B2, and C1.

● If 4th = B2, 5th can only be generated in A3, B3, and C1.

● If 4th = C1, 5th can only be generated in A3, B2, C2, and D1.

Then, if 4th or five horses need to be produced in the horse's seven horses, namely [A3, B2, B3, C1, A4, C2, and D1], two matches are required, that is to say, all the top five players were competing in the 9th games.

③ 2nd = b1, 3rd = a2. In this case, the 4th names can only be generated in A3, B2, and C1.

In the same situation as ②, 9th matches are required

④ 2nd = b1, 3rd = b2. In this case, the 4th names can only be generated in A2, B3, and C1.

● If 4th are A2, 5th are only generated in A3, B3, and C1.

● If 4th = B3, 5th can only be generated in A2, B4, and C1.

● If 4th = C1, 5th can only be generated in A2, B3, C2, and D1.

Then, if 4th or five horses need to be produced in seven horses, namely [A2, B3, B4, C1, A3, C2, and D1], two matches are required, that is to say, all the top five players were competing in the 9th games.

⑤ 2nd = b1, 3rd = C1. In this case, 4th names can only be generated in A2, B2, C2, and D1.

● If 4th = a2, 5th names can only be generated in A3, B2, C2, and D1.

● If the 4th name is B2, the 5th name can only be generated in A2, B3, C2, and D1.

● If the 4th name is C2, the 5th name can only be generated in A2, B2, C3, and D1.

● If 4th = D1, 5th can only be generated in A2, B2, C2, D2, and E2.

Therefore, 4th and 5 horses need to be produced in horse [A2, B2, C2, D1, A3, B3, C3, D2, E1, therefore, two matches are required, that is, the final victory and defeat of the game by 9th long.

Conclusion: The best case is to compete for the top 5 in 8th games, and the worst case is to do it in 9th games.

I am the dividing line of tiantiao

 

 

 

Reference: http://hxraid.iteye.com/blog/662643

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.