Live data from Hacker News

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

theguardian.com

361–370 of 419 posts

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

#361

Earlier quoted context omitted.

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…

  function areAllTheirHatsGreen(someone) {
      return someone.getHats().every(hat => hat.color === 'green')
  }
I wonder if there's a language or programming paradigm where this function wouldn't be determined simlarly.

I think best you could do is make a validation check that throws an error if there's no hats at all, but would that make sense?

What if you have a function that has to return a boolean and not throw an error.

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

#362
post #205
post #163

Earlier quoted context omitted.

yeah, you can add most "paradoxes" to that list. the one I hate the most is the Monty Hall Problem.

monty hall is not a true paradox. it could be classed as "veridical" (truthful) paradox, or i've seen it called a pseudo-paradox. but you realize that it's unambiguously mathematically true without gimicky word-play or puns or other logic puzzle trickery. it's just simply an un-intuitive result. most statistics really is. curious: why the hate for the monty-hall problem?

Yes, I didn't mean it as it being a paradox just the problem I hate the most. I should've worded that better.

The reason I hate it is that it's a example of how to lie and mislead using statistics and that the only reason it exist is that a content creator in the print media wanted to give an edgy true answer to farm engagement, and now as a consequence many introductory statistics course make students suffer for the same reasons. The assumptions made to reach that answer are not made explicit and it changes the response. And teachers mess it up a lot of the time which lead to a lead of head-scratching (or sometime just leave under-specified on purpose).

It was the right answer to a question that wasn't asked. the host opens the door before giving the choice and the door he's choosing isn't random.

Wikipedia explains this better than I would be here's the part I'm talking about:

> In Morgan _et al four university professors published an article in _The American Statistician_ claiming that Savant gave the correct advice but the wrong argument. They believed the question asked for the chance of the car behind door 2 _given_ the player's initial choice of door 1 and the game host opening door 3, and they showed this chance was anything between 1/2 and 1 depending on the host's decision process given the choice. Only when the decision is completely randomized is the chance 2/3 .

[Monty Hall problem - Wikipedia](https://en.wikipedia.org/wiki/Monty_Hall_problem)

The game theoretic explanation (in the same page) as to why you should switch is more convincing and less click-baity though without needing to give a specific probability value or assume the host strategy.

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

#363
post #278

Earlier quoted context omitted.

Granted all that, but we're not really talking about normal everyday English, but a hypothetical conversation with some mythical entity who can only lie, which is not really a capability of humans; even the most pathological liar among us can and will tell the truth. So I'd put all that theory in a drawer somewhere and acknowledge that, when we're talking about logic puzzles, the rules of logic are paramount, not gra…

As I said in a previous part of this thread, the rules of logic are as arbitrary (by definition) as they are paramount, and often diverge from natural language logic: https://news.ycombinator.com/item?id=42365222#42368661 --- I mean, it's important to remember that the axioms of first-order logic are arbitrary. We could easily argue that the truth value of an empty group is undecidable, and that would better correlat…

This addresses my previous reply to you, thanks. I wonder though if there's a problem in that common natural language is inherently limited to common concepts. Scientists famously use confusing language in their papers but they're writing for people who use the same language so it's OK. For example, they use "consistent with zero" to mean "might be zero" even though a common-language reader can interpret it as "not zero". I suppose logicians use "or" to mean inclusive or in their papers too.

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

#364
post #76

Earlier quoted context omitted.

But ‘my hats is not empty’ is not a statement being made by the liar.

He said 'all my hats are green' either that statement is to be interpreted to require that the set of hats is not empty or it isn't. In the first case that interpretation would be part of the statement he made.

This person‘s argument hinges on trying to make two statements rather than one, I’ll illustrate with a quote:

> We know that the speaker always lies, so both statements must be false: my-hats must be empty, and it must be that it exists at least one hat in my-hat that is not green.

No. Since it is one statement as written, and the rules of common logic are not created by the liar, as I said up in the thread, either possibility is true. The person may have no hats or have one hat that is not green.

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

#365
post #78

The phrase “All my hats are green” implicitly carries the premise “I have hats” in conversational language. Thus, if this statement were to be expressed as a logical proposition, it should be: “I have hats, and all my hats are green.” This means there are two potential falsehoods in the statement: 1. “I have hats.” 2. “All my hats are green.” Therefore, what we can deduce is: • He might not have any hats. • If he doe…

I think the implicit premise might come from the logical deduction that "all my hats are green" is false means that "i have hats"

the statement is ambiguous when i have no hats, therefore, i must have at least a hat. weve seen the case so often as to know its true without thinking about it

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

#366
post #285

Earlier quoted context omitted.

The difference here is that the Monty Hall problem has an explanation that while counterintuitive, is statistically sound. You should always switch, because the probability you picked the correct door is locked in at the time you made the choice between 3 doors. It is 1/3 that you picked correctly, and 2/3 that you picked incorrectly. The counterintuitive part is that if you switch, you are effectively selecting all…

Last time I claimed this was the correct answer, I was linked to the Monty Crawl problem. https://www.probability.ca/jeff/writing/montyfall.pdf

Years ago, the Monty Fall variation was mentioned on a local telnet forum I visited. The "consensus" of the thread was the solution of Monty Fall is the same as that of Monty Hall: switching gives you 2/3 chance to win.

That was when I realized many people just memorize the Monty Hall's solution without understanding it, a.k.a. "standardized tests".

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

#367
post #119
post #45

Also please solve it without using ChatGPT o1 or any other LLMs please?

4o gave the "linguistic" answer seen here in this thread. None of the 5 options are conclusive. o1 gave A as the answer, and it even mentioned "vacuous truth"

whats the chances it summarized this thread?

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

#368

Earlier quoted context omitted.

I think there's a sort of divide-by-zero problem here. Does an empty set of hats have a color? You could arbitrarily define "all my hats are green" for the empty set as either true or false as part of a consistent logical system. There isn't enough information in the question to know whether we should pick one or the other, though there's probably a colloquial preference for true.

If set of his hats is the empty set then it contains no hat which is not green, which would make his statement true. As siblings have said, this is a “vacuous truth” in formal logic. Edit to add: if you find this problematic consider that the statement “All my hats are green” in formal logic is identically equivalent to For all hats h in my hats, h is green. So for this statement to be false there needs to be a hat i…

If you add "using old-fashioned predicate logic" or "using classical logic" to the question, I agree with you. Vacuous truth is generally useful, but it's still an arbitrary choice. It's not a thing you can test like gravity.

This is why the problem statement bothers me. If you're going to contrive a puzzle out of pure logic, you had better constrain the world (ie, what logic system the "liar" uses). It's like formulating a geometry problem (behavior of parallel lines, sum of angles of a triangle, etc) and just assuming Euclidian space.

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

#369
post #303

Earlier quoted context omitted.

Those assumptions are required for the usual explanation. But they are very rarely stated. And so the usual explanation is not logically solid. You can't just sneak in the assumptions. You have to state them somewhere.

well, they are part of the original, canonical problem. it's not the original problem's fault if re-tellers omit key information.

They're not. It says he "opens another door, say No. 3, which has a goat". That could mean he deliberately chose a door with a goat or he chose one by some unstated process and it happened to have a goat by chance. It says he "knows what's behind the doors" but that statement means nothing because it doesn't say how he uses that knowledge, if at all. It's full of language ambiguity.

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

#370

Earlier quoted context omitted.

If that is true then liar said truth.

And that's why we must conclude that there must be a ten-foot tall man, so it can have non-brown hair, so that the liar indeed lied.

Why liar can't lie about ten-foot tall man? Liar could mean two-inch hamster but lied and said ten-foot tall man
Post reply on HN