Three closed boxes have either white marbles, black marbles or both, and they are labeled white, black and both. However, all three boxes are mislabeled. You may reach into one of the boxes and pull out only one marble.
Which box should you remove a marble from to determine the contents of all three boxes?
The one labeled both. Since you know that the box is labeled incorrectly, it must have all black marbles or all white marbles.
If a black marble comes out, you know that has to be the black marbles box, so you put the “black” label on it. The box labelled “white” must then be labelled “both” because you know it is also labeled incorrectly, and therefore can’t be white.
You would label the last box “white” because that is the only color/box combo left. If the first marble you pulled out from the box labeled “both” is a white marble, then you solve the problem in the same general way.