Question: There are currently 12 balls, one of which has different weights from other balls, but the shape is the same, now you are asked to use a balance to find a different ball when it is called three times? What if I change to 13 balls?
I have read the answer for a long time, but I have not come up with the answer. I have read the answer on the Internet. A classmate discussed the problem in the group and found that he still found the answer on the Internet and did not come up with it. Find the correct solution on the Internet for you to learn.
12 balls: divide the balls into three groups: a B c d, e f g h, And I J K L.
For the first weighing, compare ABCD efgh
Case 1: The two are of the same weight. The answer is in ijkl.
Weigh IJ. If they are equal, the answer is in KL. Compare K with a. If yes, the answer is L. If not, the answer is K.
If not, the answer is in IJ. If I is equal to a, the answer is J. If not, the answer is I.
Case 2: ABCD is light.
Remove fgh from efgh and replace BCD in ABCD. Remove jkl from ijkl and add it to the original position of fgh.
If afgh is light, the answer is a or E. Weigh AB. If equal, the answer is E. If not, the answer is.
If afgh is heavy, the answer is in fgh. Weigh FG, if equal, the answer is H; if not, the severe is the answer.
The answer is included in BCD. Weigh BC, if equal, the answer is D; if not, the light is the answer. (I don't quite understand why the answer is not too light)
Case 3: ABCD heavy.
Remove fgh from efgh and replace BCD in ABCD. Remove jkl from ijkl and add it to the original position of fgh.
If afgh is heavy, the answer is a or E. Weigh AB. If equal, the answer is E. If not, the answer is.
If afgh is light, the answer is in fgh. Weigh FG, if equal, the answer is H; if not, the light is for the request.
The answer is included in BCD. Weigh BC, if equal, the answer is D; if not, the severe is the answer.
Similar requirements distinguish one of the thirteen balls with different quality,
13 balls: divide 13 balls into 4 balls, 4 balls, and 5 balls.
For the first time, it is called two 4-ball groups. If they are not equal, all the 5-ball groups are standard balls. Then we can solve them with 12 ball games;
If the two 4-ball groups are the same, the exception ball exists in the 5-ball group. The 5-ball number is ABCDE, and one of the two 4-ball groups is used as the standard ball, numbered F.
The second time is called AB & CF. If AB = CF, the exception ball is in de, and ABC is the standard ball. the third time is called A & D. If it is equal, e is the exception ball. If it is not equal, D is the exception ball.
If AB> CF, the exception ball is in ABC (A is heavy B or C is light), and De is the standard ball. for the third time, it is called A & B. If it is equal, C is the exception ball. If it is not equal, the severe person is the exception ball.
If AB <CF, the exception ball is in ABC (a light B light or C heavy), and De is the standard ball. the third time is called A & B. If it is equal, C is the exception ball. If it is not equal, the light is the exception ball.
(Here, I name a ball different from other weights as an abnormal ball, And the rest as a standard ball)
Thought 1:
When I do not know whether the exception ball is light or heavy, how many balls can I find the exception ball at most twice?
Conclusion 1: If there is no standard ball, a maximum of four abnormal balls can be found (set the four balls to ABCD) twice ).
Its name is as follows:
For the first time, it is called A & B. If a = B, the exception ball is in Cd, and AB is a standard ball. for the second time, it is called A & C. If it is equal, D is the exception ball. If it is not equal, C is the exception ball.
If A> B, the abnormal ball is in AB (A is heavy or B is light), and CD is the standard ball. for the second time, it is called A & C. If it is equal, B is the exception ball. If it is not equal, a is the exception ball.
If a <B, the exception ball is in AB (B or a light), and CD is the standard ball. for the second time, it is called A & C. If it is equal, B is the exception ball. If it is not equal, a is the exception ball.
Conclusion 2: if there is a standard ball (set to F), it is said that up to 2 times can be found from the 5 balls abnormal ball (set the 5 ball number ABCDE ).
Its name is as follows:
For the first time, it is called AB & CF. If AB = CF, the exception ball is in de, and ABC is the standard ball. the second time is called A & D. If it is equal, e is the exception ball. If it is not equal, D is the exception ball.
If AB> CF, the exception ball is in ABC (A is heavy B or C is light), and De is the standard ball. for the second time, it is called A & B. If it is equal, C is the exception ball. If it is not equal, the severe person is the exception ball.
If AB <CF, the exception ball is in ABC (a light B light or C heavy), and De is the standard ball. for the second time, it is called A & B. If it is equal, C is the exception ball. If it is not equal, the light is the exception ball.
Thinking 2:
When we know that the abnormal ball is light or heavy (set the abnormal ball weight), how many balls can we find the abnormal ball at most twice?
Conclusion: an abnormal ball can be found from 9 balls at most twice.
Its name is as follows:
Divide the 9-ball into three groups, each with three balls. Take the two groups for the first time. If the equal exception ball is in the unspecified group, if the difference is not equal, it is in the duplicated group.
Take two of the selected three balls as the names. If they are equal, the other is the exception ball. If they are not equal, the severe one is the exception ball. (comments from one person on the Internet: But I don't think he has provided a good proof that his conclusion is correct, although I can't give a counterexample)
Summary: Students of computer science immediately think of this question as binary. From the analysis of the questions, we can see that sometimes two points are not the best. In this case, we should consider three points, four points, and unequal points.