Hacker News new | past | comments | ask | show | jobs | submit login

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.




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

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

Search: