8 ms·
The annoying boxes puzzle: solution
- msie 11y agoUgh, it is annoying. And the author is a bit of jerk (Read it and you'll see what I mean.)
- spacehome 11y agoI think he did me a favor.
- AgentME 11y agotl;dr: The problem didn't actually state that the labels mean anything!
- mdpopescu 11y agoYes. 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.)
- myhf 11y agoIt'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!
- linhchi 11y agoi'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??
- anatoly 11y agoThe 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.
- linhchi 11y agohm, 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.
- NLips 11y agoQuite. 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.
- TuringTest 11y ago> 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.
- JadeNB 11y ago> 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. :-)
- shultays 11y agoSo, 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.
- slavik81 11y agoThe 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.
- chronial 11y ago> 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.
- function_seven 11y agoOnly 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.
- JadeNB 11y agoThe 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 https://news.ycombinator.com/item?id=9837381) mentions. (EDIT: I think that mdpopescu (https://news.ycombinator.com/item?id=9837257 https://news.ycombinator.com/item?id=9837257) said it better.)
- slavik81 11y agoThis is secretly a lesson about comments in legacy code.
- qznc 11y agoYou 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?
- bottled_poe 11y agoThe 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.
- bottled_poe 11y agoHonestly, 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.
- chii 11y agoBecause it's not a paradox.
- bottled_poe 11y agoThat is untrue.
- phaemon 11y agoOf 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.
- bottled_poe 11y agoSorry 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.
- TuringTest 11y agoThat'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.
- brador 11y agoThere 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".
- PhantomGremlin 11y agoThere 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.
- TuringTest 11y agoI 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.
- JadeNB 11y ago> 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?
- asQuirreL 11y agoImagine 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...
- prof_hobart 11y agoI 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.
- peteretep 11y agoIf you've ever done any GMAT-type questions, this is an absolutely classic example of a data-sufficiency question.
- ChrisLomont 11y agoThat 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 https://en.wikipedia.org/wiki/Logic_puzzle [2] https://en.wikipedia.org/wiki/Knights_and_Knaves https://en.wikipedia.org/wiki/Knights_and_Knaves
- heinrich5991 11y agoBut 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".
- ajanuary 11y agoIf 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.
- JadeNB 11y agoWhat 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 https://news.ycombinator.com/item?id=9837257) made this point much more succinctly several hours ago.)
- Ended 11y agoI 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?"
- JadeNB 11y agoI 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.
- blahblah3 11y agohaha 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".
- ajanuary 11y agoWith 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 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.
- blahblah3 11y agothe 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)
- ajanuary 11y agoI'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.
- TuringTest 11y agoIf 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".