After figuring out the
Trickiest Pearls problem you've recently found out that over the last few years the performance of the blue and black oysters has greatly improved so that each one of a red oyster or a gold oyster now produce pearls exactly the same with each one of a blue oyster or a black oyster in every aspect except for weight. The pearls produced by the blue oysters weigh 10 grams, black oysters weigh 11 grams, red oysters weigh 12 grams and gold oysters weigh 13 grams, and of course fake pearls weigh 9 grams.
You have 5 bags and each of them either contains all fake pearls, all black oyster pearls, all blue oyster pearls, all red oyster pearls or, gold oyster pearls. You have to find out which bags contain which kinds of pearls in the least amount of weighings possible. Assume every bag contains an infinite amount of pearls.
If it's a graduated dial scale (spring scale) rather than a balance scale lacking weights, then:
The puzzle doesn't say that each bag contains a different type of pearl, so the solution will allow for some types to be represented by more than one bag, and other types not to be present at all.
Weigh a set consisting of 1 pearl from the first bag, 5 from the second, 25 from the third, 125 from the fourth and 625 from the fifth. That's 781 pearls in all.
The set will weigh at least 781*9=7029 grams, so subtract that much from the amount weighed. Express the excess weight in base5. The units position will express the excess over 9 grams that each pearl in the first bag weighs (including the possibility of zero if that bag contains fakes). The position just to its left does the same for the second bag, etc., with digits 0,1,2,3,4 representing fake, blue, black, red and gold oysters respectively.
If we had been assured that each bag had a different type, so that all types were represented, we could have gotten by without the fifth bag, and used 625 fewer pearls in the weighing process and found the fifth bag's contents by elimination.

Posted by Charlie
on 20120608 00:11:57 