Three mislabeled jars is a classic riddle that goes as follows:
Given three mislabeled jars, where one jar has apples, another has oranges, and the third has a mix of apples and oranges. To correctly label each jar, you can extract fruits from them. What’s the minimum number of fruits you need to extract from each jar to properly label them?
Three Mislabeled Jars solution
To correctly label each jar, you can extract fruits from them. Here’s a step-by-step approach to identifying the correct labels using the minimum number of fruit extractions:
- Identify the jar labeled “apple and orange.”
- Take a fruit from this jar and determine if it is an apple or an orange.
- Relabel the jar based on the fruit found in step 2 (i.e. if the fruit is an apple, label the jar as “apples”).
- Since the jar previously labeled as “apple and orange” has been relabeled as either “apples” or “oranges,” the jar that was originally labeled as “oranges” must actually be the “apple and orange” jar. Relabel it accordingly.
- The jar that has not yet been identified must contain the remaining type of fruit.
- Check all labels to ensure they are correct.