Hacker News new | past | comments | ask | show | jobs | submit login
A liar who always lies says "All my hats are green." (theguardian.com)
93 points by ColinWright 4 months ago | hide | past | favorite | 400 comments



The puzzle is referring to the concept of a vacuous truth (https://en.wikipedia.org/wiki/Vacuous_truth).

In most logic frameworks, the All function (upside down A in standard logic notation) is true if and only if no statement within the set is false (i.e. All his hats are green if he has no hats). This is for several reasons:

- it allows for more coherent empty set functions. For example if we take the power set of a set, that power set has the same All value as the standard set (since the power set includes the empty set)

- it allows for early stopping on false statements. So you can define the statement as a lazy executor of all child conditions


I learned about Vacuous Truth the hard way recently when I found out that `every` method in JavaScript returns `true` for empty arrays as well.


In programing, you can always rewrite that first rule as "all" and "some" must compose over set union. So, "all (A ∪ B) == all A && all B", and "some (A ∪ B) == some A || some B".

That lets you discover the answer for the empty set.


Which leads to a funny fact that if all elements of the set S satisfy proposition P it doesn’t necessarily imply that some elements of the set S satisfy proposition P.


My description of the power set is by definition allowing all to imply some


I don’t follow. Can you elaborate?


The power set of a set S, P(S) (or sometimes 2^S) is the set of all subsets of S including both the empty set and the set itself.

To bridge the gap with programming, make a map f: S -> bool which represents our predicate.

all(f, S) => either S is empty or for all elements s in S, f(s) = True.

Now make f work on sets as well as individual values. f({x, y}) means True if f(x) and f(y) are True, False otherwise.

all(f, S) => all(f, P(S))

If we take the opposite and define all(f, {}) = False then this doesn't work and in addition all(f, P(S)) = False for all sets S.


That doesn’t explain how all(f,{}) => some(f,{}) may be made true with your definition preserving the distributive property.


As I think you would hope from a practical standpoint -- you don't want to have to handle a special case of false and always check if the array is empty.

I agree it's only logical in engineering contexts like that though, not in everyday language.


This is even what I expected, but I majored in math, so maybe that biased my response.


But if you consider “liar” to be an object,

> liar.hats.every((hat) => hat.color === "green")

will throw a TypeError: Cannot read properties of undefined. That’s definitely not `true`.


This depends on `liar.hats` being undefined, but what if `liar.hats` is an empty array? That seems like an equally valid way of representing a person that owns no hats.


You implemented the problem wrong, and thus got an error. If hats is a list of colors, then every hat != green is true if the list is empty.


I wouldn’t say it is wrong per se. It certainly defies the conventional translation into FOL, but there is no a priori reason to pick the conventional formalism of FOL for this problem.


I don't think that's true. What if the liar buys a red hat?

    liar.hats.push("red")
This only works if hats is an empty array. If hats is just not a property people have (undefined in the example), then you can't represent adding them.

Now you might argue hats can be null when a user doesn't have them, or a non-empty array, but that's clearly not a great way to represent that. Now you have owning no hats represented two different ways as an empty array or null, and must build special casing around the null case (unless you are using a language where nil and the empty array are one and the same)


Hm. No.

    const liar = { hats: [] };
    liar.hats.every(hat => hat.color === "green")

    true


As a programmer, my favorite way to think about Vacuous Truth is to think about the relationship between binary operators and their corresponding sequence operators. Think about taking an operator like "plus" and extending it to sequences or lists of things. What properties would we like those extensions to have? Let's start with a simple example:

Sum is the "sequence extension" of Plus.

    Sum([a, b, c]) = a + b + c -- basically our definition

    Sum([a, b, c]) = Sum([a, b]) + Sum([c]) -- distributive

    Sum([]) = 0 -- identity
Let's keep things simple by assuming our operator is associative and has an identity (i.e., it is a monoid). We can take any monoid and extend it to sequences. Assume @ is some monoid. We define the sequence aggregate "Agg" as:

    [0] Agg([a, b, c]) = a @ b @ c == ((a @ b) @ c) == (a @ (b @ c)) -- definition + associativity

    [1] Agg([a, b, c]) = Agg([a, b]) @ Agg([c]) -- distributive

    [2] Agg([]) = Identity(@)
Note that property 2 is required if we want Agg([]) to have a value at all, since Agg([]) == Agg([] concat []) == Agg([]) @ Agg([]). If Agg([]) doesn't have a value, then it's not really properly distributive, since Agg([a]) == Agg([a] concat []) == Agg([a]) @ Agg([]) == ???. So we see that if we have an identity for the operator, it really should be the same as Agg([]).

So let's extend AND and OR to sequence operators. The extension of AND can be called "Every", and it operates on sets of booleans. In particular, Every([]) == Identity(AND). The Identity of AND is "true", so Every([]) == True. The extension of OR can be called "Any", and Any([]) == Identity(OR) == False.

This is the easiest way for me to remember the truth values of Every([]) and Any([]): they must be the identities of the corresponding boolean operators.

Any([Your name is Bob, you can fly]) == Any([Your name is Bob, you can fly] concat []) == Any([Your name is Bob]) OR Any([You can fly]) OR Any([]) == (Your name is Bob) OR (You can fly) OR (False). Any([]) == False.


One complication is that in typical English, if you say "All my hats....", you are simultaneously making an existence statement that you have at least one hat... but the usual formal logic "forall" quantifier does NOT presume existence. Here's a formal proof that "forall" has a "surprise" meaning for those not well-versed in formal logic: https://us.metamath.org/mpeuni/alimp-surprise.html

I propose that when translating such statements to a formal logic, if that's what you really mean, use an "allsome" quantifier as I've described here: https://dwheeler.com/essays/allsome.html

It's really easy to forget to include an existence quantifier. Having notation specifically designed to automatically include it can avoid some problems.


> One complication is that in typical English, if you say "All my hats....", you are simultaneously making an existence statement that you have at least one hat... but the usual formal logic "forall" quantifier does NOT presume existence.

Perhaps. But what if someone asks you "are all your hats green?" Then the interpretation is not so clear.


> 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, thus it is generally an assumed axiom that statements will have meaning. Here, even when people make borderline nonsensical statements, we assume there is a metaphor or language game involved.

So, by making a statement about 'all my hats', if the number of hats you have is zero, then any predication is absurd and the statement is absurd, so given an axiom of not making absurd statements for natural language, you can assume there are at least two hats. Obviously there are no formal rules here, but the functionality of natural language demonstrates that these heuristics exist.

https://plato.stanford.edu/entries/implicature/


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


I'll add the exchange back here to continue this thread

-----

>>scoofy: 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 correlate to natural language logic.

The fact that we compact these edge cases into arbitrary truth values is just for ease of computing.

This is also relevant to the arbitrary choice of the 'inclusive or' as a default over an 'exclusive or', which most people use in natural language.

---

>foxglacier: 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.

-----

"Absurd" here I wouldn't say is a term of art. I just mean things that not only don't mean anything, but can't mean anything. Here, existence is always extremely relevant. This goes back to Kant's idea that existence can't/shouldn't be a predicate. The idea of talking about the actual color of a nonexistent hat is absurd in that a nonexistent hat can not have a color, period, because having a color presumes existence.

So, when I talk about the logic of natural language, we have to get really philosophical. I presume that there as at least significant equivalence from formal logic to natural language, if not ultimately being fully equivalent. Formal logic is effectively a model trying to capture logical reasoning, and there are some notable differences for simplicity's sake (the Frege-Russell ambiguity thesis is a common example: https://link.springer.com/chapter/10.1007/978-94-009-4780-1_... ), however, most-if-not-all of these formal logic ambiguity concerns are trivial for natural language to deal with as any ambiguity can be clarified by an interlocutor.

Where things get really weird, however, is as you go up to the axioms of logic, and try to justify them. The idea that foundations of logic itself is determined either inductively or instinctually is just bizarre. And mapping an inductive/instinctual logic to a formal system runs into a lot of philosophical problems that aren't really practical to worry about. It just gets weird and solipsistic, as it does when you get too caught up in philosophy.


absurd statements are usually jokes

a joke

> "all my hats are green" - bill

> "but green hats catch fire in the sunlight" - joe

> "and thats why i dont have any hats" - bill

from the link:

> Many conversations have goals other than the exchange of information. One is amusement, which speakers often pursue by making jokes (Lepore & Stone 2015: §11.3). Because the goal is not to provide information, the maxims of Quality, Quantity, and Relation do not apply. If for any of these reasons the Cooperative Principle does not apply, reasoning based on it will be unsound.

i think i disagree - the joke is intended to say that bill doesnt have any hats, but would like one, and only a green one, and only if they didnt catch fire in the sunlight


This is why I point out that an absurd statement still points toward meaning via a metaphor or language game, which I would put wordplay/jokes under the rubric of.

In fact, in my thesis, I cited The Naked Jape, by Jimmy Carr specifically in reference to jokes (it has a one-liner on every page). On of my main arguments against Gricean conversational implicature theory was that the theory itself was a form of begging the question or no true scotsman problems, in that all of the obvious examples where a counter-factual to the cooperation principal that exist everywhere are excused as "not conversation."

https://archive.org/details/nakedjapeuncover0000carr

Again, yes, you can have wordplay, but wordplay is wordplay, and is a language game that exists and is trying to do something in a different framework.

The reason why so many folks have no issue with the puzzle is that they view it as a puzzle (a kind of language game), and not a sensible human communication. This lets them genuinely consider absurd statements and treat them as normal.


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 grammar.


Sure, if your main use of formal logic is to while away the time doing vacuous puzzles.


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 correlate to natural language logic.

The fact that we compact these edge cases into arbitrary truth values is just for ease of computing.

This is also relevant to the arbitrary choice of the 'inclusive or' as a default over an 'exclusive or', which most people use in natural language.


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.


> All my hats....", you are simultaneously making an existence statement that you have at least one hat

It does not. All my unicorns fly. There is no assumption that I have a unicorn. There is an assumption, based on the claim but it is not a fact.

The puzzle also assumes that "my" implies there is some ownership (we'll take for granted "my" means "has" for simplicity), which is another quibble that unravels the whole thing.

E is correct. I don't see how A comes to be the accepted answer.


Would you agree with the following proposition: “if all of my unicorns fly, then some of my unicorns fly”?


No.

(assuming you have no unicorns) "all of my unicorns fly" is true; "some of my unicorns fly" is false; "true->false" is false.


So you claim that in normal English “all” doesn’t imply “some”?


This reminds me of one of my favorite threads on the old Internet Infidels web site, in their Philosophy forum. The question was, "Do dogs bark?" There was an enormous amount of discussion on it!


Does "when pigs fly" imply that some day pigs will be able to fly? No; people can understand impossibility when it is used rhetorically in every day speech.

For example I might say, "all the honest politicians are doing a great job", which conveys my actual meaning, "all politicians are dishonest".


That stops working when its not obviously rhetorical.

Someone else in the thread mentioned: 'All my kids are in high school'. If you said this to a stranger with no other context, they will 100% think that you have kids. There is no possibility that you meant, 'I am asserting that in the set of my children, each element satisfies the property of being in high school'


I don't understand what point those examples are supposed to convey.

"All of my unicorns can fly -> some of my unicorns can fly -> at least one of my unicorns can fly" still seems to be a valid inference that may get lost in conventional translation into first order logic. And a proposed "allsome" quantifier still seems like a valid remedy for that.


Yes


So if “all my hats” doesn’t imply that I have at least one hat, “some of my hats” doesn’t imply it either; otherwise we wouldn’t be able to derive “some” from “all”.

Hence, “some of my hats are green” doesn’t imply that “at least one of my hats is green”. That’s a claim that contradicts both traditional formal logic interpretation and common sense English interpretation.


I think the same of your interpretation of some vs all. Some can contain all, just as it contains none. Both some/all imply, but do not assert existence. Claiming it tautologically defies logic is not compelling.


Well, I think showing that it defies logical inference is quite relevant in the context of that thread being about translating typical English into first order logic to do logical inference.


I worry about sets and consideration of edge cases. Legal, programmatic, medical. Adhering to a convention that presupposes meaning and claim that interpretation is the only interpretation, cannot be resolved with repetition. I remain unconvinced.


You were the one to claim the only interpretation (in opposite of OP who merely claimed "typical English" interpretation). Moreover, your interpretation directly contradicts both conventional typical English interpretation, which would be relevant in legal context (where making such claims with empty set in mind would be deemed misleading), and conventional formal-logical interpretation, which would be relevant in programming (where the truth of `array.every()` doesn't imply the truth of `array.some()`).


E cannot be correct.

"All my hats are green" is still false even when I own a red hat and a green hat.


I would agree that's obvious, if not for the original error.

The liar doesn't necessarily "have" any hats. Again, the assumption that the liar has hats is incorrect because it's relying on an conversational implication, rather than a specific assertion.


Sure, but the question isn't about which statement is possible from the liar's statement, it's about which statement we can conclude from the liar's statement.

The liar could be lying because they have no hats. They could be lying because they have a non-green hat. We cannot conclude E because it's possible that E is not correct.


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 correlate to natural language logic.

The fact that we compact these edge cases into arbitrary truth values is just for ease of computing.

This is also relevant to the arbitrary choice of the 'inclusive or' as a default over an 'exclusive or', which most people use in natural language.


I have to interpret the question at face value, which may equate to natural language logic. I dont know the specific rules of any of these systems, which are obviously particular or wildly different from a layman interpretation. Most of the arguments seem to center around specialized conveniece rules (as you mention), which are eventually equated to the one true way to deconstruct meaning. At least, that is what I got out of this thread.


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 cat that they like to carry on their head.

What the author would probably say is “All my hats are green” means the liar is either lying about All or Green. Either all their hats are some other color or only one hat is green. This means you have to assume the liar has a hat. How do we know that?

We only know that because of similar puzzles that came before. In other words this is not logic but more pattern recognition.


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.


The linguistics imo are pretty ill defined.

"All" bring a common colloquial term doesn't have a strict set theory definition here. It is reasonable many people think zero hats is means the lie is in this very first word.

A lot of people will consider "all" to implicitly mean 1 or more, while I think strict logicians will map colloquial all to 0 or more.

All mat imply colloquially 2 or more as well, as why bother say "all" if you had one hat in the truthful sense

"My hats" contrasts with the "has a hat" because having a hat in your possession that you could have borrowed does not confer ownership that the word "my" can imply.

So great, a three letter word and a two letter word and we are knee deep in ambiguity.

They could be wearing the hat to try to publicly locate the true owner who might say "hey I lost that hat at x".

"Are green"... Green as in vegetable? Green as in the specific wavelength defined as green and not lime or some other named shade? Completely green dyed being undermined by a black spot or a pattern on the hat?

Imo zero hats of ownership is a viable lie to the statement, as is having one red-green hat.


I like your way of phrasing this. Also, we can assume that this is not the only statement that the liar has ever told, so the context matters. If the preceding statement was "Every hat is my hat." Then we have a definition of "all" in the next sentence that works against the stated answer. So "we can't conclude anything" is really the answer because of undefined terms.


My favorite example is Monty Hall problem. "Smart" people often use it as the evidence of how bad general people are at probability.

It really isn't. The problem is usually given in this form:

> Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice? [1]

The only correct ansewr to this question is "I don't know." People who answer yes are just taking way too many standardized tests.

[1]: https://en.wikipedia.org/wiki/Monty_Hall_problem


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 the doors you did not pick originally. It's your original door, vs the field.

The green hat problem hinges on subjective interpretations of the meaning of both "liar" and the different ways in which the liar's sentence may be false. It may be false because the liar owns many hats, none of which are green. Or they own many hats, only some of which are green. Or they own no hats. These are all reasonable interpretations of how the sentence might be false, and the answers presented are not necessarily mutually exclusive.


The problem here is that the usual explanation sneaks in multiple rarely stated assumptions.

If Monty knows the door with the prize and is aiming for the game to continue, then you should switch. (This is the usual argument.)

If Monty doesn't know where the prize is, then you learned nothing. (Monty's result was luck, and he can't impart information that he doesn't have.)

If Monty knows where the prize is and wants you to lose, absolutely don't switch. (Monty will only drag the game out as a way to try to make you lose.)

The reasoning behind these statements is completely solid, and there are no hidden assumptions being snuck in.


I think, canonically, Monty always knows where the prize is, and will always eliminate all doors except for one, and will never eliminate a door with the prize, and will always give you a choice to switch. There's no room for Monty's motivation.


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.


the assumption is told to you in that the game is expected to continue after monty opens a door. if he could open the prize door, the game would describe what happens when he does that


No. That condition holds in all three of the scenarios that I stated. And yet you have 3 different answers. Switching 2/3 win, 1/2 win, and 0/1 win respectively.

You specifically need information that we haven't been given about the counterfactuals. What might Monty have done in other scenarios that we have not yet observed? We don't know. And we're not actually told. That makes that an implicit assumption that wasn't specified.


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.


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


That's fine, but given the parameters of the problem change with the Monty Crawl variant, it's not the same problem, and doesn't invalidate the answer of the base variant.


The problem is that the parameter was unspecified in the original problem. Your answer is equivalent to the shaky answer referred to in the paper. Without knowing that the host selects between 2 goats with 50/50 chance, you cannot give a general answer.


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.


> it doesn't matter because we don't get any additional information about whether our original choice was correct

That's the missing assumption. I would say assuming that people are perfectly random falls into the "standardized test" category.

> you won't get information, and you should still always switch and win 2/3 of the time.

You always get some information, the set of possible results becomes narrower, so saying the probabilities don't change is not sufficient. Not a good idea to discuss the problem in informal language though.


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".


But it is in your advantage! Code a simulator and do some numerical experiments. The simulations where you switch end up winning more.

Edit: from your other reply I see your beef is more with the wording.

Edit edit: although I disagree with your point even then. But it seems to lead to rather fruitless argument, so let's leave it here.


I think reasoning with the 100-door variation is likely to be more enlightening than encoding your assumptions into a simulation.


I'm sure it depends on the person. Some people like to see raw numbers, others a more general problem.


I guess I don't understand why you think "I don't know" is the only correct answer. It's clearly not, which is the point of the problem in the first place. It's a bit hard to grok, but once you do, it's clear what the right answer is.


"I don't know" is the only correct anwser because the original problem isn't properly worded.

You need to (at least) add this statement to the original question:

> The host must open a door in any situation, and you know this rule.

Because "host" in daily language is a human being with agency to choose whether to not open a door. Without this statement, the original problem is actually a game theory problem with two players. The host might be playing a strategy where he only opens the door when he knows you picked the car at the first place, or any other strategy.

The above statement removes the ambiguity and that's what the original author meant (but failed to put in words).

(If you're interesting in this, the wikipedia page linked above actually contains a quite extensive discussion in history over it)


I don't think improper wording makes it an example of the type of puzzle GP is complaining about, because the counter-intuitive aspect holds up when everything is clarified.


Ah I see what you mean. Yeah, that makes sense. If the host behavior is not clearly stated then the right answer would indeed be "it can't be determined from available information".


It depends on if Monty has the option to show another door or do nothing.


Perhaps there's another formulation you meant to write, but every time I've seen it, it's been equivalent to the thing you just asked, and the only potentially ambiguous part of the question is "to your advantage". If you stay then you have a 1/3 chance of getting a car, and if you switch you have a 2/3 chance.

Yes, it's also correct that you don't "know" the result, and you might prefer goats to cars (even then you should probably sell the car and buy several goats), but there's a reasonable enough interpretation of "advantage" that you shouldn't dismiss the problem outright.


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 made it clear in her second follow-up column that the intended host's behavior could only be what led to the 2/3 probability she gave as her original answer. (emphasis mine)

My point was that when people ask this question, they often word it like the very 1990 version did, lefting out this critical statement (which Savant considered needed as well, therefore she clarified in the follow-up column), making the question ambiguous.

(Although Savant also said "Very few (out of people who said is 2/3 is wrong) raised questions about ambiguity"... so perhaps people are actually just bad at probablity...?)


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 answer. Which is that you make up a random number and pretend it is the other one. Your odds of being right are

50% + (probability of choosing between the numbers) / 2

Which can always be strictly bigger than 50%. (Though possibly by only a little amount.)

Special case. If those numbers and yours were all independently randomly chosen from the same distribution, you'll be right 2/3 of the time.


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.


This turns out not to be the case.

Let's play this game exactly once.

You choose two unequal real numbers. I don't know what they are, and I don't know the distribution from which you choose them. You write them down and put them in separate envelopes.

I'm allowed to choose one envelope and open it to see the number inside, and my job is then to say which envelope holds the larger number.

I claim I have a strategy now which lets me win strictly more than 50% of the time. My strategy is this.

I choose a real number R at random from a distribution that has dense support. In other words, for any two reals, L and U with L<U, P(L<R<U) > 0. This is easy to do ... one method is to list the rationals, positive and negative, then roll a die, discarding numbers until you get a 6.

Now I flip a coin and thereby choose an envelope at random. I proceed by assuming my chosen number is between your two numbers. There is a non-zero chance this is true ... call it e. So e>0.

If I'm wrong then my choice is 50% ... probability is 1-e.

If I'm right then my choice is 100%. ... probability is e.

Combined, my chance of being right is 0.5(1-e) + e = 0.5+e/2, which is strictly greater than 50%.

You can make it as small as you like, and if we play the game repeatedly then you can make it approach 50%. But as it stands, with a one-off game, I can win with a probability that depends on your chosen numbers, but which is strictly bigger than 50%.


I'm not a mathematician so please bear with me here, but I think a problem stems from the fact that the set of reals is "infinite". So, whatever interval you choose, there are infinitely more reals outside the interval as inside (by that I mean that you can fit an infinite number of copies of that interval up to infinity). So the probability e is not >0, it is effectively 0. The second problem is, what does it mean to choose a real at random ? There is an implication that you can choose such number, but as a human living in the finite universe there are limitations to your choice. Any number you can write using all the atoms in the universe is infinitely outnumbered by all numbers that you can't. So effectively it is impossible to pick a random real number. You have to pick a real in some interval, implicitly the interval of reals you can write in an envelope. Which is a different problem than stated originally and for which your "e" can be >0.


> The second problem is, what does it mean to choose a real at random ?... So effectively it is impossible to pick a random real number

Yes, it's established there isn't "uniform distribution over all real numbers" without violating axiom of probability. You're 100% correct on this.

But it doesn't make Colin's solution wrong, because e > 0 for any* well-defined distribution.

> Which is a different problem than stated originally

There are two ways to inteprete the original problem:

A. The numbers are truly randomly picked over all real numbers.

B. The numbers are picked from a well-defined distribution which is unknown to the player.

Since A. is invalid mathematically speaking (without changing the commonly accepted definition of probability), it's reasonable to only consider B., in which case, Colin's solution is correct.

I made a more intuitive explantion on why a strategy better than coin toss exists here: https://news.ycombinator.com/item?id=42372972

*: More strictly, any distribution that guarantees the probability that the two numbers in envelope are the same = 0.


How the numbers in the envelopes were picked doesn't matter. What's important is that they exist, and are specific numbers.


I'm not a mathematician so please bear with me here

I am a mathematician, so please bear with me when I try to explain how this can work.

The rational numbers are countable, and that means that I can write a list of them. There are several ways of doing this, but personally I like the Calkin-Wilf tree[0]. That only gives the positive ones, but we can include zero and the negative ones by interleaving them.

So, whatever interval you choose, there are infinitely more reals outside the interval as inside (by that I mean that you can fit an infinite number of copies of that interval up to infinity). So the probability e is not >0, it is effectively 0.

One you have chosen the two numbers, L and U, I note that there are rational numbers in between. Choose one of those numbers, call it M.

M is in my list above. Now I roll a die, discarding numbers from the list until I get a 6. There is a non-zero probability that the number retained is M, so there is a non-zero probability that my chosen number is between L and U. So e is definitely non-zero.

The second problem is, what does it mean to choose a real at random?

It doesn't have to be uniformly at random -- that's the mistake nearly everyone makes -- and the above process does it perfectly well. It only ever chooses a rational number, but that's OK. It's still a real number, it's still a random number, and for any non-empty interval, there is a non-zero chance the chosen number is inside.

... as a human living in the finite universe there are limitations to your choice.

Yes, but that is accounted for in the explicit description of how to choose the number.

Any number you can write using all the atoms in the universe is infinitely outnumbered by all numbers that you can't.

Again, this is accounted for by the fact that we are not choosing uniformly at random.

[0] https://en.wikipedia.org/wiki/Calkin%E2%80%93Wilf_tree


Am I right to assume one could also sample from a Gaussian distribution for the method to work? Of course, the probability e of sampling between the two real numbers would be very small, but it would be nonzero.


Yes, any distribution with dense support works. Your problem is to prove that your method of number selection really does have a non-zero probability of being between any two distinct reals.

So ... yes, choose from a Gaussian, but then you have to tell me exactly how.

That's tricky.


Why, exactly, are you allowed to know why some random guess is between the two numbers or not when computing your choice?


Sorry, too late to edit, I see you're describing how you know your choice was good/bad (I thought you were describing a probabilistic choice).


Yes, this two real numbers question suffers from hidden conditions as the original version of Monty Hall problem does, but even more explicitly.

We can't have an uniform distribution over all real numbers, so it's quite pointless to discuss if looking into the envelope gives any new information, cause we don't even know the distribution yet.


You don't need a uniform distribution to get guaranteed better than even odds. And many nonuniform distributions work just fine.

There are no hidden conditions. It is just a shocking result that we don't expect.


https://www.alexirpan.com/2015/09/09/the-other-two-envelope-...

If your solution is the same as this article's, it's plain wrong. Even the natural number case is plain strong.

It's very easy to demostrate as well: consider a trivia case where the distribution is just {P(1)=1/3, P(2)=1/3, P(3)=1/3} and you see 2 in the first envelope. There is no strategy to get a better chance than 50%. Therefore, any strategy that gives a better chance than 50% must implicitly make an assumption over the initial distribution (and therefore excludes a distribution like {P(1)=1/3, P(2)=1/3, P(3)=1/3})

Actually the article is even "wronger" than this, because "started A" and "switched" aren't independent and one can't simply use the product of their probability. The above example is a quick way to demonstrate it's not a general strategy without assumption to get >50% winning chance. Similarily, one can just use {P(1)=1/3, P(2)=1/3, P(3)=1/3} (this is a valid distribution over real numbers!) to demonstrate the real number strategy isn't general.

Again, for both natural number and real number case, the discussion over strategies is only meaningful is we know something about the distribution.

Interestingly, this article is wrong more or less in the same way as believing switching does give you more expected value in the original "twice money in another envelope" variation.

Edit: For people who are interested in the switching strategy, check Randomized Switching in the Two-Envelope Problem (2009). Spoiler: full of discussion over the initial distribution.


> It's very easy to demostrate as well: consider a trivia case where the distribution is just {P(1)=1/3, P(2)=1/3, P(3)=1/3} and you see 2 in the first envelope.

Seeing 2 is only one of the many possible cases. You haven’t calculated the total probability.


Sorry, but you're simply wrong. You can read the answer I gave. You can read the answer Colin Wright gave. You can trust that we both have math degrees and know what we are talking about. Or, aw heck, you can try it with an actual program at https://www.perlmonks.org/?node_id=39630. (Yes, I wrote that piece of hackery about a decade ago.)

I don't actually care how you convince yourself. But the explanation is right. If your random number is outside of the range, you've got even odds. If it is inside of the range, you've got 100% odds. As long as there is a positive probability of being between, you've got strictly better than even, by half of the probability of being between.

Many, many distributions guarantee positive odds of being in between. The one I chose for my program was:

    (log(rand) * (flip_coin() ? 10 : -10 ))
Which is the log of a random number between 0 and 1, times 10 times + or - with even odds. The various factors were chosen to fit well with normal human choices that most seek to test it with.


You're correct. I realized that I completely misunderstoond the original problem after reading McDonnell's paper more carefully.

I thought you meant the strategy can make the winning chance always >50% even after the player opens the first envelope, which isn't possible.

However you actually meant the strategy can make the expected winning chance >50% before the player opens the first envelope, for any well-defined distribution of real number, even the distribution is not known to the player, which now I realize is true.

(I haven't thought through some edge case like Cantor distribution, but now I incline to it's true not just for "many distributions". Of course for a discrete distributions, we need to specifiy the two envelopes can't have the same number. Besides that, it seems to hold true for any distribution?)


Exactly right. After you've picked the envelope, you may be nearly guaranteed to be wrong. For example both numbers are large positives and you picked the smaller. Now you're almost guaranteed to guess larger, and be wrong.

But before you pick, your odds were still bigger than 50%. Just not by much.


That code has the same problem that Colin Wright's explanation does. Your computation of the success rate explicitly uses the fact that you're between the two values, but till you've seen the second value you can't possibly know whether you are or are not and thus can't adjust your guess based on that fact.


The success is checked after the decision is made to, well, verify the decision. The guess isn't adjusted on whether the number is between two values.

The strategy is straightforward and bulletproof (if you allow a random generator of real numbers, otherwise you may keep tossing coins indefinitely): keep tossing coins until you get tails. If the number you saw is less than the number of heads you got, you don't switch.

For the simplest case assume that one envelope always contains 1 and another always contains 2. You choose one envelope randomly, so in 50% of cases you get 1, which you switch in 50% of cases. And in 50% of cases you get 2, which you switch in 25% of cases. Hence, you pick the higher number in 62.5% of cases. The same works with any numbers N, M; or any complex distributions; or even real numbers with a bit more complicated strategy. You don't have to know whether you are between two values in advance, you just have to guess.


No, I'm not doing anything other than tracking it. I'm doing that to show the user, "How much of this success was chance 50% choices, how much was guaranteed?" And so people can see how much of a good or bad result was blind luck versus the strategy successfully sticking a thumb on the scales.

In other words, I'm merely trying to be informative.


Edit Edit: I was wrong. I completely misunderstood the problem. See my other comment below.


You need some _known_ distribution though, and it's shocking because the distribution is ommitted from the question, and the presence of the same distribution is snuck into the answer.


I think you are wrong ... see my answer here:

https://news.ycombinator.com/item?id=42371563


Not to be too dismissive, but the title text of this xkcd [0] seems relevant. No matter how nice the explanation is, the fact that the conclusion is wrong suggests that the reasoning has a flaw. I took a stab at what I think that flaw is when I responded to your rebuttal [1].

[0] https://xkcd.com/2217/

[1] https://news.ycombinator.com/item?id=42372285


I dimissed it at first (you can see I made some embarrassing comments above), but the strategy is correct. I'd argue it's even intuitively correct once the problem in question is clarified.

It's not saying that after the player see the number in the first envelope, the strategy guarantees a >50% outcome.

It's saying that give any distribution, over all possible outcomes, >50% times the strategy will end up pick the larger number. You can say this >50% is the expected winning chance before the player see the number in the first envelope.

I'd say this is "intuitve" because, if your strategy can guarantee "when the player see a large number in the first envelope, he's less likely to switch than if he saw a small number", it would be better than blindly switching by coin toss. So intuitively such a strategy exists.

The only "trick" here is that since the player doesn't know the initial distribution, they can't tell "how large counts as large?" therefore they needs something that preserves some property over the whole real number line. That's why the strategy involves sampling from a another distribution whose PDF is non-zero everywhere.


Sorry, I was too dismissive. I'm not crazy about the explanation, but I think you're right.


"Two Envelopes Problem" seems to be usaully referred to a very different problem: https://en.wikipedia.org/wiki/Two_envelopes_problem


I was dealing with a more general variant of the version that Vos Savant gave. Which is that you were able to look at the contents of the envelope that you got. She claimed you didn't gain useful information. Calling it "information" is problematic, but it certainly is useful, because the stated strategy then works!

This is one reason that probability theorists have learned to be more careful in stating the double money version to rule out the solution that I gave. But my version has been in the literature since, I believe the 1950s. Under, as I first encountered it, the same exact name. (I encountered it from Dr Laurie Snell at Dartmouth College in the mid 1990s.)


Perhaps it'll be more intuitive to you if you scale the number of doors up. If there are 100 doors, only one containing a car, you pick one, the host reveals 98/99 remaining doors as goats, it's obvious the correct choice is to switch. The correct answer is a mathematically provable probability. 1% chance you picked the right door, 99% chance the door was in the remaining pool, therefore 99% chance the last remaining door is the correct door.


If you will try to play this game in real life, with such logic it will be easy to trick you 100% of the time.


You can write a simulation that does this (as MIT and several others have) and Monte Carlo it. You will find that the logic is 100% correct. The prize MUST be either the door you picked initially or the one you can switch to. There is a 99% chance it's not the one you picked.

https://web.mit.edu/rsi/www/2013/files/MiniSamples/MontyHall...


Can you explain the mistake (of people taking the standardized tests)? I don't understand it from the message, and the Wikipedia article seems to detail exactly the "normal, smart" switching solution.


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.


Languages were made up by mankind at some point. They are not backed by the rest of physical reality. They can only be learned by induction, and there is no guarantee that people will get the same "version" of it.

To speak in your analogy, people walk around with different maps of the same territory and realizing this is the self-awareness mjburgess is talking about.


It is less 'logic is new'... it more about abstract thinking is a skill that is more useful in societies that have complex social arrangements.

If you are a primitive farmer abstract thinking isn't really useful to you. Everything you deal with in your life, except religion, can almost entirely be dealt with absolutes with little in the way of abstractions.

If it rains at the right time then you can have a good harvest. If the weather is bad then it sucks. If there is animals threatening your crops or herd you need to take steps to deal with them.

There is a lot of logic in dealing with these things. You have to know the seasons, know the stars, know the dirt, etc. You have to understand the life cycle and manipulate the behavior and biology of plants and animals at the right stages in their lives. Things have a logical sequence and there are direct consequences that are predictable from events and your actions.

Where as in modern society you have been conditioned to think in terms of hypothetical and abstractions through being exposed to testing your entire life.

You first need to know how test questions work before you are able to answer them accurately.

For a person who isn't exposed to this then the whole affair of asking hypotheticals and assuming imaginary situations with specific rules that don't actually apply to the present reality is very confusing.

They don't even understand the question. So, of course, they are going to suck at answering them.

And ultimately that is all IQ testing measures.. your ability to take tests.


> They don't even understand the question. So, of course, they are going to suck at answering them.

I agree, but would also say that you should be capable of learning to understand those questions. For example, If you can't speak English, you'll be bad at reading books in English. If you were never taught math, you'll be bad at math. Similarly, If you never learned to reason you'll be bad at solving logic puzzles. It's almost tautological.

However, if a person is incapable of learning to do one of those things, despite the majority of the world being fully capable of doing it, they probably have a cognitive deficit.

> And ultimately that is all IQ testing measures.. your ability to take tests.

I disagree. I think it measures how well you've learned to reason, though I do agree that reasoning is a learned skill for most people.


I mean, 2400y at least… I guess you mean quantitative logical calculus notation?

- the local Russell hater


By "relatively recent" I meant in terms of human evolution. We've had it for around 2400 of the last 300,000 years or so. So less than 1% of our species existence.

I used that phrasing to drive home the idea that logic is not some inherent aspect of nature, or even fundamental to the way humans perceive the world.


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


In my opinion a lot of these puzzles are about empathy toward the examiner as they generally ask variations of "what would I answer to this question?".

In the case of a logician and the properties of the elements of the empty set the frame of mind of the examiner is probaly going to be about using algebraic logical connectives.

For another nice example I can quote [0] via [1]

> Luria: All bears are white where there is always snow. In Novaya Zemlya there is always snow. What color are the bears there?

> Peasant: I have seen only black bears and I do not talk of what I have not seen.

> Luria: What what do my words imply?

> Peasant: If a person has not been there he can not say anything on the basis of words. If a man was 60 or 80 and had seen a white bear there and told me about it, he could be believed.

This is a more extreme case, but in my opinion it is the same phenomenon of being asked to take external things as true and work on them.

[0] https://languagelog.ldc.upenn.edu/nll/?p=481

[1] https://www.astralcodexten.com/p/somewhat-contra-marcus-on-a...


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


>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 questions often do not adopt a literal interpretation of question; D) etc. etc.

In general researchers are extremely loath to, or poor at, recognising there's 101 alternative explanations for any research result using human participants and 99.99% of the time just publish the paper that says the experiment evidences their preferred conclusion.


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.


"Democrats perform poorly on history tests designed by Republicans."


There is one notable example that I'm aware of, but it really is a cognitive deficiency.

The contrapositive is a rule that says that "A => B" is the same as "not B => not A". This is very confusing to people, and few can follow verbally why it works.

But here is a fun experiment. People are presented with a selection of envelopes, all face down, and are asked to verify the fact that, "All unstamped envelopes are small." They immediately begin turning over the large envelopes, then have trouble explaining their (correct) reasoning!

Here is a correct implication process for their actions.

"All unstamped envelopes are small." => "unstamped envelope => small envelope" => "not small envelope => not unstamped" => "large envelope => stamped"

At which point it is easier to just check the large envelopes!


It’s not so much that an inability to solve them means you’re deficient, as it is that an ability to solve them means you’re capable in ways most people aren’t. My wife is great at puzzles, and it’s always humbling to watch her sail through them.

I agree that puzzles alone shouldn’t e.g. determine whether you’re a good fit for a job, though. That’s one of the more annoying parts of software interviewing.


I think it should be the duty of the person asking the question to find a isomorphism to another question that the majority of people can answer.

Eg., rather than asking about the risks of A,,B,C given various probabilities etc. ask them to make bets in a highly familiar environment with a resource that has uniform marginal utility to them... so eg., "suppose you were at home and your friend does..., how much of your time on a sunday would you bet to do... "

You find that when "the very same question" is asked in highly familiar terms people get it right.

Then this investigator-academic should ask: what features of their own puzzle induce the kind of mistakes they see?

In my experience its often that people are far less socially incompetent than questioners, so put "interpretation & trust" priors on terms/presentations of questions that mean they don't parse the presentation into the problem the investigator has in mind.

People who write puzzles tend to be the most bureaucratic sort of literalists who have profoundly eccentric modes of interpretation

The problem that most people are solving is: "what do i say to make this person/question go away"


> The problem that most people are solving is: "what do i say to make this person/question go away" reply

This is it.

Never attribute to incompetence that which can be readily attributed to apathy.


> as it is that an ability to solve them means you’re capable in ways most people aren’t.

No, because the point is that they always hinge on an arbitrary distinction to give one answer. But if you made a different arbitrary distinction you'd get a different answer. And the arbitrary distinctions are, well, arbitrary. They reflect neither truth nor capability. Just whether you can read the questioner's mind as to what arbitrary and intentionally unstated assumptions they are making.

No thanks.


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 without ambiguity:

A) The liar has at least one hat. Yes, because std::all_of returns "true" on an empty list

B) The liar has only one green hat. Unsure, because { "green", "green", "red" } is false, and { "green", "red" } is also false

C) The liar has no hats. No, it is the opposite of A

D) The liar has at least one green hat. Unsure, because { "green", "red" } is false and { "red" } is also false

E) The liar has no green hats. Unsure, for the same reason as in D


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, category theory left its mark in C++ as well.


>The question becomes why all_of returns true for an empty list.

Yes! Before it became a programming problem, I considered the implications of this decision for common speech. In that case, it will generally be expected that when someone says "all my hats are green", they have at least one hat, probably because otherwise it doesn't hit the relevance threshold to make such a statement worth saying.[1]

Based on this, with my younger, hornier mind, I would joke that, "I have gone on a date with every female cheerleader at my university." (All the cheerleaders at my university are male.)

The idea being, an equally valid convention would be to read the statement as "there exists no element violating all the predicates" i.e. no one who is both a "female cheerleader at my university" and "someone I have not gone on a date with".

And this convention, it turns out, is what C's all_of (and Python's all()) uses.

But I'd still balk at someone using that trick in common speech -- it's at least an attempt to be misleading.

[1] See the "Maxim of Relevance": https://en.wikipedia.org/w/index.php?title=Cooperative_princ...


I make love to my wife almost every weekday. Almost monday, almost Tuesday, almost Wednesday,...


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.


> The question becomes why all_of returns true for an empty list.

Because it is, if you'll forgive my Haskell-ese, the only implementation that means that `all_of $ l1 ++ l2 == (all_of l1) && (all_of l2)` for all lists `l1` and `l2`, including empty ones.


yes of course, I was trying (and failed?) to draw a connection from all_of to accumulate (i.e. fold).


Ah, my apologies. I don't know my way around C++, and, by reading your comment too quickly, misread it to be saying that `all_of` behaved badly, rather than that its behavior could be better understood by looking elsewhere.


What you're saying can only be true to the extent that natural language doesn't look like formal logic.

Unfortunately, there are some obvious discrepancies. My favorite is that "can't" really means something closer to "not can".

This can be demonstrated with a close analysis of the statement, "I can't not do that." To get our usual understanding of the sentence we need to parse it as, "I (not can) (not do that)." And then turn that into, "I must not (not do that)." And now cancel the double negative to get, "I must do that."

Suppose that you try to parse it as, "I can not not do that." You quickly get, "I can do that." Which is not at all what that sentence actually means.


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.)


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".


Another way of considering that statement is diminishing returns on the utility of mathematicians.

Some is good, but more isn’t necessarily better.


And less isn't necessarily better either. But as we further mathematics, large cohorts are falling behind.

I welcome puzzles, but I also think we need to shed some of the exclusionary aspects of mathematics/compsci, the brunt of which are far too known: inaccesible formalisms, leetcode, competitive grants/hackathons, steep admission requirements, code bounties, interview puzzle rounds, etc.

Some necessary and organised in good faith I'm sure, but I hope we can move past the implicit assumption that 'maths/code isn't for everyone' and self-select based on that, as that doesn't further the cause.


I agree.

It reminds me of the math "puzzles" on Twitter which go:

1 shoe + 1 shoe = 2

2 shoes + 2 shoes = 4

3 shoes + 2 shoes = ???

And the answer isn't 5 because a) we're not counting shoes and b) the shoe laces were different colors. There's nothing clever, it just teaches you to be hyper cynical and question every little detail which isn't relevant to either Math or the real world.


I have a little monograph written many decades ago on Dimensional Analysis. Since reading it, not quite so many decades ago, I simply dismiss puzzles of this sort because the two sides of the equations are dimensionally incongruent. This means that I have to try to guess the state of mind of the questioner rather than solve a logic problem.

It's a handy stance because I'm no good at either solving logic problems or getting inside other people's heads!

Another on that really irritates me is the kind that presents a series of integers and asks which integer comes next. Any integer will do, you just have to fit the appropriate polynomial.


> Another on that really irritates me is the kind that presents a series of integers and asks which integer comes next. Any integer will do, you just have to fit the appropriate polynomial.

This one bugs me to no end because it's part of the standard elementary school curriculum, for example here: https://byjus.com/maths/patterns-questions/

But surely someone with a strong imagination could come up with a pattern to fit any number as the next in the sequence. I doubt most elementary educators even grasp the issue.


> This means that I have to try to guess the state of mind of the questioner rather than solve a logic problem

That is an excellent way to put it!

It explains why it appeals to non-math people. They are (usually) better at these more verbal-based games ime.


I expect people in different branches of statistics or physics would potentially come up with different answers based on what sorts of series appear in their realm of expertise.


The article clearly defines someone who always lies to mean they only make false statements. It's not hard or ambiguous to determine various scenarios in which "all my hats are green" is false.

The solution article also discusses vacuous truths ("all my hats are green" is true if you have no hats, vacuously). Truth has a definition in formal logic too, but we've gotten far enough that this problem is already solvable and unambiguous.


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.


But the question is being presented to humans via language and without any formal logic training.

If it's a formal logic problem it should be presented in formal logic terms (presumably that only those with formal logic training would even understand) so then there is no possibility of language ambiguity.

I'm not trying to be argumentative, but this is just how this come across to me, and I am pretty confident most humans would consider it a lie which I think would count for something given the place and the way in which the question was presented.


You aren't reading the same article. It's obviously ambiguous


And yet everyone here has come up with the right answer.


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.


Well, part of the coursework, and probably the hardest part, is about translating natural language problems into formal logic statements, ie:

"The liar says All my hats are green" becomes "¬∀x|x∈hat,OWNS(x) (GREEN(x))" or similar.

And then from there you can also translate the five provided answers and try to find a contradiction.


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 are a liar they might not even be talking about hats” are somewhat missing the point:

1) Whether or not they are talking about hats they have made a statement about hats and under the “rules of the game” of formal logic it must be untrue because we are given they are a liar. That’s enough to answer the question.

2) The “rules of the game” are about predicates and properties and inference. The language is plenty precise enough to convey both the question and to deduce the solution.


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 in the set “my hats” which does not have the property that it is green. If “my hats” is empty or indeed if somehow contrary to the rules of the game “my hats” only contains things which are not hats or all the hats it contains are green then the statement is true.

Since the speaker is a liar the statement cannot be true. Therefore there is at least one hat in “my hats” which does not have the property that it is green.

The maths students will be learning this in the context of negation and will have learned that the negation of a universal (“for all”) statement in predicate logic is an existential (“there exists”) statement. Since we have a liar we have to negate what the liar says so since the liar says

“For all hats h in my hats, h is green.”

We negate this and deduce

“There exists at least one hat h in my hats such that h is not green.”

In the context of old-fashioned predicate logic this is not ambiguous.


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.


Is there not a convention within formal logic defining this type of statement to be true or false?


There is, it's the "Vacuous Truth", generally any affirmation about elements of the empty set is true. It's very useful as it allows you to convert any statement "All elements of x are Y" in "No element in x is Not Y".


There is.

  [].all(x => whatever(x)) == true
At least that's how math usually thinks about it.


> 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.


Yes, this is an artificial example and it uses ambiguous language. But it doesn’t really matter whether you got it right or whether the puzzle is fair. Knowing about “vacuously true” statements is useful because that’s a corner case where a bug can happen. (Or it could be a loophole in a legal document.)

When you’re writing functions that work on lists or sets, you need to decide what to do about statements that are vacuously true. Call it out in the documentation? Put in a special case? Assert that the set is non-empty? Or maybe even create a new datatype to make the corner case unrepresentable. These design choices have side-effects, making a function easier or harder to use, more or less error-prone.

Recognizing vacuous statements is pattern recognition, but it’s sometimes useful pattern recognition, and for children, learning about it might even be fun.


Any time I hear the Rick Roll song (Rick Astley - Never Gonna Give You Up) I always notice the ambiguity in the lyrics "Never Gonna run around AND desert you" and ponder how his proclamation would still be valid provided he only committed one of those transgressions individually.


> It is not formal logic but more about the idiosyncrasies and conventions of the English language

Well yea, that's the fun part! Logic puzzles without interaction with language are dull affairs indeed, basically just computation.


Yes - the puzzle should not revolved around semantic ambiguities like this. Let's be clear about the terms of the puzzle, agree on definitions, and then argue from there.

In fact, I would extend this to arguments as well: Let's be clear up front what we mean by important words and go from there. Too often people ending up arguing about definitions, but in roundabout ways.


> Either all their hats are some other color or only one hat is green. This means you have to assume the liar has a hat. How do we know that?

Which is another listener’s bias: is lying by omission a lie?

All my horses are unicorns. I don’t have any horses, nor unicorns. So it’s true but also not.


The end of the article notes "A liar is someone who only says false statements." I agree that this is quite different from the colloquial definition of a liar, someone who mixes truth and lies in order to mislead.


The beginning of the article quite clearly states "A liar who always lies", though.


This is an Alex Bellos puzzle, which I’ve learned through experience to ignore. The terms are always so loosely defined that any solution you come up with is a gamble at best.


If a stranger told me "All of my cars are red" and then I learned that they didn't own a car, I wouldn't call them clever I'd call them a liar.


Agreed. I bin this with other “rules lawyering,” which usually feels unfair, uninteresting, and unsatisfying.

It’s why puzzlemaking a truly challenging and impressive skill. It must be fair, a challenge, and obvious in retrospect.

I think it’s why the twist in Bioshock worked so well for me: it was right there in plain sight numerous times, while other twists in mystery games/films elicit a groan.


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.


> Not to mention that a liar doesn't necessarily have to mean someone who tells a falsehood in every single statement.

FTA: >Note: this question was originally set in a maths exam, so the answer assumes some basic assumptions about formal logic. A liar is someone who only says false statements.

I think it's pretty clear how on definitions


Ah I see that now, thanks. It was under the ad banner so I missed it first time around.


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.


Which seems to be an untenable premise.

"I never make a true statement" says the liar.


> "I never make a true statement" says the liar.

I’ve never seen one of this puzzles phrasing it like that. With good reason, that would break the puzzle.


if you look at it as a programmer, vacuously true makes sense.

In js if I write:

  const allHatsGreen = hats.every(hat => hat.color === 'green');
it will be true if hats is empty. Same thing for C# Linq. Imo this makes sense, because if I write:

  const matchAllConditions = conditions.every(condition => condition.matches(item))

In some condition matcher (lets say I want to check rules before an user is allowed to post), the correct behavior is the result to be true, when the array is empty.

I'm not well versed, in functional programming, but in Ocaml (of F#, hehe) it would be

  let rec all_hats_green = function
    | [] -> true
    | hat::rest -> hat.color = "green" && all_hats_green rest
so in a recursive implementation, this is the behavior that makes sense.


Right. Some people will claim "all my hats are green" is equivalent to "I have no hats which are not green", so he ,must have one hat which is not green. But other people would argue that teh original statement also implies you have at least one hat, so the statement can still be a lie if he has no hats at all. Lewis Carrol explicitly endorses the second view in his book "The Game of Logic". Good luck trying to argue logic with Lewis Carrol.


I think the puzzle is better if the person "only speaks falsehoods" than if they "always lie" - depending on context, a true statement can be a lie.


This is called out in the article:

>Note: this question was originally set in a maths exam, so the answer assumes some basic assumptions about formal logic. A liar is someone who only says false statements.


Yeah, my comment was just a suggestion that that wording be imported into the question, rather than living in a clarification.


I don't think it's that idiosyncratic? Everywhere I've lived:

1. A deceit is an attempt to make somebody believe something false.

2. A falsehood is a statement which is false.

3. A lie is a deceitful falsehood.

Regardless of whether they miscommunicated about hats vs cats, and regardless of whether they were being deceitful in the process, for the statement to be a lie it would also have to be a falsehood, implying they have at least one hat which is not green.

Yes, these problems require suspension of disbelief, especially given the shorthand "he's a liar" always meaning that the person is often deceitful (usually with other negative implications), but the problem statement being that the "person always lies" is pretty clear and doesn't require special pattern recognition or other mental gymnastics, and it's not that different from the suspension of disbelief you invoke when playing a game of chess and not literally sending a knight to murderously dethrone your opposition.


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.


Only people with formal training in logic, or those who work with formal definitions of logic, have trouble with this aspect of the puzzles.

Trying to return to your more naive understanding of logic not only helps understand the intent of the puzzle, it also makes the puzzle more fun.


> it also makes the puzzle more fun.

No; it makes the puzzle illogical and thus about as much fun, for those who prefer logical outcomes, as discussing religion or politics.


That could be - in my country religion and politics is literally a matter of life or death. We discuss them to no end.


I'm genuinely perplexed by this, how is the puzzle even a puzzle if you don't judge it by formal logic?


It's still useful for young people or those who have never stopped to consider it. I think it's a good introduction to the warts of a context sensitive grammar


Because in everyday life we do not formally define ideas.

Just for example I play a game with my children where we tickle each other when we see a yellow vehicle. Is a yellow tractor a vehicle for purpose of the game? How about a yellow baby cart. How about a billboard with a photograph of a yellow baby's toy car?

We honestly have more fun discussing what is a vehicle for purpose of the game than we do tickling. Especially when it becomes clear that a yellow baby carriage is a vehicle only if it is daddy to be tickled... Honestly a good lesson to learn early that life is not fair and that rules are subjective.


Reminds me of "The rule says, “No vehicles in the park”", https://news.ycombinator.com/item?id=36453856


Most english sentences are semantically ambiguous and can often be parsed in hundreds of different ways. And it's true that there is an element of reading comprehension. But a reasonable reader won't assume the thing about the cat.

We know this is occurring on a math exam, so it must be a logic puzzle. The exam-taker would've probably known this refers to a first-order logic question, and have been taught a certain way of translating sentences like this into first-order logic.

This is true of all word puzzles that they need to be mapped to math in a way that assumes knowledge about the world and context.


> What the author would probably say is “All my hats are green” means the liar is either lying about All or Green. Either all their hats are some other color or only one hat is green. This means you have to assume the liar has a hat. How do we know that?

This is almost certainly not what the author will say, and it does have some tangential connections to computing so it's worth expanding on briefly.

In computing you often reduce problems to smaller problems, this can be done with recursion but it doesn't have to be, dynamic programming kind of is the reverse of it; whatever. When you do that though, you get these questions about really small collections, sets, lists, data structures.

Just for a quick concrete example so that we're not an abstract theory land, is a one-element list sorted? Is a zero element list sorted? Is [5, 5, 5] sorted ascending, descending, both, or neither? If you choose the wrong answer, then it means that your algorithm needs to be more complex, you don't trust zero-element lists to be sorted so your quicksort HAS to pivot on a median of 3, you don't trust one-element lists to be sorted so your quicksort HAS to pivot on a median of 5, or maybe when you see that you would recurse into a list of size 1 you generate a new median-pivot or something.

In mathematics, there is a convention which attempts to generalize this idea that an empty list is always sorted. In fact, an empty list is also always randomly sorted. It is always sorted descending, too. If it's an empty array of ints, all of those ints are greater than 1000—and they are also less than 50.

The mathematical convention is, in lay speak, “if you are talking about nothing, pretty much anything you say is going to be true unless it's gibberish.” If I said every int is green, well, synesthesia excepted ints don't really have colors, that's crap.

Everything else is “trivially true.” More formally, any predicate of the form {for all elements in S, this is true of that element} is taken to be “trivially true” when S is an empty set. It is something like the code,

    let agg = true
    for (const element of mylist) {
      agg = agg || f(element)
    }
where no matter what f is, if mylist was empty, agg is true. (“Trivial” here is sometimes replaced with the word “vacuous” because “trivially” is also a common English word meaning “easily,” so something “trivially true” might also by normal English rules mean “is easily seen to be true, is easily proven to be true, we can debunk the opposite with a 5 second look at the Wikipedia page,” etc.)

So that's the convention and besides making base cases much easier, one reason to do this is that the negation of any “for all Xs in the set, Y” is always perfectly specified as “there exists an X in the set such that not-Y.” The other convention you'd have to negate as “Either the set is empty or (...)”.

So the claim is that the perfect Liar is lying according to mathematical rules of Truth and falsehood, and according to those rules, this statement “all of my hats are green” can only be false if there exists at least one hat belonging to the liar which is not green. If there are no hats then the statement was trivially true.


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.


very interesting. i love the reply; don't mistake my responses as arguments or disagreement - just ideas:

i think Savant was 100% correct and the original stating of the problem was clear enough. it's not really about torturing students or trying to be tricky or edgy - it's meant to be an important lesson about independence in statistics. it's more of an example of the kind of real problems that are torture. statistics is the torture, not the exposition of it...

> content creator in the print media wanted to give an edgy true answer to farm engagement

this was 1975 and the fight didn't break out until 1990. using terms like "content creator", "farm engagement", etc. gives a vibe that i guarantee was not the case at the time. yes, it was meant to be an engaging puzzle, but back then it didn't have those highly negative connotations.

from wiki: "Several critics of the paper by Morgan et al.,[38] whose contributions were published along with the original paper, criticized the authors for altering Savant's wording and misinterpreting her intention"

if anything people with an axe to grind like the Morgan et. al. analysis were the one twisting words around.

as far as instructors (and many other people) having a bad time explaining it, well... that's not a problem with the puzzle is it? bad teachers are a real thing.

for me the very best most direct way to understand the puzzle and the solution is to look at the decision tree diagram next to "Conditional probability by direct calculation" on the wikipedia page [1]. with only 3 doors and 3 possible first choices and a single 2nd chose (switch or not), you can easily fully directly compute every possible scenario. draw that picture 3 times (one for each initial door chosen) and count up the wins and losses for strategy switch vs no-switch.

[1] https://upload.wikimedia.org/wikipedia/commons/thumb/d/de/Mo...


The claimed Monty Hall result becomes untrue with very subtle changes to the premises. For example, if the host blindly chooses randomly between remaining doors, the resulting distribution is 1/3 contestant door choice correct (switch loses), 1/3 contestant and host both incorrect (switch wins), 1/3 contestant incorrect host correct (no switch can be offered).


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 at least one hat, that, furthermore, is not green, so A) [EDIT: but not D - I misread it].

In ordinary English, the meaning of the original phrase, thus the answer to the puzzle, is different.


Wait a second.

If the liar says, "All ten-foot tall men have brown hair," we cannot conclude that there must exist a ten-foot tall man.

EDIT: I'll clarify to say I wasn't taking issue with the derivation, but rather with the translation of the English statement into first-order predicate logic. No non-logician would conclude that there must be a ten-foot tall man if "All ten-foot-tall men have brown hair" is false. But since we can derive it from the translated logic statement, then there must be a problem with the translation.

In normal discourse people don't accept vacuous truths like that as meaningfully true. Rather I think people would interpret such a statement as a kind of hypothetical: "If there were a ten-foot tall man, he would have brown hair."

It's not clear to me if first-order predicate logic is really equipped to even handle reasoning about these cases of "a liar who always lies." Such a situation seems to be intrinsically higher-order. If a liar states a hypothetical, what does that mean, exactly?

My interpretation of the negation of the statement is, "If there were a ten-foot-tall man, he would not necessarily have brown hair." This doesn't imply the existence of any ten-foot-tall man.


Yes we can because if there are no ten-foot tall men, then it is indeed true that "All ten-foot tall men have brown hair"


It seems intuitively wrong that you can say "All X are Y" and yet that doesn't imply "At least one X exists".


It also seems intuitively wrong that there are different sizes of infinity, yet Cantor discovered exactly that.


That's how math defined what "all" means. You can be talking about all elements of empty set without implying it must have some.

Basically it disentangled two unrelated concepts, that English language unduly mixes. Concept of every item having some quality and concepts of at least one item existing.


That how we define "all" logically but not linguistically. For instance, linguistically we would consider this inconsistent: "all 10-foot men have black hair AND all 10-foot men have blonde hair" yet it is true, logically, if there are no 10-foot tall men. The translation of the English word "all" should be something something like: |Q| > 0 ∧ ∀x∈Q, x is ...


If that is true then liar said truth.


Indeed, which is why the premise is false. So if a liar who always lies says that thing about ten foot men, ten foot men must exist, and at least one does not have brown hair.


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


In formal logic, but in regular English that would not be true


In the solution they explain why they have to conclude that there should be at least one. Let me try again with a bit more explanation.

1. The liar stating something must mean that the phrase is not true. They cannot state anything that is not false.

2. "All X are Y" is the phrase.

Now, if we assume there is no X the phrases "All X are Y" and "Not all X are Y" are both true and false.

All X are Y - True. Yes, there is no X that is not Y.

All X are Y - False. Yes, there is no X that is Y.

Not all X are Y - True. Yes, there are no X, so none is not Y.

Not all X are Y - False. Yes, there are no X, so none is Y.

All these statements are (according to the article) vacuous if there is no X. A liar then cannot make them, as they are not false.

So from here you can deduce that either the phrase "All X are Y" stated by a liar indicates the existence of X or that I'm a liar :)


By the way, if the phrase is "X exists and all X are Y" then we wouldn't know if X really existed.

We only would know that either X doesn't exists or, if it exists, not all X are Y.


There are normal-discourse statements in which vacuous truth plays a role, example: "I've never met a Frenchman I didn't like, but then again, I've never met a Frenchman". This is, of course, a joke: and it relies on the fact that we assume the set "met a Frenchman" will have contents, but we recognize that, due to the negation, the empty set is actually valid.

But it doesn't work the other way around: "Every Frenchman I've ever met has become a good friend, but then again, I've never met a Frenchman". This isn't funny, because the second clause makes the first clause into a lie, as truth is normally understood. This is not a place where we colloquially accept an empty set.

So the puzzle posed translates the English sentence into logic badly. It isn't the conclusion which is counterintuitive, it is the logical analysis which is flawed.


> A liar is someone who only says false statements.

we're using a made up definition of liar, who can only say things that are false. it's not part of the question for the liar to be able to tell a statement they arent certain is false


In these types of puzzles, a "liar" is meant to be someone who makes only statements which evaluate to false. They are meant to be riddles about formal logic.


Then the liar isn't lying, as the statement is true.


Not D), because it says "The liar has at least one green hat." which isn't implied.


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.


I agree for A), by why D) ?


I suspect a misreading of D) as "The liar has at least one non-green hat" which, in fairness, feels weird that wasn't included in the list.


I did that myself, not sure whats wrong with my eyes >.<


Also, I'm not sure that those two affirmations are equivalent:

  ~∀x  (~IsAHatOfMine(x) ∨  Green(x))

   ∃x ~(~IsAHatOfMine(x) ∨  Green(x))



All my unicorns are green.


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.


Speaking mathematically, you are right. However, linguistically I disagree. Consider: Someone tells you that "all of their kids are doing great in school". Turns out they have no kids. They obviously were trying to deceive you, and make you think they do have kids - in fact, since plural, more than one kid. Hence, it is effectively a lie.

So if the liar speaks of "all my hats" while having none, that is deceptive. I would consider it a lie.


The specific linguistic concept your reaching for is "implicature" from pragmatics.

https://en.wikipedia.org/wiki/Implicature


Ah yes, the only standardized test questions that gave me trouble back in school... "Guess what the speaker was implying"


And that's why SO gets mad when I come home with six cartons of milk[1].

[1]: https://blog.bryanbibat.net/2013/01/02/programming-joke/


I prefer to call her the first wife (apologies to Sir Clement Freud)

Also somehow saying she's my favourite wife was a problem, and yet "least favourite" was worse. Honestly!


Try "ex girlfriend"!


The joke, loosely, is :

A wife asks her programmer husband” on your way home, can you swing by the store and buy one carton of milk, and if they have eggs, get six?”

It’s funnier and more relatable to programming if he comes home empty handed, crashes the car into the garage door, and says, with perfect alacrity, “six what?”


English is an interpreted language. We wouldn't have this problem if we can check for undefined references during compilation.


Still, the REPL is nice to have.


More generally, the puzzle is kind of stupid -- not as a puzzle, but as a representation of life -- because speakers do not speak according to the rules of mathematical logic. That doesn't make them liars, it just means they don't agree about the ground rules.


What does it even mean to be right mathematically here? If I invent a mathematical structure where I define elements 1 and 2, an operation + and a relation = that posits that 1+2=2, I can say that mathematically one apple plus two apples equals two apples. Would I be mathematically right or would I be applying a wrong/not-even-wrong/linguistically deceiving /incoherent model to the real world?


Who hasn't had a picture taken with only them sitting in a room, labeled "X with all their friends" can cast the first stone.


"You can give me the loan, all my companies have millions in assets."


or

"You can give me the loan, I don't own any companies that have less than 1 million in assets"


If you actually give a loan without checking the companies themselves, that is on you.


That's not right; you're conflating dishonesty with lying. Why do people get weird when it comes to grokking what it means to lie?

Mere deception is not lying. (Though it is dishonest.)

A mere untrue statement is not a lie. (Though it is conterfactual.)

But to lie is to (a) state an untruth (b) that is intended to deceive. Absent both conditions being satisfied, you're not dealing with a lie.

There are other forms of dishonesty, but not all of them are lies.


For what it's worth (to whomever was upset by this): this is not apologetics—there's nothing here in my comment to give anyone cover for being dishonest. It is sufficient for something to be dishonest in order for to it to be deserving of all the judgement that people have for liars. It is the dishonesty that is bad, whether it takes form of a lie or not.

But conflating dishonesty with lying is harmful, because once you do that, you give ammunition to people who employ dishonesty in instances that don't involve lying, because if everyone is taking it as a given that dishonesty and lying are the same, and they can show that they weren't lying, then they can argue they weren't being dishonest. But that's wrong since dishonesty and lying are not synonymous—people can still be dishonest without lying—and, again, it is the dishonesty that is bad.


No, the liar having no hats would not make the statement true. ‘All my hats implies’ implies the liar stating they have hats.

The liar either has zero hats or some amount of hats. The only thing we know for certain is that if they do have hats, there is at least one non Green hat.


No. In formal logic, if you have no hats, it is true that all your hats are green. You can claim anything about those hats, it is even true that each one of those hats is the same size as the universe, or that they are all completely green and completely red at the same time. In normal language, this would be different, but that is not the context here.

> Note: this question was originally set in a maths exam, so the answer assumes some basic assumptions about formal logic. A liar is someone who only says false statements.


This is a somewhat irritating property of formal logic and mathematics. Natural language receives a “special” grammar that isn’t always declared up front. You just have to sort of be in on it.

In this case, the reader is given the special definition of liar, but not the special definition of “lie”. (As in, it’s not a lie to make definitive claims about nonexistent hats.)

A lot of the “trick” in logic puzzles boils down to this issue of word play. This puzzle could have been drafted so that the liar’s statement leaves proper room for the no-hats case, but then it would be too easy.


> In formal logic, if you have no hats, it is true that all your hats are green.

But told by someone who cannot make a true statement.


That's the thing, the problem isn't written in formal logic. It's written in English, which is vague.


It's written in a form of English that is formal enough to have a straightforward translation to logic formulas. Also, in the solution article that now has been posted, it's compared to the statement "I have read all books on my shelf" with an empty shelf, which is indeed vacuously true. The sentence about hats is equivalent, I think even the least exactly-minded English speaker would agree.


> Also, in the solution article that now has been posted, it's compared to the statement "I have read all books on my shelf" with an empty shelf, which is indeed vacuously true.

Really? Any human I have ever met when presented with that statement would likely immediately point out that there are no books on that shelf.


I read statement "All my hats are green" as meaning:

For every hat H that I have, H is green.

If I have no hats, this statement is true, just as

* the empty sum is 0,

* the empty product is 1,

* the empty AND is True, and

* the empty OR is False.

So with this interpretation, the liar having no hats would make the statement true.


by the same following, this would mean that any statement on the members of an empty set can be made and it would be logically true?

e.g. "all my lamborghinis have magical goat skin seat covers" is true if 1) I have no lamborghinis or 2) All the ones I own have magical goat skin seat covers.

(fr I have no logical or mathematical background)


Correct.

Common source of confusion/trickery/divergence between ordinary language and formal logic.

Edit: Logically speaking, the following two are equivalent:

They married and had kids.

They had kids and married.


Also I think sometimes children will realize a logic gap there and so they will try this funny trickery where they will make statements like these, which technically are true, but imply something totally otherwise to others. Which I find very interesting and kind of speaks to ability and inventiveness of children to think outside the box. Parents may find it annoying or dismiss it, but I think it is great.


vacuous truths are indeed a useful form of half-truth if you are aiming to deceive.


> Edit: Logically speaking, the following two are equivalent:

Depends on your logical system! There are temporal logics to allow one to capture logically the difference between the two.


I don't have formal logic or any math beyond calculus, either, and it appears that this fact is to our advantage.


You don't need to have learned formal logic to conclude the answer to this puzzle in my view. Yes, formal logic concludes it, but plain logic as well. The key is to realize that the answer will go against your learned social intuition and be fine with that. Social communication in many cases is illogical for efficiency reasons and that is fine. It is interesting to point out those cases and make puzzles out of them.


I agree.

I would appreciate it if you would correct my thinking on the subject, if I have erred: https://news.ycombinator.com/item?id=42365506

Thanks in advance.


Yes, your statement would be true.


Yes


Perhaps I'm being a bit too logical, but in mathematics and logic the statement

  For all x in A, x has XYZ property
is taken to be true when A is the empty set.


No, in logic that is a vacuous truth. All my hats is true for zero hats. But that would not be a lie. And since the liar always lies, that can not be case.


For me, this is one of those types of examples that illustrates the problem with logics allowing vacuous truth.

It amounts to an assumption of an implied conditional ("If I have hats...") which is not always warranted. The "gotcha" here says more about the vacuous truth assumption than it does someone who falls for it.


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.

Because for efficiency reasons you make a lot of assumptions constantly that may or may not be true, and 99% cases it would work for your favour.

Sometimes assumptions need to be challenged or we need to be reminded of that it can be good to challenge assumptions in certain cases, it can allow us to discover some new things.


> 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 true technically, but (assuming laws of biology hold, and a human is making the statement), it is something that could never be true even if the antecedent ("I have children") were true. It's not just something playing on incorrect intuition, it's a statement that is true only by convention or a certain line of reasoning that to me is made only out of convenience because of certain implications.

It stretches the definition of "true" so far that the term "vacuous truth" no longer means "truth" in the general sense in which it is understood. It plays on the use of the term "truth" more than anything else to me; one could redefine "vacuously true" statements as "vacuous" statements in the sense of "undefined" and then the "gotcha" would no longer apply.

I think the example also captures a sort of flaw in applying classical logic (at least classical logic with vacuous statements) to everyday speech in another way that I don't think is just incorrect intuition. If someone asserts "All my hats are green", it's understood to be an assertion that the speaker does in fact have hats, otherwise there would be no point in structuring the statement as it is. That is, the statement is evaluated as true or false with reference to the antecedent because it (the antecedent itself) exists, and another, different statement could have been made. Classical logic evaluates the statement "All my hats are green" as if it were the same as "If I had hats, all my hats would be green" — but they are not the same statement, they have different meanings. There's a counterfactual possibility in natural language, which I think requires nonclassical logic.


Thank you for taking the time to write this. I don't have any formal training in the field but it matches my intuition and I am surprised, astonished even, to see this explanation so far down.


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


Do you think regular people, when communicating, use academic logic? Or do you think the liar is an academic?


Do you think that amongst regular people, there exists a liar who always lies?


No. But that is the premise. People redefining ‘all’ to include ‘none’ is not.


It is a logic puzzle. It is not two regular (or academic) people communicating


Yes. So we will apply logic, but assume the people making the statements are otherwise ordinary people and do not do strange things like defining ‘all’ to include ’none’.


Let's say that saying 'all my hats' implies that the set of hats is non empty, then you have the two following statements

    my-hats is not empty
    for every hat in my-hats, is-green(hat) is true
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. This is a contradiction. So either the speaker or the puzzle is not consistent (and uninteresting), or the 'my-hats is not empty' is not a valid assumption.


I was initially thinking that, but you can parse it as one statement "my-hats is not empty AND for every hat in my-hats, is-green(hat) is true", in which case it's still consistent for that single statement to be false, and it can be false by my-hats being empty.


That's a very good point!


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.


One of the points of this puzzle is to see beyond your social intuition. So yes, this puzzle plays on being able to figure out the logic while it goes against common social intuition.


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!


  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.


The best I've found are languages like F# that allow you to return a pair of values, which for your example would be a tuple of (bool, bool), where the first is isError and the second is the evalResult. Of course, you better not mix `em up!

As to paradigms, I've not seen anything yet, but I haven't seen it all, and corporate America has their legacy systems that limit their explorations.


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


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.


It's a multiple choice question, it's asking "which of the following is necessarily implied", and A is the only one.


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.


You are talking about the colloquial meaning of these words.


At most people reading The Guardian would?


The article states that "this question was originally set in a maths exam, so the answer assumes some basic assumptions about formal logic." This is a funny way of phrasing it, but should make it sufficiently clear to any perceptive reader of The Guardian that they are supposed to ignore the colloquial interpretation of the phrase.

At any rate, it would hardly qualify as a puzzle if the answer was so obvious


Agree it must be true that it has at least one hat, and it must be non-green (he might have other green hats).


Why would you conclude that the liar is telling the truth that they have any hats at all?


This is the contentious, formal-logicy part of the puzzle. "All my hats are green" as a logical statement, in most formal logic systems, would be true if I didn't own any hats (a so-called vacuous truth, because it doesn't mean anything, for similar reasons any statement conditioned on a false statement is true, e.g. "if 2+2=5, then I am god" is similarly vacuously true). So if I'm a liar and that statement is false, it must be false by me owning a non-green hat. But colloquially, people will usually break it down into the logical statement: "I own at least one hat and all my hats are green" (because most people don't consider vacuous truths to be relevant in most contexts), in which case it will be false if I own no hats

(other systems of logic exist which will attempt to resolve this. Forcing such statements to be false makes things much trickier formally, as does e.g. three-valued logic to try to avoid assigning truth or falsity to such statements)


Thanks for breaking that down for me.

I guess, to me, a programmer logician not a mathematician logician, the real problem for me here is the definition of "liar" as it applies to how we parse the problem statement's facts.


I'd argue that this bit of mathematical logic carries over to many programming languages. For example using LINQ expressions in C#:

https://dotnetfiddle.net/3QGurc


"for each hat in the set of hats I know. the statement 'the hat is green' is true"; the previous statement would be true if the set of hats I know is empty.

Incidentally, if you are a programmer it should be obvious that folding 'and' on an empty set must return True.


Uninitialized variables are 90% of our bugs, or so I've been told.

I don't consider a boolean "and" or "or" of a list of bools to be automatically true or false of an empty set, my friend. To me, the specific case for a boolean function applied to an empty list of bools would have to be explicitly stated in the design.

Thanks for explaining how mathematicians and logicians treat the empty set. I have more pragmatic situations to address :-)


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 AND:

  A = True
  for value in collection:
    A = A AND value
  return A
For every non-empty collection this returns the correct result, and for the empty collection it returns True.

Now the OR:

  R = False
  for value in collection:
    R = R OR value
  return R
For every non-empty collection this returns the correct result, and for the empty collection it returns False.

Let's abstract it:

  Def FOLDR( initial, OP, collection )

    result = initial
    for value in collection:
      result = result OP value
    return result
So now:

  sum(     collection ) = FOLDR(   0  ,  + , collection )
  product( collection ) = FOLDR(   1  ,  * , collection )
  and(     collection ) = FOLDR( True , AND, collection )
  or(      collection ) = FOLDR( False, OR , collection )
This is why we define the results we do on empty collections. It's not just a convenience or a convention, it's consistent, and to do otherwise, even if documented, is to lay a trap for future maintainers.


Exactly. More generally the natural initial value for a fold of an operation is the identity (or zero) element for that operation.


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 chosen to specify them, and in real world programming, not having any elements of that specific set's specific kinds of values could well mean that the default results could be any combination of False and True, (NPI, again).

And, yes, I understand that you must initialize the temporary processing value (that you then return) to True and False in order to properly AND and OR the set's values, but that is different from the semantics of the set's cardinality.

I programmed professionally in C# (with the help of F# for its fsi.exe command-line utility) for a number of years, so I am well aware of how fold et al work. They were a very useful aspect to functional programming, making a lot of processing tasks very straightforward, as you have.

To apply my thinking to your FOLDR function, I would add a parameter that specifies the value to return for the empty set, because I would want to specify its semantics for that specific set such that they do not depend upon the value needed for computation to define it.

  Def FOLDR( emptysetval, initial, OP, collection )

    if length( collection ) == 0 then
      return emptysetval
    result = initial
    for value in collection:
      result = result OP value
    return result
In a similar vein, I also used to specify my db wrapper functions to add special error conditions for specific cases. Let's say you're using a select statement that is only going to return 0 or 1 rows, my select wrapper would have a parameter that would say its valid result cardinality is specifically 0 or 1 and nothing else. Yes, the select statement would succeed, but the situation in the table might not be semantically correct, and it's better IMO to catch the problem when it is issued. It also standardizes the handling of such error conditions by the caller of the wrapper.

The same occurs with a "select count(*) ..."; it must return a single row, or it is an error in semantics if not for the db engine. It can also be a problem if your update statement affects more than one row. And there are other situations where the cardinality must be "> 0" or ">= 0". All these cases were my own error conditions that were not SQL errors, but merely semantic errors caused by db data problems.

I used these this style of manual ORM from perl to VB to C# and F# for 15+ years, to great success.

SEPARATELY

In a db/stats context, the empty set should count as a NULL value, and I don't like to AND or OR actual boolean values with NULL values. Sure, the semantics are defined but I find it's better to catch the NULL value's presence before it gets to being involved in operations.

That's why I always specified NOT NULL in my column defs, because all hell breaks loose once a NULL gets put into a column's values.

Statistics also has such difficulties, as I was many, many years ago helping grad students with their SAS and SPSS data sets and processing. It's always just better to get rid of NULLs, unless the stats you need use are built to handle them. Once again, properly producing the required semantics are the end goal.


> 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.


IIUC, using your function with an empty set in SPSS or SAS will result in a NULL value, which is neither True nor False (NPI).

Do you know the truth tables that include NULL? I don't off-hand, but I seem to remember that combining NULL with a True or False results in NULL, which is why I catch my NULLs before they become operands in my operations.

ANDing or ORing the lack of values in the empty-set is always specified by someone's semantics. You're just determining those semantics as a by-product of the way ANDs and ORs are calculated.

This is why the reality of "All my hats are green" has a great deal of real-world ambiguity when there are no hats, because "Color( NULL[-hat] )" is NULL. Now, how you interpret NULL in that case is up to you, because NULL is neither True nor False, in my experience and understanding.

I am open to learning, tho.

ETA: Wouldn't your method also mean that the liar saying "All my hats are not green" would also be true? And, I'm no mathematician, but if "All my hats are green" and "All my hats are not green" both eval to True, I think something has gone very wrong. That looks like why the NULL value is so useful in SQL and stats.


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.

I've read through your reply several times, and I think you've missed the point.

The code here is the code that produces the right result for non-empty collections. It's the shortest, cleanest, clearest code that does so. These aren't random initial values, chosen arbitrarily. They are the unique values that make the code give the right answer.

Then we ask: What result does it give for the empty collection?

The answer is that for "sum" it gives "0", for "product" it gives "1", for "AND" it gives "True", for "OR" it gives "False".

In particular, in each case it gives the identity element of the algebraic structure. This isn't a coincidence, it's a part of how algebraic operations work.

That's why for any operator, the result of applying it to an empty collection is the identity element. It's algebraically consistent.


Sure, but as a programmer, my job is to specify and code out the semantics of the system. ANDing and ORing a set of bools may very well be different for one list's semantics than another's.

So, the initial value that forms the basis for those computations -- to my mind and experience -- is as related to the value computed for the empty set as the programmer decides it should be. I don't think that function's default will necessarily be the proper semantic result when applied to the empty set.

As an example, why should "Are all hats green?" have the same result as "Are all hats NOT green?"? If the logical computation's initial value is the automatic result, then you have merely answered the mathematical-logic answer to a question about sets, not about the list of real-world things being modeled.

If one is writing pure math software, then the answer will be the pure math logical result. When one is modeling a real-world system, the semantics require another level of specification, in my experience and opinion.

(Good morning. I've never replied to such an old comment before. I do not yet have software to monitor my active conversations around here, and am only just beginning to entertain undertaking such a project, so it is merely luck of the universe that I found your interesting comment this morning. Thanks. It's like a mental warm-up as I begin my day.)


"Which, if any, of the following statements can we conclude from what the liar has said?"


That's the conclusion I came to as well. That said, for whatever reason, the part that was most confusing to me was realizing that the logic puzzle was about the idea that the statement itself had to be false. For whatever reason, I glossed over the phrase "a liar who always lies" the first time and just read "liar" everywhere else, so it wasn't obvious to me what the intent was behind using the word "liar" was.

Personally, I'd change the original wording (from the quoted italic section) to "someone who only tells lies" if I were the author. It's probably specific to me, but I'm always thrown by phrases like that because it seems like it's trying to differentiate in some way from someone else; surely there isn't anyone who "always lies" who _isn't_ a liar, so why say that? It's distracting to me in the same way as if someone said "the speech-capable human being who speaks only in lies". Normally it wouldn't bother me, but because puzzles like this often seem to be used to try to illustrate some smug point about how bad people are at logic, phrasing things in an unnecessarily confusing way just makes it seem even more smug (see https://xkcd.com/169/).


Wait, is there are any color space in which Turquoise gets classified as green?


Yes, the one in which there is no word for blue.


This puzzle has appeared at least once on Youtube. This was two years ago, and comments are still being added - there are over 15,500 now. They are everything that you would expect on that platform, and such arguments as are being made now are pretty much the same as in the beginning. I hope HN does better.

https://www.youtube.com/watch?v=YQykZU8mcZY


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.


A friend of mine at university once showed me how presumptuous those "Verbal Reasoning" tests are. You know, the kind that high-powered consultancy companies love to give internship candidates as if it tests for anything meaningful.

The tests typically begin by instructing the sitter to try not to assume anything in each question. They presumably mean that you shouldn't assume something like women liking the colour pink more than men.

But actually, there often are a bunch of assumptions you need to make, such as that there are seven days of the week with the standard name and sequence. That the word for each number has not been switched with some other. Etc...


Ah... lateral thinking. You reminded me of this joke https://www.snopes.com/fact-check/the-barometer-problem/


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


A liar who always lies lies always about everything.

Therefore he lied when he said "All". He isn't talking about all of his hats.

He lied about "my", meaning that the hats aren't his. They belong to someone else.

He lied about "hats", really, they aren't hats at all!

He also lied about "are", because he is not talking about the present, but the past and the future states of the "hats".

Finally, he also lied about "green", the "hats" are anything but green, which proves, conclusively, that when he said 'green' he was actually referring to the very specific shade of green found only in government-issue pickle jars from 1972.


Actually I would say by the rules of English we cannot conclude any of those multiple choice questions is the absolute case -

A) "The liar has at least one hat." cannot conclude because may have no hats, thus the lie is in the "all my hats"

B) "The liar has only one green hat." cannot conclude because may have 2+ green hats out of a 3+ set.

C) "The liar has no hats." cannot conclude that because he may have hats that are not green.

D) "The liar has at least one green hat." cannot conclude that because he may have no hats, or no green hats.

E) "The liar has no green hats." cannot conclude that because of the "all my" modifier means that he can have some green hats.

This is however different than what is true or not. Concluding from a set of multiple choice questions is not choosing ones that are potentially true, concluding is choosing something that is definitely true. There is not a single statement in that list of questions that is definitely true given the requirements, but all of the questions are potentially true.

on edit: all questions are potentially true, but not all potentially true at the same time of course - some of them lock out the others.


As others have noted in the comments, if the liar has no hats, then "All my hats are green" is, in some formal understanding, true. The liar cannot make true statement so must in fact have at least one hat.

That makes A) a good candidate.

But E) can also be true — and in fact both A) and E) can both be correct.


Thank you for clarifying something that I pointed out in my comment while missing the total point of my comment.

on edit: I don't actually think you made my comment "but all of the questions are potentially true." any clearer than I made it, and evidently you seem to think that only A and E are potentially true, which is obviously wrong.

on second edit: ah I see that you believe the idea that some people are saying that All my hats are green indicates that the liar must have hats https://news.ycombinator.com/item?id=42369002 because evidently the assumption is that the 0 hat has a color green for some reason that is not adequately explained.

If that were true then it also follows that if the liar has no hats then all his hats are every color known to humanity. I don't think that is the way it works however.


instead of going through and making more and more edits, I finally figured out what the problem is here - there are at least two logics being used here - one set theory, in which case for vacuous truth I guess it's true that all the hats are green if you have an empty set, and the other linguistic logic.

In many forms of linguistic logic you need to have an existent hat to have the property green, therefore if you do not have any hats you have no green hats. Which is my preferred method of dealing with this.

And obviously there are other forms of logic, as https://iep.utm.edu/liar-paradox/#SH3c

Is the column that was linked more likely to be interested in linguistic logic games or formal mathematical logic games? I'm guessing the second, in which case I guess it's true we can conclude A - but I inherently dislike vacuous truths when applied to logic, especially language like this where the normal argument that the second parameter "Green" is never evaluated because we do not have the first "A hat" in the empty set seems suspect to me because we know what Green is separate from a hat, we just need to know if there is a hat we can assign Green to.


There are few hard semantic rules in English; it is more a matter of conventional usage and expectations - and when 'all' is used, people usually expect that the sentence is about at least one thing, and probably more. I suspect that this is mainly a matter of omission: in ordinary discourse, there seem to be few occasions for using it when it is definitely the case that the resulting sentence is not referring to anything (or exactly one thing), and if there is doubt about the existence of any referents at all, an alternative phrasing along the lines of 'if there are any X, then...' would be considered the right way to say it.

This is so much so that if you use the 'vacuous all', people will suspect that you have ulterior motives, and are being deliberately obtuse to hide them.

I wonder whether, if we attempted to make explicit all these tacit rules and conventions, we would end up with a consistent logic, and I believe that this looseness of natural languages was the main motivation for formalizing logic, from the enlightenment onward.


I agree in general but I do wonder how unusual using ‘all’ to assume existence is. For example “have you done all your homework?” What we are really asking is whether there is any homework that wasn’t done, not did you do any homework.


Fair enough, and this seems to emphasize the notion that being explicit about the tacit rules of natural-language usage is not easy.


given that this is a liar the use of all may be meant to deceive, the main thing here is the use of the word conclude.

I doubt, given in what context this was written, that this is a matter of omission.


It clearly was not an omission here, and I suspect one of the motivations for this question in the examination was to test the students' use of quantifiers in formal logic, as opposed to according to the tacit rules and conventions of natural language.


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 does have hats, at least one of them is not green.

However, considering the options provided by the author, it is clear they did not take into account the implicitly stated proposition (1) in conversational language. Instead, the author assumes that if he has no hats, then “All my hats are green” is true.

This interpretation, however, is conversationally unreasonable; otherwise, one could claim something equally absurd, such as “All my houses are worth over 100 million dollars” but actually has no house.


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


Author was pretty clear about the spirit of the riddle:

>Note: this question was originally set in a maths exam, so the answer assumes some basic assumptions about formal logic.


In conversational language, "All my hats..." implies that the speaker has at least two hats, which theoretically means that the sentence could be a lie from them having exactly one hat (even a green one). However, in practice, I don't think anyone would actually call that a lie. I think we treat the "I have hats" part not as part of the sentence itself, but more as an underlying premise.

You could have a similar situation in pure logic or math - if I were to say "the largest prime number is odd", is that false? Or something else entirely? (This is what Hofstadter calls mu, from a related concept in Zen.)


Casual sentences and mathematics/logic don't go very well together, and lead to ambiguities and interpretation if there are no clear rules defined beforehand. This reminds me of those silly problems that circulate on TikTok with a series of additions and multiplications. The "correct" result depends on how you assume the operations precedence. Here, does "being a liar" mean that we have to take as a true statement the negation of "all my hats are green"? If so, is that "NOT all my hats are green"? How does that translate back to the mathematics realm? Is it {total_hats>0, green_hats>=1}, or is it {total_hats>=0, green_hats>=0}?


The correct answer to almost all of these problems that play with the hierarchy levels between English and Math is "undefined". If you want to play in English, you get intrinsically sloppy, provisional, and context-specific answers, and that is effectively by design and a feature, and anyone who insists that there is only one answer is in error. Our languages work that way for good reasons; we see the costs of the occasional misinterpretations, but the benefits of language not requiring endless precise specifications for everything that is obvious in context is taken for granted.

By contrast, if you want to play in Math space, you need to be rigorous, and provide a Math-quality conversion.

If you refuse, what this reveals about the one posing the problem is that they themselves labor under the delusion that you can apply math rules to English, that there is exactly one and only one such mapping, that everyone should know and agree upon that mapping, and that is so true that you are justified in playing "gotcha!" games with people who don't know this nonexistent mapping.

It doesn't paint a terribly flattering picture of such people, in my opinion.

In the meantime, the rest of us should meditate a bit on "The Only Way To Win Is Not To Play The Game", because spiraling down trying to figure out the exact nature of the aforementioned nonexistent mapping is just a waste of time. There isn't one, so arguing it is just a waste of time and emotional energy. Pick a lane up front. They're both fine, but anything that functions by always choosing whichever lane maximizes the "gotcha!" in the moment is not worth spending time on.


From I remember from what we did in maths, a liar is usually used to have a NOT so we have something like NOT (All my hats are green) => There is at least one hat that is not green.


A way to think about it is, if you went into the liars house to prove him wrong, you could find one non-green hat to prove him wrong. If he has no hats you wouldn't be able to prove him wrong.

Which reminds me of a quote from the British TV series Yes Minister: "A good speech isn't one where we can prove he's telling the truth. It's one in which nobody else can prove he's lying!"


This answer is the only intuitive one for me, thanks.


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.


I wonder what the language adds? I suppose it's one more layer of convolution and cuts off the "what would the other gods answer" kinda things.


If you ask whether the sky is blue, the answer yes tells you that you did not speak to False, the answers da or ja on the other hand tell you nothing because either could mean yes.


Do the gods know each other?


Yes. As always in such puzzles, they know everything and have perfect reasoning, at least as far as logic permits.


As a native English speaker, I'd have said "all my hats are green" is untrue when you don't own any hats, meaning (A) isn't actually implied to be true. The fact the guy is a liar means he's allowed to imply he owns hats when he doesn't, right??


Agreed. They are making two declarative statements: “all my hats”, and “are green”

If they always lie, then statement one is false - they lied about having hats.


My guess is we're supposed to read this sentence as:

Ɐh G(h)

(for all my hats, the hat is green)

or whatever similar formulation:

Ɐx (H(x) ^ M(x)) → G(x)

(for all x, if x is a hat and x is mine, then x is green)

Either way, the general idea will be that negating the statement (making it a lie) will make it a negative existential quantifier:

Ǝh ~G(h)

(there exists one of my hats such that it is not green)

Or in the case of the alternate formulation:

Ǝh (H(x) ^ M(x)) ^ ~G(x)

(there exists an x, such that x is a hat and x is mine, and x is not green)

So I think we answer (A) The liar has at least one hat.

All that said, I think other commenters are rightly pointing out that this relies on a very questionable distinction between semantics - which is what we've formalized above - and pragmatics. In conversational pragmatics, "All my hats are green" means that I have at least one hat (probably at least 3, even, since the sentence didn't say "My only hat" or "Both my hats"). One might explain this by way of an implicit pragmatic conversational principle that all statements should be relevant and informative in some way, which vacuously true statements (like, "all grass growing on the moon is purple") are not (see the "Gricean maxims").

If we don't make this implausible distinction between semantics and pragmatics (implausible to me because it assumes that sentences in general are usefully analyzed as having "propositional" meanings which can be evaluated outside of any conversational context), we might cash out the statement as:

Ɐh G(h) ^ Ǝh G(h)

so we can conclude, since this is a lie, that:

Ǝh ~G(h) ∨ Ɐh ~G(h)

Which is consistent with the liar owning no hats, as in:

> "All my hats are green"

> "Liar! You don't own any hats"


The proposed solution misses the fact that you can't even derive that the liar has a hat because the subject of the predicate could be the lie. What if the liar had two green cars but any number or no hats? The lie is a lie then even if the statement is vacuous as there is too much ambiguity in the english language overall. Their hats could be any combination of colors or they could even be hatless if the lie was over the subject of the constraint, not the qualification of the subjects, as they were effectively miscommunicating what is green.


Even if that is the case -- if he has no hats, then the statement is technically true, and regardless of whether he intended to lie or not, he made a true statement.


If everyone knows that the liar always lies, then can he effectively even lie? It’s like he speaks a language where everything means the opposite of what it means in English, and everyone understands this semantically inverted language. So then he might lie by just telling the truth.


The article even defines "liar" for you: "A liar is someone who only says false statements." It's not someone who is trying to maximally mislead.


That would only be true if the liar speaks in purely boolean statements. Many statements aren't invertible because the possibility space is larger than true or false.


I would assume that the possibility space has a truth axis relative to which the whole space can be inverted.


¬[∀hat ∊ hats, IsGreen(hat)] ⇔ ∃hat ∊ hats, ¬IsGreen(hat)


This reads: for it to not be true that every hat in the collection of hats is green, there must exist at least one hat in the collection of hats that is not green.


If all statements made by the liar are false, then the statement 'my hats' which is a statement made by the liar about his possession of hats, must be false, right? If the liar claims possession of hats, the truth must be that the liar does not possess any hats.

What if the liar said "I own no hats, but if I did own hats, not a single one of them would be green"? Can we then conclude the liar owns a green hat?

Formal logic generates contradictions easily and confuses people when expressed in word problem format, because humans aren't that logical - liars may only lie 10% of the time, when they see a benefit. It's like rational actor theory in economics - people may only act rationally 50% of the time.


It is either that:

a) they don't have any hats, i.e. that they are lying about having any hats at all.

b) they have some number of hats (n >= 1) and at least one is not green, because they are lying about the color of all their hats.

I would be happy to learn how I am wrong.


I wonder what color is a hat that doesn’t exist.

If a person doesn’t have any hats, is the statement ”All my hats are hats” false?


That is a tautology. A tautology is always true.


I think the question is more about liars than it is about hats.


Yes, it is a counterintuitive aspect of mathematics that "for all x in X ..." is always true if X is an empty set, just like "A implies B" is always true if A is false.

I once passed a midterm by abusing the latter. The question was to prove "there exists x such that if |a - b| < x, then something". The professor forgot to specify that x should be positive, so my response was that the implication is trivially true for x = -5 because a modulus cannot be negative.

The actual proof for positive values of x was much harder but the professor respected my math hacking skills and gave me full points for that question.


Here's one way to maybe make it less counter-intuitive:

We have a set of items X1, X2, X3, ... etc.

Each of X1, X2, X3 differently matches conditions A, B, C, D, etc.

Think of "All" as: A AND B AND C AND D AND...

Each term we add we further restricts the result-set.

Thus if we start with lots of conditions, as we remove conditions, we increase the matching results, until we remove all conditions, and "All([])" matches everything, i.e. is vacuously true.

Likewise, think of "Any" as: A OR B OR C OR D.

Here, as we increase the number of conditions, we increase how many things match, thus "Any" on an empty set returns nothing, i.e. is vacously false.


1. it is not true that (for all hats h in {liar's hats}, h is green)

2. by the negation rule, there exists a hat h in {liar's hats}, such that it is not true that h is green.

3. there exists a hat in {liar's hats}

This is really basic first order logic guys.

"For all x in {}, P(x)" is always trivially true without regard for P.

Similarly, "there exists an x in {}, P(x)" is always trivially false.

https://en.wikipedia.org/wiki/Vacuous_truth


I kind of disagree

1) “All my hats are green”

2) We assume that “always lies” means that (1) is false.

3) If the liar has at least one hat that is not green satisfies (2)

4) If the liar doesn’t have any hats also satisfies (2)


Related is the raven paradox (https://en.wikipedia.org/wiki/Raven_paradox), where for the statement "All of my hats are green", seeing _anything_ non-green that is not one of my hats is evidence in favour of the overall statement.


  things.every(thing => thing.type == 'hat' && thing.color == 'green')
now negating this gives:

  things.some(things => thing.type != 'hat' || thing.color != 'green')
So liar has something that is not a hat OR has something that is not green

So only "E) The liar has no green hats" is true


Your initial translation into JavaScript is a representation of the statement "All my things are green hats", which is not the same as "All my hats are green."

The statement "All my hats are green" would map to

    things.every(thing => thing.type != 'hat' || thing.color == 'green')
i.e., everything the person owns must either be green or, if it isn't green, it must not be a hat since all hats are green.

The negated form would then be

    things.some(thing => thing.type == 'hat' && thing.color != 'green')
i.e., there are some hats that are not green.


Yes, the liar have some hats. There are two ways how to conclude this:

1. If they don't have any hats, then any sentence about them would be truth.

2. The negation of the sentence, which must be truth, is "not all my hats are green". For this to be true, there must be some hats that are not green, so there must be some hats in general.


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.


!! Spoil:

Since we cannot refer to the liar, we can refer to the extended puzzle's author.

The author states that the goal of the extended puzzle is to determine if there is, 'IF ANY' (!!), a correct statement among [A, B, C, D, E]. Thus, there can be zero or at most one statement we can conclude as being true for sure.

The liar didn't said if he has hats. Maybe he has 0. Maybe 1. Maybe n. We just don't know.

'A: The liar has at least one hat.' > We cannot conclude this statement as sure, since maybe the liar has in fact 0 hats.

'B: The liar has only one green hat.' > He has maybe 0 hats. Or maybe n | n>1.

'C: The liar has no hats.' > He has maybe 1 hat. Or maybe n | n>1.

'D: The liar has at least one green hat.' > He might not have any hats at all.

'E: The liar has no green hats.' > Since the liar may have 2 hats, one could be green and the proposition could still be false, as it is a lie.

Since we cannot conclude any of the statements as being definitively true, the extended puzzle's answer is none of them are true for certain. It depends on how many hats the liar has.


If we're doing "provoke arguments on the internet using confusingly-stated constructs", they should have some self respect and use the venerable 6÷2(1+2).

And then read https://xkcd.com/169/

Anyway, I'm sure there'll be a YouTube video about this with an AI voiceover soon.


This is part of a Brazilian test - those are common for enrolling in free higher education or working in public positions. IMO one of the most vile ways of wasting the young generation's potential, as you need to be really smart to pass those exams (think 1-10000 candidate/position ratio) but too stupid to accept the position (think $500 USD monthly salary).


They are not even remotely the same.

6÷2(1+2) is written in a deliberately confusing fashion. This is a simple math olympiad-style question. All universal quantifications on the empty set are true, for the same reason that the implication A -> B is true when A is false regardless of B. It cannot be any other way. Precedence of infix operators on the other hand is completely arbitrary, we settled on multiplication before addition because otherwise it would be a pain to write polynomials.


The point is it's an attempt to sucker people into a fight over ambiguity over the natural readings of what looks like informal English (which can vary from person to person) vs formal logic statements predicated on a strict framework which may sound weird but actually have right answers. And it works every damn time.

It might be a math Olympiad question, but a math Olympiad participant is supposed to know how, say, a vacuous truth works, and, moreover the mapping of formal English to logical operators (see also: the inclusive or) and that is not how everyone in the world will parse the statement of the problem.

Is the point here to educate people on a quirk of formal logic, or is a smugbait to promote a book? Oh look, there's a book. Quelle surprise.


That's why I always use parentheses, i.e. I never rely on operator precedence. Therein lie troubles, lad.

And, as usual, the xkcd is fantastic.


You don't write 1+2+3, but (1+2)+3?


The same operators don't need precedence rules; each language is processed left-to-right or vice versa. Usually it's left-to-right, in my experience with maybe a dozen languages professionally, maybe twice that in exploration.


With the same operator, the rule is not called precedence, but associativity (left or right; consider 2^3^4 where it matters), but you still need a rule - unless you use parentheses, which you said you always do.


Touche!

If there's a case where one computation needs to occur before others, then that's where I always use parens.

I'm also never doing a^b^c, either as a^(b^c) or (a^b)^c, but if I did, there would be parens.

Readibility in one's code is necessary for those of us who must re-read our code when we need to refamiliarize ourselves with it before making changes. It is said that programmers spend far more time reading code than writing it, and I have found that to be true. As someone who has developed large pieces of software, my strategies include clarity for the reader, who is, first of all, myself.

As to what it's called, yeah, 'associativity' is the math term, but if you think I don't understand the concept, then you don't understand the depth that precedence goes to the heart of parsing source code to produce executable code. And I do understand that, friend, for four decades now.


That entirely depends whether an empty set trivially fulfills every possible predicate.

And if I remember correctly it's not something that's obvious although for convenience it's often assumed.


If you were to code this statement in JS, it would be:

hats.every((hat) => hat === 'green') === false

(A) is the only one of those potential answers that must be true to guarantee the above statement is satisfied.


This is why we need while-else. Not the pythonic version, mind you.


{{ Spoiler }}

If you didn’t select A, then the test is great for weeding out less intelligent people; which means it’s a good test if that is the objective.


I answered it correctly, because it seems obvious to me, even though probably to some people it is not obvious.


Isn't the answer D? From predicate logic, the negation of forall() is existsone().


I thought A. ChatGPT said E. ChatGPT o1 said A.

Also, the novel referenced (Intermezzo) by Sally Rooney is quite good. It makes a few references to analytic philosophy, mostly Wittgenstein. It concerns two brothers whose relationship has broken down. One of them is a "wordcel" and the other is a "shape rotator".


Well, let's see...

NOT(FORALL(x): my-hat(x) -> green(x))

EXISTS(x): NOT(my-hat(x) -> green(x)) ; https://en.wikipedia.org/wiki/Universal_quantification#Negat...

EXISTS(x): NOT(NOT(my-hat(x)) OR green(x)) ; https://en.wikipedia.org/wiki/Material_implication_(rule_of_...

EXISTS(x): NOT(NOT(my-hat(x)) AND NOT(green(x)) ; https://en.wikipedia.org/wiki/De_Morgan%27s_laws

EXISTS(x): my-hat(x) AND NOT(green(x)) ; https://en.wikipedia.org/wiki/Double_negation#Elimination_an... (note that this assumes non-intuitionistic logic)

EXISTS(x): my-hat(x) ; https://en.wikipedia.org/wiki/Conjunction_elimination

So yeah, the liar must have at least one (non-green) hat.


Perhaps they aren’t even his hats at all and the “my” part is the lie.


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?


Mr liar.

"All my hats are green"

Is lie.

They are sombreros. Some you borrowed from me. You have no head!


If liar is lying so the not false statement can also be: "Not all not my not hats are not not green".


taking this seriously is a midwit trap




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: