Shopping Shuffle

Logic Level 1

You have four boxes labeled Apples, Bananas, Carrots, and Dates. Each box is closed.

While you know all four types of food are there and each box only contains one type of food, you also know that only one of the boxes is labeled correctly. How many boxes do you need to open to be guaranteed to find out which one is labeled correctly?

1 2 3 4

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Peter Macgregor
Jan 23, 2017

You have to start somehow. Open box A. You might strike it lucky and find it is the correctly labelled box, but we have to assume the worst case scenario. Suppose it contains one of the other fruits, say (without loss of generality) fruit B. Then we know that neither A nor B are labelled correctly.

So now open box C. If it contains fruit C it is the correctly labelled box and we are done. And if it does not contain fruit C we are done as well, because box D remains as the only box which is not incorrectly labelled - and so must be the correctly labelled box.

Note.

By 'without loss of generality' I mean that the other cases (fruit C or fruit D being found in box A) are treated by the same argument, except for a trivial permutation of the letters.

Saya Suka
Jan 17, 2017

Opening 1 incorrectly labeled box will give you 2 info, that the one you did open is wrong, and another box labeling the fruit you found inside the opened one is also wrong. Opening 1 correctly labeled box will also give you 2 info, that the one you did open is right, and all the other 3 are wrong, but you would not know which way they rotate. So, it would not be enough to deduce 3 things (out of 4, but we were already told about 3 wrong and 1 correct boxes) from just 2 info. Another box need to be opened, and we can relabel all of them no matter what kind of box we'd encounter. Thus, minimum number of box to be checked is 2.

Prince Loomba
Jan 19, 2017

Let the apple box be opened. Suppose it contains bananas, then open banana box, suppose it contains dates. So we know apple,banana,date are in wrong box after opening 2. Thus carrot is in right. Now if the first or second box contained what was labelled, then also we achieved our goal.

Another case is after I open apples box to get bananas. And banana box contain apples. This case isnt possible as apple has bananas, banana has apples, so other 2 must be right or wrong simultaneously, a contradiction

Right now, you've not covered all possibilities.

For completeness, you should also explain what happens if (after open apple to get banana), we open banana and get apple.

Calvin Lin Staff - 4 years, 4 months ago

Log in to reply

This case isnt possible as apple has bananas, banana has apples, so other 2 must be right or wrong simultaneously, a contradiction

Prince Loomba - 4 years, 4 months ago

Log in to reply

That's not stated in the solution. That's why I said "For completeness ...".

I can only read what's in the solution, as opposed to what thoughts are in your mind.

If not, the solution could be "Open Apple. Read my mind. Hence answer is 2".

Calvin Lin Staff - 4 years, 4 months ago

Log in to reply

@Calvin Lin Done editting

Prince Loomba - 4 years, 4 months ago

Log in to reply

@Prince Loomba So, playing devil's advocate, how do we know that we've gotten all cases? IE Why are these the only cases that we care about?

Calvin Lin Staff - 4 years, 4 months ago

Log in to reply

@Calvin Lin Apple box contains bananas. Banana box can contain apple, carrot or dates. Covered all cases

Prince Loomba - 4 years, 4 months ago

Log in to reply

@Prince Loomba (According to me)

Prince Loomba - 4 years, 4 months ago
Terry Smith
Jan 23, 2017

If you open the box labeled apples and it's bananas, you know the box labeled bananas must be wrong. Open the carrot box. It must be carrots or the box labeled dates is right.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...