Want bags full of gold coins ?
"I have got 10 Bags with 100 gold coins each. Each coin weighs 10 gms in 9 bags and each coin weighs 9 gms in one bag"
"I also have a weighing machine which gives you the exact weight "
"I will give you all the bags and all the coins on one condition", said the Jinni.
"if you can use the weighing machine, least number of times, to find out which bag has coins of 9 gms."
Can you ?
"I also have a weighing machine which gives you the exact weight "
"I will give you all the bags and all the coins on one condition", said the Jinni.
"if you can use the weighing machine, least number of times, to find out which bag has coins of 9 gms."
Can you ?
Labels: friday special, logic, thinktank



47 Comments:
stack the bags one at a time until the weight reads as something else other than a product of 10. whatever was the last bag you put on the scale is the bag, and you use the scale only once.
Joe in Hawaii is correct in saying that it only takes one weighing, however he is incorrect in his methodology. I beleive that the idea here is to set something on the scale, then when you're done setting things on it you find the weight and based on that you make your conclusion(s).
That said, it can still be done in one weighing. First, number the bags 1-10.
Next, take one coin from bag one, two coins from bag two, etc. until you have 55 coins, and place them on the scale.
If all of the coins weighed 10 grams, you would have a weight of 550g, since they dont, the weight is going to be different.
Next, subtract the actual weight from 550 and the difference will be the number of the bag that contains the 9g coins.
Simplified, if bag one is the 9g bag, then one coin will weigh 9g, bringing the total to 549 and the difference to 1. Similarly, if it's bag 6, that's six light coins and a corresponding weight of 544.
One weighing is all it takes, please send the coins to my PO Box in the Caymans :)
I know it's not standard practice but since I solved this problem kind of early (not to say there aren't other methods of solving it) I have a question of my own to pose to the gang to amuse them:
I have 12 identical billiard balls of uniform size and color, and a balance scale, similar to that of the grocer from a few days ago. One of these balls is counterfeit, and weighs different from the others. I don't know if it weighs more than the others or less, but I am certain that there is one out of place. How can I determine which ball is counterfeit, and whether or not it is heavier or lighter in three weighings(or fewer)?
Sorry Joe, but the standard of "place, then weigh" applies here. Enjoy :)
no i think i'm still correct. example...
first bag weighs 1kg, all coins in there weigh 10gms. when you add second bag, if the weight reads 2kg, both bags have 10gm coins. if the third bag reads anything else other than 3kg, the bag has the coins with 9gms. if it does weigh 3kg, continue. my way is faster. sorry man.
i take that back...i read your message carefully and agree that your way works too...conditions unfortunately are not clear as to whether or not you can remove the coins from the bag.
another problem with your method is that you'd have to mark each coin for each bag, and even if you placed all the coins on there at the same time, that wouldn't help you determine which is the lighter coin. you'd have to take each coin out of the bag first, place them individually on the scale...so on so forth...dude, i think i still wooped you in my method.
so i take back what i took back earlier. yup.
yeah, reading your comment now...what the hell you gotta be thinking that way is faster...yeah right...that takes at least 55 steps compared to no more than 9. like...as if. go home. you obviously lacking in logic if this is a logic problem.
and if you really anal, take one coin out of the first bag...if it weighs 10g, then hmm, i guess the bag must have the 10g coins, and so on and so forth...
as for the question you just posted...
put 6 balls on either side of the scale. one side will be lower than the other. remove 3 from each side. if the balance is still uneven, then you can get rid of those 6 balls. if the balance becomes even, get rid of the 6 on the balance. now place 3 one either side. whichever is higher has the fake ball. remove the other 3. now put two balls on the scale. if the scale is balanced, you have the fake ball. otherwise, the higher one is fake. 3 steps. don't think you can do it any less than that. anything harder than that man?
slight correction in that last posting of mine...if the balance remained uneven in the first step, the total amount of steps ends up being two...so yeah, three or fewer steps.
booyaka
word of advice when it comes to logic Daniel. don't overthink it.
Joe, the first problem said least number of times, and I think Daniel has the right idea. It would actually be only one weighing, but then requires some math skills. Not my strong suit. . . =}
Sorry--least number of weighings. Your way would take many, while Daniel would only require one.
haha.....ummmm.....oops? ok....i had time to totally think about it...and yeah, perhaps daniel is right. ummmm....my bad? hahaha...haha? i still figured out his challenge tho...
yeah, maybe it was too simple to be true...hmmm...oh well. i concede, i messed up. my bad daniel, send the coins to him.
and yes i feel the fool.
bring another, this gadget thing is interesting. =)
Wouldn't logic suggest that since 1 bag weighs 900grams and and 9 bags weigh 1000grams each.
Use your hand and wiegh them after all 2Lbs isn't much. When you find the bag that seems lighter just toss it on the machine.
________________________
Or better yet, use your own scale, that way you use his machine 0 times.
I believe that both daniel and Joe are correct, but daniels would be correct if the directions were clearer. Joe, you are correct if one weighing can be considered as constantly adding one bag after another. But if it actually means that you would have to put everything on there, then say, press a button to figure out the weight, and you are counting the number of times you push the button, Daniels way is right. If one condition not specified goes in Joe's direction, that as you put on a bag the scale moves and you can see that movement, Joe is much more simple. However, if any other conditions are added to the scale, Daniel is right. Joe, don't show off before you even check your answer LOL
I USED THE MACHINE 1 TIME BECAUSE THE FIRST BAG I PUT ON THE SCALE WAS THE BAG OF 9 GRAM COINS!
LUCKY ME HUH?
~ANGIE
Question: Can you???
Answer: Yes! YES I CAN!
As the question asked, both Joe in Hawaii and Daniel used the scale only once--adding weight in either case.
If the question stated they were allowed to only observe the reading on the scale once, then Daniel would have it hands down. Albeit, he did remove coins from the bags and needed to mark the bags as well.
Myself, I would go with handling each bag to determine the lightest then weigh it.
I believe that it is 4 or 6 times, I am not sure. The way I figure is this: you take five of the bags and get their weight, then the other five. Which ever weighs less you take and split into two equal groups (2 and 2). If they weigh the same then the other one is the oddball, if they're weights are different then you take the lighter one and weigh the those two bags.
put all the bags on the scale... lift off one bag at a time till you lift off the lighter bag.
Daniels only takes one time.
You throw all the 55 coins on at once.
You'd expect 550gms for all 10gm coins.
If the weight is 449, then bag one is the light one.
If it is 448, bag 2 is the light one.
If it is 447, bad 3 is the light one.
...
If the total weight is 540, then bag 10 has the light coins.
And you don't have to mark each coin, if you are walking out with the whole kit and caboodle if you are right.
Now, saying all that, and nodding to that bit of login, I don't know why I assumed balance type measuring device, in which you can do it in 3 max weighings.
Guess I should have explained my 3 max balance weighings.
Divide bags into 2 sets of 3, and 1 set of 4 (or 2 sets of 2).
Put the 2 sets of 3, one on each side of balance. 1st weighing.
If they aren't equal, take the lighter side, and split into 3 sets of 1 bag each. Place one bag each on scale, if one is lighter that is your bag, if they are the same, the odd bag out is the light one. 2 weighings. 2 total for this branch.
If the two sets of 3 are equal, put the 4 bags on the scale as 2 sets of 2. 2nd weighing this branch.
Take the lighter 2 bags of that exercise, and place 1 each, and the lighter is your bag. 3rd weighing, maximum number for any branch.
I still like Daniels for cleverness, but man, that is a lot of work ;)
Daniel's answer is the right one. If you have to look at the scale more than once, it can't be considered "one" weighing. Joe had to look at the scale many times before coming to an answer.
Thanks to everybody for your support. For Raj's question however, I beleive his description of the scale makes it very clear that it is NOT a balance scale, and I think steve put it best in his above post as to the definition of "weighing".
----------
Onto the billiard ball question, I was very explicit in my definition of "weighing," so Joe unfortunately you were wrong. I have pasted your post and numbered the weighings to explain.
((1))put 6 balls on either side of the scale. one side will be lower than the other.
((2))remove 3 from each side. if the balance is still uneven, then you can get rid of those 6 balls. if the balance becomes even, get rid of the 6 on the balance.
((3 sometimes))now place 3 one either side. whichever is higher has the fake ball. remove the other 3.
((4))now put two balls on the scale. if the scale is balanced, you have the fake ball. otherwise, the higher one is fake. 3 steps. don't think you can do it any less than that. anything harder than that man?
Sometimes three weighings, sometimes four weighings. In addition, the problem was very clear in saying that you are unsure if the spurious ball is heavier or lighter than standard, in your solution you are going on the assumption that you know that the counterfeit ball is lighter, like the coins, but this in fact is not the case.
Sorry for string-posting but since there was a question in the coin problem about numbering coins, I will be very clear that in my problem numbering the balls is allowed (and in fact, encouraged) to make keeping track of them easier. In fact, for the sake of argument they could be "billiard balls 1-12 of indiscriminable style", instead of 12 identical balls. Good luck!
I'm sorry but I got to say that both your solutions are nonsense! If you read the weight every time you've placed a new bag on the weighing machine, I would say you use the machine ten times in the worst case.
Daniel's solutino is based on the idea of taking coins out of the bags. I don't think you're alowed to do this.
Both good ideas, but if you take the exercise like it's written, you can't do it this way. Maybe the exercise is written to unclearly.
Then why are they bags of coins? if you cant take coins out they should have been bricks or perhaps billiard balls. It's not like Raj is waiting for us to come up with a solution...he has a solution and I'm pretty sure it involves taking coins out of the bags
I didn't answer this one because i had already heard it.
The question doesn't prohibit taking coins from the bag as long as you only weigh them once.
You're clearly not meant to take the coins out of the bag; and Joe, if you 'stack the bags one at a time...' then clearly you are "using" the scales each time you place a bag on it - so that's a maximum of 10 uses it might take to find the lightest bag.
Tullotoe is on the right lines, though you don't need a 'balance' scale - the answer is a Binary Split: You divide the bags into 2 sets of 5 then
1. Weigh Set 1
2. Weigh Set 2
Take the set which has the lighter weight (say set 2); divide it into two sets: Set 3 with 3 bags, Set 4 with 2 bags
3. Weigh Set 3
Now, if set 3 weighs 3 kg then the lighter coins are in Set 4, so you make one further weighing...
4a. Weigh first bag of Set 4; it is either the lighter bag, if not the other one is, so you've solved it in 4 weighings.
But if Set 3 weighs 2.9kg, you again split it into 2 sets, Set 5 with 2 bags in and Set 6 with just one bag.
4b. Weigh Set 5
if it's 2kg then again you've solved it in 4 weighings, because the single bag in Set 6 is the lighter bag; but if luck's against you, you have to weigh one of the bags from Set 5, so
5. Weigh one of the bags from Set 5 and it or the other bag is the lighter.
So the answer is a maximum of 5 weighings, minimum of 4.
QED
The correct answer is a minimum of 2 and a maximum of 3.
Divide 10 bags in 3 groups:
1) 4 bags
2) 4 bags
3) 2 bags
Weight 1) vs 2) and set 3) aside.
Assume 1) and 2) have different weights, and that 1) is the lighter one.
Take the 4 bags from 1) and weight 2 of them against the other 2.
Select lighter group of 2.
Weight final 2 bags.
Total= 3 weightings
If in the first step the 4 bags vs 4 bags weighted the same, just measure the 2 put aside.
Cheers,
the answer is 1 coz u might get lucky and choose the right bag!
This post has been removed by a blog administrator.
This post has been removed by a blog administrator.
Since there is no condition on opening the bags it takes precisely 0 weighings open the bags and count the coins.
I would think that everytime you change the amount of bags on the scale that counts as another time you used the scale.
If you weigh 1/2 of the bags, supposing the first 5 bags weighed 4.9 kg you begin taking bags off the scale until it weighs an even kg and the bag in your hand has the 9 gram coins in it. If the 5 bags weigh 5 kg you begin weighing the other 5 one at a time and if the next 4 you weigh all weigh an even kg, you know it is the light one. At the most you will use the scale 5 times.
I would think that everytime you change the amount of bags on the scale that counts as another time you used the scale.
If you weigh 1/2 of the bags, supposing the first 5 bags weighed 4.9 kg you begin taking bags off the scale until it weighs an even kg and the bag in your hand has the 9 gram coins in it. If the 5 bags weigh 5 kg you begin weighing the other 5 one at a time and if the next 4 you weigh all weigh an even kg, you know it is the light one. At the most you will use the scale 5 times.
Pick Up Each One Which Ever One Feels Lightest set it on the scale
ANSWER
--------------------------
1 Pick one coin from the first bag, 2 from the second, 3 from the third, 4 from the 4th and so on ...
2 Weight all these (picked) coins together.
3 Subtract the weight from 550 (=10+20+30+40+50+60+70+80+90+100)
4 The number you get will tell you which bag has the 9gm coins.
GOT RIGHT
--------------------------
Daniel, i have told the Jinni, but he won't accept the P.O Box address :)
dumb answer: couldnt u just pick each bag up and whichever one was easiest to pick up is the one w/ the lightest coins? that would mean u weighed 0times, the absolute lowest u could go
You could # the bags 1-10. Then take 1 coin out of bag 1, 2 out of bag 2, and so forth. Putt all of these onto the scale. However many grams under 100grams the weigt is, that is the # of the bag with the underweight coins.
step 1: you put 5 bags on the scale if the weight is 5k lbs then you use the other 5 bags for the next step if not then use those 5 bags for step 2
step 2: you take 3 bags from the other 5 bags and wiegh it if the weight is 300kg then go to step 3 if not then go to use the 3 bags for step 4
step 3: use 1 of the remaing bags to see if it weighs 100lbs if not then that is your bag if so then the last bag is your remaining bag
step 4: put 2 of the bags on the scale, if they weigh 2k gms then the remaining bag is the bag if not then use one of the bags on the scale to see if it weighs 1k gms
Just use a Binary search pattern.
take 1/2 the bags, from lighter half take 1 set aside weigh 1/2 the bags if = then odd bag if not then take lighter side weigh 1/2
and there you "halve" it.
yall are making it harder than what it is one bag the coins weigh 9g apiece and the rest weigh 10g a 1 g difference times the 100 coins thus a difference of 100g which is noticably different than the others and the difference could be felt when lifting two bags simultaneously just grab one bag and then start picking up the others one at a time until you find the lighter bag: total use of weighing machine 0
Post a Comment
Links to this post:
Create a Link
<< Home