There are 4 wrenches just unpacked from a box. They all look the same. There might be one defective item which is either heavier or lighter. Fortunately there is a fifth one that is standard. If you can use a scale to weigh only 2 times, can you find out:
- Is there a defective wrench?
- If there is a defective item, is it heavier or lighter?
My solution goes like this:
Let us call the three wrenches A's , the defctive one A and the satandard one S.
Take two of the set (A, A, A, X). There are two possiblities , u get A, A or u get A, X.
If you get A, A . The scles will be balanced. So u know that X is in the remaining two. Then you take one of the remaining two and balance it against the standard. If it is balanced then you have chosen a standard on and the remaining wrench is defective. If it is not balnced then the wrench you have picked is defective.
If you get A, X. The scales will not be balanced. Then the defective wrench must be one of these two. So you take one of them and balance it against the standard. If this time the scales are balanced, then the defective wrench is the other one. If the scales are not balanced, then you picked the defective wrench.
Posted by rohit
on 2004-07-03 00:30:20