Brain Teaser: Jelly Beans

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?

 | | | | | | |jar 1| |jar 2| |jar 3| | | | | | | ======= ======= ======= p.b. grape p.b./grape

At first pass, pull out a bean out of each jar. Two will be the same. The different bean will be the correct label.

And the last 2 jars…not sure.

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…

You can save one bean pull from the first step if the first two jars produce the same type of bean.

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.

Just googled it, nice one Chad.

Yea that was my line of thinking as well. Since we’re given a total random mix, there’s not much other way to know for sure.

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…

2 beans?

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.

jar 1 PB: choose two. if same, then jar 1 is actually grape, if not then it’s mixed.

in either case, switch the labels on the remaining jars and you’re done.

answer is two out of any single jar.

ahh good point. start with with mixed and you only have to pull one.

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.

is that correcT?

so yeah i agree with Ohai. Didn’t notice he had the same answer earlier.

I’m loving this! Here’s one I got during my last interview

What is the angle between the hour-hand and minute-hand of a clock at 3:15?

7.5?

30 degrees/4 = 7.5 degrees.

Here is another clock question: start with both hands at 12:00. What time do the hands cross again?

yup! Funny…my solution was so convoluted compared to yours, Ohai

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.

1.05?