There are 10 barrels of gold coins. In that, some of the barrels contain
1 gram gold coins and some of the barrels contain 2 gram gold coins.
There is a weighing machine which is allowed to weigh only once.
Which of the barrels contain 2 gram coins?
16 comments:
Take 1 coin from one barrel 2 from next .....hope you got it
take 1 coin from first barrel, 2 coins from second, 4 coins from third, 8; 16; 32; 64; 128; 256; 512. weight will be from 1023 to 2046 included. if the answer is more than (2046+1+1023)/2=1535 there is 2 gram coins in tenth barrel, if less there will be 1 gram coins. for example it was more, now we have answer from 1535 to 2046. if the answer is more than (2046+1+1535)/2=1791 there is 2 gram coins in ninth barrel, if less 1 gram coins and so on...
You don't need any weighting, just look into these barrels. The 2-gram one will have half the coins.
I don't understand this.... Do the barrels have the same value?
The simplest solution would be to grab 4 or 5 coins from each barrel. Once each set of 4 or 5 coins has been removed compare them by placing separate sets in each hand. Compare 1&2, 3&4, ..., 9&10. Among the 5 comparisons, which set had felt unbalanced. From this set, choose the respective barrel which contained the heavier coin, this barrel is filled with 2 gram coins. This way you do not need the machine at all, it is important to consider your resources even if they are not explicitly stated in the question, ie- your hands.
The simplest solution would be to grab 4 or 5 coins from each barrel. Once each set of 4 or 5 coins has been removed compare them by placing separate sets in each hand. Compare 1&2, 3&4, ..., 9&10. Among the 5 comparisons, which set had felt unbalanced. From this set, choose the respective barrel which contained the heavier coin, this barrel is filled with 2 gram coins. This way you do not need the machine at all, it is important to consider your resources even if they are not explicitly stated in the question, ie- your hands.
I don't get it. Is there information missing from the question? I don't understand the limitations or what we're trying to do here..
More Info It seems, it will approach.
take 1 coin from first barrel, 2 coins from second, 4 coins from third, 8; 16; 32; 64; 128; 256; 512. weight will be from 1023 to 2046 included. if the answer is more than (2046+1+1023)/2=1535 there is 2 gram coins in tenth barrel, if less there will be 1 gram coins. for example it was more, now we have answer from 1535 to 2046. if the answer is more than (2046+1+1535)/2=1791 there is 2 gram coins in ninth barrel, if less 1 gram coins and so on...
If it's faster to take the coins from the barrels and you want to reduce the calculations needed to find out the end result, it would be easier to take 1 coin form then first barrel, 10 from the second barrel and so on.
When you see the result, which would be something like this: 2122121112
Then you know that the ones with a 2 have 2 gram coins in it and the ones with 1 have 1 gram coins in it.
@JyRKS - good luck trying to take 1,000,000,000 from the 10th barrel...
Giorgi Leonidze is correct.
Impossible to solve
None of the barrels contain any coins. A single gram or two of gold is far too small to print any legible pattern on for mass production, so it would not be a coin at all, it would just be a flake of gold.
Besides that, we are not told how large the barrels are, thus how many flakes of gold are in each. We do not know whether the barrels can be opened or not.
Most importantly, we are not told what "once" means as far as the capacity of the weighing machine is concerned. Does it break after weight is taken off or added after the initial weight is placed on the machine? Or does it break after the weight of the machine returns to null?
This question is inadequately formulated, for shame.
Take 1 3 7 9..... 17 19 coins from barrels 1 2 3..... 9 10 respectively and weigh. Value ranges from 110 to 220 gives answer.
Tale 1 3 5 7 ..... 17 19 coins from 1 2 ....10 barrels gives answer
@Jesley Al
That would not work.
Let's say that we take the coins and get 1 3 5 7 9 11 13 15 17 38.
So all are 1 gram except the last one. Add them all together and you get 119.
Now lets try another combination, where half are 1 gram and half are 2 gram: 2 3 10 7 18 11 26 15 34 19. Add them all together and you get 145.
So we would need to add 26 to 119 to get 145. We can do that by adding 11 + 9 + 5 +1 = 26.
So now we double numbers 11, 9, 5 and 1 from the first array and get 2 3 10 7 18 22 13 15 17 38. Add them all together and you get 145.
So once you have weighed the coins you get the number 145. You can not tell if it is array
2 3 10 7 18 22 13 15 17 38
or
2 3 10 7 18 11 26 15 34 19
since they both equal 145.
Post a Comment