Sep 5, 2012

Cool logic puzzle. Four apple eaters who also write music. Solution explained.


A. The problem


Four infinitely intelligent composers, Amadeus, Bach, Chopin, and Dvorak, ate a total of eleven apples. Everyone knows that each person ate at least one apple, but no one knows exactly how many apples the others ate.

Amadeus: Bach, did you eat more apples than I did?
Bach: I don’t know. Chopin, did you eat more apples than I did?
Chopin: I don’t know.

After listening to this conversation, Dvorak could figure out exactly how many apples each person ate. How many apples did Dvorak eat?


B. The solution


Perplexed? So was I, at least initially. Given the specificity of the answer that the question demands, the information we are provided with appears to be little more useful than no information at all. In logic problems like this, every word counts. Failing to notice seemingly insignificant parts of the problem can cause a difference between frustration and the thrill of victory, as we will see in a bit.

I unfortunately do not know who designed this problem. It was listed in Korean puzzlist Poo-Sung Park’s book titled Fun Math Puzzles for the Gifted II (재미있는 영재들의 수학퍼즐 2), but the author does not mention whether he created it by himself or adapted it from someone else. Regardless of who initially thought of it, I think I deserve some credit for coming up with better names than the original A, B, C, and D.

Solving this one requires the ability to empathize. You will have to read the minds of the four individuals in order to find out what information each of them has and what he is unaware of. Let’s start with Mozart.


(a) Amadeus


What do we know about (Wolfgang) Amadeus (Mozart)? In addition to the fact that he wrote The Marriage of Figaro, we also know that the maximum number of apples he could have eaten is 8. As the question states, each person ate at least one apple, and if Amadeus had eaten nine or more apples, at least one of the others would have been left without an apple. The same goes for the other three.

There are other possibilities we can eliminate. 5, 6, and 7 are out as well. Too see why these numbers are impossible, let’s say Amadeus ate five apples. Also suppose Bach ate more apples than Amadeus did—say six apples. Combined, that’s already eleven, the total number of apples the four of them ate. That leaves no room for the other two. In other words, if Amadeus ate five apples, he would know that Bach could not have eaten more apples than he did. So he wouldn’t have asked such a meaningless question.

Initially, the numbers of apples Amadeus could have eaten were 1, 2, 3, 4, 5, 6, 7, and 8, but since we have just crossed out 5, 6, 7, and 8, only 1, 2, 3, and 4 remain.


(b) Bach


Remember that we are assuming Bach is at least as smart as we are—he is infinitely intelligent. In other words, Bach knows everything we know about Amadeus so far. To the question of whether he ate more apples than Amadeus did, Bach replied that he didn’t know. We will try to think of the situations in which he could have known, and then eliminate those situations.

Let’s first hypothesize that Bach ate five or more apples. Bach knows that Amadeus ate four or fewer apples. Knowing the he himself ate five or more, he would have been able to answer Amadeus’s question with confidence, which he didn’t. Thus the hypothesis fails—Bach also ate four or fewer apples.

Moreover, Bach did  not eat just one apple, because then he would have known that no one ate fewer apples than he did. He would have said no to Amadeus’s question.

The possible numbers of apples that Bach could have eaten, therefore, are 2, 3, and 4.


(c) Chopin


So far, we know that Amadeus and Bach both ate four or fewer apples. Bach in particular could only have eaten either two, three, or four apples. If we could figure that out, so can Chopin.

The important part is that with all this information, Chopin still doesn’t know whether he ate more apples than Bach did. The same logic that we used for Bach applies here as well. If Chopin had eaten five or more apples, he would have answered yes to Bach’s question. So he, too, ate four or fewer apples.

If he had eaten one or two apples, on the other hand, he would have known that he did not eat more apples than Bach did, and therefore would have said no to Bach's question. We can cross out 1 and 2 as well, and now we are left with 3 and 4. Either three or four apples for Chopin.


(d) Dvorak


Dvorak has all the information that we have so far. He knows that the possible scenarios are as follows:

Amadeus: one, two, three, or four apples
Bach; two, three, or four apples
Chopin: three or four apples

Could Dvorak have eaten one apple?

No. He would have no clue at the end. The possible combinations include [A-4, B-3, C-3, D-1] and [A-3, B-4, C-3, D-1] and many others, all of which could totally be true. It would be impossible for Dvorak to find out which one is the correct combination.

What if Dvorak ate two apples? Three? Four?

Again, numerous possible combinations appear. Four example, suppose Dvorak ate three apples. [A-2, B-2, C-4, D-3] and [A-1, B-3, C-4, D-3] both work. Unless we are assuming that the narrator in this problem sometimes lies, Dvorak would not have been able to figure out the correct combination had he eaten two, three, or four apples.

Five apples?

Let’s save this until the end, because this is the correct answer.

Six or more?

Impossible. The least number of apples Chopin could have eaten is 3. Add that to 6 and we get 9. Even if we assume that Amadeus and Bach ate the minimal number of apples they could have eaten (1 and 2, respectively), the total would be 12, which exceeds 11.

Back to five apples.

Pretend you’re Dvorak. You have enough information to find out how many apples Chopin ate. Definitely not four apples, because then the total number of apples they ate as a group would always exceed 11. Hence we know that Chopin ate three apples. In fact, the only possible combination that can add up to 11 is [A-1, B-2, C-3, D-5].

Now we have the answer. Dvorak ate five apples.


C. For those who have better things to do than read this entire post


I can say with some confidence that my explanation is the easiest way to understand this problem, but it is clearly not the most efficient approach. Poo-Sung Park’s explanation is much simpler and more mathematical. Below is a rough Korean-to-English translation of his solution—think of it as a short summary of what I have above. Remember that instead of the cute names that I used, he simply uses A, B, C, and D.


From the fact that B didn’t know the answer to A’s question, we know that B ate more than one apple. In other words, s/he ate at least two apples.

Since C also didn’t know the answer to B’s question, the number of apples C ate has to be more than 2. In other words, C ate at least three apples.

Thus, the total number of apples that A, B, and C ate is at least 6 = 1 + 2 + 3. This means that the number of apples D could have eaten cannot exceed 5.

If D had eaten four apples, A, B, and C would have had to share the remaining seven apples. In this case, it would have been impossible for D to know exactly how many apples each person ate.

So the only scenario in which D could have known the exact numbers of apples each person ate would be that D ate five apples and A, B, and C ate one, two, and three apples, respectively.

No comments:

Post a Comment