After figuring out the
Trickier pearls problem you've just realized something. Being a pearl expert you know there are two types of oysters which each produce pearls exactly the same in every aspect except for weight. The pearls produced by the blue oysters weigh 10 grams and the ones produced by the black oysters weigh 11 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 or all blue oyster pearls. You have to find out which bags contain which kinds of pearls in the least amount of weighings possible. Assume every bag of pearls has an infinite amount of pearls.