# Which sack of coins holds the gold?



## chuckchuckit (Nov 22, 2012)

There are 10 sacks of coins that each have 100 coins in them. Only one sack has pure gold coins in it, all the other sacks of coins have imitation gold coins. All the coins in all the sacks look the same. The only noticeable difference between the gold coins and the imitation coins is; each imitation coin weighs 1 pound, and each pure gold coin weighs 1 pound and 1 ounce.

You have a scale you can only use once. How would you find out which sack has the pure gold coins?


----------



## davesweep (Nov 22, 2012)

Label the bags 1 through 10.

Take 1 coin from bag 1, 2 coins from bag 2 etc, and weigh them all.

If all the coins were fake, the total would be 55lbs.  However, as some coins are real, the total will be greater. If it's 1oz over, bag 1 is real, if it's 2oz over, bag 2 is real, etc.


----------



## chuckchuckit (Nov 22, 2012)

You got it Dave. That's the only solution I have come up with too.

I like this kind of puzzle, as trying to figure it out reminds me of some VBA programming projects I can't quite figure the solution to yet, but figure there has to be a way to do it.

Some can best be figured by eliminating the extremes first. Such as; if there were only 2 bags, the solution would be easy. But if it can be solved for 3 bags the solution is the same for 10.


----------



## Firefly2012 (Nov 22, 2012)

Nice solution Dave


----------



## xenou (Nov 22, 2012)

Good one.  I though of putting all ten bags on the scale and sneaking a look at the weight as I take them off.  That may be a loose definition of using the scale once of course


----------



## chuckchuckit (Nov 22, 2012)

xenou said:


> Good one.  I though of putting all ten bags on the scale and sneaking a look at the weight as I take them off.  That may be a loose definition of using the scale once of course


lol - Depending upon the type of scale, that certainly might be another way... Unless the scale is like one of those newer parking meters that can see when the car has left, and then resets any time left on the meter back to zero.


----------



## xenou (Nov 24, 2012)

^^ A complete travesty, btw.  If I pay for the parking why should the city care that I let someone else have the last 15 minutes?  I also realized that the simpler version of my solution is to watch the total as you put the bags on the scale to "weigh all ten" ... hehe.


----------



## chuckchuckit (Nov 25, 2012)

Yep. As much as I like working with pure logic and it's creativity thru coding etc, real world is not always so binary. May sometimes require common sense thinking for the best results.

I heard this puzzle many decades ago on a TV detective show called Columbo I think it was (we don't watch TV anymore - got rid of our TV's years ago). Had till end of the show to figure it out.

Later today my wife and I are going to San Francisco for dinner - nice place to visit. So many steep streets and pacific ocean and bay right there too. Finding street parking is always a challenge even on weekends. Starting in January SF decided they will start enforcing parking meters 7 days a week. Perhaps lack of common sense in many past decisions has led to the binary decision about that...


----------



## Gerald Higgins (Nov 26, 2012)

Just a thought.

If the question is "Which sack holds the pure gold coins?" then Davesweep's suggestion will let you answer that.
But if the question is put slightly differently - "How can you separate the pure gold coins from the fakes ?" then Davesweep's suggestion won't necessarily do it, without some refinement.
If you simply place quantities of coins in the scale as suggested, you will be able to identify which sack holds the pure gold coins. But you may be left with a pile of indistinguishable coins on the scale, which contains a quantity of pure gold coins. You will know what that quantity is, but you won't necessarily know exactly which of the coins on the scale are pure. 

To unambiguously do that, you need to know which coins came from which bag. 
Labelling all the coins would be one way, if you're allowed to do that. 
Another way would be to put the coins onto the scale in a pattern - for example, a vertical stack of coins, with one from sack 1 on the bottom, all the way up to 10 from sack 10 on the top. 
Or, keep the coins in individual piles of coins from each sack.

I make this point because I think it's a good example of user requirements often being open to interpretation.


----------



## chuckchuckit (Nov 26, 2012)

Gerald, Yes Davesweep did a good job figuring out the answer and stating the answer very clearly for others to understand.

Your interesting comments about perhaps ending up with "mixed coins" on the scale does point to a need to also keep the "bigger picture" in mind. What we do may certainly affect situations beyond just our current actions, as one pursues forward.

I  have had a machinery repair business for decades, and the machines I do not like working on the most are by far the ones that "The engineers tried to fix first!". Finding out what makes it tick, might not fix it... Without good engineering of course we won't have good products, but one current mindset or learned area of expertise may not be the best approach to resolving the current required task. Especially if we lose track of what the end result of our actions might involve.


----------



## Jonmo1 (Nov 28, 2012)

The rules don't say you must actually use the scale.

If there are 100 coins in each bag, then the bag with the gold is 6.25 Pounds heavier than the rest.
You could tell the difference by simply lifting each bag and choosing which one is heavier.


----------



## Wookiee (Nov 28, 2012)

chuckchuckit said:


> Yep. As much as I like working with pure logic and it's creativity thru coding etc, real world is not always so binary. May sometimes require common sense thinking for the best results.



My first thought when seeing the original post was: I love logic puzzles, but what's that doing in an Excel forum? But after reading through the thread, I think it is a great way to illustrate principles used in VBA coding. 

I've found that coding automated tasks in VBA is not nearly as difficult as predicting all the ways in which the code might go south and trying to include error handling for each possible scenario.


----------



## Joe4 (Nov 29, 2012)

> I love logic puzzles, but what's that doing in an Excel forum?


That is why it is posted to the "Lounge" instead of the "Excel Questions" forum. 
(note the description of the "Lounge" forum).


----------



## Wookiee (Nov 29, 2012)

Joe4 said:


> That is why it is posted to the "Lounge" instead of the "Excel Questions" forum.



Thanks for explaining. That was my first post and I had arrived at that thread via the "Search New Posts" link at the top of the site. I'll keep that in mind next time.


----------



## Joe4 (Nov 29, 2012)

> Thanks for explaining. That was my first post and I had arrived at that thread via the "Search New Posts" link at the top of the site. I'll keep that in mind next time.


No worries.  That Search functionality has tripped up many a veteran member too, in that many have responded to Access questions with Excel answers (not realizing that the question is actually in the Access forum, not the Excel forum).

BTW, welcome aboard!  Hope you find this site useful!


----------



## dfida (Nov 29, 2012)

Gerald Higgins said:


> But if the question is put slightly differently - "How can you separate the pure gold coins from the fakes ?" then Davesweep's suggestion won't necessarily do it, without some refinement.




I am not sure if this qualifies as "using the scale only once", but let's say it's one of those old-time scales where you put weights on one side and the thing you want to weigh on the other side. In this case, instead of using weights, you put 5 bags on one side and 5 bags on the other side.

The side with the real gold will be heavier, and will dip down. Then you proceed to remove one bag from each side. When you remove the real-gold bag, the scale will balance. Now you know which bag has the gold.


----------



## chuckchuckit (Nov 30, 2012)

Wookiee said:


> I've found that coding automated tasks in VBA is not nearly as difficult as predicting all the ways in which the code might go south and trying to include error handling for each possible scenario.


Welcome to the board Wookiee.

Ah yes, that can be the longer term end result of good code = less bugs etc. Then there is often that tradeoff between getting the job completed (Production) -vs- doing the extra time and effort especially in places needed where no one may ever notice right away (Quality).

It can be difficult enough to just learn something new (I'm still somewhat new to VBA). But if the mindset starts off as "Just do what looks good or gets instant results (Production)", then the resulting lower quality and bigger problems will eventually show up later. If that mindset happens a lot or becomes accepted as status quo, then a lot of other things too can be affected and start going downhill, and then become not so easy to fix later. Like it is said - "An ounce of prevention is worth a pound of cure."

Sometimes takes some unhurried thought before even starting some things, to figure the realistic balance in any tradeoff (such as: Production/Quality).


----------



## Err (Dec 3, 2012)

There is also no rule about how many gold sacks you can take. Why not take them all?

Even the fake gold coins have a value (it is assumed) so take them all.


----------

