Microsoft
Company
You have 8 balls. One of them is defective and weighs less than others. You have a balance to measure balls against each other. In 2 weighings how do you find the defective one?
Read Solution (Total 4)
-
- Make it into three groups of 3, 3 and 2.
Weigh 3 and 3.
If equal, defective is in third group, in which case, a simple weighing of the remaining two will give defective one.
Otherwise, take any two from the set of three weighing less and weigh them. If thay weigh equal, remaining one is defective. Otherwise, the one weighing less is defective. - 15 years agoHelpfull: Yes(12) No(0)
- Group it as 3, 3 and 2. Weigh 3 against 3. If same, wigh one each from the remaining two to find the defective. Otherwise, take the lighter group, as it contains the defective ball. Weigh one from it against any other one. If same weight, remaining is defective. Otherwise the lighter one is defective.
- 15 years agoHelpfull: Yes(4) No(0)
- Step 1.Take any 6 balls put 3 on left and 3 on right. If the odd ball is present then that ball can be predicted on which side it is present (As its weight differs from others that side will move up or down )
Step 2.Take those 3 balls (where odd ball is present). Now put 1 ball on left side and 1 on right side. If the weight differs you can find out odd ball . If the weight of two balls is same the one which is left is the odd ball.
Step 3. If step 1 result is equal then remaining two balls are weighed and odd ball can be predicted easily.
So we need only 2 weighs either step 1 and step 2 or step 1 and step 3 - 8 years agoHelpfull: Yes(0) No(0)
- answer can be 3,3,2 or 2,2,4
let us assume that 7 balls, each weighing 2 kg and 1 remaining ball weighs 1 kg.
1. 3,3,2
-in this case, in 1st weighing, weigh 3 and 3 on balance and if both groups weights are equal i.e. 3*2=3*2, then defective ball is in remaining 2 balls group.
so, measure that 2 balls on the balance in 2nd weighing, the defective on out of two balls will be found out.
2. 2,2,4
-in 1st weighing, put 2,2 balls groups on one side of balance and put 4 balls group on other side of balance.
2*2 + 2*2=4*2
either the Lhs or Rhs contains defective ball.
if the Lhs contains defective ball, then it is measured in second weighing or if rhs contains defective ball then, those 4 balls groups can be measured in second weighing by dividing 4 balls in 2,2. then also the defective ball can be found.
so, cases can be
a) 2kg,1kg = 2 balls
2 kg,2kg = 2 balls
2 kg, 2kg, 2 kg, 2kg = 4 balls group.
b) 2kg,2kg = 2 balls
2 kg,2kg = 2 balls
2 kg, 2kg, 2 kg, 1kg = 4 balls group. - 7 years agoHelpfull: Yes(0) No(0)
Microsoft Other Question