What's the minimum number of balls to pick to ensure at least two are of the same color? Given a bag of balls of two colors

1.1k Views Asked by At

If you have a bag of jelly beans with a large number of two different colours, what's the minimum you need to pick out to guarantee that you have at least $2$ of the same colour?

I found an answer online - "$3$, and for the general case picking $m$ with the same colour from $n$ classes you'd need: $m \cdot n + 1$".
But I don't understand the reasoning behind it. Please advise.

Thanks in advance.

1

There are 1 best solutions below

0
On BEST ANSWER

The reasoning is the following: if you have a large number of jelly beans of 2 different colours in the bag, let's say blue and red, and you draw one at random from your bag, it would be blue or red. Let's suppose to do that and to draw at first a red jelly. Then, if we draw one other jelly, two things could happen: or we are lucky and we draw an other red jelly (in this lucky case we have two jelly of the same colour, as we wanted) and we finish the "game", or we are unlucky and we draw a blue jelly. In this unlucky case, we have two jellies: one blue and one red so we must draw one other jelly, the third: if it will blue, we will have in total 2 blue jellies and one red jelly, instead if it will be red, we will have in total 2 red jellies and one blue jelly. As you see, in both of the case, the third jelly that we draw will make us have at least two jellies of the same colour, doesn't matter how many jellies are in the bag (they could be 10, 100 or infinite, you can repeat this reasoning) provided that they are divided in only two colours. We saw also that when we have to solve this type of problems we have to examine the number of trying that we have to do in the most unlucky case possible to "win".