Logic Basics: Learn It 3

Truth Tables

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.”

  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.

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.

  1. Identify the Variables: Determine all the variables used in your logical statements or expressions. These will be the inputs for your truth table.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

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]

Create a truth table for the statement: [latex]A\wedge\sim\left(B\vee{C}\right)[/latex]

definition