Because complex Boolean statements can get tricky to think about, we can create a truth table to break the complex statement into simple statements, and determine whether they are true or false. A table will help keep track of all the truth values of the simple statements that make up a complex statement, leading to an analysis of the full statement.
truth table
A truth table is a table showing what the resulting truth value of a complex statement is for all the possible truth values for the simple statements.
Some symbols that are commonly used for and, or, and not make using a truth table easier.
symbols in truth tables
The symbol [latex]\wedge[/latex] is used for and: [latex]A[/latex] and [latex]B[/latex] is notated [latex]A\wedge{B}[/latex]
The symbol [latex]\vee[/latex] is used for or: [latex]A[/latex] or [latex]B[/latex] is notated [latex]A\vee{B}[/latex]
The symbol [latex]\sim[/latex] is used for not: not [latex]A[/latex] is notated [latex]\sim{A}[/latex]
You can remember the first two symbols by relating them to the shapes for the union and intersection. [latex]A\wedge{B}[/latex] would be the elements that exist in both sets, in [latex]A\cap{B}[/latex]. Likewise, [latex]A\vee{B}[/latex] would be the elements that exist in either set, in [latex]A\cup{B}[/latex].
You may notice that you’ve accumulated quite a bit of new vocabulary and symbols. A helpful technique is to collect all of these in a central location: a set of flashcards, a notebook, or something similar. New notation and vocabulary are introduced in this page as well. Try to find similarities between the symbols in this page and the ones you encountered in previous pages in this module.Translate each statement into symbolic notation using the symbols for truth tables. Let [latex]P[/latex] represent “I like Pepsi” and let [latex]C[/latex] represent “I like Coke.”
I like Pepsi or I like Coke.
I like Pepsi and I like Coke.
I do not like Pepsi.
It is not the case that I like Pepsi or Coke.
I like Pepsi and I do not like Coke.
[latex]P \vee C[/latex]
[latex]P \wedge C[/latex]
[latex]\sim P[/latex]
[latex]\sim(P \vee C)[/latex]
[latex]P \wedge \sim C[/latex]
Let’s try to construct a simple truth table before we apply these new symbols.
How to: Create a Truth Table
The idea of creating a truth table may seem daunting to some. Don’t panic, there are some easy steps you can follow to create a truth table.
Identify the Variables: Determine all the variables used in your logical statements or expressions. These will be the inputs for your truth table.
Create the Table: Draw a table with enough columns to hold all the variables and all the logical expressions you want to evaluate. Typically, each variable and each expression will have its own column.
Fill in the Variables’ Values: Start filling the columns for the variables first. The number of rows is determined by the number of possible combinations of truth values for your variables, which is [latex]2^n[/latex], where [latex]n[/latex] is the number of variables. For each variable, alternate between true (T) and false (F) values, doubling the length of the sequence with each new variable.
Evaluate the Expressions: For each row of the table, evaluate the logical expressions based on the truth values of the variables for that row. Write the result in the column for that expression.
Interpret the Table: Examine the completed table to determine the truth values of the expressions for all combinations of truth values of the variables. This can provide valuable insights about the properties of these expressions and can help in logical reasoning or proofs.
Suppose you’re picking out a new couch, and your significant other says “get a sectional or something with a chaise.” Construct a truth table that describes the elements of the conditions of this statement and whether the conditions are met.
This is a complex statement made of two simpler conditions: “is a sectional,” and “has a chaise.” For simplicity, let’s use [latex]S[/latex] to designate “is a sectional,” and [latex]C[/latex] to designate “has a chaise.” The condition [latex]S[/latex] is true if the couch is a sectional. A truth table for this would look like this:
[latex]S[/latex]
[latex]C[/latex]
[latex]S \text{ or } C[/latex]
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 [latex]S[/latex] is true and [latex]C[/latex] is also true, then the complex statement “[latex]S[/latex] or [latex]C[/latex]” is true. This would be a sectional that also has a chaise, which meets our desire.
Remember also that or in logic is not exclusive; if the couch has both features, it does meet the condition.
In the previous example, 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.
basic truth tables
[latex]A[/latex]
[latex]B[/latex]
[latex]A\wedge{B}[/latex]
T
T
T
T
F
F
F
T
F
F
F
F
[latex]A[/latex]
[latex]B[/latex]
[latex]A\vee{B}[/latex]
T
T
T
T
F
T
F
T
T
F
F
F
[latex]A[/latex]
[latex]\sim{A}[/latex]
T
F
F
T
Truth tables really become useful when analyzing more complex Boolean statements.
Create a truth table for this statement: [latex]A \vee \sim B[/latex]
When we create the truth table, we need to list all the possible truth value combinations for [latex]A[/latex] and [latex]B[/latex]. Notice how the first column contains [latex]2[/latex] Ts followed by [latex]2[/latex] Fs, and the second column alternates T,F,T, F. This pattern ensures that all [latex]4[/latex] combinations are considered.
[latex]A[/latex]
[latex]B[/latex]
T
T
T
F
F
T
F
F
After creating columns with those initial values, we create a third column for the expression [latex]\sim B[/latex]. Now we will temporarily ignore the column for [latex]A[/latex] and write the truth values for [latex]\sim B[/latex]
[latex]A[/latex]
[latex]B[/latex]
[latex]\sim B[/latex]
T
T
F
T
F
T
F
T
F
F
F
T
Next we can find the truth values of [latex]A \vee \sim B[/latex], using the first and third columns.
[latex]A[/latex]
[latex]B[/latex]
[latex]\sim B[/latex]
[latex]A \vee \sim B[/latex]
T
T
F
T
T
F
T
T
F
T
F
F
F
F
T
T
The truth table shows that [latex]A \vee \sim B[/latex] 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 [latex]A=[/latex] Anaheim wins its game and [latex]B=[/latex] Boston wins its game, then [latex]A \vee \sim B[/latex] 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 the statement: [latex]A\wedge\sim\left(B\vee{C}\right)[/latex]
It helps to work from the inside out when creating truth tables, and create tables for intermediate operations. We start by listing all the possible truth value combinations for [latex]A[/latex], [latex]B[/latex], and [latex]C[/latex]. Notice how the first column contains [latex]4[/latex] Ts followed by [latex]4[/latex] Fs, the second column contains [latex]2[/latex] Ts, [latex]2[/latex] Fs, then repeats, and the last column alternates. This pattern ensures that all combinations are considered. Along with those initial values, we’ll list the truth values for the innermost expression, [latex]B\vee{C}[/latex].
[latex]A[/latex]
[latex]B[/latex]
[latex]C[/latex]
[latex]B \vee{C}[/latex]
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
Next we can find the negation of [latex]B\vee{C}[/latex], working off the [latex]B\vee{C}[/latex] column we just created.
[latex]A[/latex]
[latex]B[/latex]
[latex]C[/latex]
[latex]B\vee{C}[/latex]
[latex]\sim\left(B\vee{C}\right)[/latex]
T
T
T
T
F
T
T
F
T
F
T
F
T
T
F
T
F
F
F
T
F
T
T
T
F
F
T
F
T
F
F
F
T
T
F
F
F
F
F
T
Finally, we find the values of [latex]A[/latex] and [latex]\sim\left(B\vee{C}\right)[/latex]
[latex]A[/latex]
[latex]B[/latex]
[latex]C[/latex]
[latex]B\vee{C}[/latex]
[latex]\sim\left(B\vee{C}\right)[/latex]
[latex]A\wedge\sim\left(B{\vee}C\right)[/latex]
T
T
T
T
F
F
T
T
F
T
F
F
T
F
T
T
F
F
T
F
F
F
T
T
F
T
T
T
F
F
F
T
F
T
F
F
F
F
T
T
F
F
F
F
F
F
T
F
It turns out that this complex expression is only true in one case: if [latex]A[/latex] is true, [latex]B[/latex] is false, and [latex]C[/latex] is false.
definition
Chaise is short for chaise lounge which is a chair having a lengthened seat that forms a leg rest for reclining.