Without looking it up, you have three jars that are all mislabeled. one contains peanut butter jelly beans, another grape jelly jelly beans, and the third has a mix of both (not necessarily a 50/50 mix, could be a 1/99 mix or a 399/22 mix). how many jelly beans would you have to pull out, and out of which jars, to find out how to fix the labels on the jars?
Looks like after you identify the first correct jar, you keep pulling beans out of one of the other jars until: 1) you find a different color, or 2) the jar is empty. Doesn’t seem like there is a shorter way…
Gonna have to agree with Ohai on this. If one has a 499/1 mix, you’d essentially have to drain one of the two jars that matched on the first pull to know for sure which you were dealing with.
Are all the jars mislabeld? If they’re intentionally mislabeled that means the mixed jar would actually be a 1-flavor jar…
so you pull either PB or GJ bean from the labeld mixed jar, and you know that jar is actually PB, or GJ. Then you pull another bean from another jar, assume this jar is intentionally mislabled then you know its either a mixed or either PB or GJ jar…
Ok. That is a good point. If you know *all* the labels are wrong, you can actually identify all three jars with one bean pull. Here’s how:
You pull one bean from the jar labeled “mixed”. Since you know that it is not truly the “mixed” jar, the color of the bean is the color of all beans in that jar. So, one jar is identified.
Lets say you pulled a PB bean. The two remaining jars are labeled “PB” and “J”. The remaining true jars are “Mixed” and “J”. The jar labeled “J” cannot be the true J jar. So, that is the mixed jar. So, the second jar is identified.
Since there is only one jar remaining, that must be the true J jar. So, all jars are identified.
1 jelly bean from the jar that’s incorrectly labeled as ‘mixed’ jar.
If you pull out a p.b jelly bean, then thats pb jar, the ones thats labeled grape is the mixed jar (since they’'re all labeled wrong) and the one thats labeled p.b is the grape jar.
If you pull out a grape jelly bean, then thats grape jar, the ones thats labeled p.b is the mixed jar (since they’'re all labeled wrong) and the one thats labeled grape is the p.b jar.
Your’s was also wrong. Picking two from a mixed jar that has 499/1 and concluding that if two are the same then it is that type and not mixed will get you nowhere. You could potentially have to clear out the entire jar.