A rule states that in order to drink beer, one must be over 18 years old. In a bar, there are 4 people: P is 16 years old, Q is 25 years old, R is drinking milkshake, and S is drinking a beer. What must be checked to ensure that the rule is being followed? A. Only P's drink B. Only P's drink and S's age C. Only S's age D. Only P's drink, Q's drink, and S's age

GATE 2017 · General Aptitude · Logical Reasoning · medium

Answer: B. Only P's drink and S's age

  1. Restate rule as a conditional: Rule: drink_beer(x) => age(x) > 18. Violation: drink_beer(x) is TRUE and age(x) > 18 is FALSE.
  2. Check P: age 16, drink unknown: P's age is 16 (<= 18, so Q is false). If P drinks beer (P is true), rule is violated. Must check P's drink.
  3. Check Q: age 25, drink unknown: Q's age is 25 (> 18, so Q is true). The implication is true regardless of what Q drinks. No need to check Q's drink.
  4. Check R: milkshake, age unknown: R drinks milkshake (not beer, so P is false). The rule is vacuously satisfied. No need to check R's age.
  5. Check S: beer, age unknown: S drinks beer (P is true). If S's age <= 18 (Q is false), rule is violated. Must check S's age.
  6. Conclusion: Must check: P's drink (could be beer while underage) and S's age (is drinking beer, age unknown). Answer: B.