**From New Scientist #1501, 27th March 1986** [link]

Yesterday, I was presented with an unusual box containing 13 painted Easter eggs. Each egg was either red, white or blue and there was at least one egg of each colour. If I had been in a dark room, the minimum number of eggs I would have had to withdraw from the box to be certain of picking at least three eggs of the same colour was the same as the number of blue eggs in the box.

Being superstitious, I decided against leaving 13 eggs in the box and transferred a number to a black bag. This bag may not have been empty before I added the coloured eggs. If it wasn’t, then it contained one or more black eggs and nothing else. However, two things are certain. One is that if I were in a dark room, the minimum number of eggs I would now have to withdraw from the box to be sure of having at least three eggs of the same colour is the same as the number of blue eggs in the bag. The second is that the chances of picking out a white egg from the bag with one attempt are the same as the chances of picking out a white egg from the box with one attempt.

But I *am* in a dark room. Trying to deduce the contents of that black back without turning the light on and looking is keeping me awake late into the night.

How many red, white, blue and black (if any) eggs are there in the bag?

[enigma352]

### Like this:

Like Loading...

I used a constructive way of finding the minimum number of eggs that need to be chosen to be sure of getting three the same colour.

This Python 3 program runs in 140ms.

Solution:There are 2 red, 3 white, 4 blue and 3 black eggs in the bag.We start off with 2 red, 4 white and 7 blue eggs in the box (13 eggs in total as required).

The minimum number of eggs chosen unseen to guarantee three the same colour is 7 (because after 6 we can end up with 2 red, 2 white and 2 blue eggs, but the next choice guarantees three eggs the same colour), which is the same as the number of blue eggs.

2 red, 3 white and 4 blue eggs are then placed in the bag, which already contains 3 black eggs. Leaving 0 red, 1 white and 3 blue eggs in the box.

The minimum number of eggs chosen unseen from the box to guarantee three the same colour is 4 (all of them, because I have to withdraw the 3 blue eggs, and I might pick the white egg at some point), and this is the same as the number of blue eggs in the bag.

The chance of choosing a white egg from the bag is 3/12 = 1/4, and the chance of choosing a white egg from the box is 1/4.