# Mixed up Lego Bricks – Part II

12 Red lego bricks, 16 blue lego bricks  and 18 yellow lego bricks are all mixed up in a drawer.  All the bricks are completely alike except for their colors.  The room is in total darkness, and you want two matching bricks.

You start pulling out bricks from the drawer, one at a time. What is the fewest number of bricks that you would need to take out of the drawer in order to be certain that you have a pair that match?

For solution, click below

Solution :

Suppose you draw out three bricks out of the drawer, there is a slight chance that you might get a pair in 2 or 3 draws. For example, you pick out 2 red bricks in first two draws or you picked 1 red brick in your first draw, 1 yellow in your second draw and a red brick in your third draw and you found a match.

But, it is very much possible that you don’t have a pair after 3 draws, ie you have 1 red,1 blue and 1 yellow brick. In your fourth draw, you are going to pick either a red or a blue or a yellow brick, which is guaranteed to create a match.

So, the answer is : We need to take out 4 bricks in order to guarantee a pair that match.