Why do I only have to pick $21$ beads?

871 Views Asked by At

I recently read this problem

A bag contains $500$ beads, each of the same size, but in $5$ different colors. Suppose there are $100$ beads of each color and I am blindfolded. What is the least number of beads I must pick before I can be sure there are $5$ beads of the same color among the beads I have picked blindfolded?

My intuitive answer was $401$, because the worst case would be picking $100$ beads of $4$ of the colors, then picking $1$ of the last remaning color. However, the given answer was $21$. Could someone explain how this answer was achieved?

3

There are 3 best solutions below

0
On BEST ANSWER

You probably read the question wrong. You need $5$ beads of the same color. This means you can get $4$ beads of each color maximum to not-have $5$ beads that are the same color (which is $20$ beads) and then the next one makes sure you have $5$ beads of the same color (that was the $21$st bead).

0
On

Your answer is the number of beads you would have to pick to be sure there was at least one of each color. But that's not the question. You just want there to be one color such that there are at least 5 beads in that color. So 21 beads will do, since it's greater than (4 beads)*(5 colors) = 20.

0
On

You have $5$ colors, and the worst possible scenario is picking $4$ of each color before you pick a fifth of one color. So you can get $20$ beads before you get the fifth of at least one of the colors. Does this make sense?