# Mr. Gardner's dessert

Mr. Gardner is facing the choice of dessert at his favorite restaurant The Erratic Chef. The cook tends to prepare great desserts, but is not very consistent. Mr. Gardner hates it when his choice for dessert turns out to be suboptimal. So he has kept elaborate statistics of all his past dessert experiences. This helps him each evening optimizing his chances to hit the best dessert.

The waitress reaches Mr. Gardner's table:

-- Shall I bring your apple pie?

-- Yes, if the banana pie is sold out and the choice is apple pie or cherry pie, I'll take the apple.

-- Actually there is banana pie.

-- If the choice is apple or banana, I still go for apple.

-- No sir, there is banana next to apple and cherry.

-- Oh, I see. In that case I take cherry.

Has Mr. Gardner gone nuts? Or can you think of a scenario that justifies Mr. Gardner's approach towards selecting his dessert?

• If Mr Gardner is also a theoretical physicist, then his statistics on pie quality will only apply to pies near absolute zero in a vacuum. So he'll probably still end up with the wrong one. :) – Paul Apr 12 '16 at 21:24
• There are lots of reasons. On days when the chef cooks all three, he either makes good banana, decent apple, and bad cherry, OR he makes good cherry and bad apple and banana. On days when the chef cooks only apple and banana, his apple is better. – Trenin Apr 13 '16 at 12:24

Let's suppose that there is

2/9 probability for APPLE > BANANA > CHERRY, 3/9 for BANANA > APPLE > CHERRY and 4/9 for CHERRY > APPLE > BANANA.

Then if all three pies are present cherry pie has the highest probability to be the best, but if only apple and cherry pies are left then apple pie is the best

with probability 5/9,

and if only apple and banana pies are left, apple pie is the best

with probability 6/9,

so in both cases apple pie would be the best choice.

• Are these probabiities feasible if Apple, Banana and Cherry are independent variables? – ffao Apr 12 '16 at 20:31
• @ffao I think not - apple is never the smallest, so if these were independent variables that would mean apple is always larger than cherry, which is not the case. But they don't have to be independent variables -- they are just pies. Meaning the chef decides to make apple pie the best, the banana pie second best and cherry pie the worst on average two times out of nine and so on. – ruldnes Apr 12 '16 at 20:54
• I have to say, reading some of the other answers, I feel a tad disappointed this is the one that gets the checkmark. – Tim Couwelier Apr 13 '16 at 15:07

The fruit is seasonal, thus when just apples and bananas are available, the banana is late in its season and so the apple is better . When only apple and cherry are available, the apple is better than the cherry as the cherry is only good right at the start of its season. But when all 3 are still in season cherries are at their prime and hence the best option.

A possible visual representation of the overlapping seasons, where cherries are only good right at the very start of their season and bananas are bad later in their season:

----------------------------banana----------.............................................
...........................-----------------------------apple--------------------------
...............................................-------------------cherry------------........

In a mathematical context this basically says that the probability of a dish being good is not independent of the choices offered and as such the conditional probabilities change.

If we call the events apple is best, banana is best, cherry is best A,B,C respectively. And the events A&B, A&C, B&C or A&B&C are offered D,E,F,G respectively then we might have for example:

P(A|D) = 0.9 & P(B|D) = 0.1
P(A|E) = 0.9 & P(C|E) = 0.1
P(B|F) = 0.5 & P(C|F) = 0.5
P(A|G) = 0.05 & P(B|G) = 0.05 & P(C|G) = 0.9

Which gives us the preferences as stated above

Edit: I realise I misread the original question, but have kept this answer for a slightly different scenario as I still think it is interesting.

(This is for the case A>C>B>A but C is preferred out of all 3)

We assign each pie a score based quality, on a scale of 1-10. Each pie comes in three varying qualities, and each score is equally likely to occur.

Apple (A) with scores 7,5,3 each with probability 1/3
Banana (B) with scores 8,6,1 each with probability 1/3
Cherry (C) with scores 12,4,2 each with probability 1/3

Now if only two options are available we have preferences as follows:

A&C:
- If A is 7 we prefer it to when C is 4 or 2
- If A is 5 we prefer it to when C is 4 or 2
- If A is 3 we prefer it to when C is 2
So we prefer B in 5/9 situations so given the choice between the two A is optimal

B&C:
- If C is 12 we prefer it to when B is 1, 6 or 8
- If C is 4 we prefer it to when B is 1
- If C is 2 we prefer it to when B is 1
So we prefer A in 5/9 situations so given the choice between the two C is !optimal

A&B:
- If B is 8 we prefer it to when A is 3, 5 or 7
- If B is 6 we prefer it to when A is 3 or 5
So we prefer C in 5/9 situations so given the choice between the two B is optimal

Thus we have that Banana>Apple>Cherry>Banana

Now in the question we have that on being offered apple he says he would rather have it over Cherry but not over Banana as per above. But when faced with the choice of all 3 it is optimal to pick the option with the highest expected value:

E(A)=1/3*(7+5+3) = 5
E(B)=1/3*(8+6+1) = 5
E(C)=1/3*(12+4+2) = 6

And so we choose cherry.

• "Represent the three pies with non-transitive dice Apple 10,10,4,4,2,2 Banana 3,3,5,5,7,7 & Cherry 1,1,6,6,8,8 so A>C>B>A but when all 3 are present A has the highest mean and so is best" -- in a pairwise comparison A is given to beat B, so B>A is incorrect. – Johannes Apr 12 '16 at 18:34
• A has 1/3 chance of being 10, 1/3 of being 4 and 1/3 of being 2. 10 beats all of B's roll 4, beats 3 only and 2 beats none thus the probability of A beating B is 1/3*3/3+1/3*1/3+0 = 4/9 and since there are no ties B beats A 5/9 of the time thus my reasoning stands – Scoranio Apr 12 '16 at 23:12
• Slightly misread the question so I fixed which option had the highest expected value and clarified the answer overall – Scoranio Apr 12 '16 at 23:49
• B>A is still incorrect because between apple and banana he prefers apple – ffao Apr 13 '16 at 0:20
• Mr. Gardner's decision process is rather silly in the probabilistic pie scenario. When the choices are just apple and cherry, he picks the one that's probably better without caring about expected quality. When a third option enters the picture, he suddenly uses an entirely different selection criteria and starts preferring cherry to apple, even though nothing has changed about either of those options. I much prefer the seasonal fruit scenario (which is not another interpretation of the other scenario, since the fruit qualities are correlated instead of independent). – user2357112 supports Monica Apr 13 '16 at 3:44

Mr Gardner had dinner together with his wife.

* Mr Gardner prefers BANANA > CHERRY >> APPLE.
* He knows that his wife has the same preferences BANANA > CHERRY >> APPLE

-- Yes, if the banana pie is sold out and the choice is apple pie or cherry pie, I'll take the apple.

If only one piece of APPLE and CHERRY is available, then Mr Gardner as a gentleman leaves CHERRY to his wife, and takes APPLE.

-- If the choice is apple or banana, I still go for apple.

If only one piece of APPLE and BANANA is available, then Mr Gardner as a gentleman leaves BANANA to his wife, and takes APPLE.

-- No sir, there is banana next to apple and cherry.
-- Oh, I see. In that case I take cherry.

If one piece of APPLE, BANANA, CHERRY is available, then Mr Gardner leaves BANANA to his wife (as her top preference), and hence takes his favorite remaining piece CHERRY.

• What about statistics ? he doesn't need statistics and experience to make this choice – Fabich Apr 12 '16 at 18:48
• If he were doing this on the basis of being a gentleman, he would simply let his wife order first (or perhaps ask what she wants and then order for both of them). =) – jpmc26 Apr 13 '16 at 6:00
• @jpmc26 His wive deplores the concept of a weaker gender, so Mr Gardner has to be gentlemanly without revealing this to his wive. Although I would question the assumption that there is exactly one item left of whatever pie is the best available. – Taemyr Apr 13 '16 at 10:43
• @Taemyr Neither is based on gender comparison. It's just Mr. Gardener wanting to do something nice for someone he loves. If she feels especially slighted, then just have her order for herself. – jpmc26 Apr 13 '16 at 17:25

Well, I am not sure why the following answer would not be acceptable, although it is not very interesting.

Mr. Gardner collected a lot of statistics and found out:
- No bananas often implies bad cherry => go for apples
- No cherries often implies bad banana => go for apples
- All items available often imply cherry is good => go for cherry

I believe there is something missing in your text that would make this solution wrong.

• I personally would like to see a solution of this nature. Something like: "cherry pie is made from preserved cherries, but takes a lot of time to make. Apple and Banana pie use fresh ingredients and if these are available, the chef will focus on them and not spend the necessary time on the cherry pie; however, Mr. Gardner eats late and if made fresh, they will be sold out by the time he gets there." And so forth. Therefore, upvote for this answer. – Hugh Meyers Apr 12 '16 at 18:24

Assume:

There's a few different staff members in the restaurant that take care of make the desserts. (and use A,B,C for apple, banana and cherry). Mr. Gardner being a regular, usually not dining alone there, we can assume that he's worked out which chefs can do which pies, and if they do them good.

Skills of the restaurant staff:

Cook X makes a bad pie A, a bad pie B and an good pie C.

Cook Y makes a good pie A and an bad pie B

Cook Z makes a good pie A and a bad pie C

(So there's always only one good pie option)

Questions:

-- Shall I bring your apple pie?

-- Yes, if the banana pie is sold out and the choice is apple pie or cherry pie, I'll take the apple.

If there's A and C, but no B, cook Z is on duty, so he'll want the apple pie.

-- Actually there is banana pie.

-- If the choice is apple or banana, I still go for apple.

If there's A and B, but no C, he'll go with A from cook Y.

-- No sir, there is banana next to apple and cherry.

-- Oh, I see. In that case I take cherry.

The only cook making all three pies is cook X, in which case he wants the cherry pie.

• Your first assumption seems wrong. "If there's A and C, but no B, cook Z is on duty, so he'll want the apple pie." The premise was that the banana pie is sold out meaning that there was banana pie (i.e. a chef capable of banana) existed. – Trenin Apr 13 '16 at 12:17
• Yea I struggled with that part. The thing is, Mr Gardner is the one asking about it - nowhere does the waitress imply anything is sold out. It might just be a more 'polite' way of phrasing the 'A and C but no B' scenario - to figure out if cook Y is the one on duty. – Tim Couwelier Apr 13 '16 at 15:06

They always have a lot of apple-pie, which is the best. But usually they only bake a big batch in the morning and even have leftovers from the last day. So if there are only a few customers you will likely get the stale apple-pie from the morning or from yesterday. Mr. Gardner wants fresh apple pie - but a fresh batch of apple pie is only baked if there are a lot of customers.

One type of pie being sold out is a good indication for a day with a lot of customers, so the chance is high to get a fresh baked apple-pie. If there is stale apple pie, cherry is the better choice.

They have a whole storage full of apples, but only get a few cherries and bananas from the market each day. So there is always apple pie, but banana and cherry get sold out quickly when a lot of customers order pie.

Based on Mr. Gardner's gathered statistics:

Apple pie is usually the best, and thus the most popular. So, all else equal, one would expect apple pie to sell out first. Cherry is usually the second best, followed by banana.

If banana is sold out:

Then today banana was the chef's best pie. But since it is gone, and the choice is between apple, and cherry, go with the statistical best - apple.

If cherry is sold out:

then same reasoning as when banana was sold out. Since the best is gone, go with the statistical best - apple.

If none are sold out:

Then maybe apple wasn't so great today, since it is usually the most popular, but hasn't sold out yet. So go with the pie that is statistically second best - cherry.

• It's a big leap to assume the 'best selling pie' was by definition the best pie. Not all diners have the statistical background to decide. – Tim Couwelier Apr 13 '16 at 9:52
• @TimCouwelier - I agree. If this is the answer, then the puzzle doesn't really reflect reality very well. – mbeckish Apr 13 '16 at 13:17