A logic puzzle with a peel

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

A logic puzzle with a peel

Post by HansV »

From today's The Guardian, with a small addition for clarity.

You and your two friends Pip and Blossom are captured by an evil gang of logicians. In order to gain your freedom, the gang’s chief, Kurt, sets you this fearsome challenge:

The three of you are put in adjacent cells. In each cell is a quantity of apples. Each of you can count the number of apples in your own cell, but not in anyone else’s. You are told that each cell has at least one apple, and at most nine apples, and no two cells have the same number of apples.

The rules of the challenge are as follows: Each of you will ask Kurt a single question, which he will answer truthfully ‘Yes’ or ‘No’. Every one hears the questions and the answers. After that, he will free you only if one of you tells him the total number of apples in all the cells. Only one guess is allowed (in total, not per person).

Pip: Is the total an even number?
Kurt: No.
Blossom: Is the total a prime number?
Kurt: No


You have five apples in your cell. What question will you ask?

Answers between [spoiler]...[/spoiler] tags, please.

For bonus points: what would have been smarter questions for Pip and Blossom to ask?
Best wishes,
Hans

User avatar
StuartR
Administrator
Posts: 12577
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: A logic puzzle with a peel

Post by StuartR »

Spoiler
Only possibilities are 9, 15, and 21.
I can't think of a question that will definitively tell us which of these is right!
StuartR


User avatar
StuartR
Administrator
Posts: 12577
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: A logic puzzle with a peel

Post by StuartR »

Good questions to ask
Spoiler
Is the total more than the 6 apples in my cell? YES
Is the total more than the 4 apples in my cell? YES
Total = 15
StuartR


Becks
2StarLounger
Posts: 196
Joined: 31 Mar 2011, 03:41
Location: Perth, Western Australia

Re: A logic puzzle with a peel

Post by Becks »

Spoiler
Q: Is the total number of apples divisible without a remainder by the number of apples I have?

Inference:
Because speaker has 5 apples and only options are 9, 15 and 21.
If reply is YES then speaker knows it's 15.
If reply is NO then the options for the other two are either 1 and 3 or 7 and 9.
From the question both others can deduce speaker has either 5 or 7 (wouldn't ask question if had even number, 1 or 3 or 9)

If person B has 3 and person C has 1
Person B knows that speaker must have 5 or 7. If speaker has 7 then speaker wouldn't have asked that question because it wouldn't lead to a resolution. Therefore can deduce that speaker has 5. if 3rd person had 7 then sum would be 15 and answer would have been YES. Therefore 3rd person must have 1 and the sum is 9

If person B has 7 and person C has 9
Person B can deduce that speaker has 5 by elimination. Therefore person C must have either 3 or 9. Because answer was NO the sum must be 21

Earlier questions: Do I have have n apples? (where n is the number the person has). The answers would have to be YES
Assuming the others have their wits about them

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: A logic puzzle with a peel

Post by HansV »

Correct :thumbup:
Best wishes,
Hans

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: A logic puzzle with a peel

Post by Rudi »

:drop: :dizzy:
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: A logic puzzle with a peel

Post by HansV »

Spoiler
The easiest question to ask after those asked by Pip and Blossom is: "Is the total 15?".
If Kurt answers Yes, the total is known. Otherwise, Pip and Blossom can easily determine whether the total is 9 or 21 from their own number of apples: if it is small, the total can only be 9, and if it is large, the total can only 21.

The best questions for Pip and Blossom would have been those proposed by Becks. The protagonist would be able to calculate the total after those two questions.
Best wishes,
Hans

dasadler
5StarLounger
Posts: 889
Joined: 25 Jan 2010, 16:26
Location: Garden Grove, CA 92844 USA

Re: A logic puzzle with a peel

Post by dasadler »

:grin: Of course, this presumes Pip and blossom have logical minds.
Don

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: A logic puzzle with a peel

Post by HansV »

Yes, that is the general assumption behind all puzzles of this type.
Best wishes,
Hans

dasadler
5StarLounger
Posts: 889
Joined: 25 Jan 2010, 16:26
Location: Garden Grove, CA 92844 USA

Re: A logic puzzle with a peel

Post by dasadler »

Apparently the :grin: was insufficient to show my comment was tongue in cheek. Sorry about that.
Don

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: A logic puzzle with a peel

Post by HansV »

Sorry for misunderstanding you... :sad:
Best wishes,
Hans