# Fruit boxes

From Math Puzzle Wiki

Here is a puzzle I saw on the Maths is Fun website.

## Puzzle

You are on an island and there are three crates of fruit that have washed up in front of you. One crate contains only apples. One crate contains only oranges. The other crate contains both apples and oranges.

Each crate is labeled. One reads "apples", one reads "oranges", and one reads "apples and oranges". You know that NONE of the crates have been labeled correctly - they are all wrong.

If you can only take out and look at just one of the pieces of fruit from just one of the crates, how can you label ALL of the crates correctly?

## Help

**Hint**

The problem, of course, is that if you pick a piece of fruit and it happens to be an apple, how can you know if it came from the apple box or the box containing both? Figure that out, and you are mostly done.

**Answer**

Pick a fruit out of the box labeled "apples and oranges." Say you get an apple. That box has all apples, the box labeled apples has all oranges, and the box labeled oranges has both fruits.

**Solution**

The key here is that you know all the boxes are labeled incorrectly. So the "apples and oranges" box contains just a single kind of fruit. Picking from that box tells you what the fruit is. Once you know which kind of fruit it is, you just need to determine the labels for the other two boxes. Without loss of generality, suppose the "apples and oranges" box contains apples. Then you have the "apples" and "oranges" boxes left. They each contain either just oranges or both apples and oranges. But since we know the labels are wrong, the "oranges" box cannot contain just oranges, so it must contain both. This leaves the box labeled "apples" as the only box which can contain just oranges.

## References

Maths is Fun - math and logic puzzles appropriate for math education.