Interviews Questions, Algorithms, Aptitude, C Interview Program, C Theory Question, Aptitude Tricks, Test Series,

Thursday 30 May 2019

Puzzle #2 Solution

Question:

One of twelve pool balls is a bit lighter or heavier (you do not know) than the others. At least how many times do you have to use an old balance-type pair of scales to identify this ball?

(a) 1

(b) 3

(c) 7

(d) 12

Answer:(b) 3

Explanation:

 Let's mark the balls using numbers from 1 to 12 and these special symbols:

 x? means I know nothing about ball number x;

 xL means that this ball is maybe lighter than the others; 

xH means that this ball is maybe heavier than the others;

 x. means this ball is "normal".

 At first, lay on the left pan balls 1? 2? 3? 4? and on the right pan balls 5? 6? 7? 8?.

 If there is equilibrium, then the wrong ball is among balls 9-12. Put 1. 2. 3. on the left and 9? 10? 11? on the right pan. 

If there is equilibrium, then the wrong ball is number 12 and comparing it with another ball it can find out if it is heavier or lighter.

 If the left pan is heavier, 12 is normal and 9L 10L 11L. weigh 9L and 10L.

 If they are the same weight, then ball 11 is lighter than all other balls.

 If they are not the same weight, then the lighter ball is the one up. 

If the right pan is heavier, then 9H 10H and 11H and the procedure is similar to the former text.

 If the left pan is heavier, then 1H 2H 3H 4H, 5L 6L 7L 8L and 9. 10. 11. 12. 

Now lay on the left pan 1H 2H 3H 5L and on the right pan 4H 9. 10. 11. 

If there is equilibrium, then the suspicious balls are 6L 7L and 8L.

 Identifying the wrong one is similar to the former case of 9L 10L 11L. 

If the left pan is lighter, then the wrong ball can be 5L or 4H. 

Compare for instance 1. and 4H. If they weigh the same, then ball 5 is lighter than all the others. Otherwise, ball 4 is heavier. If the left pan is heavier, then all balls are normal except for 1H 2H and 3H.

 Identifying the wrong ball among 3 balls was described earlier. In all possible way at least 3 times we have to weigh to find out which one is odd one.

0 comments:

Post a Comment