English Language & Usage Asked by Lukman on February 17, 2021
How do you evaluate a logical statement that has multiple condition clauses "If A or B and C"?
From method 1 & 2 below, which is the correct/common interpretation?
Using parentheses, the method 1 & 2 would be:
Coming from a programmer point of view, most programming languages use the method 1, where all ‘and’ are evaluated first before the ‘or’ are evaluated. Is it also true for English language in general usage?
To use a concrete example, consider the following A, B, C:
If it is morning or it is evening and it is Monday, then I will bring an umbrella.
Do I bring an umbrella if it is Tuesday morning?
ADDITIONAL INFO:
Let me add additional information why I insist on not adding additional commas to resolve the ambiguity.
I’m designing a system where a non-technical user can define rules using English language with specific formats, for example:
And the rules can be combined using "and" and "or":
today is sunday or date is 1st of june and user’s age is not less than 18
Can I rely on a common interpretation in English using a well-known precedence of "and" and "or", or do I have to either:
Apologies for the length of this. It is an interesting exercise in the relation of language to logic and, with the eight possible combinations of the True/False logic for three items, length is inevitable. The question has two parts: the analysis of the A/B/C logic; and the structure of the sentence.
Let us interpret or to mean one or the other, or both (this is the inclusive definition rather than the exclusive definition as one or the other, but not both).
ABC Logic 1
“If A is true, or both of B and C are true, then the statement is true.“
The truth table is shown with {True A} in green and {True (B and C)} in orange. The or makes the statement true in five of the eight possible cases.
ABC Logic 2
“If either of A and B is true, and also if C is true, then the statement is true. “
Following some common usage, let us interpret either to mean either one of two, or both (this is the inclusive definition rather than the exclusive definition as one or the other but not both). This is thus the same as the inclusive or.
The truth table is shown with {True C} in green and {True (either B or C or both)} in blue. The and makes the statement true in three of the eight possible cases.
Sentence Structure
The sentence is ambiguous as given and needs a comma to define its intention. There are two useful positions of the comma.
Comma Position 1
“If it is morning, or it is evening and it is Monday, then I will bring an umbrella“
Mornings are green; Monday evenings are shown orange.
This corresponds to Logic 1. Tuesday morning is a morning (green cases); bring an umbrella.
Comma Position 2
“If it is morning or it is evening, and it is Monday, then I will bring an umbrella.“
{Morning or evening} is shown blue; {Monday} is green.
The case {morning and evening both true} is not possible in reality but the logic remains the same.
Tuesday is not Monday: do not bring an umbrella.
Answered by Anton on February 17, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP