You have four closed boxes as shown:
While you know all four types of food are inside and each box only contains one type of food, you also know that only one of the boxes is labeled correctly.
What’s the minimum number of boxes that you need to open to be guaranteed (regardless of luck) to find out which one is labeled correctly?
You will need to open a minimum of 2 boxes.
First, open the box labelled Apple; if it’s labelled correctly we’re done (though this is purely based on luck), otherwise we’ll find either bananas, carrots, or dates. In any of these cases, we know either that the boxes labelled Bananas, Carrots, or Dates must also be mislabeled.
If the first opened box has:
- bananas inside, then the box labelled Banana is incorrect and either Carrots or Dates are correct.
- carrots inside, then the box labelled Carrots is incorrect and either Banana or Dates are correct
- dates inside, then the box labelled Dates is incorrect and either Banana or Carrots are correct.
No matter the circumstance, after opening one box we can identify two remaining boxes that might be the correctly labelled box. Open either one of them. If it’s the correctly labelled box, we’ve found it. Otherwise the remaining unopened box is correctly labelled and we’ve found it. We don’t need to open it to double confirm.