The annoying boxes puzzle: solution
blog.plover.com
blog.plover.com
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
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 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.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).
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.
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.
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)
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?> > 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.)
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.
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.
> 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.)
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.
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. That was the solution to the puzzle - realizing that this was an invalid assumption, given the formulation.
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.
(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 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?
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 ….)
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.
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.)
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!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??
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.
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.
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. :-)
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.
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.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.
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.
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?