Question:
There are 10 boxes of apples. Each apple in the boxes weights 1 pound, except that one of the boxes contains bad apples, which weights 0.9 pound each. You are given a digital weight (not a scale), and you can take apples out of the boxes. what is the minimum time of weighs to find out which box has bad apples?
Solution:
There are 10 boxes of apples. Each apple in the boxes weights 1 pound, except that one of the boxes contains bad apples, which weights 0.9 pound each. You are given a digital weight (not a scale), and you can take apples out of the boxes. what is the minimum time of weighs to find out which box has bad apples?
Solution:
it's simple:
take 1 apple from box 1, 2 apples from box 2 ... 10 apples from box 10
put all on scale, say it shows XX.Y pounds
take 1 apple from box 1, 2 apples from box 2 ... 10 apples from box 10
put all on scale, say it shows XX.Y pounds
look at Y (fractional part).
if it's 0, it's box 10
1 - box 9
2 - box 8
...
9 - box 1
if it's 0, it's box 10
1 - box 9
2 - box 8
...
9 - box 1
POST YOUR OPINION IF YOU HAVE BETTER SOLUTION
Click Here To add Comment
Your feedback is always appreciated.
I will try to reply to your queries as soon as time allows.
Please do not spam Spam comments will be deleted immediately upon our review.
Blogger Widgets