3.2: Truth Tables- Conjunction (and), Disjunction (or), Negation (not)
Because complex statements can get tricky to think about, we can create a truth table to keep track of what truth values for the simple statements make the complex statement true and false.
A table showing what the resulting truth value of a complex statement is for all the possible truth values for the simple statements.
Suppose you’re picking out a new couch, and your significant other says “get a sectional or something with a chaise”.
This is a complex statement made of two simpler conditions: “is a sectional”, and “has a chaise”. For simplicity, let’s use p to designate “is a sectional”, and q to designate “has a chaise”.
A truth table for this situation would look like this:
\(\begin{array}{|c|c|c|}
\hline p & q & p \text { or } q \\
\hline \mathrm{T} & \mathrm{T} & \mathrm{T} \\
\hline \mathrm{T} & \mathrm{F} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{T} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{F} & \mathrm{F} \\ \hline
\end{array}\)
In the table, T is used for true, and F for false. In the first row, if p is true and q is also true, then the complex statement “p or q ” is true. This would be a sectional that also has a chaise, which meets our desire. (Remember that or in logic is not exclusive; if the couch has both features, it meets the condition.)
In the previous example about the couch, the truth table was really just summarizing what we already know about how the or statement work. The truth tables for the basic and , or , and not statements are shown below.
Negation - Expresses "not" which means the opposite truth value.
\(\begin{array}{|c|c|}
\hline p & \sim p \\
\hline \mathrm{T} & \mathrm{F} \\
\hline \mathrm{F} & \mathrm{T} \\
\hline
\end{array}\)
Conjunction - Expresses "and" which means both p and q must be true.
\(\begin{array}{|c|c|c|}
\hline p & q & p \wedge q \\
\hline \mathrm{T} & \mathrm{T} & \mathrm{T} \\
\hline \mathrm{T} & \mathrm{F} & \mathrm{F} \\
\hline \mathrm{F} & \mathrm{T} & \mathrm{F} \\
\hline \mathrm{F} & \mathrm{F} & \mathrm{F} \\
\hline
\end{array}\)
Disjunction - Expresses "or" which means either p or q can be true or both.
\(\begin{array}{|c|c|c|}
\hline p & q & p \vee q \\
\hline \mathrm{T} & \mathrm{T} & \mathrm{T} \\
\hline \mathrm{T} & \mathrm{F} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{T} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{F} & \mathrm{F} \\
\hline
\end{array}\)
Truth tables really become useful when we analyze more complex statements.
Create a truth table for the statement \(p \vee \sim q\)
Solution
When we create the truth table, we need to list all the possible truth value combinations for \(p\) and \(q\). Notice how the first column contains 2 Ts followed by \(2 ~\mathrm{Fs}\), and the second column alternates \(\mathrm{T}, \mathrm{F}, \mathrm{T}\), F. This pattern ensures that all 4 combinations are considered.
\(\begin{array}{|c|c|}
\hline p & q \\
\hline \mathrm{T} & \mathrm{T} \\
\hline \mathrm{T} & \mathrm{F} \\
\hline \mathrm{F} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{F} \\
\hline
\end{array}\)
After creating columns with those initial values, we create a third column for the expression \(\sim q\). Now we will temporarily ignore the column for \(p\) and write the truth values for \(\sim q\)
\(\begin{array}{|c|c|c|}
\hline p & q & \sim q \\
\hline \mathrm{T} & \mathrm{T} & \mathrm{F} \\
\hline \mathrm{T} & \mathrm{F} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{T} & \mathrm{F} \\
\hline \mathrm{F} & \mathrm{F} & \mathrm{T} \\
\hline
\end{array}\)
Next we can find the truth values of \(p \vee \sim q,\) using the first and third columns.
\(\begin{array}{|c|c|c|c|}
\hline p & q & \sim q & p \vee \sim q \\
\hline \mathrm{T} & \mathrm{T} & \mathrm{F} & \mathrm{T} \\
\hline \mathrm{T} & \mathrm{F} & \mathrm{T} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{T} & \mathrm{F} & \mathrm{F} \\
\hline \mathrm{F} & \mathrm{F} & \mathrm{T} & \mathrm{T} \\
\hline
\end{array}\)
The truth table shows that \(p \vee \sim q\) is true in three cases and false in one case. If you're wondering what the point of this is, suppose it is the last day of the baseball season and two teams, who are not playing each other, are competing for the final playoff spot. Anaheim will make the playoffs if it wins its game or if Boston does not win its game. (Anaheim owns the tie-breaker; if both teams win, or if both teams lose, then Anaheim gets the playoff spot.) If \(p=\) Anaheim wins its game and \(q=\) Boston wins its game, then \(p \vee\) \(\sim q\) represents the situation "Anaheim wins its game or Boston does not win its game". The truth table shows us the different scenarios related to Anaheim making the playoffs. In the first row, Anaheim wins its game and Boston wins its game, so it is true that Anaheim makes the playoffs. In the second row, Anaheim wins and Boston does not win, so it is true that Anaheim makes the playoffs. In the third row, Anaheim does not win its game and Boston wins its game, so it is false that Anaheim makes the playoffs. In the fourth row, Anaheim does not win and Boston does not win, so it is true that Anaheim makes the playoffs.
Create a truth table for this statement: \(\sim p \wedge q\)
- Answer
-
\(\begin{array}{|c|c|c|c|}
\hline p & q & \sim p & \sim p \wedge q \\
\hline \mathrm{T} & \mathrm{T} & \mathrm{F} & \mathrm{F} \\
\hline \mathrm{T} & \mathrm{F} & \mathrm{F} & \mathrm{F} \\
\hline \mathrm{F} & \mathrm{T} & \mathrm{T} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{F} & \mathrm{T} & \mathrm{F} \\
\hline
\end{array}\)
Create a truth table for the statement \(p \wedge \sim(q \vee r)\)
Solution
It helps to work from the inside out when creating a truth table, and to create columns in the table for intermediate operations. We start by listing all the possible truth value combinations for \(p, q,\) and \(r .\) Notice how the first column contains 4 Ts followed by \(4 \mathrm{Fs}\), the second column contains \(2 \mathrm{Ts}, 2 \mathrm{Fs}\), then repeats, and the last column alternates \(\mathrm{T}, \mathrm{F}, \mathrm{T}, \mathrm{F} \ldots\) This pattern ensures that all 8 combinations are considered. After creating columns with those initial values, we create a fourth column for the innermost expression, \(q \vee r .\) Now we will temporarily ignore the column for \(p\) and focus on \(q\) and \(r\), writing the truth values for \(q \vee r\)
\(\begin{array}{|c|c|c|}
\hline p & q & r \\
\hline \mathrm{T} & \mathrm{T} & \mathrm{T} \\
\hline \mathrm{T} & \mathrm{T} & \mathrm{F} \\
\hline \mathrm{T} & \mathrm{F} & \mathrm{T} \\
\hline \mathrm{T} & \mathrm{F} & \mathrm{F} \\
\hline \mathrm{F} & \mathrm{T} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{T} & \mathrm{F} \\
\hline \mathrm{F} & \mathrm{F} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{F} & \mathrm{F} \\
\hline
\end{array}\)
\(\begin{array}{|c|c|c|c|}
\hline p & q & r & q \vee r \\
\hline \mathrm{T} & \mathrm{T} & \mathrm{T} & \mathrm{T} \\
\hline \mathrm{T} & \mathrm{T} & \mathrm{F} & \mathrm{T} \\
\hline \mathrm{T} & \mathrm{F} & \mathrm{T} & \mathrm{T} \\
\hline \mathrm{T} & \mathrm{F} & \mathrm{F} & \mathrm{F} \\
\hline \mathrm{F} & \mathrm{T} & \mathrm{T} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{T} & \mathrm{F} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{F} & \mathrm{T} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{F} & \mathrm{F} & \mathrm{F} \\
\hline
\end{array}\)
Next we can find the negation of \(q \vee r\), working off the \(q \vee r\) Column we just created. (Ignore the first three columns and simply negate the values in the \(q \vee r\) column.)
\(\begin{array}{|c|c|c|c|c|}
\hline p & q & r & q \vee r & \sim(q \vee r) \\
\hline \mathrm{T} & \mathrm{T} & \mathrm{T} & \mathrm{T} & \mathrm{F} \\
\hline \mathrm{T} & \mathrm{T} & \mathrm{F} & \mathrm{T} & \mathrm{F} \\
\hline \mathrm{T} & \mathrm{F} & \mathrm{T} & \mathrm{T} & \mathrm{F} \\
\hline \mathrm{T} & \mathrm{F} & \mathrm{F} & \mathrm{F} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{T} & \mathrm{T} & \mathrm{T} & \mathrm{F} \\
\hline \mathrm{F} & \mathrm{T} & \mathrm{F} & \mathrm{T} & \mathrm{F} \\
\hline \mathrm{F} & \mathrm{F} & \mathrm{T} & \mathrm{T} & \mathrm{F} \\
\hline \mathrm{F} & \mathrm{F} & \mathrm{F} & \mathrm{F} & \mathrm{T} \\
\hline
\end{array}\)
Finally, we find the values of \(p\) and \(\sim(q \vee r)\). (Ignore the second, third, and fourth columns.)
\(\begin{array}{|c|c|c|c|c|c|}
\hline p & q & r & q \vee r & \sim (q \vee r) & p \wedge \sim (q \vee r \text { ) } \\
\hline \text { T } & \text { T } & \text { T } & \text { T } & \text { F } & \text { F } \\
\hline \text { T } & \text { T } & \text { F } & \text { T } & \text { F } & \text { F } \\
\hline \text { T } & \text { F } & \text { T } & \text { T } & \text { F } & \text { F } \\
\hline \text { T } & \text { F } & \text { F } & \text { F } & \text { T } & \text { T } \\
\hline \text { F } & \text { T } & \text { T } & \text { T } & \text { F } & \text { F } \\
\hline \text { F } & \text { T } & \text { F } & \text { T } & \text { F } & \text { F } \\
\hline \text { F } & \text { F } & \text { T } & \text { T } & \text { F } & \text { F } \\
\hline \text { F } & \text { F } & \text { F } & \text { F } & \text { T } & \text { F } \\
\hline
\end{array}\)
It turns out that this complex expression is true in only one case: when \(p\) is true, \(q\) is false, and \(r\) is false. To illustrate this situation, suppose that Anaheim will make the playoffs if: (1) Anaheim wins, and (2) neither Boston nor Cleveland wins. TFF is the only scenario in which Anaheim will make the playoffs.
Create a truth table for this statement: \((\sim p \wedge q) \vee \sim q\)
- Answer
-
\(\begin{array}{|c|c|c|c|c|c|}
\hline p & q & \sim p & \sim p \wedge q & \sim q & (\sim p \wedge q) \vee \sim q \\
\hline \mathrm{T} & \mathrm{T} & \mathrm{F} & \mathrm{F} & \mathrm{F} & \mathrm{F} \\
\hline \mathrm{T} & \mathrm{F} & \mathrm{F} & \mathrm{F} & \mathrm{T} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{T} & \mathrm{T} & \mathrm{T} & \mathrm{F} & \mathrm{T} \\
\hline \mathrm{F} & \mathrm{F} & \mathrm{T} & \mathrm{F} & \mathrm{T} & \mathrm{T} \\
\hline
\end{array}\)
You have probably noticed that different truth tables have different numbers of rows, depending on how many variables (or simple statements) that we have. When there is only one simple statement (such as our truth table for negation), we have two rows, one for true and another for false. When we have two simple statements, \(p\) and \(q\), there are four rows in the truth table. For Example 3, we had three simple statements, \(p\), \(q\) and \(r\), with eight rows in the truth table. So for each new simple statement, the number of rows doubles. This pattern continues, so we can generalize it as follows.
A statement with \(k\) variables - or simple statements - will have a truth table with \(2^k\) rows.
Two statements are logically equivalent if they have the same simple statements and when their truth tables are computed, the final columns in the tables are identical.
The negation of a conjunction is logically equivalent to the disjunction of the negation of the statements making up the conjunction. To negate an “and” statement, negate each part and change the “and” to “or”.
\(\sim(p \wedge q)\) is logically equivalent to \(\sim p \vee \sim q\)
The negation of a disjunction is logically equivalent to the conjunction of the negation of the statements making up the disjunction. To negate an “or” statement, negate each part and change the “or” to “and”.
\(\sim(p \vee q)\) is logically equivalent to \(\sim p \wedge \sim q\)
For Valentine’s Day, you did not get your sweetie flowers or candy: Which of the following statements is logically equivalent?
- You did not get them flowers or did not get them candy.
- You did not get them flowers and did not get them candy.
- You got them flowers or got them candy.
Solution
- This statement does not go far enough; it leaves open the possibility that you got them one of the two things.
- This statement is equivalent to the original; \(\sim (f \vee c)\) is equivalent to \(\sim f \wedge \sim c\)
- This statement says that you got them something, but we know that you did not.
To serve as the President of the US, a person must have been born in the US, must be at least 35 years old, and must have lived in the US for at least 14 years. What minimum set of conditions would disqualify someone from serving as President?
- Answer
-
Failing to meet just one of the three conditions is all it takes to be disqualified. A person is disqualified if they were not born in the US, or are not at least 35 years old, or have not lived in the US for at least 14 years. The key word here is “or” instead of “and”.