Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In the card game, the rule is that if a card has a vowel on one side, it must have an even number on the other side. Replace "the card has a vowel on one side" with "a person is drinking alcohol" and "it must have an even number on the other side" with "he or she must be over eighteen". Since a card with a vowel must have an even number on it, if a card has an odd number, one must check whether the other side has a vowel to know whether the card follows the rule. Similarly, if a person is under eighteen, one must check whether they are drinking alcohol to know whether they are following the rules.

If we refer to either "a card has a vowel" or "a person is drinking alcohol" as P and either "a card has an even number" or "a person is over eighteen" as Q, we can describe the four cards/people in both situations as:

1. P 2. ¬P 3. Q 4. ¬Q

The rule can be described as P implies Q. P implies Q is equivalent to "Q or ¬P". Therefore, in cases 2 and 3, P implies Q is known to be true without needing to know the value of the other proposition. In the remaining cases, you don't have enough information to know whether P implies Q. In case 1, P implies Q if and only if the value of Q is true when one checks it. In case 4, P implies Q is true if and only if the value of P is false when one checks it.



Sorry, but I still think that checking what a very old person is drinking is stupid, no matter how much notation you add to it.


Yes, that's the point. The bouncer doesn't need to check the old man, and the card player doesn't need to check the third card.

This is obvious when given the bar context, but less obvious when the same set of rules is taken out of any human context.




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

Search: