Live data from Hacker News

A liar who always lies says "All my hats are green."

theguardian.com

341–350 of 419 posts

Re: A liar who always lies says "All my hats are green."

#341

Earlier quoted context omitted.

The article said that the problem was based in formal logic and appeared on a "maths test." That means it isn't ambiguous question about the English language.

Yes. It isn’t ambiguous and is entirely solvable using old school formal logic of the “All Cretans are liars” sort. If the liar owns no hats the statement “All my hats are green” would be true. Under the parameters of the question it must be a lie and therefore cannot be true. So the liar owns at least one hat which is not green. They may own additional hats which can be of any colour. People who are saying “if they…

> If the liar owns no hats the statement “All my hats are green” would be true.

Color of non existing object is undefined.

The correct solution is:

!(all && my && hats && are && green) == !all || !my || !hats || !are || !green.

Re: A liar who always lies says "All my hats are green."

#342

Earlier quoted context omitted.

The article said that the problem was based in formal logic and appeared on a "maths test." That means it isn't ambiguous question about the English language.

No that doesn't mean anything. Tests and books can be wrong.

[deleted]

Re: A liar who always lies says "All my hats are green."

#343

Earlier quoted context omitted.

The article said that the problem was based in formal logic and appeared on a "maths test." That means it isn't ambiguous question about the English language.

Yes. It isn’t ambiguous and is entirely solvable using old school formal logic of the “All Cretans are liars” sort. If the liar owns no hats the statement “All my hats are green” would be true. Under the parameters of the question it must be a lie and therefore cannot be true. So the liar owns at least one hat which is not green. They may own additional hats which can be of any colour. People who are saying “if they…

[deleted]

Re: A liar who always lies says "All my hats are green."

#344
post #81

Earlier quoted context omitted.

I think it is very logical to allow for vacuous truths. Doing otherwise would not be logical. The actual key insight is to accept that in a lot of cases everyday communication itself is not logical, because it is more efficient to communicate skipping always being logically correct. This builds social intuition that goes against the logic. It is interesting to observe and point out those cases, which this puzzle does…

> I think it is very logical to allow for vacuous truths. Doing otherwise would not be logical. I guess I disagree, although I don't mean that disrespectfully. Vacuous truth is one reason why nonclassical logics exist. The wikipedia article gives a good example of how allowing for vacuous truth can lead to absurdities: "All my children are goats" said by someone without children. This is a statement that is vacuously…

i think its relevant that the liar has to say false things, which is more limited than just not-true things.

if you dont assume the vacuous truth, and instead leave it undefined, then when hes got no hats, "all my hats are green" is absurd, rather than false.

the gotcha only stops applying when you put a vacuous false, rather than true or undefined.

is this really a flaw in applying classical logic? with the vacuous true, the only information you get from "all my hats are green" being false is that they have at least a hat, same as the intuitive result

Re: A liar who always lies says "All my hats are green."

#345
post #207

Earlier quoted context omitted.

> in typical English you are making an existence statement No, you're not.

Oh boy... so I actually wrote a thesis in graduate school on conversational implicature, Paul Grice, and various other theories of implying things. I would actually agree user dwheeler here. Whether or not you agree with Gricean implicature theory (I do not), the point is that making a claim about a group that doesn't exist is absurd. Absurd statements do not convey meaning, and language is a tool for communication,…

Is "absurd" a term of art here, or you just mean it conflicts with common intuition? This sort of thing comes up a lot in programming languages. For example, is Null=Null true or false? What about Null!=Null? Maybe they can both be true or both false. It's strange because there's no simple obvious right answer but we need some answer and programming languages manage to define that sort of thing so it ends up logically consistent. Closer to this topic, how about a typed collection with no item in it? We expect the type system to enforce "all its items are green" but when it's empty, that constraint would become absurd and we can no longer pass an empty collection to a function that requires a collection of greens?

A simple program to test "all my hats are green" allows the empty set to be all green:

    AllGreen = True
    For each hat in MyHats:
      If hat  green:
        AllGreen = False

Re: A liar who always lies says "All my hats are green."

#347
post #2

My take (possible spoiler): If he had no hats, then his statement would technically be true. Therefore he has at least one hat. He may have some green hats and some non-green hats, but must have at least one non-green hat. He could have any number of green hats, including zero, as long as he has at least one non-green hat. So the only derived statement that we can conclude to be true is A.

You are correct, and anyone that couldn’t come to that conclusion needs to stop overthinking the problem it is pretty basic 101 intro to logic type question.

Not sure why so many people got it wrong maybe ESL is at play here

Re: A liar who always lies says "All my hats are green."

#348

Earlier quoted context omitted.

Yes. It isn’t ambiguous and is entirely solvable using old school formal logic of the “All Cretans are liars” sort. If the liar owns no hats the statement “All my hats are green” would be true. Under the parameters of the question it must be a lie and therefore cannot be true. So the liar owns at least one hat which is not green. They may own additional hats which can be of any colour. People who are saying “if they…

> If the liar owns no hats the statement “All my hats are green” would be true. Color of non existing object is undefined. The correct solution is: !(all && my && hats && are && green) == !all || !my || !hats || !are || !green.

If you want to allow undefined statements that’s actually fine from an inferential point of view even though in predicate logic statements are always either true or false.

He’s a liar so his statement has to be specifically false.

Re: A liar who always lies says "All my hats are green."

#349
post #324

Earlier quoted context omitted.

I don't follow, which parameter was unspecified in the original problem?

My last sentence. Or which parameter do you think was modified?

The host might be selecting between two goats, or might be selecting between a goat and a car. Either way, it doesn't matter because we don't get any additional information about whether our original choice was correct. (To clarify, this applies to the original problem, not the Crawl variant, where we either sometimes get definitive information, or sometimes get no information)

Edit: Furthermore, I don't think that author's solution to the Crawl problem is correct. When the host eliminates a door, either you will get information that says you should switch, and you'll win 100% of the time; or you won't get information, and you should still always switch and win 2/3 of the time.

Re: A liar who always lies says "All my hats are green."

#350
post #300

Earlier quoted context omitted.

I regret opening this can of worms called Monty Hall. But anyway I'll link the relevant section from Wikipedia: https://en.wikipedia.org/wiki/Monty_Hall_problem#Other_host_... > The version of the Monty Hall problem published in Parade in 1990 did not specifically state that the host would always open another door , or always offer a choice to switch, or even never open the door revealing the car. However, Savant mad…

Just be glad that you didn't go for the 2 envelopes problem which was her next. Vos Savant was wrong about that one, and few people like the real answer. The problem is that you're presented with two envelopes with 2 real numbers inside. You randomly select one, then look, and try to guess if you got the larger number. It doesn't seem like you can do better than even, but you can! Unfortunately everyone hates the ans…

The two reals are selected via some distribution, and the only way you can do better than chance is if you have some knowledge of that distribution.

The question leaves that distribution completely hidden, and your answer smuggles it back in. That feels less like a counter-intuitive math/stats question and more like a badly worded gotcha.

Post reply on HN