Which cupcake?

Logic Level 2

You are offered two cupcakes. One is poisoned and the other is safe to eat.

You happen to be in a village full of knights (who always tell the truth) and knaves (who always lie), but you can't tell which is which by their appearance.

You ask one of them, "Which cupcake is safe to eat?" To this he makes the following two statements,

1
2
"If I were a knave, I'd say the one on the right."  
"But I'd say the one on the left, if I were a knight."

Which cupcake is safe to eat?

Assumption : The person you ask knows which cupcake is which.

The one on the left The one on the right You can't tell

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.

14 solutions

Geoff Pilling
May 25, 2017

If he is a knight, the two statements would be consistent with the cupcake on the left being the non-poisoned one.

However, if he is a knave, according to propositional logic the second statement will always be true, which, of course, would contradict the knave's behavior which is to always lie.

Therefore, he must be a knight, and the good cupcake must be the one on the left \boxed{\text{the one on the left}}

Moderator note:

To clarify:

An if-then statement is false ONLY in the case where the hypothesis is true and the conclusion is false.

A false hypothesis indicates the if-then statement is TRUE.

"If I were a knave, I'd say the one on the right. But I'd say the one on the left, if I were a knight."

With "If I were a knave, I'd say the one on the right" the hypothesis is "I were a knave" and the conclusion is "I'd say the one on the right."

With "I'd say the one on the left, if I were a knight." the hypothesis is "I were a knight" and the conclusion is "I'd say the one on the left."

Because they must be either a knight or a knave, ONE of the hypotheses must be false. That indicates at least one of the if-then statements must be true, and the only type that can make a true statement is a knight.

Let's consider what happens if the cupcake on the right is safe, and the person is a knave.
The knave knows that a knave would say the left is safe and that a knight would say the right cupcake is safe. So the knave lies about both of these, saying that a knave would say the right cupcake is safe while the knight would say the left is safe. The knave is lying about what the knight would say. That's the ordinary understanding of this phrase. The interpretation above makes it impossible for the knave to make a claim about what a knight would say. That's a positively bizarre interpretation.

Richard Desper - 4 years ago

Log in to reply

Sorry, but I found this wording to be hopelessly confusing (the wording of the problem, not the explanation, which is true, though it should IMHO, have been clarified in the question. As phrased, it is insufficiently precise what 'lying' in the given statements means.

Don Weingarten - 2 years, 4 months ago

I definitely agree, the wording is hopelessly confusing... at best. AFAIK no formal logic rule states that an ASSUMPTION is a lie or a truth. Here the statements are assumptions; the person doesn't claim "I am a knight/knave" but says in essence: "This is what would happen if I was a knight/knave"... Whether they actually are or not should be logically irrelevant (as far as my understanding of formal logic goes).

Max Lamenace - 2 years, 4 months ago

Log in to reply

I agree I think the answer is wrong If the sentence was "...If I am a knight" then it was ok But it says "...If I were a knight"

For example: If today is Tuesday, and I ask a knight "What day is it?" - can he say "If you asked me that yesterday - I would have said Saturday"?! Of course not! And according to this question logic - the answer should be yes (because I haven't asked him yesterday) This is wrong!

Eliyahu Tauber - 1 month, 3 weeks ago

I hope I'm missing something, but I think I might've just proven the given solution wrong.

Think about it this way: -The knave always lies. -The knave basically says, "if knave, I'd say right". Because knave always lies, this means knave would actually say "left". Therefore, "right" is safe.

So if it's a knave, it must be the one on the right. If it's a knight, it must be the one on the left. Therefore, the correct answer should be "You can't tell".

Am I missing something?

Nicholas Kross - 4 years ago

Log in to reply

Yeah, there is a small subtlety in this problem that is very easy to overlook... The fact that he can't be a knave, because then logically, his second statement would be true, namely, "If I am a knight..."

Geoff Pilling - 4 years ago

Log in to reply

I think I might get it now...

If it's a knave, he says "If I AM a knave, I hereby declare right", which would be a lie, so it's left. "If I AM a knight, I hereby declare left", which would be true (see line above), SO he can't be a knave, since knaves always lie.

It's not "If I WERE", it's "If I AM", hence the confusion of me and others.

Is this right?

Nicholas Kross - 4 years ago

Log in to reply

@Nicholas Kross Yeah... Sounds correct. If I'd have been a bit more careful, I should have made it "I am" to begin with... Somehow "I were" sounded more poetic, but at the cost of a clear logic statement... :-/

Geoff Pilling - 4 years ago

Log in to reply

@Geoff Pilling

If I'd have been Well, intriguing problem! Fun and mind-expanding to think about (even when thinking incorrectly). Glad to see the wording's been fixed.

Nicholas Kross - 4 years ago

The problem statement used the language "If I were a knight." There is a difference between "if I am a knight" and "If I were a knight." Under your reasoning, the statement "If we were on the moon then we would be able to swim in the Pacific ocean," is a true statement because we are not on the moon. This is not how we use our language.

george palen - 2 years, 11 months ago

Log in to reply

@George Palen Formal logic and conversational english aren't the same. In this case, the given answer is based on the rules of formal logic, in which an "if...then" statement is true if the premise (the 'if' portion) is false.

Consider a politician who says, "if I am elected, then I will cut taxes." If he is not elected, making the premise false, then the statement is true, because it can't be proven that he would not have cut taxes.

Brian Egedy - 2 years, 11 months ago

Log in to reply

@Brian Egedy @Brian Egedy - Just to clarify: You would assert that the statement "If we were on the moon then we would be able to swim in the Pacific ocean," is a true statement?

I would agree that the statement "If we are on the moon then we are able to swim in the Pacific ocean," is a true statement, though a silly one that we would very likely only use as an example to demonstrate formal logic.

Or let us expand the context of the original problem a bit. Suppose that the knights/knaves in the problem are really originally right and left handed people (assuming that a person is either one or the other). Let us further assume that on weekdays, right handed people are knights and left handed people are knaves, and that on weekends the opposite is the case. Let us say it is Friday and the answerer in the original problem is left handed. Then the statement "But I'd say the one on the left, if I were a knight," could in fact be tested for its veracity by waiting a day.

george palen - 2 years, 11 months ago

Log in to reply

@George Palen I'm not expanding the context, I'm discussing the current one. You're picking up on a conversation that's over a year old at this point.

Brian Egedy - 2 years, 11 months ago

Log in to reply

@Brian Egedy I apologize for picking up a year old conversation. I should have read more carefully before typing. I had not seen Geoff's reply to Nicholas below but now see that it covers the same point.

george palen - 2 years, 11 months ago

@Nicholas Kross no youre exactly right the answer is just messed up lol

Rhys Denno - 3 years, 12 months ago

I have to agree with you, if the cupcake on the left is safe, then all the statements are true, no matter who said them. Since that can't happen with the knave, you must be talking to the knight.

If the cupcake on the right is safe, then all the statements are false, so you must be talking to the knave because the knight can't lie.

So there's no way to know.

Lee Hobbins - 3 years, 3 months ago

i think the same the questions is wrongly interpreted

Tucan 444 - 10 months, 1 week ago

No i found the flaw U see ""If i were a knave i would say the one on right"" is equal to "If i were a knight i would say left left"

Tucan 444 - 10 months, 1 week ago

I think this is another case where it is not clear from the problem statement exactly what it means to be a liar. Given the use of the language "If I were..." this sounds to me like a hypothetical conditional statement in which the speaker puts himself in the shoes of either a knight or knave, regardless of who he actually is. If the speaker is a knight, then he is truthfully reporting what a hypothetical knight or knave would say in that situation. However, if the speaker is a knave, then he is saying the exact opposite of what he would say if he were a knight.

Given this definition, I think the possibilities break down as follows:

safe cupcake on right, speaker is a knight:

If I were a knave, I'd say the one on the right. False hypothetical statement, inconsistent with being a knight.

If I were a knight, I'd say the one on the left. False hypothetical statement, inconsistent with being a knight.

safe cupcake on left, speaker is a knight:

If I were a knave, I'd say the one on the right. True hypothetical statement, consistent with being a knight.

If I were a knight, I'd say the one on the left. True hypothetical statement, consistent with being a knight.

safe cupcake on right, speaker is a knave:

If I were a knave, I'd say the one on the right. False hypothetical statement, consistent with being a knave

If I were a knight, I'd say the one on the left. False hypothetical statement, consistent with being a knave

safe cupcake on left, speaker is a knave:

If I were a knave, I'd say the one on the right. True hypothetical statement, inconsistent with being a knave

If I were a knight, I'd say the one on the left. True hypothetical statement, inconsistent with being a knave

So with this definition of being liar, we are either talking to a knight and the safe cupcake is on the left, or we are talking to a knave and the safe cupcake is on the right.

I think part of the problem here is that the conditional statements provided are self-referential, so there is no way to benefit from (-1) (1) = (1) (-1). Recall the classic puzzle where there are two respondents, one a knight and one a knave, and you don't which is which. You ask one of them to point to the cupcake that the other one would say is the poisoned one. Although you can't tell if the respondent is a knight or knave, you can still tell which is the poisoned cupcake.

Rel Dauts - 4 years ago

Log in to reply

Hi Rel,

Thanks for your feedback.

I'm not so sure I understand your logic though.

For example you say:

safe cupcake on right, speaker is a knight:

If I were a knave, I'd say the one on the right. False hypothetical statement, inconsistent with being a knight.

But I would argue that a false hypothetical statement would be consistent with being a knight, since the statement as a whole would be true.

Geoff Pilling - 4 years ago

Log in to reply

The way I am interpreting it, the statements are hypothetical. As such, the statement "If I were a knave, I'd say the one on the right" is false. It is false because a hypothetical knave, if asked which cupcake is poisoned, would say the one on the left (since he would in that situation make a false statement). To me your solution is mixing up two concepts: 1) the veracity of a hypothetical person's response to the question "which cupcake is safe?" and 2) the veracity of the respondents statements about what the hypothetical person's responses would be in a given situation. There are two reference frames from which we are judging veracity, not one.

Rel Dauts - 4 years ago

If I were a Knave: I would tell you that a Knave would say the one on the right, and a knight would say the one on the left as the falsehood.

If I were a Knight: I would tell you a knave would say the one on the right and a knight would say the one on the left as the truth.

Therefore since only one actual premise exists, I wouldn't eat the cupcake. I got really good at these problems, but these dilemmas still come out. There is only one statement you must negate the whole thing, not just parts of it.

Eric Belrose - 4 years ago

I disagree with this solution that the speaker must be a knight. The only way you can come to that conclusion is to assume the knave is stupid and not aware of the reputation knaves have. If the poisoned cupcake was on the left, the intelligent knave would answer in the above fashion. Each statement is false. The idea a knave couldn't say the first statement because he would be giving the correct answer is ridiculous. The knave is giving the correct answer in the context of a deception, knowing that if a person believes he is telling the truth, they will choose the poisoned cupcake. If you were to follow up with another question, "But which one is safe?" The knave would answer, "The one on the left" because it is poisoned. If the riddle had been given by the knight, he would also answer the follow-up question by saying the safe cupcake is the one on the left because it would be. Based on how this problem is written, you cannot tell which cupcake is safe without making some questionable assumptions.

Further, if, as the challenge master states, "A false hypothesis indicates the if-then statement is TRUE." I give this statement: If I am blind, the sky is orange. As I am not blind, my hypothesis is false, and I have proven the sky is orange.

Jared Fullmer - 3 years, 12 months ago

Log in to reply

Yes... I would say that according to propositional statement, this is indeed a true statement even though both components are false.

"If I am blind, the sky is orange."

Geoff Pilling - 3 years, 12 months ago

Log in to reply

If the solution rests on the premise that the village inhabitants use propositional logic to answer all questions, the knave can never use this logic without telling the truth. Therefore, he can never fully answer any question, and must either remain mute, or provide only half of the riddle. This violates the stated condition, "but you can't tell which is which." The way you have set up the solution, if he answers from both perspectives, he is a knight. The solution contradicts the parameters of the problem and is therefore invalid.

Jared Fullmer - 3 years, 11 months ago

Log in to reply

@Jared Fullmer Ah, good point... I've updated the description. Thanks!

Geoff Pilling - 3 years, 11 months ago

My thought is what if he IS a Knave and is lying about which option they would each give.

Nevan Cox - 4 years ago

Log in to reply

Problem is that if he's a knave the second statement is logically true, which contradicts him being a knave.

Geoff Pilling - 4 years ago

Would you be willing to reconsider if, through inference, Knaves lie about the fundamental behaviour of Knaves and Knights?

I have a table that shows which cupcake is non-poisoned when the truth of Knaves and Knights is turned into a lie by the Knaves.

Jonathan Quarrie - 4 years ago

Log in to reply

Cool... I'd be interested to see the truth table. My assumption was that a knave would lie about everything . If I had a flaw in my logic (I'm good at that! ;-) ) I'd love to take a look.

Geoff Pilling - 4 years ago

Log in to reply

Don't worry, I'm expecting someone to destroy my line of thinking with something I also haven't thought of, but I think it's good to get it out there and discuss it.

Here goes...


If we consider that a Knave must lie absolutely about all facts, we can infer that a Knave would describe a Knave as 'a villager that always tells the truth', and a Knight as 'a villager that always lies'.

By explicitly identifying a type of villager in their statements, we can (must?) infer a truth/lie about the implied fundamental behaviour of the stated type of villager.

With this additional logic, each statement then becomes a compound of lies and truths - With the Inferred Behaviour being either the truth or a lie, the claim to be either the truth or a lie relative to the Inferred Behaviour of the stated villager, and the claim the be the truth or a lie relative to the Actual Behaviour of the stated villager.

Any element of truth (Inferred or Actual) in a statement by a Knave renders it an invalid case. Equally, any element of a lie in a statement by a Knight renders it an invalid case.

Non-poisoned Cupcake Villager Actual Statement Inferred Statement Inferred Behaviour Validity Inferred Behaviour Claim Validity Actual Behaviour Claim Validity Absolute Validity
Right K n a v e \color{#D61F06}Knave "If I were a Knave I'd say the one on the right" "If I were a Knave, I would always tell the truth, and I'd say the one on the right is not poisoned" \color{#20A900}\checkmark "If I were a Knave, I would always tell the truth" - This is a valid lie. × \color{#D61F06}\times "and I'd say the one on the right is not poisoned" - This is an invalid truth about the Inferred Behaviour of always telling the truth. \color{#20A900}\checkmark "and I'd say the one on the right is not poisoned" - This is a valid lie about the Actual Behaviour of a Knave. × \color{#D61F06}\times
Right K n a v e \color{#D61F06}Knave "But I'd say the one on the left if I were a Knight." "If I were a Knight, I would always lie, and I'd say the one on the left is not poisoned." \color{#20A900}\checkmark "If I were a Knight, I would always lie" - This a valid lie. × \color{#D61F06}\times "and I'd say the one on the left is not poisoned." - This is an invalid truth about the Inferred Behaviour of always telling lies. \color{#20A900}\checkmark "and I'd say the one on the left is not poisoned." - This is a valid lie about the Actual Behaviour of a Knight. × \color{#D61F06}\times
Right K n i g h t \color{#20A900}Knight "If I were a Knave, I'd say the one on the right" "If I were a Knave, I would always lie, and I'd say the one on the right is not poisoned" \color{#20A900}\checkmark "If I were a Knave, I would always lie" - This is a valid truth. × \color{#D61F06}\times "and I'd say the one on the right is not poisoned" - This is an invalid lie about the Inferred Behaviour of always telling lies. × \color{#D61F06}\times "and I'd say the one on the right is not poisoned" - This is an invalid lie about the Actual Behaviour of a Knave. × \color{#D61F06}\times
Right K n i g h t \color{#20A900}Knight "But I'd say the one on the left if I were a Knight." "If I were a Knight, I would always tell the truth, and I'd say the one on the left is not poisoned." \color{#20A900}\checkmark "If I were a Knight, I would always tell the truth" - This is a valid truth. × \color{#D61F06}\times "and I'd say the one on the left is not poisoned." - This is an invalid lie about the Inferred Behaviour of always telling the truth. × \color{#D61F06}\times "and I'd say the one on the left is not poisoned." - This is an invalid lie about the Actual Behaviour of a Knight. × \color{#D61F06}\times

Because none of the above cases are entirely valid (by either being complete lies by the Knave, or the complete truth by the Knight), the Right cupcake cannot be the non-poisoned cupcake. But we can confirm this by repeating this process for cases where the Left cupcake is non-poisoned.

Non-poisoned Cupcake Villager Actual Statement Inferred Statement Inferred Behaviour Validity Inferred Behaviour Claim Validity Actual Behaviour Claim Validity Absolute Validity
Left K n a v e \color{#D61F06}Knave "If I were a Knave I'd say the one on the right" "If I were a Knave, I would always tell the truth, and I'd say the one on the right is not poisoned" \color{#20A900}\checkmark "If I were a Knave, I would always tell the truth" - This is a valid lie. \color{#20A900}\checkmark "and I'd say the one on the right is not poisoned" - This is a valid lie about the Inferred Behaviour of always telling the truth. × \color{#D61F06}\times "and I'd say the one on the right is not poisoned" - This is an invalid truth about the Actual Behaviour of a Knave. × \color{#D61F06}\times
Left K n a v e \color{#D61F06}Knave "But I'd say the one on the left if I were a Knight." "If I were a Knight, I would always lie, and I'd say the one on the left is not poisoned." \color{#20A900}\checkmark "If I were a Knight, I would always lie" - This a valid lie. \color{#20A900}\checkmark "and I'd say the one on the left is not poisoned." - This is a valid lie about the Inferred Behaviour of always telling lies. × \color{#D61F06}\times "and I'd say the one on the left is not poisoned." - This is an invalid truth about the Actual Behaviour of a Knight. × \color{#D61F06}\times
Left K n i g h t \color{#20A900}Knight "If I were a Knave, I'd say the one on the right" "If I were a Knave, I would always lie, and I'd say the one on the right is not poisoned" \color{#20A900}\checkmark "If I were a Knave, I would always lie" - This is a valid truth. \color{#20A900}\checkmark "and I'd say the one on the right is not poisoned" - This is a valid truth about the Inferred Behaviour of always telling lies. \color{#20A900}\checkmark "and I'd say the one on the right is not poisoned" - This is a valid truth about the Actual Behaviour of a Knave. \color{#20A900}\checkmark
Left K n i g h t \color{#20A900}Knight "But I'd say the one on the left if I were a Knight." "If I were a Knight, I would always tell the truth, and I'd say the one on the left is not poisoned." \color{#20A900}\checkmark "If I were a Knight, I would always tell the truth" - This is a valid truth. \color{#20A900}\checkmark "and I'd say the one on the left is not poisoned." - This is a valid truth about the Inferred Behaviour of always telling the truth. \color{#20A900}\checkmark "and I'd say the one on the left is not poisoned." - This is a valid truth about the Actual Behaviour of a Knight. \color{#20A900}\checkmark

I concluded that the Left cupcake is not poisoned. Moreover, I concluded that we're speaking to a Knight.

I think the Knave falls somewhat foul to the liar's paradox - as soon as a Knave infers that a Knave always lies, they are telling the truth.

Jonathan Quarrie - 4 years ago

Log in to reply

@Jonathan Quarrie Thanks for the write-up... Interesting perspective... Thoughts @Calvin Lin ? Is there a way we might be able to rephrase the question for clarity, without making it too complicated?

Geoff Pilling - 4 years ago

Log in to reply

@Geoff Pilling You might not need to rephrase the question. I may have based my logic on a false premise.

If I am correct, should the question be rephrased to suit the answer, or should the answer be changed to suit the question? I don't know how stuff like that works on this site. Either option seems unfair on the users that have already attempted an answer.

But let's see if the logic I used is valid first.

Jonathan Quarrie - 4 years ago

Log in to reply

@Jonathan Quarrie If we find that there is an error in the logic... No worries, the Brilliant team has a way of making sure that everyone who had the correct answer receives credit and is informed, so it will definitely end up being fair, whichever way it is decided...

All that remains now is to figure out the correct interpretations of "Knaves"... As you likely know, the concept of Knights and Knaves has been used so much in mathematics/logic that they have almost become their own "type" of logic problem in mathematics . Given that, I'd like to be true to the traditional understanding of knights and knaves.

@Pi Han Goh any thoughts?

Geoff Pilling - 4 years ago

Log in to reply

@Geoff Pilling I would like to get an official Brilliant take on this.

As it's been nearly a week without thoughts from Calvin, I'm tempted to open a report - not because I believe this problem to be wrong, but to facilitate an answer from Brilliant.

Are you happy with this approach, Geoff?

Jonathan Quarrie - 4 years ago

Log in to reply

@Jonathan Quarrie Hi Jonathan... Whatever works is fine with me... Before you write up a report though, lemme go ahead and ping @Calvin Lin again here and see if he has any thoughts... I have thought about it a bit, and when I look over other and Knights and Knaves problems I believe the logic in the original problem is consistent with the general assumptions made about knights and knaves, but it never hurts to get another opinion! :-)

Geoff Pilling - 4 years ago

Log in to reply

@Geoff Pilling I like your perspective on the problem, but I think you're adding data to it which influences your result. I feel like you're assuming that the Knave cares what the end result of his lies turns out to be.

The only question I can see is whether you treat the entire utterance as one statement or as two statements. If it's one statement, then the Knight should express the entire thing as true, and the Knave can express any part of it as a lie. If it's two statements, then the Knight should still express the entire thing as true, and the Knave must express both portions as lies.

Let's assume the right cupcake is safe.

  1. The Knight says a Knight would say Right and a Knave would say Left.
  2. The Knight says a Knight would say Right. The Knight says the Knave would say Left.

For the Knight, this utterance is unchanged, obviously.

  1. The Knave says a Knight would say Right and a Knave would say Right. (a lie about the Knave)
  2. The Knave says a Knight would say Left and a Knave would say Left. (a lie about the Knight)
  3. The Knave says a Knight would say Left and a Knave would say Right. (lies about both)

Each of these statements has a lie in it, and would meet the threshold of a Knave always lying.

  1. The Knave says a Knight would say Left. The Knave says the Knave would say Right. (two lies)

As separate statements, each must be a lie. Therefore the true statement of the Knight is turned to a lie, and the lie of the Knave is turned to a truth. The end result is indistinguishable from statement 5.

The Knave isn't concerned with the fact that "The Knave would say Right" means that the Knave would indicate the safe cupcake, because the statement itself, that a Knave would say it, is the lie.

If we mirror these statements for a left-safe cupcake, then the pattern will be the same, and statements 1, 2, 5, and 6 would be indistinguishable mirrors of each other, regardless of whether it were Knights or Knaves speaking.

It's not possible to tell, from the answer, which cupcake is safe.

Brian Egedy - 4 years ago

Log in to reply

@Brian Egedy I see that the answer has been changed to the Left cupcake, although I don't know whether my logic correctly led me to the correct answer, or whether that was incidental.

Jonathan Quarrie - 4 years ago

Log in to reply

@Jonathan Quarrie I just noticed I responded to the wrong post in my original response. My mistake.

I believe someone changed it to an incorrect answer, then. The liar's paradox has to do with recursive statements, not to general statements made by liars. There is no paradox in answering, "a Knave would say Right," even if the truth is Right, because a Knave would say Left, which is a lie, and "a Knave would say Right" is now a lie about what a Knave would say, not a lie about whether the cupcake is safe.

The lie is elevated, in this instance, to being about a statement. It's not a lie about the answer to the original question of safety.

Brian Egedy - 4 years ago

Log in to reply

@Brian Egedy I believe the problem is the use of the subjunctive mood, "If I were". In a conditional statement, the hypothesis and conclusion should be statements that are either true or false (but not both, obviously, or neither). I'm not sure "I were a knave" fits the bill. The subjunctive mood is used grammatically to discuss hypothetical situations and hypothetical conclusions. E.g. "if I were you, I'd be a purple unicorn." I wouldn't consider this a true conditional statement. However, if I say "if I AM you, then I'm a purple unicorn," then I would consider this true since the hypothesis is clearly false, and not just a rhetorical hypothesis. So if the problem is reworded to say "if I AM a knave.." and "if I AM a knight...", then I think it would be unambiguous.

Joey Hunt - 4 years ago

Log in to reply

@Joey Hunt That's the point I'm getting at. Because of the phrasing of the statement(s), these aren't conditional statements in the strict sense that would limit the Knave's ability to make them. They're plain language, and the restriction is on our interpretation, not on the statement(s) themselves. Either the question should be rephrased, or the answer should be corrected back to the original (you can't tell), but I don't see a rephrasing of the question as "correcting" it.

Brian Egedy - 4 years ago

Log in to reply

@Brian Egedy I have updated the problem to AM rather than WERE. Hopefully that helps make the question less ambiguous.

Geoff Pilling - 4 years ago

Log in to reply

@Geoff Pilling I don't think that really fixes the problem. To me there is nothing in the "actual statement" as you've written it, in either version, that implies the "inferred statement" you have in the table above.

Rel Dauts - 4 years ago

Log in to reply

@Rel Dauts That was my comment, not Geoff's. I wouldn't use it against the problem writer or the way that the answer has been changed.

Jonathan Quarrie - 4 years ago

@Joey Hunt Agreed. I've updated the question accordingly.

Geoff Pilling - 4 years ago

@Joey Hunt I agree with your assessment of the subjunctive mood. But I think it's possible for a hypothetical to be true in some contexts where the if condition is false. For example, imagine I make the following statement: "If I were named Joey, my name would have the letter J in it." This is true, even though my name is Rel and does not have a J in it.

Now imagine I say: "If I am Joey, my name has the letter J in it." I think it's a bit less clear whether this statement is true of false. Since I am not Joey, the if...then condition fails. To my logic that means we have no information about whether my name has a J in it or not. Compare that to "If I am Rel, my name has the letter R in it." The veracity of this statement seems less ambiguous.

Rel Dauts - 4 years ago

@Jonathan Quarrie If he talks to a knight, then the second part of the answer applies and the left cupcake is safe. On the other hand if a knave could give this answer, the first part applies. But a knave always lies, so if he says it's the one on the right, it must be the one on the left. But if it is the one on the left, the knave would say it is the one on the right. But if a knave answered this way, he would be telling the truth. On the other hand, if it actually is the one on the right, he would say it is the one on the left. Then by saying that he would say it is the one on the right he would be lying. Except that he is inadvertently telling the truth. Therefore, the speaker cannot be a knave.

Tom Capizzi - 4 years ago

Log in to reply

@Tom Capizzi I agree that he cannot be a knave... Good catch!

The answer has been updated accordingly.

Geoff Pilling - 4 years ago

I don't get it.

Stephen Garramone - 4 years ago

I just got an email saying the one on the left was right ><, i answered it a few days ago and all the discussions said you couldnt tell

Kevin Meyers - 4 years ago

Log in to reply

Yeah, I think all of the discussions ignored the subtlety involved when you consider whether or not an "If ... then ... " statement is true. This is counter-intuitive, and a good example of where propositional logic disagrees with the spoken language.

Geoff Pilling - 4 years ago

Log in to reply

You've made it impossible for a knave to use the language of "if..then". I think you've distorted the meaning of the question. And to my eyes, this is a question about spoken language.

Richard Desper - 4 years ago

You can not tell if the person is a knave. If a knave any statement must be a lie, so nothing he says is true, so the being a knave in the first statement must be a lie but the statement was if would also be a lie, as would be what he would say and the result would be a lie. There are so many lies that they must contradict each other.

Gary Hanson - 4 years ago

@Geoff Pilling couldn't he still be a knave? if he says "If I were a knave, I'd say the one on the right." then he could be lying and if he were a knave (which he is) he would actually say the one on the left because the one on the right was the safe one. this makes no sense.

Rhys Denno - 3 years, 12 months ago

Log in to reply

Yeah so its consistent with the first statement but not the second.... i.e. According to propositional logic, if a knave says, "If I were/am a knight, ..." then he is telling the truth. since he is not a knight.

Geoff Pilling - 3 years, 11 months ago

If I don't know who is a knight or knave, and one of my choices always lies (knaves), then I can not tell which because one could be acting as the other to create confusion.

Dominic Scalisi - 3 years, 10 months ago

Log in to reply

The good thing is that you can eliminate the possibility of him being a knave since then the "If I were a knight" statement would always be true.

Geoff Pilling - 3 years, 10 months ago

You are missing an obvious logical possibility. The person you ask may not know which cupcake is poisoned, in which case both statements are lies, and the person is a knave. Nothing in the problem states that the person questioned actually knows the answer.

Lawrence Rowswell - 3 years, 8 months ago

Log in to reply

A Knight would say he didn't know.

Brian Egedy - 3 years, 8 months ago

Ah, good point. I've clarified the problem statement.

Geoff Pilling - 3 years, 8 months ago

Most puzzles, even the ones in the logic section, don't require the application of formal logic rules; therefore, even though this is a puzzle in the logic section, I feel that it should be noted that formal logic rules apply. After all, without them, I think most people would quite reasonably feel that the statement

"If I were a knave, I would tell the truth"

is not one a truthful knight could make.

zico quintina - 3 years, 6 months ago

When a knight speaks for a knight, that is a true statement about a true statement.

True * True = True.

When a knight speaks for a knave, that is a true statement about a false statement.

True * False = False

When a knave speaks for a knight, that is a false statement about a false statement.

False * True = False

When a knave speaks for a knave, that is a false statement about a false statement.

False * False = True

I think perhaps this last line of logic is where the confusion lies. A knave, speaking on behalf of the knave, will actually say that he would tell you the truth, because that's exactly what a knave wouldn't say. Just because the answer turns out to be true, does that really mean the knave isn't lying?

Paul Crabb - 3 years, 2 months ago

Log in to reply

Read the moderator note, specifically as it applies to the knave's statement for a knight. He doesn't say, "A knight would say...", he says, "If I were a Knight, then I would say..." This means he's making an If-Then statement, which formal logic requires to have a provable premise and a provable conclusion. The premise, "If I were a knight" is false, which means the conclusion, in formal logic, is necessarily true. Because the Knave must lie, and therefore must not make a true statement, it is impossible for a knave to make any statement that begins, "If I were a Knight". So it can't be a Knave speaking.

Brian Egedy - 3 years, 1 month ago

The current solution is incorrect:

A knave must lie. Assume a knave saying that "a knave would say the one on the right" is a lie so a knave would ACTUALLY say the one on the left if forced to answer the direct question. This means the right one would be safe. Now assume the same knave says, "Were I a knight, I'd say the one on the left is safe. Because the knave MUST lie, the knight would ACTUALLY say the one on the right is safe. Logically matching the conclusion from the first statement. The one on the right is safe.

Result: if it's a knave you're talking to, you must chose the one on the right.

If it's a knight you're talking to: 1. Why would he present you with a terrible riddle like this instead of just saying "the sky is blue and the one on the left is safe" - but this is a logic problem, I get it. 2. Both statements would be true, meaning you'd have to chose the one on the left.

Conclusion should be that you can't tell.

Gustin Stamatinos - 3 years, 1 month ago

Log in to reply

You should read the moderator note. Your solution doesn't apply in formal logic.

Brian Egedy - 3 years, 1 month ago

If met Knave : statement 1 should be a lie, so right is good ; statement 2 should be lie then right is good

If met knight : statement 1 should be a truth, so left is good; statement 2 should be a truth, so left one is good

So we can't conclude by this information.

Subash CD - 3 years, 1 month ago

Log in to reply

You should read the moderator note. Your solution doesn't apply to formal logic.

Brian Egedy - 3 years, 1 month ago

It will also work if the person is a knave.The false statement is a double negative. the first statement suggests that the cupcake is on the left when the statement is true.So when the person is a knave,the first statement is false which suggests that the cupcake is on the right.When the second statement is false, it also suggests that the cupcake is on the right.

Dcc Cdx - 2 years, 11 months ago

Note on moderator note:

There is a mistake in this analysis. You say "Because they must be either a knight or a knave, ONE of the hypotheses must be false." This is incorrect. It distorts the meaning of the word "were".

"If I were a knight . . ." prompts the reader to imagine that the speaker actually was a knight. That the speaker is or is not a knight has no bearing upon the hypothetical situation that is to be imagined. This is how the word "were" is used in the English language when we are speaking hypothetically.

To say that the hypothesis in the statement "But I'd say the one on the left, if I were a knight," is false when the speaker of the statement is a knave is simply incorrect. If the word "am" were used instead of "were" then one might be able to argue otherwise. But that is not the case here.

george palen - 2 years, 11 months ago

I think this question has a fairly problematical use of ‘lie’.

I don’t think mathematical concepts of correctness can be that easily mapped on human language.

While I have no problem with the answer I feel indifferent to having it wrong.

Leon Widdershoven - 2 years, 5 months ago

This explanation doesn't make sense. I think it confuses a hypothetical with a hypothesis.

Here's how I read the actual statement:

"If I were a knave, I'd say the one on the right."

If the safe cupcake is on the right, a statement saying the right one is safe is a true statement. This equates to "If I were a Knave, I'd say a true statement", or "Knaves tell the truth" which is itself a lie. Therefore a knave would have to ​say this and a knight could not.

If the safe cupcake is on the left, a statement saying the right one is safe is a false statement. This equates to "If I were a Knave, I'd say a false statement" , or "Knaves tell lies" which is the truth. Therefore a knight would have to say this and a knave could not.

"But I'd say the one on the left, if I were a knight."

If the safe cupcake is on the right, a statement saying the left one is safe is a false statement. This equates to "If I were a Knight, I'd say a false statement" which is itself a lie. Therefore a knave would have to ​say this and a knight could not.

If the safe cupcake is on the left, a statement saying the left one is safe is true. This equates to "If I were a Knight, I'd say a true statement" , which is the truth. Therefore a knight would have to say this and a knave could not.

Carlton Lindsay - 1 week, 3 days ago
Robert Bolin
Jun 8, 2017

Flawed. That's two of these I found flawed. The knave could just as easily say this and have the entire statement be a falsity including both parts. If he were a knave, then the first half he just says the opposite of what a knave would say pointing to the one on the right which is the actual safe one. And the second part he would say it was the left becausde he is lying about what the knight was saying. This fails primafacia.

How about this - imagine he is a knave, so his statements of what he would do are always false (would you believe a liar if he said he was going to do something?). First case, he says "if I am a knave" "I would say it's on the right" - LIE - he would say it's on the left if he was a knave (which he is, btw) - therefore it's on the right. Second case "if I am a knight" " I'd say it's on the left" - LIE - he would say it's on the right if he was a knight - therefore it's on the right. These two statements are consistent with the good cake being on the right. As has been pointed out, if he were a knight the good cake would be on the left. Therefore you don't know if the good cake is left or right.

Jonathan Kinnersley - 4 years ago

Log in to reply

That's what i thought too!

GimmeSOmar Omar - 3 years, 11 months ago

The definition of a false sentence is any of its parts is false. So there might be one of them is false and this is still a possible scenario if this sentence is said by a knave.

CHIN KEE HAW - 3 years, 5 months ago

Log in to reply

That's not the definition of a false statement in formal logic.

Brian Egedy - 3 years ago

agreed. I think there answer is you can't tell.

ranger lee - 3 years ago

Log in to reply

A statement starting with "If I am a knight" being said by someone who is not a knight is automatically the truth, because when the hypothesis is false in an if-then statement then the if-then statement is automatically true (no matter what the conclusion). This comes up in several of our courses, including here at Joy of Problem Solving .

Jason Dyer Staff - 3 years ago

The discussion is about whether the statement should be taken as a logical if-then statement, which follows strict definitions of what "true" and "false" can be, or if the statement can be taken at face value, as phrased.

Given that the section the problem appears in is "Logic, Level 2," it would make sense to treat it as a strictly logical if-then statement. The flaw, if any, is that the average user doesn't understand the rigor that logical statements, especially if-then statements, require.

Brian Egedy - 3 years, 12 months ago

My thoughts exactly

GimmeSOmar Omar - 3 years, 11 months ago

Same thought I guess they are not thinking from knaves point of view

Abhinav Chintale - 3 years, 11 months ago

Short answer: you're likely interpreting the statement as "A knight would say the one on the left is poisoned." This is subtly but importantly different from "If I was a knight, the one on the left is poisoned."

Long answer:

"If I were a knave, I'd say the one on the right."
"But I'd say the one on the left, if I were a knight."

The second statement is an if-then statement.

In an "if A, then B" statement, the ONLY way for it to be false is for the hypothesis (A) is true and the conclusion (B) is false.

The hypothesis here (If I were a knight) is false . Therefore the overall statement is true , and a knave can't make the statement.

I think it's easier to grasp this with a different example:

If llamas flew through space, then 1 + 1 = 3.

In logic, this statement is true . The fact that 1 + 1 does not equal 3 is irrelevant; since llamas don't fly through space in the first place, there is no danger of 1 + 1 = 3 alone being a true statement somehow.

If llamas flew through space, then 1 + 1 = 2.

In logic, this statement is also true . Again, the fact that 1 + 1 actually equals 2 is not relevant; the condition never gets checked in the first place because llamas don't fly through space.

This isn't just some abstract principle. It does apply to natural language. Suppose I claim that if I am elected, I will lower taxes. Then I lose the election. It's possible taxes may lower or raise afterwards based on whoever actually made it to office; either way, it doesn't falsify my claim since I wasn't elected in the first place!

Jason Dyer Staff - 3 years, 10 months ago

Log in to reply

I understand propositional logic states that a false hypothesis automatically makes an if-then statement true, regardless of the conclusion. You say this also applies to natural language, but I don't think that's always true.

Let me propose a slightly different scenario. There are still two cupcakes, but everyone (knights, knaves and I) knows that the left one is poisoned and the right one is safe. If I were to ask a knight which cupcake was safe, the knight would have to say the one on the right, and everyone knows this is how a knight would reply. If, on the other hand, I were to ask a knave which cupcake was safe, the knave would have to say the one on the left, and again everyone knows this is how a knave would reply.

Suppose now that I ask someone, whom I know to be a knight, to complete the following statement:

"If I were a knave, I would answer the question 'Which cupcake is safe?' by saying ......"

The knight knows, to a certainty, that any knave would say 'the one on the left'. Yet if we apply propositional logic, the knight could complete the above statement with the words 'the one on the right' and still be telling the truth? I don't think anyone, without invoking formal logic, would consider that a reasonable assessment.

I think the problem is that formal logic assumes every statement to be true unless it's demonstrably false, and I don't think anyone, even logicians, applies this outside of formal logic. Even in your example with the taxes, you could claim that you were making a true statement (and no-one could contradict you); but if you asked anybody else, I don't think anyone would positively state that you were telling the truth.

I would love to hear your thoughts.

zico quintina - 3 years, 6 months ago

Log in to reply

I like your analysis, but I think it drops into the distinction between "telling the truth" and "making a true statement". Honest people do the former, politicians and lawyers do the latter. In a logical argument, everyone is a politician. If the distinction between Knights and Knaves is "truth" vs "lies", then it's a moral question of whether they could knowingly tell a truth or falsehood. If the distinction between Knights and Knaves is "true statements" vs "false statements", then the Knight wouldn't have a moral obligation to make a particular kind of true statement, as long as the total statement were true.

Personally, I still get hung up on the logical definition of "true" not matching my idea of "truth", but in the context of a logical puzzle, I'm comfortable with the idea that everyone is essentially a politician, with no moral component to the statements made.

Brian Egedy - 3 years, 5 months ago

Log in to reply

@Brian Egedy A true statement isn't always the truth. Wow. Maybe add that to the logic course somewhere?

Madhur Agrawal - 3 years, 3 months ago

Log in to reply

@Madhur Agrawal I get what the staff is getting at, but in you cant just literalize mathematical logic to the english language. I dont see how in any non ruled logic, a person who lies could not hypothesies what he would say if he said the truth...

Little Narwhal - 2 years, 9 months ago

Log in to reply

@Little Narwhal This isn't non-ruled logic. It's more like legal speak than normal language. Lawyers say "true statements" that aren't true all the time.

Brian Egedy - 2 years, 9 months ago

@Madhur Agrawal They did, right after they said that a false premise makes the statement true.

Brian Egedy - 2 years, 9 months ago

You are correct - question is flawed.

Gustin Stamatinos - 3 years, 1 month ago

Breaking down the knave's statements:

  1. "If I were a knave, I'd say the right one." - which is equivalent to: "A knave would say the right one." --> "The right one isn't safe." --> "The left one is safe." Since the above is a lie, the knave believes that the right one is safe.
  2. "If I were a knight, I'd say the left one." --> "A knight would say the left one." --> "The left one is safe." Since the above is a lie, the knave, once again, implies that the right one is safe.

The issue here is in interpretation.

"If I were a dog, I could fly." is logically different from "If I'm a dog, I can fly." The former is equivalent to "If I become a dog right now, I'll be able to fly," but NOT the latter.

An if-then statement combines two logically INDEPENDENT statements. "I were a dog" is an incomplete statement, both in natural language and in logic.

The islander's actual state of being (knight or knave) doesn't interfere with his SUPPOSITORY state of being. In the knave's mind: "If I were a knight, it wouldn't contradict my current state of being because then I'd be in a different reality! Being a knight in that reality, I'd say that the right one were safe. But I have to lie, so I'll tell this man that I'd say "left" if I were a knight."

Imagining being a dog wouldn't contradict my state of being human. DECLARING "I'm a dog" would.

Swapnil Saroch - 3 years ago
Annie Li
Jun 6, 2017

If you read the sentence carefully, you would notice that the knave or knight kept son saying if which does not give you an answer. Instead, it is just telling you what each person ( knight or knave ) may say.

  1. If he were a knave (-), he answers: 1.1 if he were a knave (-), he would say the right hence - . - = + then the right one is safe 1.2 if he were a knight (+),he would say the left hence - . + = - then the left one is not safe.
  2. If he were a knight (+), he answers: 2.1 if he were a knave (-), he would say the right hence + . - = - then the right one is not safe 2.2 if he were a knight (+),he would say the left hence + . + = + then the left one is safe. Therefore "You can't tell " is the solution.

Mahmoud Sarafha - 4 years ago

A) the good cake is on the Left Knave will say it is Right
Knight will say it is Left

a1) If the responder is Knave If I were a knave, I'd say the one on the right. => He will say LEFT instead of RIGHT since he will not tell the truth about the lying answer he will say But I'd say the one on the left, if I were a knight => He will say RIGHT

a2) If the responder is Knight If I were a knave, I'd say the one on the right. => He will say RIGHT But I'd say the one on the left, if I were a knight => He will say LEFT

So in this case, the responder is KNIGHT

B) the good cake is on the Right Knave will say it is Left
Knight will say it is Right

a1) If the responder is Knave If I were a knave, I'd say the one on the right. => He will say RIGHT instead of LEFT since he will not tell the truth about the lying answer he will say But I'd say the one on the left, if I were a knight => He will say LEFT

a1) If the responder is Knight If I were a knave, I'd say the one on the right. => He will say LEFT But I'd say the one on the left, if I were a knight => He will say RIGHT

So in this case, the responder is Knave

Therefore no way you can tell which cake is good.

Vincent Huynh - 4 years ago

Log in to reply

I agree with you!! That is the correct logic!!!

Ron Kowch - 4 years ago

Log in to reply

I agree with you that it would be Left if the Knight made the Statement. But if the Knave made the statement it would indicate a contradiction: Assume that the Knave made the Original statement: Part 1 "If I am a knave, I say the one on the right." which is a lie...he would actually say the one on the left! To change this to true..... the knave would say the one on the left - which means the Right is safe!

Part 2 But I say the one on the left, if I am a knight." which is a lie....he would actually say the Knight would say the one on the right To change this to true.... The knight would say the one on the Right - and since the Knave lies means the left is safe!

Which is a contradiction because the Knave is offering a half truth which is not possible!

Impossible to tell!!!

Ron Kowch - 4 years ago

Log in to reply

@Ron Kowch yes.. I think its impossible to tell too.. I also based on the assumption that the good cake is on the right.

ranger lee - 3 years ago

Go and post your own solution.

Annie Li - 3 years ago

I don’t care

Annie Li - 3 years ago

@Vincent Huynh Though I agree this solution does not explain the answer, the correct answer is in fact the one on the left. The trick is the fact that the knaves ALWAYS lie. In order for a conditional statement to be false, the if-clause must be true and the then-clause is false. Otherwise, the statment is true. For example, the statement "If we have school this Saturday, aliens will invade," is technically true if we do not have school this Saturday. That means, if the speaker were a knave, the statement "If I were a knight, I'd say the one on the left" would be true because the if-clause, that he is a knight, is false. But knaves always lie. Therefore, the speaker cannot be a knave, and must be a knight. This is how you know the safe cupcake is on the left.

Emily Namm - 4 years ago

Log in to reply

Yeah yeah yeah

Annie Li - 2 years, 6 months ago

I don't agree that the statement "If we have school this Saturday, aliens will invade" is true if we don't hold school this Saturday. It is neither true nor false. Think of it like an experiment:

Hypothesis: Aliens will invade if we hold school on Saturday June 10.

Experiment: Hold school on Saturday June 10 and see if aliens invade. If they do, we can conclude the hypothesis as a whole is true. If they don't, we know it is untrue. Whether this experiment is predictive about future Saturdays is unknown, but as far as June 10 is concerned, it can be assessed as true or false by this experiment.

Now let's say we don't hold school on Saturday June 10. Can we conclude anything about the veracity of the hypothesis? We don't know whether aliens would have invaded had we held school. So in my mind the hypothesis is neither true nor false. It remains an untested hypothesis.

Rel Dauts - 4 years ago

Log in to reply

An unprovable logical statement is, by definition, true. That's the problem with discussing formal propositional logic without establishing what the rules of formal propositional logic are.

Imagine if we were having an argument about whether you could divide by zero in a context in which no one had already established that you can't divide by zero. Imagine having a discussion of raising a number to the 0 power, if we didn't already have, by definition, that any number to the 0 power is 1. This is that type of discussion.

Just accept the definition, if you didn't know it before, that "if False, then ..." is a formally true statement.

Brian Egedy - 3 years ago

Log in to reply

@Brian Egedy Post your own solution if you think your so smart

Annie Li - 3 years ago

Log in to reply

@Annie Li You missed the entire point of my statement. Instead of complaining that it's incorrect or unfair, why not just learn what the rules are? That's what I did.

Brian Egedy - 3 years ago

Log in to reply

@Brian Egedy I don’t care about the rules. Just post whatever you want to on your own space

Annie Li - 3 years ago

Log in to reply

@Annie Li I believe you're completely missing the point of Brilliant. It's not a forum to demonstrate your brilliance, it's a forum to learn about the ways in which the world works, and the ways in which the world is studied.

Brian Egedy - 3 years ago

Log in to reply

@Brian Egedy Oh my gosh!!!! I hardly ever use brilliant these days. Do u think i care?

Annie Li - 3 years ago

If the person is a Knight then both the statements are true. Left one is safe to eat and right one is not. if the person is a Knave then both the statements are false but in statement 1 now the Knave has actually told the truth that Knaves lie! Isn't that contradictory?

Manash Gogoi
Jun 8, 2017

Knight is always truthful so it's going to be LEFT. Accordingly knave always lies so it's LEFT again. So being consistent in both the statements answer is LEFT

I agree with you that it would be Left if the Knight made the Statement. But if the Knave made the statement it would indicate a contradiction: Assume that the Knave made the Original statement: Part 1 "If I am a knave, I say the one on the right." which is a lie...he would actually say the one on the left! To change this to true..... the knave would say the one on the left - which means the Right is safe!

Part 2 But I say the one on the left, if I am a knight." which is a lie....he would actually say the Knight would say the one on the right To change this to true.... The knight would say the one on the Right - and since the Knave lies means the left is safe!

Which is a contradiction because the Knave is offering a half truth which is not possible!

Impossible to tell!!!

Ron Kowch - 4 years ago

Log in to reply

The fact that if a knave said this makes a contradiction means there is no way this sentence is said by a knave.

CHIN KEE HAW - 3 years, 5 months ago

Also, a false sentence can have any parts of it being wrong and still considered false, so this logic is flawed.

CHIN KEE HAW - 3 years, 5 months ago

I don't think this is correct. If a knave had said "If I were a knave, I'd say the one on the right.", then he'd be lying about that statement, meaning he would actually say it was on the left if he was a knave. If the knave had said "But I'd say the one on the left, if I were a knight.", he'd be lying and would actually say it was on the right if he were a knight. Meaning if a knave said the statements the good cupcake would be on the right and if a knight said it, the good cupcake would be on the left.

The logic of "if-then" statements doesn't work like this. For the first part, everything is fine. But the second part doesn't match with the last part. Just because the person saying the right is the safe cupcake is a knight doesn't mean a knight will say it's the right one that is safe. Also any part of this sentence can be wrong(for example, maybe the first statement is false but the second statement is true and vice-versa).

CHIN KEE HAW - 3 years, 5 months ago

I just came back to this. Idk what I said before, but now that I'm reading the problem again, I realized if a knave said the statement they'd be lying about both the placement of the cupcake AND what they'd do if they were either knave or knight. So if a knave said "This is what I'd do as a knave", he'd actually be saying "This is what I'd do as a not a knave", meaning that's what'd they'd do as a knight.

Knave saying it: "If I were a knave I'd say the one on the right" = "If I were a knight I'd say the one on the left" = left "If I were a knight I'd say the one on the left" = "If I were a knave I'd say the one on the right" = left

Knight Saying it: "If I were a knave I'd say the one the on right" = left "If I were a knight I'd say the one on the left" = left

Bonanaman Killsyou - 2 years, 5 months ago
Mohammad Khaza
Jul 1, 2017

But I'd say the one on the left, if I were a knight."-----the second statement prove that the good cupcake must be on the left.

You treat the sentence as if it is this: If I am a knight, then I'd say the one on the left. These sentences seem equal but they are totally different sentences.

CHIN KEE HAW - 3 years, 5 months ago

Log in to reply

obviously different,but where did you find my mistake?

Mohammad Khaza - 3 years, 5 months ago

Relevant wiki: Predicate Logic

Symbolically, let P ( K ) P(K) be the proposition that the person making the statement is a knight. Similarly, let P ( N ) P(N) be the proposition that the person making the statement is a knave. Also, let C ( L ) C(L) and C ( R ) C(R) be propositions that the safe-to-eat cupcake is on the left or right, respectively. Let P ( K ) ¬ P ( N ) P(K) \equiv \neg P(N) , and C ( L ) ¬ C ( R ) C(L) \equiv \neg C(R) where ¬ \neg is negation.

The statement becomes ( P ( N ) C ( R ) ) ( P ( K ) C ( L ) ) ( P(N) \implies C(R) ) \wedge ( P(K) \implies C(L) ) where \wedge is conjunction and \implies is implication.

Then, if the person making the statement is a knight, it follows that the safe cupcake is on the left. Why? Because the first part of the conjunction is true since the person is not a knave and the second part is only true when the safe cupcake is on the left. Since we assumed the person to be a knight, and knights only make true statements, the cupcake is on the left.

If the person is a knave, then we negate the statement, which is false since a knave is saying it, so that it becomes a true statement.
This becomes ¬ [ ( P ( N ) C ( R ) ) ( P ( K ) C ( L ) ) ] \neg [ (P(N) \implies C(R)) \wedge (P(K) \implies C(L) )] ¬ [ ( ¬ P ( N ) C ( R ) ) ( ¬ P ( K ) C ( L ) ) ] \iff \neg [ (\neg P(N) \vee C(R)) \wedge (\neg P(K) \vee C(L)) ]
[ P ( N ) ¬ C ( R ) ] [ P ( K ) ¬ C ( L ) ] \iff [ P(N) \wedge \neg C(R) ] \vee [ P(K) \wedge \neg C(L) ]
[ P ( N ) C ( L ) ] [ P ( K ) C ( R ) ] \iff [ P(N) \wedge C(L) ] \vee [ P(K) \wedge C(R) ] where \vee is disjunction.
Since the statement is true and we assumed the person to be a knave, the only part of the disjunction which is true is "the person is a knave and the safe cupcake is on the left." Thus, the safe cupcake is on the left.



Since these are the only two possibilities and they agree with each other, then the safe cupcake is on the left regardless of whether the person making the statement is a knight or a knave.

Except if he were a knave, he would lie about what the knave would say and there fore be telling you the safe side. And he would also lie about what the knight would say and be telling you the poisoned side, meaning you cannot tell.

Robert Bolin - 4 years ago

This solution is nice. It especially helps to have written down the structure of the argument in an abstract language so that we can appreciate the structure of the argument regardless of its context. Also, we might use an automated program to generate/verify proofs in some cases.

I agree with @Robert Bolin here. There is a slight issue with your formalization, which is inherent from the ambiguous nature of natural language. Let C ^ ( P ) \hat{C}(\mathcal{P}) be a second order predicate which is true if the agent would claim proposition P \mathcal{P} . Then, we could understand the statement as follows: ( P ( N ) C ^ ( C ( R ) ) ) ( P ( K ) C ^ ( C ( L ) ) ) ( P(N) \implies \hat{C}(C(R)) ) \wedge ( P(K) \implies \hat{C}(C(L) ))

I am not really sure if this formalization is equivalent to yours. Also, I am not really sure if my formalization is correct.

Yinn Mar Soe
Jul 8, 2020

No.1 says that if I were a knave , I'd say the one on the right. We know that knaves always tell the lie so No.1 is a knight so the non poisoned cupcake is on the left. THUS, ANSWER IS ;THE NON- POISONED CUPCAKE IS ON THE LEFT.

Jake A
Jun 26, 2020

If the person is a knave. Then negate the first statement to get “he’s a knave but he said the one on the left.”

But this means that he was indeed a knave. This cannot happen. Then the person is a knight and the safe one is on the left.

Don Weingarten
Feb 11, 2019

Consider the instance in which the speaker is a knight. Then he is telling the truth, and since he says "If I were a knight, I'd say the one on the left," then the one on the left is safe. But suppose now that he is a knave. Then his entire statement is false, which means that if he were a knave, which he is, he would NOT say the one on the left, but would lie and say the one on the right. So since this is a lie, the one on the left is again safe to eat.

Wrier Greenfield
Jun 30, 2018

A thing that may confuse a person would be the fact that we don't know whether the person we asked is a Knight or a Knave. However, this does not matter, as his statements are just if he were either a Knight or a Knave.

He says if he were a Knave, he would tell you the cupcake on the right were safe to eat. However, we know that Knaves will always lie, so the cupcake on the left would be safe to eat according to his first statement.

His second statement states that if he were a Knight that he would say the cupcake on the left was safe. We know that Knights will always tell the truth, so according to this statement, the cupcake on the left is safe to eat.

Both of his statements match up, leading to the conclusion that the cupcake on the left is safe and the cupcake on the right is poisoned.

Saya Suka
Apr 25, 2021

There are two statements with two different ifs, one for each statement. Thus, one of the if must be true and the other false, but both if-then statements must have the same truth values. This would mean that it's impossible for a knave to give two false statements since there's only one way for an if-then to be false, so the speaker must be a Knight with their "if True, then True" AND "if False, then False" true statements. The safe 🧁 cupcake is on the left.

he said himself if I am I knight I would say the one on the left

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...