Donate to Remove ads

Got a credit card? use our Credit Card & Finance Calculators

Thanks to johnstevens77,Bhoddhisatva,scotia,Anonymous,Cornytiv34, for Donating to support the site

Apple logic puzzle

redsturgeon
Lemon Half
Posts: 8912
Joined: November 4th, 2016, 9:06 am
Has thanked: 1309 times
Been thanked: 3667 times

Apple logic puzzle

#97083

Postby redsturgeon » November 20th, 2017, 8:31 am

https://www.theguardian.com/science/201 ... -hard-core

This looks fun, I haven't worked it out yet.

John

redsturgeon
Lemon Half
Posts: 8912
Joined: November 4th, 2016, 9:06 am
Has thanked: 1309 times
Been thanked: 3667 times

Re: Apple logic puzzle

#97087

Postby redsturgeon » November 20th, 2017, 8:42 am

redsturgeon wrote:https://www.theguardian.com/science/2017/nov/20/can-you-solve-it-this-apple-teaser-is-hard-core

This looks fun, I haven't worked it out yet.

John


OK I think I have it now.

John

UncleEbenezer
The full Lemon
Posts: 10691
Joined: November 4th, 2016, 8:17 pm
Has thanked: 1459 times
Been thanked: 2965 times

Re: Apple logic puzzle

#97151

Postby UncleEbenezer » November 20th, 2017, 11:59 am

I think it's flawed. The formulation is ambiguous: do we have to guess the answer now (with our YesNo question), or after it?

The latter is straightforward: our question just needs to hand the solution to one of our friends. The former is hard: we have to infer that pip's and blossom's questions were ingeniously formulated to hand us the solution based on their respective holdings, from the solutions we can enumerate.

We can trivially enumerate solutions 9,15,21. If our question is to guess the exact number ("is it [n], yes or no?"), that cannot work with 9 or 21, as pip's and blossom's questions with holdings of 1 and 3 or 7 and 9 apples couldn't have disambiguated for us. I haven't figured out the various cases adding up to 15, except that pip's and blossom's holdings would have to be even for there to be a solution. And I'm pretty sure that case falls flat (hence flawed question) if the answer to blossom's question had been a Yes.

So we have to infer that our question is really leading to a fourth question (or rather, solution) that'll be coming from one of our friends, and our task is to ask a question that will hand the solution to someone. If the solution is 9 then 21 is outside our friends' solution space, and vice versa, so in either of those cases we just have to disambiguate 15 for them. And if it's 15, then a disambiguating question "is it 15?" works all the more directly.

Gengulphus
Lemon Quarter
Posts: 4255
Joined: November 4th, 2016, 1:17 am
Been thanked: 2628 times

Re: Apple logic puzzle

#97152

Postby Gengulphus » November 20th, 2017, 12:09 pm

redsturgeon wrote:https://www.theguardian.com/science/2017/nov/20/can-you-solve-it-this-apple-teaser-is-hard-core

Spoiler: What I know before hearing any answers is that the three cells contain three different numbers of apples, one of which is 5 and the others are in the range 1-9. So the total number of apples is in the range 1+2+5 = 8 to 5+8+9 = 22.

After hearing Pip's and Blossom's answers, I know that the total is an odd composite number or 1, and is in that range. There are only three possibilities, namely 9, 15 and 21.

Are all of those totals actually possible? Yes: 9 is possible if the other two cells hold 1 and 3 apples, and that's the only way it is possible. Similarly, 21 is possible if the other two cells hold 7 and 9 apples, and again that's the only possibility. Finally, 15 is possible in four ways, namely if the other two cells hold 1 and 9 apples, or 2 and 8 apples, or 3 and 7 apples, or 4 and 6 apples.

Can a yes/no question distinguish between the three different possible totals? Obviously not, so I'm apparently stuck: no question I can ask can possibly guarantee that I'm able to deduce the total. And since the puzzle doesn't actually tell me anything about Pip and Blossom's abilities as logicians, on the information given alone I cannot guarantee that either of them will be able to deduce the answer either. So strictly speaking, I cannot guarantee being set free.

However, I can try to find a question whose answer is "Yes" for one of the possible totals, allowing me to deduce the total, and "No" for the other two (or the other way around). The latter doesn't allow me to deduce the total, but if I choose the question well, it will mean that at least one (preferably both) of Pip and Blossom ought to be able to deduce it. That way, we'll only fail to be set free if neither Pip nor Blossom is a competent logician, or if only one of them is and unfortunately the other of them is the only one who ought to be able to deduce the total - and even then I have the last-resort technique of guessing one of the two possible totals randomly (Kurt has only required us to tell him the total, not to explain how we arrived at it!).

So I need to imagine what situations Pip and Blossom are facing. The answer is the same as mine, except that "one of which is 5" is replaced by "one of which is N" for N = 1, 2, 3, 4, 6, 7, 8 or 9. If one chases through the analysis of Pip's and Blossom's answers above with that change, they should have deduced the following for those various cases:

N=1: total is an odd composite number or 1, and is in the range 1+2+3 = 6 to 1+8+9 = 18, so must be 9 or 15.
N=2: total is an odd composite number or 1, and is in the range 1+2+3 = 6 to 2+8+9 = 19, so must be 9 or 15.
N=3: total is an odd composite number or 1, and is in the range 1+2+3 = 6 to 3+8+9 = 20, so must be 9 or 15.
N=4: total is an odd composite number or 1, and is in the range 1+2+4 = 7 to 4+8+9 = 21, so must be 9, 15 or 21.
N=6: total is an odd composite number or 1, and is in the range 1+2+6 = 9 to 6+8+9 = 23, so must be 9, 15 or 21.
N=7: total is an odd composite number or 1, and is in the range 1+2+7 = 10 to 7+8+9 = 24, so must be 15 or 21.
N=8: total is an odd composite number or 1, and is in the range 1+2+8 = 11 to 7+8+9 = 24, so must be 15 or 21.
N=9: total is an odd composite number or 1, and is in the range 1+2+9 = 12 to 7+8+9 = 24, so must be 15 or 21.

By this point, it's pretty clear that the question "Is the total 15?" will do the job. If the answer is "Yes", any of us should have little trouble deducing that the total is 15 ;-), and if it's "No", I can deduce that either Pip and Blossom are facing the N=1 and N=3 cases and so both of them ought to be able to deduce that the total is 9 (since it's not 15), or they're facing the N=7 and N=9 cases and so both of them ought to be able to deduce similarly that it is 21.

So we should end up being set free unless the answer is "No" and neither Pip nor Blossom is a competent logician, and even then I can get a 50% chance of being set free by waiting long enough for it to be clear they're not going to manage the deduction and then randomly guessing one of 9 and 21. And I can't do better than that - there are other conceivable approaches to the problem based on trying to work out why they asked the questions they did, but they're all dependent on an assumption that they are able to choose their questions logically!


Gengulphus

redsturgeon
Lemon Half
Posts: 8912
Joined: November 4th, 2016, 9:06 am
Has thanked: 1309 times
Been thanked: 3667 times

Re: Apple logic puzzle

#97157

Postby redsturgeon » November 20th, 2017, 12:18 pm

Gengulphus wrote:And since the puzzle doesn't actually tell me anything about Pip and Blossom's abilities as logicians,Gengulphus


From the text of the puzzle:

We can also assume that you and your friends are all perfect logicians.


John

psychodom
Posts: 28
Joined: November 7th, 2016, 8:59 am
Has thanked: 12 times
Been thanked: 3 times

Re: Apple logic puzzle

#97158

Postby psychodom » November 20th, 2017, 12:19 pm

The only solutions are 9, 15, 21
I think the 3rd question is "is the total 15?"
If yes, then that's the answer
If no, then if either Pip or Blossom have 1,2,3 then they can answer "9"
f either Pip or Blossom have 7,8,9 apples then they can answer "21"
(If either Pip or Blossom have 4 or 6 then they have insufficient information to answer, and they can't both have 4 and 6 as that would necessitate 15 as being the total)

redsturgeon
Lemon Half
Posts: 8912
Joined: November 4th, 2016, 9:06 am
Has thanked: 1309 times
Been thanked: 3667 times

Re: Apple logic puzzle

#97177

Postby redsturgeon » November 20th, 2017, 1:03 pm

Clearly much to easy for the logicians here :D

John

UncleEbenezer
The full Lemon
Posts: 10691
Joined: November 4th, 2016, 8:17 pm
Has thanked: 1459 times
Been thanked: 2965 times

Re: Apple logic puzzle

#97192

Postby UncleEbenezer » November 20th, 2017, 1:34 pm

redsturgeon wrote:Clearly much to easy for the logicians here :D

John

As so often, the hardest bit is to figure out an interpretation of the question that admits of a solution.

I'd have preferred a version where pip's and blossom's questions were themselves disambiguating, and the formulation of those questions feeds into the solution ("if blossom held [x] or [y] then the question wouldn't have worked, therefore we infer that blossom's holding is [a] or [b]"). As it stands, it's only by chance that the answer to blossom's question was a No. Seems our blossom isn't really the perfect logician to have asked that question.

Unless there's a solution none of us have seen to the hard problem I posited?

Or indeed, unless pip and blossom are working with the additional information: this is a logic puzzle and you are guaranteed that it is solveable on information you have.

redsturgeon
Lemon Half
Posts: 8912
Joined: November 4th, 2016, 9:06 am
Has thanked: 1309 times
Been thanked: 3667 times

Re: Apple logic puzzle

#97199

Postby redsturgeon » November 20th, 2017, 1:40 pm

UncleEbenezer wrote: As it stands, it's only by chance that the answer to blossom's question was a No. Seems our blossom isn't really the perfect logician to have asked that question.


But if the answer to that question had been "yes" then it is still solved...or am I missing what you mean?

John

UncleEbenezer
The full Lemon
Posts: 10691
Joined: November 4th, 2016, 8:17 pm
Has thanked: 1459 times
Been thanked: 2965 times

Re: Apple logic puzzle

#97212

Postby UncleEbenezer » November 20th, 2017, 2:19 pm

redsturgeon wrote:
UncleEbenezer wrote: As it stands, it's only by chance that the answer to blossom's question was a No. Seems our blossom isn't really the perfect logician to have asked that question.


But if the answer to that question had been "yes" then it is still solved...or am I missing what you mean?

John

If the answer to blossom were Yes (it is a prime) then your solution space is 11,13,17,19. There has to be a solution to that for the question to have been a good one. Though the solution space for blossom would be reduced on a holding of 1 or 9.

Or indeed pip's question. I wonder if an optimal first question might've sorted out those primes? Not knowing it's odd, we'd have had to formulate "is either the number itself or (27-[n]) a prime"? I haven't thought through how one's own holding should feed into the question.

Gengulphus
Lemon Quarter
Posts: 4255
Joined: November 4th, 2016, 1:17 am
Been thanked: 2628 times

Re: Apple logic puzzle

#97235

Postby Gengulphus » November 20th, 2017, 3:20 pm

redsturgeon wrote:
Gengulphus wrote:And since the puzzle doesn't actually tell me anything about Pip and Blossom's abilities as logicians,Gengulphus


From the text of the puzzle:

We can also assume that you and your friends are all perfect logicians.

Hmm... You're right that it's there in the article and yes, I missed it.

But when the puzzle comes to an apparent end with "What question will you ask?" followed by stuff about why the author likes the puzzle, which is clearly discussion about the puzzle rather than part of the puzzle, I think it's rather questionable whether anything later is in the text of the puzzle!

Gengulphus

Gengulphus
Lemon Quarter
Posts: 4255
Joined: November 4th, 2016, 1:17 am
Been thanked: 2628 times

Re: Apple logic puzzle

#97246

Postby Gengulphus » November 20th, 2017, 4:04 pm

UncleEbenezer wrote:We can trivially enumerate solutions 9,15,21. If our question is to guess the exact number ("is it [n], yes or no?"), that cannot work with 9 or 21, as pip's and blossom's questions with holdings of 1 and 3 or 7 and 9 apples couldn't have disambiguated for us. I haven't figured out the various cases adding up to 15, except that pip's and blossom's holdings would have to be even for there to be a solution. And I'm pretty sure that case falls flat (hence flawed question) if the answer to blossom's question had been a Yes.

It wasn't - the puzzle states that the answer to Blossom's question was "No". If your solution has to cater for the possibility that it was "Yes", it also has to cater for other facts being other than as stated in the puzzle - e.g. the answer to Pip's question being "Yes" (which would make Blossom's question a rather silly one, since no even number > 2 is prime), or the maximum number of apples in a room being 90 rather than 9, or Kurt's answers not being truthful, or endless other possibilities...

In short, it's a standard convention of puzzles that the facts are as stated and not otherwise. (Unless of course overridden by some statement such as "One of the following clues is a red herring planted by the criminal", but that doesn't apply here.)

Gengulphus

UncleEbenezer
The full Lemon
Posts: 10691
Joined: November 4th, 2016, 8:17 pm
Has thanked: 1459 times
Been thanked: 2965 times

Re: Apple logic puzzle

#97266

Postby UncleEbenezer » November 20th, 2017, 5:09 pm

Gengulphus wrote:It wasn't - the puzzle states that the answer to Blossom's question was "No".
Gengulphus

I know.

However, it also tells us they're perfect logicians.

From that, we can infer that if there are three questions that can reliably solve the problem for all allowable triplets, they will ask those questions.

We've solved an easy problem: eliminate all entropy with one question, based on information we already have. But the captives were collectively set a harder problem. They should not have relied on luck in the answer to the second question. That they have done so belies their logical prowess.
If your solution has to cater for the possibility that it was "Yes", it also has to cater for other facts being other than as stated in the puzzle - e.g. the answer to Pip's question being "Yes" (which would make Blossom's question a rather silly one, since no even number > 2 is prime)

Red herring there. Of course if it's even then an equivalent second question becomes "is (27-n) prime"? The whole point is, an optimal solution to the captives' problem has to consider all three questions. This means there is at least potential to infer more information: "If pip's number had property X then pip's question would have been sub-optimal, therefore pip's question tells us pip's number doesn't have property X".

After all, it's a problem about apples, and computers are good at complex enumerations!

Gengulphus
Lemon Quarter
Posts: 4255
Joined: November 4th, 2016, 1:17 am
Been thanked: 2628 times

Re: Apple logic puzzle

#97387

Postby Gengulphus » November 20th, 2017, 11:38 pm

UncleEbenezer wrote:However, it also tells us they're perfect logicians.

From that, we can infer that if there are three questions that can reliably solve the problem for all allowable triplets, they will ask those questions.

OK, now understood. But what you're saying is (somewhat loosely) that if there is at least one set of three questions that can reliably solve the problem for all allowable triplets, and if the two questions asked do not form the first two of such a set of three questions, then the puzzle is inconsistent - at least one of the statement of Pip's first question, the statement of Blossom's first question, and the statement about being perfect logicians must be incorrect. A fair point, though of course both of those preconditions need to be established to be true before one can actually know that the puzzle is inconsistent.

I say "somewhat loosely" because somewhat less loosely, there are actually seven questions involved: Pip's question, Blossom's two questions, one for each possible answer to Pip's question, and your four questions, one for each combination of answers to Pip's question and the appropriate one of Blossom's questions. And less loosely still, each person's question can also depend on how many apples they see, so there are potentially 9 questions that Pip could ask, 9*2*8 = 144 questions Blossom could ask depending on what question Pip asks, what the answer is and how many apples she can see in her room, and similarly 144*2*7 = 2016 questions you could ask! And to finish the tightening up, one has to somehow forbid questions that convey information in code, otherwise 'cheating' solutions exist along the lines of "Each person asks 'Is the total 10+n?', where n is the number of apples they can see. Everyone ignores the answers to the questions, and instead works out the value of n for each question asked and adds the resulting three values of n together."

UncleEbenezer wrote:After all, it's a problem about apples, and computers are good at complex enumerations!

They are, but enumerating all N^2169 combinations of 9+144+2016 = 2169 questions, each of which can be any of a large number N of possible questions, goes well beyond what they're currently capable of!

Gengulphus

psychodom
Posts: 28
Joined: November 7th, 2016, 8:59 am
Has thanked: 12 times
Been thanked: 3 times

Re: Apple logic puzzle

#97427

Postby psychodom » November 21st, 2017, 8:45 am

The Guardian have provided an update with their answer:

https://www.theguardian.com/science/201 ... -hard-core

Solution: The question you should ask is: “Is the total 15?”

Which at least tallies with discussion here.

-Dom


Return to “Games, Puzzles and Riddles”

Who is online

Users browsing this forum: No registered users and 3 guests