Tuesday, April 24, 2007

#21

You have 10 bags with 10 marbles in each bag. All marbles weigh 10g except for the marbles in one bag which weigh 9g. But you don't know in which bag these 9g marbles are. You have to find out by taking zero or more marbles from zero or more bags and put them on a weightscale. After seeing the result of the weight, you should be able to tell in which bag the marbles weigh only 9g. So how many marbles from which bags do you take to weigh?

Answer:

    Take 1 marble from bag 1,
    take 2 marbles from bag 2,
    take 3 marbles from bag 3,
    ...
    take 9 marbles from bag 9 and
    take 10 marbles from bag 10

    Now put them on the weightscale. Now there are 10 possible measurements. If all marbles would weigh 10g, the total would be 550g. But one or more marbles weigh 9g. So if you took one 9g marble, the total would be 549g. If you took two 9g marbles, the total would be 548g. And so on.You know the total weight, so you know the number of 9g marbles you took. That is, if the total was 549g, you took one 9g marble. If the total was 548g, you took two 9g marbles. And so on.Now that you know how many 9g marbles you took, you know in which bag they are because you took 1 marble from bag 1, 2 marbles from bag 2, etc.So if the weight is: 549g the bag with the 9g marbles is bag 1.
    548g the bag with the 9g marbles is bag 2.
    ...
    541g the bag with the 9g marbles is bag 9.
    540g the bag with the 9g marbles is bag 10.

No comments: