The Gateway to Computer Science Excellence

0 votes

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?

- Only $\text{P’s}$ drink
- Only $\text{P’s}$ drink and $\text{S’s}$ age
- Only $\text{S’s}$ age
- Only $\text{P’s}$ drink, $\text{Q’s}$ drink and $\text{S’s}$ age

Migrated from GO Electronics 1 year ago by Arjun

+1 vote

Best answer

- If a person drinking beer, his age should be checked, to verify he's eligible (>18 years old)
- If a person not drinking beer, checking him is useless.
- If a person is younger than 18 years old, his drink must be checked, It should not be beer.
- If a person is older than 18 years old, checking his drink is useless.

So, here Only $P’s$ drink and $S’s$ age should be checked to ensure that the rule is being followed.

Correct Answer: $B$

+7 votes

In this question the rule states that** "in order to drink beer the person must be over 18 years of age"**. So we will consider the following options according to the rule:

**For P** it is given that his/her age is 16 years and **since he/she is below 18 years of age, they cannot have beer so we have to check P's drink to see if the rule is followed**.

**For Q** it is given that his/her age is 25 years and the rule states nothing about what anyone above 18 years cannot drink therefore there is no restriction on him/her. **We do not need to check his/her drink.**

**For R** it is given that he/she is having a milkshake. Now for milkshake also the rule puts no restriction therefore t**here is no need to check his/her age.**

and finally **for S** it is given that he/she is having a beer and now since **the rule clearly states that if anyone is having beer then he/she must be over 18 years of age therefore we need to check S's age.**

So the correct option is** Option B) We need to check P's drink and S's age**

52,345 questions

60,471 answers

201,797 comments

95,273 users