Live data from Hacker News

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

theguardian.com

191–200 of 419 posts

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

#191
post #150

Earlier quoted context omitted.

That's the reason natural languages are not very well suited to formal logic, and one of the reasons programmers use programming languages. If we reframe it using C++ "std::all_of" function over an array of strings called "hats", and say that the following must be false (because he is a liar): std::all_of(hats.begin(), hats.end(), [](std::string hat) { return hat == "green"; }) Then we can answer the questions withou…

The question becomes why all_of returns true for an empty list. A better example would use std::accumulate and an 'and' function argument. The original STL documentation [1] described the function argument as having to model the Monoid[2] concept and have an identity value. The identity value for the 'and' Monoid is 'true'. [1] https://www.boost.org/sgi/stl/MonoidOperation.html [2] note: Monoid, not Monad, and yes, c…

And it is also what makes the most sense if you are using all_of, usually.

For example, you may want to use all_of to check if all the preconditions are met before running a command, is there are no preconditions, then you can run the command.

Or, in a test report, a test case is successful if it and all of its sub-cases are successful, if there are no sub-cases, then that part is considered successful.

Or, you are making a task runner, you exit if all the tasks are completed, if there are no tasks, then you can exit immediately.

Saying that all of nothing is true is the most appropriate behavior, both in theory and in practice.

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

#192

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…

This is generally the case for the vast majority of puzzles, 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. I've rarely encountered a case where it is isnt an extreme lack of self-awareness in the questioner -- eg., being extremely overfit to language/notation/etc. localised to their own area of expertise.

It works better for everybody when these puzzles are told as inside jokes instead.

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

#193

Earlier quoted context omitted.

Puzzles like this are to make more people interested in formal logic. The "gateway drug" of formal logic. Just like the barber paradox isn't literally Russell's paradox, but it made more people to look up the history of it and perhaps learned what Russell's paradox is. Hopefully 0.1% of them turn out to be mathematicians.

Why not hopefully more? Less? Is mathematics this inaccessible to the other 99.9%?

> Why not hopefully more? Less? Is mathematics this inaccessible to the other 99.9%?

I think it meant "hopefully at least 0.1%." (I can imagine someone who feels that it's hopefully at most 0.1%, but probably that person wouldn't be kindly disposed towards efforts to fool people into being interested in complex mathematical topics, as your parent seems to be.)

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

#195

Earlier quoted context omitted.

Agreed. Not to mention that a liar doesn't necessarily have to mean someone who tells a falsehood in every single statement. It could just mean someone who frequently tells falsehoods. Or, more deviously, someone who wants to cause maximum uncertainty in his listeners, in which case some mix of true and false statements would probably be the way to go.

In the world of logic puzzles, it is understood that a "liar" never makes a true statement, and that "vacuously true" statements are false.

> In the world of logic puzzles, it is understood that a "liar" never makes a true statement, and that "vacuously true" statements are false.

I agree with the first stipulation, but, outside of Lewis Carroll's puzzles, I think that the second isn't true. For example, I believe you'll find just the opposite in Raymond Smullyan's books.

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

#196

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…

There's an early xkcd for this sort of riddle: https://xkcd.com/169/

The article mentions a maths exam, and of course the answer to the hats puzzle is very straightforward if you convert to statements about sets and logic in the way the teacher expects.

But converting ambiguous language into logical statements by taking everything extremely literally is the opposite of a useful life lesson, so I think it's a terrible exam question.

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

#197
post #3

Earlier quoted context omitted.

Yeah, I'm a bit confused there is no option "he has at least one non-green hat", which is what I would answer. Perhaps that means I'm wrong.

Whether you are wrong depends on whether you interpret his statement in a mathematical or in a colloquial sense. Colloquially, if I have no cats and tell you "all my cats are brown", you'd say that I'm lying, beause I'm implying that I have cats. Mathematically, if I have no cats, then it is true to say that all of the ones I have, which are zero, are brown.

If you have none how can you say they are specifically brown? You could say they are any color then which makes them being just 1 specific color not true. Your non-existent cats aren't brown, they are every color or even no color.

Maybe even more accurately they aren't brown, they are an undefined color.

I'm not really satisfied saying that the characteristics of something that doesn't exist can be anything. I am satisfied saying the characteristics are undefined though.

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

#199
post #166

Earlier quoted context omitted.

Logic itself is a relatively new invention, and is symbolic itself. That is to say, logic is a map not the territory. That said, if someone can't fathom the most widely used symbolic languages humans use (math, logic, language, etc) they probably do have a cognitive deficit of some sort when compared to those who can.

I mean, 2400y at least… I guess you mean quantitative logical calculus notation? - the local Russell hater

I guess sleeping through history class is also a mental deficit ;)

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

#200

Earlier quoted context omitted.

Why not hopefully more? Less? Is mathematics this inaccessible to the other 99.9%?

Maybe "hopefully" isn't the right word. My point is that not everyone who understands barber paradox (in plain english) has to understand formal logic, and not everyone who understands formal logic has to become a mathematician. However I still believe the existing of the plain english puzzle is a net positive for humanity's collective mathematical comprehension.

I think you want "optimistically".
Post reply on HN