wood burning stoves 2.0*
The moose likes Programming Diversions and the fly likes More scales Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "More scales" Watch "More scales" New topic
Author

More scales

Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
This was on Car Talk last Saturday ...

You have 7 stacks of 100 coins each - total 700 coins. Each stack is either all genuine at 10 grams per coin (1000 per stack) or all fake at 9 grams per coin (900 per stack).

You have a scale that can measure to 0.1 grams accuracy. You don't compare two sets of coins; you just weigh one set and get a number.

How do you find which stacks (zero, some or all) are fake in the fewest weighings? And the hint Ray gave, why is the answer "one"?


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Nick George
Ranch Hand

Joined: Apr 04, 2004
Posts: 815
measure take out 2^n coins from each pile, where n is the pile (i.e. 1 from first pile, 2 from second, 4 from third, etc.) If I'm not mistaken, that should lead to unique numbers. (A bit of handwaving to ward off proof-seekers)
[ May 21, 2004: Message edited by: Joseph George ]

I've heard it takes forever to grow a woman from the ground
Nick George
Ranch Hand

Joined: Apr 04, 2004
Posts: 815
so what's the ruling, Stan?
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Oh, sorry, I thought that one was too easy since first answer was good. Can't fool computer geeks with powers of 2

We had an office in NYC with push button combo locks on the bathroom doors. The men's room combo was 1-2-4-8 and I always thought some geek set that up. Easy to remember tho.
 
 
subject: More scales
 
Similar Threads
six coins
Solve this puzzle.
Coin Stack Puzzle
The Machine Game
Another puzzle of the night