[Math] Jar of candies: Minimum subset size to satisfy a condition

combinatorics

Here is a problem my son was trying to solve:

A bowl contains 100 pieces of candy: 48 green, 30 red, 12 yellow and 10 blue. They are all wrapped in a foil, so the color of no candy is visible. How many pieces should be picked at a minimum to ensure 15 candies of the same color are picked?

I could intuitively guess, it will take picking all the colors that do not satisfy 15 (12 yellow + 10 blue), and then picking 14 of each possible color (14 green + 14 red) and then one more to ensure 15.

For the life of me, I cannot find how to solve it mathematically, or to validate my answer. I feel it is somehow related to sampling without replacement, but my probability knowledge fails me.
What is the correct way to mathematically solve this?

Best Answer

You will need to pick 51 candies to get at least 15 of the same color. Here is the logic:

  1. 15 candies will not do as all of them can be a mix of yellow, blue, red and green.

  2. How many more should you pick?

    If you pick 20 candies there is no guarantee that they will all be the same color as you could have picked the 10 yellow and the 10 blue. Very soon you realize that picking 22 candies will still not satisfy your condition as they can be 12 yellow and 10 blue.

  3. Will picking 22 + 15 candies be enough?

    No. In the worst possible scenario you could have picked 12 yellow, 10 blue and a mix of green and red for the remaining 15 candies.

  4. So, point 3 suggests that you should pick at least 22 + 29 candies.

    That way in the worst possible scenario you would pick: 12 yellow, 10 blue (to get to 22), 14 red, 14 green, 1 candy that is either green or red (to get to the additional 29).