Gift Boxes

One of my kids passed along a logic problem.

Description of the gift box problem

I’m going to retype the text in the image above to make it easier to search for.


Alice has invited her friends Caroline and Susan to her home, and she has placed several boxes on the table before them. They are all perfectly logical.

  • small red box
  • medium red box
  • large black box
  • small blue box
  • large blue box

Alice tells her friends that she has placed a gift into one of the boxes, and she has privately told Caroline the colour of the box and Susan the size of the box, and they both know this. The following conversation ensues.

Caroline: I don’t know which box contains the gift, and I also know that Susan doesn’t know

Susan: I already knew before you spoke that you didn’t know which box contains the gift.

Caroline: Ah, now that you say that, it suddenly occurs to me which box must contain the gift.

Question. Which box contains the gift?


There is an odd phrasing. “They are all perfectly logical” could apply to boxes or to Alice, Caroline and Susan. I’m assuming that Alice, Caroline and Susan are perfectly logical, and that “perfectly logical” also means Alice hasn’t lied.

“Colour” is the British spelling.

Let’s figure this out.

  • Caroline knows the color of the gift box, but doesn’t know which box contains the gift.
    • The large black box does not contain the gift, otherwise Caroline would know which is the gift box. Caroline knows that the color, and we can say she knows it to be either red or blue.
  • Caroline can determine that Susan doesn’t know which box contains the gift. If Caroline knew the box was red, then Susan could possibly know the gift box size was medium.
    • We know that Caroline knows the box is blue, but doesn’t now if it’s small or large.
  • Susan could determine that Caroline didn’t know which box contained the gift based on color alone. The size Susan knows is not large. If Caroline could figure out which was the gift box on color, the large black box would contain the gift.

Caroline can determine from Susan’s statement that Susan knows the box is either medium or small.

Since the box is medium or small and blue, the small blue box contains the gift. There is no medium blue box.


I’d like to convert this to a symbolic logic expression, but I can’t figure out how to compose these statements as a tautology. For Knights and Knaves problems, you create tautologies by logically equating whatever a character says with the assertion that character is a Knight. I’m not sure that “they’re all perfectly logical” is the same as “all characters are Knights”, or how to symbolically relate the boxes to what Caroline and Susan can know.


It looks like this is a creation of Joel David Hamkins, an Oxford University professor of logic. This is a high class puzzle!


There’s a Reddit post. Redditors get the same solution I did.

I’m a little surprised this isn’t from Raymond Smullyan. His book The Lady or The Tiger has plenty of similarly phrased problems.