Skip to main content

Section 17.4 Truth Tables I

Before we focus on truth tables, we’re going to introduce some symbols that are commonly used for and, or, and not.

Definition 17.4.1. Symbols for Compound Statements.

The symbol \(\wedge\) is used for and: A and B is notated \(A\wedge B\)

The symbol \(\vee\) is used for or: A or B is notated \(A\vee B\)

The symbol \(\sim\) is used for not: not A is notated \(\sim A\)

You can remember the first two symbols by relating them to the shapes for the union and intersection. \(A\wedge B\) would be the elements that exist in both sets, in \(A\cap B\text{.}\) Likewise, \(A\vee B\) would be the elements that exist in either set, in \(A\cup B\text{.}\) When we are working with sets, we use the rounded version of the symbols; when we are working with statements, we use the pointy version.

Example 17.4.2.

Translate each statement into symbolic notation. Let P represent “I like Pepsi” and let C represent “I like Coke”.

1. I like Pepsi or I like Coke.

2. I like Pepsi and I like Coke.

3. I do not like Pepsi.

4. It is not the case that I like Pepsi or Coke.

5. I like Pepsi and I do not like Coke.

  1. \(\displaystyle P \vee C\)

  2. \(\displaystyle P \wedge C\)

  3. \(\displaystyle \sim P\)

  4. \(\displaystyle \sim(P\vee C)\)

  5. \(\displaystyle P \wedge \sim C\)

As you can see, we can use parentheses to organize more complicated statements.

Translate “We have carrots or we will not make soup” into symbols. Let C represent “we have carrots” and let S represent “we will make soup”.

Answer

\(C \vee \sim S\)

Because complex Boolean 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.

Definition 17.4.4. Truth table.

A table showing what the resulting truth value of a complex statement is for all the possible truth values for the simple statements.

Example 17.4.5.

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 S to designate “is a sectional”, and C to designate “has a chaise”.

A truth table for this situation would look like this:

Table 17.4.6.
S C S or C
T T T
T F T
F T T
F F F

In the table, T is used for true, and F for false. In the first row, if S is true and C is also true, then the complex statement “S or C” 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.

Truth tables really become useful when we analyze more complex Boolean statements.

Example 17.4.9.

Create a truth table for the statement \(A\vee{} \sim B\text{.}\)

When we create the truth table, we need to list all the possible truth value combinations for A and B. Notice how the first column contains 2 Ts followed by 2 Fs, and the second column alternates T, F, T, F. This pattern ensures that all 4 combinations are considered.

Table 17.4.10.
\(​A\) \(B​\)
T T
T F
F T
F F

After creating columns with those initial values, we create a third column for the expression \(\sim B\text{.}\) Now we will temporarily ignore the column for A and write the truth values for \(\sim B\text{.}\)

Table 17.4.11.
\(​A\) \(B​\) \(\sim B​\)
T T F
T F T
F T F
F F T

Next we can find the truth values of \(A\vee{} \sim B\text{,}\) using the first and third columns.

Table 17.4.12.
\(A​\) \(B​\) \(​\sim B\) \(A\vee{} \sim B​\)
T T F T
T F T T
F T F F
F F T T

The truth table shows that \(A\vee{}\sim B\) 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 A = Anaheim wins its game and B = Boston wins its game, then \(A\vee{}\sim B\) 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: \(\mathop\sim A \wedge B\text{.}\)

Answer
Table 17.4.14.
\(A​\) \(B​\) \(\sim A​\) \(\sim A \wedge B​\)
T T F F
T F F F
F T T T
F F T F
Example 17.4.15.

Create a truth table for the statement \(A \wedge {} \sim\!(B\vee C)\text{.}\)

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 A, B, and C.

Table 17.4.16.
A B C BC
T T T T
T T F T
T F T T
T F F F
F T T T
F T F T
F F T T
F F F F

Notice how the first column contains 4 Ts followed by 4 Fs, the second column contains 2 Ts, 2 Fs, then repeats, and the last column alternates T, F, T, F... 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, \(B\vee C\text{.}\) Now we will temporarily ignore the column for A and focus on B and C, writing the truth values for \(B\vee C\text{.}\)