There are 12 small balls, the same appearance. Among them, there is a gap with other 11 (as it is a light weight than other palls). The tool available now is a balance. It is called to find this different small ball.
PS: Do not consider luck and external factors (ie the worst plan of ideal state).
-------------------------------------------------- -------------
First, divide the ball into four piles: 3 groups of methyl
First put the two groups of A & B on the balance, see if it is balanced? (First use of balance)
There are two cases: 1, balance balance. 2, the balance is unbalanced.
The first case: It can be judged that the sequential ball is in the cola. The three balls were then taken out from the coopoprotection. Is it balanced? (Second use of balance)
{
There are two cases: 1, balance balance. 2, the balance is unbalanced.
The first case: The one of the remaining in the co-disc can be concluded.
In the second case: one of the three balls that have just been taken out from the co-disks are defective. And can be judged
The ball is light or heavy! ! ! ! ! (Mainly watching the balance of the feet is declined or rising: falling, the rebel ball.
Lighten, subtiline light) If you want to find out which one is a subtle ball from the three balls, and known the ball is light, you don't have to use it.
I said! ! ! ! ! ! ! !
}
The second case: It can be judged to be all good balls in the copass. Not general,
Assume a disabling.
The three balls were then taken out from the coopoprotection.
Then exchange the remaining ball in the panel and any ball in the dish.
Is it balanced? (Second use of balance)
{
There are two cases: 1, balance balance. 2, the balance is unbalanced.
The first case: It can be judged that there is one of the three balls taken from the Beth, and the secondary ball is light. Below
I don't have to say it in one step, with the same.
The second case: There are two cases when the balance is imbalanced at this time. 1, will not change the original position of the two discs of Aethyl. 2, change
Available in the original position of the two discs.
{
1. It can be judged that the secondary ball is in the remaining three balls left, and the secondary ball is heavy. I don't need to say it in the last step below.
It is the same as the same.
2, can be judged that there is one must be a defective item from the two balls exchanged in the panel, but I don't know the product ball at this time.
Is it light or heavy.
The last use of balance is from two balls out of the next item, you should not use me.
}
}
The issue of the ball will generally have the following three modifications:
1, n Ball, one of which is bad, knowing that it is light or heavy, and it is called a bad ball with heaven.
2, N balls, there is a bad, I don't know whether it is light or heavy, and it is said to be a bad ball.
3, N balls, there is a bad, I don't know whether it is light or heavy, use the heavens to say bad balls, and tell the bad ball is light or heavy.
For 3 cases above, we are weighed, up to a few balls to find bad balls?
Answers: 3 ^ n, (3 ^ n - 1) / 2, (3 ^ n - 3) / 2, respectively.
The claim is reflected in the following proof:
One,
The balance weighed, there are two pallets that are relatively heavy, plus the tray, which is 3 results per weighing, which is LN3 / LN2 bit information. n Ball should know one of the different balls. If you know that the different weights are light or heavy, then what is found, that is, one of the n results, there is ln (n) / ln2 bit information,
Suppose we want to be called K, according to the information theory: K * ln3 / ln2> = ln (n) / ln2, solution K> = ln (n) / ln3
This is to get the lower limit, which can easily prove that the minimum positive integer K of the condition is satisfied. For example, I have known 3 times knowing that it can find different balls from 3 ^ 3 = 27 balls.
The specific aspect is: Take [(n 2) / 3] a ball in N balls to be determined, placed on the left of the balance; [(N 2) / 3] The ball is placed on the right side of the balance.
(Note: [x] indicates the maximum integer not greater than X.)
two,
BBS Shuimu Tsinghua Station: Essence
Sender: IDLE (Return line), letter area: GreatTurn
Title: Solution to the Termination of the Mark ---- M Time (3 ^ m-1) / 2 Solution
Sending station: BBS Shuimu Tsinghua Station (Sat Jul 25 09:10:51 1998)
For N (m) = (3 ^ m-1) / 2 small balls, now let's seek way to solve M times.
First of all, for M = 2, it is equivalent to four small balls, which has been discussed many times, and it is very simple, this is slightly
Second, if M <= K-1, we have a solution for N (k-1) = (3 ^ (k-1) -1) / 2 balls.
Now consider the case of M = K.
The first time, [3 ^ (k-1) -1] is placed on both ends of the balance balance, then:
If balanced, obtain [3 ^ (k-1) -1] standard ball, the bad ball is in the remaining [3 ^ (k-1) 1] / 2. due to
[3 ^ (k-1) -1]> = [3 ^ (k-1) 1] / 2 (k> = 2), that is, the number of standards known is not less than the number of unknown spins;
Therefore, in the future measurement, it is equivalent to any given standard ball, and it is known from the front.
For the case of [3 ^ (k-1) 1] / 2 (k-1).
If it is not balanced, the big part is remembered as a small part of the part to B. Standard Ball Do C.
Now we have [3 ^ (k-1) -1] / 2 A balls and B balls, there are [3 ^ (k-1) 1] / 2 c balls.
The second use of 3 ^ (k-2) A ball plus [3 ^ (k-2) -1] / 2 B ball left;
3 ^ (k-2) C ball plus [3 ^ (k-2) -1] / 2 A balls put on the right.
If the left is larger than the right, it means that the mass is a bad ball in the 3 ^ (k-2) A ball on the left;
If the left is equal to the right, then the quality of the 3 ^ (k-2) B ball that is not used in the second time is light.
It is a bad ball. The above two cases can be solved by three-degree (k-2), plus the first two
A total of k is resolved.
If the left is smaller than the right, the bad ball is on the left [3 ^ (k-2) -1] / 2 B balls or on the right side.
Number A balls. At this time, the situation is similar to the second start (only K-1 becomes K-2).
Take back to an A ball and a B ball once, at this time
Just take the A ball and the standard ball to compare the following.
Therefore, in this case, it can eventually be solved with K times.
It is known from the above two steps, and the case of N (m) = (3 ^ m-1) / 2 is said to be called M times.
The upper bound Nmax (M) <= (3 ^ m-1) / 2 given in the previous solution, the number of pellets that can be solved by the name M times can be solved.
Nmax (m) = (3 ^ m-1) / 2.
Interested people can verify that M = 3, n = 13 ---- This situation has been repeatedly discussed.
three,
Sender: Nature (growing trouble), letter area: Mathematics
Title: [Reprinted] My answer to the title of the problem
Sending station: Nanjing University Small Lily Station (WED NOV 8 17:47:05 2000), station letter [The following text is reproduced from the Algorithm discussion area]
[Original text from Grass]
Let's analyze the first three piles:
(1) If it is unbalanced, the information we get is:
1. Bad balls in two piles on the horizon;
2. There is a bunch of balls, a bunch of light.
Everyone tends to ignore the second information, in fact, this information is very important.
If we know some of the light relationships of some balls, we can draw less than the number of times that this relationship is called. Such as: If you tell you the bad ball, then 27 balls are enough for three times.
So we have to study it. If we know that some balls are lightweight, how many balls can I be called up to N times. We use the function h (n).
(2) If balance, the information obtained is:
1. Bad balls in the remaining pile;
2. There are several good balls to use us.
The second information is also easy to ignore. Just as 12 balls, we can use the balance if we balance.
Ball as a standard ball. There are standard balls, 4 balls can be called 4 balls (see 2-5 of the first test solution);
If there is no, only 3 balls can be referred to.
So we still have to study, if we have a standard ball, how many balls can I be called up to N times. we
Decisive function g (n).
Definition 1: If a ball, if it does not know (or knowing it is impossible to be light), we call this ball for half-determination of heavy ball (or half confirm light ball); half-determination of heavy ball and semi-determination For a semi-determined ball.
In the first question, after the first weigh, if the imbalance is imbalance, the ball is half-determining the ball.
If 1, 2, 3, 4 <5, 6, 7, 8, 1, 2, 3, 4 are semi-determining light balls, 5, 6, 7, 8 for half determine the heavy ball.
Definition 2: If a ball, if you know it is a good ball, we call this ball to determine a good ball; if you know is a bad ball, make a bad ball. Determine a good ball and determine a good speech called a determination ball.
In the first question, after the first weigh, if the balance, the ball is 1, 2, 3, 4, 5, 6, 7, and 8 becomes a good ball.
Definition 3: If a ball is neither a certain ball, it is not a half-determined ball, then we call this ball as an uncertain ball.
In the first question, after the first weigh, the balls 9, 10, 11, 12 are uncertainty.
All balls are uncertain before one time.
Intrusion, for the ball, the ball, is half-definition, or determine the ball.
This is an obvious proposition.
Definition 4: If all the balls are half a semi-determined ball, then the maximum number of balls that can be referred to in the N times We use H (n).
引 2: h (n) = 3 ^ n.
prove:
Use the induction method:
(1) For n = 1, the first three balls are confiithmable, and then 4 is not known.
1 3 balls can be called,
If it is half a semi-determination of heavy ball, any pick two, if it is unbalanced, he is a bad ball; otherwise, the remaining is a bad ball;
It is half-half-faced light ball.
If two and a half determine the heavy ball, one and a half determine the light ball, it is called two and semi-semi-determination of heavy ball. If it is unbalanced, the weight is to determine the heavy ball; otherwise, the remaining is to determine the light ball; if one half determine The ball, two and a half determine the light ball.
Therefore, 3 seeking can be called.
2 four balls are unemaptive
If it is 4 balls, the balance is called once, only three information can be provided, and the information of the drawer will inevitably have two balls. Therefore, it is impossible to guarantee that it can be judged.
Therefore, n = 1 is H (n) = 3 ^ N is established.
(2) Set n = k when the initial title is established, for n = k 1
1 The first class T = 3 ^ (k 1) a ball is determined:
There is a half of the T in t in t, B is determined to be light ball, t = a b;
From symmetry, you may wish to set A> B (A B is an odd number, so it is impossible to wait)
Divided into three piles as follows:
If A> = 2 * (3 ^ k), the balance is placed in both sides of the balance to determine the heavy ball. If it is unbalanced, the bad ball is in the bunch of heavy; the balance, the bad ball is in the remaining pile. At this time, there are 3 ^ k balls, and k can be judged, a total of K 1 time, and it is founded.
If a <2 * (3 ^ K), the balance is placed in [A / 2] half a semi-determined heavy ball, 3 ^ k- [a / 2] half determines the light ball. If you are unbalanced, the bad ball is determined in the heavy ball or the light pile of the heavy ball or a light pile of half; balanced, the bad ball is in the remaining pile. At this time, there are 3 ^ k balls, and k can be judged, a total of K 1 time, and it is founded.
A
Therefore, 3 ^ (k 1) is a ball.
2 If 3 ^ (k 1) 1 ball, it is called once, only three information can be provided by the drawer principle, there must be 3 ^ k 1 ball information, this 3 ^ k 1 ball It is not possible to use K times. Therefore, K can not guarantee that it can be judged.
Therefore, n = k 1 is also established.
From the inductive method, H (n) = 3 ^ n is established for all natural numbers.
Go back to the original question, come to F (n).
For the first treatment, if the imbalance is imbalance, the balls of the balance will become a semi-determined ball. There is a number of two balls, and the number is b. It is easy to know that A and B are independent of each other. In order to make F (n) = 2a b, the maximum value of A and B is obtained separately.
By the introduction, this 2A half determined that the ball should be judged in N-1 times, and only when
2A <= h (N-1) = 3 ^ (N-1).
However, the equal number cannot be taken, because 3 ^ (n-1) is odd, so 2A <= 3 (N-1) -1,
Max (a) = (3 ^ (N-1) -1) / 2
f (n) = (3 ^ (N-1) -1) max (b)
Definition four, give a number of non-definitely balls that determine a good ball, N times, is represented by g (n).
Extension 3: g (n) = f (n) 1
If there is any determination of a good ball, G (n) is more than f (n) to improve the efficiency, and the number of non-definitely balls that can be placed on both sides can be not as much as possible. On one side placed C udeastening ball, one side is placed in an uncertain ball and C-A certain good
Ball, there is a bunch of b. If the balance, the Treatment of b is f (n), so the max (b) at this time is obviously equal to MAX (B) of F (N). If it is imbalance, there is a C uncertain ball.
A C <= 3 ^ (n - 1) (equal sign)
Let C = A 1 = (3 ^ (N-1) 1) / 2, then only one determination is a good ball, g (n) = max (A C) max (b) = 3 ^ (N-1) max (b) = f (n) 1
Take another way to study Max (b). If the imbalance is imbalance, the B ball is all determined a good ball, otherwise it is all non-definitely balls. But the ball on the sky
All determined a good ball. At this time, B is just the G (n) we just discussed.
MAX (B) = g (n-1) = f (n-1) 1.
Therefore, f (n) = 3 ^ (N-1) -1 f (n-1) 1 = f (n-1) 3 ^ (N-1)
This is a recurrent formula.
We also know, f (2) = 3, so easy to solve
f (n) = (3 ^ n-3) / 2
Therefore, N times, you can find a bad ball in (3 ^ n-3) / 2 balls. (There is only one bad ball)
When n = 3, the first question, f (3) = 12. The maximum number that can be called 3 can be 12.
-------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------
12 balls called 3 times and 13 spheres of trees said:
So everyone may see more clearly.
V means that the previous expects of the next row,
A means that the next row is overward.
Last 0 indicates that this situation does not exist.
12:
| 1 | V 1, H
| V | vs - | = 6, L
| | 2 | A 2, H
|
| 1, 2, 5 | | 1 | V 7, L
| V | vs --- | = | vs-- | = 8, L
| | 3, 4, 6 | | 7 | A 0
| | |
| | | 3 | V 3, H
| | A | VS - | = 5, L
| | 4 | A 4, H
|
|
| | 9 | V 9, H
| | V | vs - | = 11, L
| | | | 10 | A 10, H
| | |
1, 2, 3, 4 | | 9, 10 | | 1 | V 12, L
VS ----- | = | vs --- | = | vs-- | = 0
5, 6, 7, 8 | | 1,11 | | 12 | a 12, h
| | |
| | | 9 | V 10, L
| | A | VS - | = 11, H
| | 10 | a 9, L|
| A Similar to V
13:
| 1 | V 1, H
| V | vs - | = 6, L
| | 2 | A 2, H
|
| 1, 2, 5 | | 1 | V 7, L
| V | vs --- | = | vs-- | = 8, L
| | 3, 4, 6 | | 7 | A 0
| | |
| | | 3 | V 3, H
| | A | VS - | = 5, L
| | 4 | A 4, H
|
|
| | 9 | V 9, H
| | V | vs - | = 11, L
| | | | 10 | A 10, H
| | |
1, 2, 3, 4 | | 9, 10 | | 1 | V 12, L
VS ----- | = | vs --- | = | vs-- | = 13
5, 6, 7, 8 | | 1,11 | | 12 | a 12, h
| | |
| | | 9 | V 10, L
| | A | VS - | = 11, H
| | 10 | A 9, L
|
| A Similar to V