Live data from Hacker News

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

theguardian.com

221–230 of 419 posts

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

#221
post #82

Earlier quoted context omitted.

Fascinating. I think many people here have applied their own social intuition- - a programmer’s idea of an empty sets- to the puzzle.

True, but "programmer's intuition" is because most programming languages are more or less based on formal logic so they agree with the formal logic interpretation even if many programmers have never studied formal logic.

"More or less" is the key and the rub. The specific semantics must be determined and utilized in place.

For me, the evaluation of the empty set should have separate semantics than that for how a non-empty set's elements are logically combined to produce a value.

This is the result of doing stats programming for grad students, doing lots of database design and programming, and lots of regular programming in imperative and functional languages.

The key is that we are always working within a context, and this problem's context involves both formal logic and regular old language. And, whew!, is there a disconnect and interference pattern.

What a delightfully unserious discussion!

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

#222
I thought it would be a trick question. If this person is a known liar, how do we even know he has any hats to begin with?

Person could really have a neon colored bowling ball and the statement “All my hats are green” is still valid.

I suppose the solution of A is valid assuming the physical object itself is not a lie.

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

#223

Earlier quoted context omitted.

Consider iterative code to sum a collection of ints: sum = 0 for value in collection: sum += value return sum For every non-empty collection this returns the correct result, and for the empty collection it returns 0. Now the product: product = 1 for value in collection: product *= value return product For every non-empty collection this returns the correct result, and for the empty collection it returns 1. Now the AN…

But you have specifically initialized your AND and OR results to be True and then False, respectively, thus specifying the resulting value for their processing of the empty set. What I'm saying is that you always need to specify that default value to handle the empty set properly. In no way would I consider ANDing or ORing an empty set's boolean values to be automatically True or False, (no pun intended). You have ch…

> But you have specifically initialized your AND and OR results to be True and then False

No other value would be meaningful.

> What I'm saying is that you always need to specify that default value to handle the empty set properly

no you need a default value to handle the base case of the recursion. The result of the empty set falls off from it.

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

#224
post #121

Earlier quoted context omitted.

These puzzles are entirely formal logic. Now you may not like or understand the intricacies of the logic/math and how it interacts with the English language, but the rules, and thus the solutions, are pretty objective and not open to interpretation.

Then the puzzle shouldn't use the word lie, because to lie can mean to be deceptive, and saying all your hats are green when you have no hats is clearly deceptive and thus can be considered a lie.

It's not deceptive, it's simply true in formal logic. I've been thought in linear algebra 101: all statements about the elements of the empty set are true. That's the core of this puzzle, and contrary what OP claimed, it's a matter of logic, not language.

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

#225
post #95

SPOILER The statement translates to: ∀x ( IsAHatOfMine(x) => Green(x)) That's just equivalent to ∀x (~IsAHatOfMine(x) ∨ Green(x)) by the definition of implication (it's only false if the antecedent is true, and the conclusion false). The negation of that is (by repeated application of De Morgan's): ~∀x (~IsAHatOfMine(x) ∨ Green(x)) ∃x ~(~IsAHatOfMine(x) ∨ Green(x)) ∃x IsAHatOfMine(x) ∧ ~Green(x)) Thus, the liar has a…

I think this is how the puzzle author intended the puzzle to be read.

That being said, I would argue that, "All my hats are green." has different meaning than "I may or may not own a hat. Any hat that I own is green".

The use of 'all' and the plural of 'hat' implies that the author has multiple hats.

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

#227

I tried to figure it out but got stuck on the linguistic dilemma if he's lying about the concept of himself existing ("All of MY hats"). Then I decided I have better things to do.

Right? There's more: Perhaps he exists, but he's denying that concept of ownership exists. He may also be claiming that the hats are ecologically friendly. Are we also to assume that if all the hats were each mainly green on the outside but had brown linings, they are, or are not, each said to be "all green"?! I need a pint.

You have given me a broad smile, friend. Thanks for that.

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

#228

I never liked this type of puzzle. It is not formal logic but more about the idiosyncrasies and conventions of the English language. I put this puzzle on par with Agatha Christie’s murder mysteries. It requires a suspension of disbelief and logic to be believable. Someone who always lies means in the purest sense means you cannot trust anything they say. Even the word “hat” could mean they are talking about their pet…

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.

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

#229

Earlier quoted context omitted.

>and it equally drives me mad in those areas where academics set "puzzles" and conclude that people's inabilty to "solve" them is some cognitive deficiency. Does that actually happen in academia? It seems to mostly be a social media thing.

So frequently I'd say its the main case. Researchers are extremely poor at controlling for competing explanations, in many cases, strongly incentivsed not to. Suppose you're writing a paper what do you write: option A) Average People Cannot Understand Probaility!?!?!, option B) Inexperienced test takers with unfamiliar notation fail to grasp meaning of a novel question; option C) survey participants on technical ques…

These sorts of puzzles aren't used by researchers though, so I'm not sure I follow the rest. They almost always seemed to be used by people trained in logical thinking to consider problems in different ways. They only seem get to the larger public when someone shares one on social media and people with no background in logic complain that they are poorly written or have no answer, since they don't realize that these sorts of puzzles presuppose some background in logic and familiarity with the setup.

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

#230
Three gods A, B, and C are called, in no particular order, True, False, and Random. True always speaks truly, False always speaks falsely, but whether Random speaks truly or falsely is a completely random matter. Your task is to determine the identities of A, B, and C by asking three yes–no questions; each question must be put to exactly one god. The gods understand English, but will answer all questions in their own language, in which the words for yes and no are da and ja, in some order. You do not know which word means which.

Some clarifications. You can ask the same god repeatedly and you can make your questions and to whom you address them depend on previous answers. Think of Random as just flipping a fair coin to decide whether to tell the truth or lie. The puzzle is by George Boolos and titled The Hardest Logic Puzzle Ever for those looking for hints or whatever. Have fun.

Post reply on HN