You have ten coins, but two are fake, and weigh a little less. How many times do you have to use a two arm scale, in order to pick out the two fakes?
(In reply to
thoughts by Charlie)
WORSE CASE IS 5 WEIGHINGS - BEST CASE IS 3.
1- weigh 2 piles of 5 coins:
if each pile weighs the same then 1 fake in each group then take each group of 5 and 2-weigh 2 groups of 2 coins - if they are equal the fifth coin (not weighed is fake) - else take lighter stack and 3- weigh the 2 coins the lighter is the fake 1 - RRRRF = RRRRF [WEIGH EACH GROUP BELOW] 2&3 RR = RR F [END- BEST CASE 3 WEIGHING] OR RF = RR R [WEIGH LIGHT GROUP] 4&5 R F [EXPECT 4 WEIGHING] else if one of the groups of 5 is lighter than it contains both fake coins. Split the 5 coins into 2 groups of 2 and 1 - weigh the 2 groups of 2 - if they are equal each contains 1 fake ... 1 RRRRR = RRRFF [WEIGH LIGHT GROUP ONLY] 2 RF = RF R 3&4 R = F OR 2 RR = RF F [WEIGH LIGHTER] 3 R = F [LIGHTER IS FAKE AND FIFTH FROM 2 IS A FAKE] OR 2 RR = FF R [WEIGH LIGHTER] 3 F = F [IF EQUAL BOTH ARE FAKE]
|
Posted by pete
on 2005-03-26 05:25:35 |