Interview Questions and Answers :: Broadcom Ltd
Home > Experience Archives > Broadcom Ltd > Interview Question Set 1 > Discussion
1. You have 10 bags full of coins, in each bag are 1,000 coins.But one bag is full of forgeries, and you can't remember which one.But you do know that a genuine coins weigh 1 gram, but forgeries weigh 1.1 grams.To hide the fact that you can't remember which bag contains forgeries, you plan to go just once to the central weighing machine to get ONE ACCURATE weight.How can you identify the bag with the forgeries with just one weighing?
Answer:
If there is only 1 bag with forgeries, then take 1 coin from the first bag, 2 coins from the second bag . . . 10 coins from the tenth bag and simply weigh the picked coins together !
If there were no forgeries, you know that the total weight should be (1+2+3+ . . . +10) = 55 grams.
But if, for example, the weight is 55.3 grams, then you know that 3 coins are forgeries, so that must be bag 3. So, that solves it.
If there is only 1 bag with forgeries, then take 1 coin from the first bag, 2 coins from the second bag . . . 10 coins from the tenth bag and simply weigh the picked coins together !
If there were no forgeries, you know that the total weight should be (1+2+3+ . . . +10) = 55 grams.
But if, for example, the weight is 55.3 grams, then you know that 3 coins are forgeries, so that must be bag 3. So, that solves it.
If there were no forgeries, you know that the total weight should be (1+2+3+ . . . +10) = 55 grams.
But if, for example, the weight is 55.3 grams, then you know that 3 coins are forgeries, so that must be bag 3. So, that solves it.
Report Error
Report Error
Please Login First Click Here