Similar to the And operator, Or is symbolized thusly:
P∨Q
And just like And, an Or statement can be evaluated to True or False. The difference with Or is that it evaluates to False only if both component statements are False. Here is the truth table for P∨Q
P | Q | P ∨ Q |
True
| True | True |
True | False | True |
False | True | True |
False | False | False |
The “Or” operator evaluates to False if and only if both component operands are False.
If you’ll recall, we had values for P and Q:P=”The car is green”So P ∨ Q would read as:
Q=”The car has four doors.”
Either the car is green or it has four doors, or both.
If our hypothetical car has two doors, this statement is still true, because both predicates must evaluate to False in order for the whole thing to be False. In fact, let’s look at the truth table for this statement, just for fun:
Either the car is green or it doesn’t have four doors, or both.
That would be symbolized like this:
P ∨ ~Q
Here’s the truth table of that statement:P | Q | ~Q | P∨~Q |
True | True | False | True |
True | False | True | True |
False | True | False | False |
False | False | True | True |
Next: Differentials
Next in the Logic Series: The If… Then Operator
No comments:
Post a Comment