Saturday, May 14, 2011

Which Box Has Defective Balls

You have 10 boxes of balls (each ball weighing exactly10 gm) with one box with defective balls (each one of the defective balls weigh 9 gm). You are given an electronic weighing machine and only one chance at it. How will find out which box has the defective balls?



Firstly 10 boxes of ball kept in a queue and mark it as box1,box2,box3.........box10
then from 1st box we have to take 1 ball,from 2nd box 2 ball..........from 10th box we kept 10 balls. and weight the total ball....

so if total nos ball is :n(n+1)/2 (n= total nos of box that is 10)=55
if all the ball is 10 gm.then total weight will be=550gm.
suppose total weight is 546gm.
so the difference is(550-546=4gm).
then the d defective ball is in box no:4.
similarly we can try for all possible box difference gives us the box number which contains the defective balls

1 comment:

Jarrod said...

Hi

I like this post:

You create good material for community.

Please keep posting.

Let me introduce other material that may be good for net community.

Source: General Motors interview questions

Best rgs
Peter