56 comments

[ 3.5 ms ] story [ 143 ms ] thread
Ugh, it is annoying. And the author is a bit of jerk (Read it and you'll see what I mean.)
tl;dr: The problem didn't actually state that the labels mean anything!
Yes. Normally, problems give you information so that you can do something with it. Otherwise, even if the author says later on:

Notice that the problem condition gives the suitor a certification about the truth of the labels

the problem author can always cop out and say "yes, but the certification itself was meaningless!".

If I take the labels to their face value, the treasure cannot be in the green box because the red label doesn't have a truth value. (If it's true, then there are two true labels, therefore it must be false. But if it's false, there is only one true label, so the red one is true.)

It's more interesting than that. If you take the labels at their face value, evaluating the red label either causes itself to be correct (flip-flop), or causes itself to be incorrect (#REF!), based on the state of the world.

    treasure in green | treasure in red | green label   | red label
    ------------------+-----------------+---------------+-----------
    no                | no              | false         | flip-flop
    no                | yes             | false         | flip-flop
    yes               | no              | true          | #REF!
    yes               | yes             | misquantified | #REF!
i'm so confused. the red label doesnt convey any information yet it rules out the ability that the green label is true.

so how can the green label still be true?

or is the author saying that the symbols on labels dont mean anything? if he says that, it's tautological. what can we get from discussion if we dont conventionally put meaning in symbols? are what we typing now in all these comments also jibberish??

The contents of the green box make the labels paradoxical; but it's OK because paradoxes exist.

Consider a paradox such as "This sentence is false". There's a problem with deciding if it's true or false. Countless articles and books have been written about it, and there exist different ways of dealing with this "difficulty". However, nothing prevents you from actually writing these letters on a piece of paper, and nothing prevented me from typing them a few seconds ago. The puzzle we're talking about makes the same point in a more amusing fashion.

hm, isnt that obvious? if it's just "we do whatever we want regardless of whatever", then we dont need to go that far: elaborating a nonsense puzzle to prove nonsense.
Quite. This is a pointless exercise - there are assumed rules in most or all logic puzzles of this sort. The assumption that statements made in the puzzle are true or false, but not gibberish, is a fair one.
> The assumption that statements made in the puzzle are true or false, but not gibberish, is a fair one.

But given that one of the possible answers (the right one) did not depend on that assumption, and in fact the git of the puzzle is that you shouldn't depend on it, the puzzle is fair.

> the git of the puzzle

I know not everyone shares my feelings about the trickiness of the puzzle, but I have to immortalise this typo because it so perfectly sums up those feelings. :-)

So, how could there be enough info to solve any problem if we can't trust the information at all? I mean bot boxes could be open, with the treasure being in green box at all but it could be all dream! The treasure was in red box all the time. Kinda stupid.
The problem inherently indicated that the labels were untrustworthy. It was impossible for them both to be true, because one explicitly stated that only one was true. I see no reason to trust the red label more than the green label, so at that point, it should be clear that neither can be trusted.

It's interesting in that people seem to trust meta-statements like the red label's more than they trust basic statements like the green label's.

> It's interesting in that people seem to trust meta-statements like the red label's more than they trust basic statements like the green label's.

That are the rules of puzzles.

Only when such statements are made by the narrator, not the puzzle artifacts themselves. The whole point of these sorts of puzzles is that the labels can't all be relied upon, yet some people think the red label can be, for some reason.
The problem is that mjd himself, when discussing "Why don't all logic puzzles fall afoul of this problem", says that the statement

> Portia explained to the suitor that of the three statements, at most one was true.

in a Gardner puzzle is evidence enough that we may trust that "of the three statements, at most one was true". Here, Portia is a character in the puzzle; why should we trust her any more than we should labels on boxes or (in the set-up of the puzzle) statements on caskets? If we have to distrust everything about the problem, then it seems to me that it runs into exactly the problem shultays (https://news.ycombinator.com/item?id=9837381) mentions.

(EDIT: I think that mdpopescu (https://news.ycombinator.com/item?id=9837257) said it better.)

> I mean bot boxes could be open, with the treasure being in green box at all but it could be all dream!

Have you studied Descartes? "I think, therefore I am" is the philosophical answer to thta problem. It's the only certainty that can not be invalidated by untrustworthy perceptions.

Unless you are only dreaming of thinking, of course
No, because dreaming of thinking is a way of thinking. I'd still be certain of having experienced those perceptions, even if I can't be sure whether it's a dream or not.
This is secretly a lesson about comments in legacy code.
You just transformed the puzzle from "annoying" to "can teach a worthwhile lesson" for me.

Edit: This message can be made more clear with a slight change to the puzzle.

There are two methods, foo and bar. One returns what you desire.

    /** Exactly one of the comments is true */
    function foo();

    /** @returns what you desire */
    function bar();
Can you figure out which method returns what you desire?
The actual scenario he presents with the physical boxes is not consistent, as the truth value of the label on the red box cannot be decided. i.e. Its value is the opposite of its value. This is a troll question.
Honestly, on reading that entire post I'm convinced the writer doesn't know what he is talking about. He doesn't even mention the term paradox.
Of course it's consistent: it actually exists.

There is no paradox. It's clearly obvious that you can choose either box to put the treasure in. It's also clearly obvious that sticking labels on the boxes doesn't alter that, no matter what they say.

You just got fooled by the puzzle. It's not a big deal.

Sorry for assuming the problem would adhere to standard expectations. By breaking the typical rules of a logic puzzle, the interesting aspects are replaced with groan-worthy ones.
That's true only if your interest is limited to the mechanical rules of logic derivation. For those of us interested in the relations between symbols and meaning, the puzzle is fascinating.

> Sorry for assuming the problem would adhere to standard expectations. That was the solution to the puzzle - realizing that this was an invalid assumption, given the formulation.

Actually, it's a very simple practical counterexample to the "law of excluded middle" logic axiom. [1]

The situation described in the puzzle did physically exist when the photo was taken, yet the truth value of the first label is neither true nor false. It that's a troll, then trolls like this provide food for thought.

[1] https://en.wikipedia.org/wiki/Law_of_excluded_middle

I think that this is not the correct interpretation of the law of the excluded middle. It says that `P or not-P`; that is, that P is true or not-P is true. That's different to saying that P is true or P is false; confusing "not-P is true" with "P is false" is exactly the distinction that logics, such as constructive logic, that avoid LEM try to avoid.

(At least for me, it helps to think in terms of proveability, not of truth, which is, I think, almost what constructive logic does; there is a difference between saying that "P is not proveable" and "not-P is proveable".)

I keep telling myself that I should learn more about constructive logic, as my own intuitions tend to it.

I get that in such logic you can't deduce "P is false" directly from "Not-P is true", and you have to build an explicit derivation for the former?

> I get that in such logic you can't deduce "P is false" directly from "Not-P is true"

It's actually the other way around; if not-P is true, then P is false, but not conversely. (The computer-flavoured example that comes to mind is that it is not possible to decide equality of functions (so `P or not-P` fails), but any two functions either are (`P` is true) or are not (`P` is false) equal. Again, this confusion between truth and decideability is, I think, not quite rigorous, but it gets at the essential idea.)

> I keep telling myself that I should learn more about constructive logic, as my own intuitions tend to it.

Indeed, Brouwer's precursor of constructive logic was called "intuitionistic logic" precisely because he felt that it better captured an intuitive, rather than formalist, approach to reasoning. (I'm not sure I agree ….)

For me, the important intuition in this regard is that, for any mathematical theory to be useful, you need to create a process where you can prove properties about its objects in a finite number of steps. You can handle infinite objects (like sets), but at some point you need to define a finite process that produces some knowledge about the object (for example, deciding if a particular word is a member of an infinite grammar).

Working with infinite objects is like using lazy computations in a functional language - you only use as many steps as needed, even if the process does not have a termination step. (I'm not sure to what degree constructive logics handle this intuition - as I said, I don't know much about them).

I've seen that some models exist for mathematical proofs containing infinite steps, but those don't seem to be widespread - and the models are themselves defined through a finite description; so I think even this extreme case validates my intuition that in the end, the mathematician needs to include just a limited number of clauses in their day-to-day work to get something done, even if those clauses are used to describe infinite objects.

There is the implication, since the question was asked, that enough information is presented to get to a solution. Else, why would the question be asked, unless to fool. In which case, he did a fancy equivalent of "it' a prank it's a prank".
There is the implication ... that enough information is presented to get to a solution

In general I agree with you.

HOWEVER, in this case, one of the choices is explicitly "There is not enough information to determine the answer". Given that choice is explicitly presented, it's not a prank. IMO.

I agree. In every puzzle there's an element of complexity requiring some lateral thinking, otherwise it wouldn't be puzzling. Playing with the "conventions of the genre", so to say, in order to defy the reader is fair game.
> HOWEVER, in this case, one of the choices is explicitly "There is not enough information to determine the answer". Given that choice is explicitly presented, it's not a prank. IMO.

That's an interesting perspective, but can it really be that the correct answer to the question depends on the options one is given? That is, would the same puzzle, with that choice deleted, have a different answer?

Imagine oneself playing a game of Simon Says, where we don't know who Simon is or which bits he's actually saying, he in fact sounds exactly like everyone else giving us instructions: we can choose to believe what we want about the actions we are told to make, but an adversarial Simon can always contradict us. It's not a game I'd enjoy playing nor a lesson I think I benefited from very much...
I think the problem I'm having with it is that it's presented as a logic puzzle, but I'm not sure I'd classify it that way.

It seems more of a comprehension test to me, as the trick is both to see that the questions is a "Can you figure out the answer?" rather than "What is the answer?" and to realise that at no point does he say that either label is correct.

If you've ever done any GMAT-type questions, this is an absolutely classic example of a data-sufficiency question.
That is not a logic puzzle [1], even though the author claims it is; it's a silly outcome that is easily achieved when one breaks how logic puzzles are presented and solved.

It's more of a bait-and-switch.

Here is a famous logic puzzle, often called a Knights and Knaves style puzzle [2]: Knights always tell the truth, Knaves always lie.

"John and Bill are standing at a fork in the road. John is standing in front of the left road, and Bill is standing in front of the right road. One of them is a knight and the other a knave, but you don't know which. You also know that one road leads to Death, and the other leads to Freedom. By asking one yes–no question, can you determine the road to Freedom?"

Here's a "solution" in the style of the author: "There is no solution, because the road to 'Freedom' is under construction, and the detour leads through 'Death.' Hahaha! Gotcha!"

It's a non-solution, and not a logic puzzle any more.

[1] https://en.wikipedia.org/wiki/Logic_puzzle [2] https://en.wikipedia.org/wiki/Knights_and_Knaves

But the difference is that in this puzzle you can deduce that something is wrong by just using logic: In the absence of any hints, you'd just consider everything true. This obviously does not lead to a solution, as the red box states that one box lies. When you come to this point, you might wonder why you were trusting the boxes in the first place and reconsider your assumptions, i.e. not putting any trust in what the boxes say. After this step you realise that there suddenly is not enough information to determine which box the treasure is in.

The difference between the blog post and your example is that in your example there's nothing that makes you recheck your assumptions. A puzzle in the style of the author's would be:

Knights always tell the truth, Knaves always lie.

John and Bill are standing at a fork in the road. John is standing in front of the left road, and Bill is standing in front of the right road. John says: "One of us is a knight and the other a knave". You also know that one road leads to Death, and the other leads to Freedom. Bill says: "My road leads to freedom".

If you attacked that formulation with the normal assumptions for logic problems, the answer would be the same. If you break the assumption that you can trust all logical statements in the problem, regardless of their origin, then you could get a solution like "John is a dick and tells a mixture of truth and lies as he sees fit just to mess with you". But you could get that solution with any problem where the source of information is an entity in the problem itself, which is why we tend to assume that isn't the case.
That's entirely wrong. The whole point of the article is that there are two distinct types of information present in all problems of this type: information about the problem (which the author calls certification, and which is assumed to be true), and then information presented in the problem, which - in almost every problem I've ever seen of this type - has statements that aren't true in it.

    > "If you break the assumption that you can trust all
    > logical statements in the problem"
That is never the assumption - you are normally told explicitly that you can trust some and not others.
I disagree. In your case, the problem formulation is inconsistent with the answer (actually I don't think one question in this case suffices anyway): from the formulation we expect that the roads don't have detours; so the question formulation is omitting the truth -- indeed if you aren't truthful in your formulation, any puzzle would be unbeatable.

But in this case there is no missing information from the formulation -- it is truthful and complete. He even puts quotes on the labels, which indicates they are not necessarily true (but they are necessarily as written). A 'Gotcha' in this case could be for example Q:"The two labels are "..." and "..."" A:"There is no solution, because we decided to use another label!". The solution of the puzzle shown is the correct way to perform inference assuming what the statement says is true (and in real life if this happens -- that is, the inquirer is sincere -- if you chose either box you may fail).

>in real life if this happens

Except he claimed it was a "logic puzzle," and he does not meet the requirements of a logic puzzle as the term is used. If you're allowing misuse of terms, then anything is possible, and my solution is as ridiculous as his, given the claim.

In fact, it's formally provable his solution makes the problem not a logic puzzle. Logic puzzles, by definition in the genre, require statements to have truth values, hence the word "logic."

If labels are either true or false, as is always the case in style of problems labeled "logic puzzles" unless the statement claims a random outcome, then his puzzle leads to the red solution.

To see the logical outcome of his "solution", by putting the treasure in the in the green box, the label "the treasure is in this box" on the green box is true.

Then the label "exactly one of the labels is true" on the red box has indeterminate truth value, because it cannot take the value true (since then both it and the green label are true), and it cannot take the value false (because then exactly one of the labels is true, contradicting the red label).

Thus, under his solution, the "logic puzzle" is not a logic puzzle. Statements cannot have indeterminate truth value by taking a final answer and working backwards and cancelling any statements that become indeterminate.

He even finished with "16 people correctly said that the treasure was in the green box. This has to be counted as a lucky guess, unacceptable as a solution to a logic puzzle."

So he claims any "correct" answer to his non-logic puzzle had to be a lucky guess? Well, he got that right - the green solution is certainly unacceptable as a solution to a true logic puzzle.

As I said, I do believe that if the formulation is abusive anything is possible. My quip is that logic puzzles shouldn't necessarily follow classical logic -- instead it should roughly be understood as "assume the statement is sincere and infer from that". Perhaps that's not the convention though.

Here's a system of logic where the puzzle has a solution:

https://en.wikipedia.org/wiki/Three-valued_logic#Kleene_and_...

If your logic system doesn't accept an inconsistent statement when they may occur, I tend to blame the logic system rather than reject reality. Here's a paradox illustrating my point:

https://en.wikipedia.org/wiki/Raven_paradox

(and others https://en.wikipedia.org/wiki/List_of_paradoxes#Logic)

> So he claims any "correct" answer to his non-logic puzzle had to be a lucky guess?

Not at all. He said the statement "the treasure was in the green box" is correct; but that is not the solution to the puzzle. The solution is "There is not enough information to determine the answer", which was explicitly provided as a possibility.

What bothers me about mjd's explanation of "Why doesn't every logic puzzle fall afoul of this problem" is:

> > Portia explained to the suitor that of the three statements, at most one was true.

> Notice that the problem condition gives the suitor a certification about the truth of the labels, on which he may rely.

(the first sentence is quoted, approvingly, from a puzzle by Gardner, and the second explains why it saves that puzzle). Sure, there is a certificate provided in the problem; but why may we trust Portia's certification, any more than we may trust the labels on the boxes? It seems that one needs either

- an annoying intra-textual infinite regress: "Portia said this, and Balthazar said that Portia was telling the truth, and Stephano said that Balthazar was telling the truth, …" (which still doesn't really address the trust problem, just moves it infinitely far); or

- a meta-textual reassurance: "Given that at most one of the three statements is true, which of the caskets should the suitor choose?"

(EDIT: Oops, mdpopescu (https://news.ycombinator.com/item?id=9837257) made this point much more succinctly several hours ago.)

I think you are right, and the solution is a meta-textual reassurance, specifically of the form: "if one of the statements is true, then which casket should the suitor choose?"
I agree, although note that Gardner actually sneaks in the subtly different statement "at most one of the statements is true." Of course, even here one has to be careful: do we require that the problem say "if at most one of the statements is true, and the previous description of the problem is correct, then …"? If not, what allows us to trust the previous description?

One can re-phrase every logic puzzle ever as "Assuming that `P` is true, what can you deduce about `Q`?"; or one may assume that a logic puzzle of the form "`P` is true. What can you deduce about `Q`?" is really shorthand for the former. I don't begrudge mjd for pointing out this shorthand, but I do think that his description of the 'solution' (to the meta-problem, not the actual puzzle he poses) is facile at best, and creates bigger problems at worst.

haha indeed an "annoying" trick. we're so conditioned to reading phrases like "exactly one of the labels is true" as meta-information that we forget it's a "box label".
With logic problems the assumption is that logical information is always relevant to the solution, no matter what the source of the information is. It's interesting to have that assumption challenged though.

https://www.youtube.com/watch?v=emiMj8cCL5E and the extra footage is another demonstration on how the solution can change if you don't start with the normal "logic puzzle" assumptions.

the difference here is that the label on the green box is explicitly "challenged" by the label of the red box. the step is to realize that both labels should be challenged (i.e if the label on the green box doesn't have to be true, the label on the red box doesn't have to be true)
I'm not convinced the fact one label "challenges" the other should change how you attack the problem. I think you have to be able to apply the same reasoning to the following problem:

    James says he is shorter than Alex.
    Jane says she is shorter than James.
    Alex says he is taller than James.
    Can you figure out who is the shortest?
Going by the authors premise that only things in the puzzle statement can be taken to be truthful, you can't figure out who is the shortest because they could all be lying. It's formulated exactly the same as the problem in the post, it just doesn't have a potential contradiction to lead you down the path to realising you're not meant to be assuming the logical statements are involved in the solution.
If one of the possible answers is "There's not enough information to decide", that's a good hint that something weird may be going on and you should double-check your assumption of "everybody is telling the truth".