Subsection 2.6.2 Practice Converting Between English and Boolean Logic
To see how Boolean logic can be used, we should practice converting simple ideas into it.
Consider the sentence, “If it’s cloudy, you can’t see the stars.” To convert this sentence to Boolean logic, we begin by assigning simple variable names to the basic statements. Then we can combine them. We’ll give names to the following statements:
C: It’s cloudy.
S: You can see the stars.
Then we have: \(C \rightarrow \neg S \)
Consider the sentence, “If there aren’t any cookies, we’ll have to buy or steal some.” We’ll give names to the following statements:
C: There are cookies.
B: We have to buy cookies.
S: We have to steal cookies.
Then we have: \(\neg C \rightarrow (B \vee S) \)
We don’t actually need the parentheses here. Operator precedence will get us the interpretation that we want. But it’s always safe to use them.
Consider the sentence, “We’ll only have the party if it’s not raining or snowing.” We can give names to the following statements:
R: It’s raining
S: It’s snowing.
P: We’ll have the party.
This one is more complex. Literally, this sentence just gives circumstances under which there will be no party. But most people interpret it as giving not just necessary conditions for partying but also sufficient ones. You would think me annoying, at the least, if I said this and I had no intention of having a party under any circumstances. So let’s assume that this sentence says that we will have the party if the weather is good but we won’t if it isn’t. In other words, good weather (i.e., not rain and not snow) means party; bad weather means no party.
So we have: \((\neg R \wedge \neg S) = P \)
English Aside
In this last example, we exploited a convention for how English is used for efficient communication. We’re generally expected not to mislead. Rather, we should make the strongest statement that we believe to be both true and relevant. Our listeners, then, can assume that if we didn’t make a stronger statement it’s because such a statement wouldn’t be true. The Cooperative Principle describes a more general pattern of communication conventions that work in this way. A study of it is beyond the scope of this class, but we’ll mention it occasionally. For more information, see:
We should point out here that there are other, logically equivalent ways of writing many complex logical statements. If you came up with something different for one of these examples, you can see whether your answer is equivalent to ours by writing out the truth tables for both our expression and yours and seeing if they’re the same.
Exercises Exercises
1.
Consider this sentence:
“If a loaf of bread costs $4 and a pound of hamburger costs $8 then John eats tofu.”
Define:
B: A loaf of bread costs $4.
H: A pound of hamburger costs $8.
J: John eats tofu.
Which of the following logical expressions captures the meaning of the sentence:
\(\displaystyle B \rightarrow \neg H \)
\(\displaystyle (B \wedge H) \rightarrow J \)
\(\displaystyle \neg J \wedge \neg H \vee B \)
\(\displaystyle (B \wedge H) \wedge J \)
2.
Consider this sentence:
“We’ll have chips but no peanuts at the party.”
Define:
C : We’ll have chips at the party.
P: We’ll have peanuts at the party.
Which of the following logical expressions captures the meaning of the sentence:
\(\displaystyle C \rightarrow \neg P \)
\(\displaystyle C \wedge \neg P \)
\(\displaystyle \neg (C \wedge P ) \)
\(\displaystyle C \wedge \neg P \)
3.
Consider this sentence:
“If you’ve got a costume, you can come to the party unless you like loud music.”
Define:
C: You’ve got a costume.
P: You can come to the party.
M: You like loud music.
Which of the following logical expressions captures the meaning of the sentence:
(C → P) ∧ (¬M → P)
(C → P) ∨ (¬M → P)
(M → P) ∨ ¬ C ∨ ¬P
(C ∧ ¬M) → P
¬M ∨ C ∨ P
Exercise Group.
Define:
P: Pat is on vacation.
C: Chris is on vacation.
4.
(Part 1) Which of the following logical expressions corresponds to the sentence:
“Pat and Chris are not both on vacation.”
\(\displaystyle \neg P \wedge \neg C \)
\(\displaystyle P \neg \wedge C \)
\(\displaystyle \neg ( P \vee C ) \)
\(\displaystyle \neg ( P \wedge C ) \)
\(\displaystyle \neg P \rightarrow \neg C \)
5.
(Part 2) Which of the following logical expressions corresponds to the sentence:
“Pat and Chris are both not on vacation.”
\(\displaystyle \neg (P \wedge \neg C) \)
\(\displaystyle \neg P \wedge \neg C \)
\(\displaystyle P \neg \wedge C \)
\(\displaystyle \neg ( P \equiv C ) \)
\(\displaystyle \neg P \wedge \neg C \)