Skip to main content

Truth Tables

Consider the following three formulas:

  1. ¬(PQ)\neg(P\wedge Q)
  2. (¬P¬Q)(\neg P\wedge\neg Q)
  3. (¬P¬Q)(\neg P\vee \neg Q)

These formulas have different syntax trees:

diff_syntax_trees

There is something more that we can say about the formulas: two of the above formulas always have the same truth value. See if you can figure out which two formulas always have the same truth value before reading further.

Each atomic proposition can be assigned any of the two possible truth values, so there are two possible truth value functions for a single atomic proposition. For two atomic propositions, there 4 possible truth value functions. For instance, there are 4 ways to assign truth values to the atomic propositions PP and QQ. It is common to list the different truth value functions in a table, where each atomic proposition labels a column and each row is an assignment of truth values to the formulas in the columns:

PPQQ
1. T\mathsf{T}T\mathsf{T}
2. T\mathsf{T}F\mathsf{F}
3. F\mathsf{F}T\mathsf{T}
4. F\mathsf{F}F\mathsf{F}

For example, row 2 is the truth value assignment that assigns T\mathsf{T} to PP and F\mathsf{F} to QQ. Each additional atomic proposition doubles the number of rows. For example, there are 8 truth value functions for the atomic propositions PP, QQ and RR:

PPQQRR
T\mathsf{T}T\mathsf{T}T\mathsf{T}
T\mathsf{T}T\mathsf{T}F\mathsf{F}
T\mathsf{T}F\mathsf{F}T\mathsf{T}
T\mathsf{T}F\mathsf{F}F\mathsf{F}
F\mathsf{F}T\mathsf{T}T\mathsf{T}
F\mathsf{F}T\mathsf{T}F\mathsf{F}
F\mathsf{F}F\mathsf{F}T\mathsf{T}
F\mathsf{F}F\mathsf{F}F\mathsf{F}

More generally, we have the following:

Observation. If there are nn atomic propositions, then there are 2n2^n different truth value functions.

Method to find all truth values for formulas: Suppose that we are interested in all the possible truth values of one or more formulas. Below are the steps to find all the possible truth values for a collection of formulas:

  1. Write down all the atomic propositions that appear in the formulas.
  2. Create a truth table listing all the truth value functions for the atomic propositions identified in step 1.
  3. Add columns for each formula. You may want to add columns for some of the subformulas to make the calculations easier.
  4. Using the rules for assigning truth values to complex formulas (i.e., by chasing truth up the syntax tree), write a truth value for each formula in each row of the truth table.
Example

The truth values for the 3 formulas from the beginning of this section (¬(PQ)\neg(P\wedge Q), (¬P¬Q)(\neg P\vee\neg Q), and (¬P¬Q)(\neg P\wedge \neg Q)) are given in the following table:

PPQQ¬(PQ)\neg (P\wedge Q)(¬P¬Q)(\neg P\vee \neg Q)(¬P¬Q)(\neg P\wedge \neg Q)
T\mathsf{T}T\mathsf{T}F\mathsf{F}F\mathsf{F}F\mathsf{F}
T\mathsf{T}F\mathsf{F}T\mathsf{T}T\mathsf{T}F\mathsf{F}
F\mathsf{F}T\mathsf{T}T\mathsf{T}T\mathsf{T}F\mathsf{F}
F\mathsf{F}F\mathsf{F}T\mathsf{T}T\mathsf{T}T\mathsf{T}

Note that ¬(PQ)\neg(P\wedge Q) and (¬P¬Q)(\neg P\vee\neg Q) always have the same truth value, but this is not true for any other pair of formulas.

Practice Questions

  1. Find all possible truth values for (P¬Q)(P\rightarrow \neg Q)
  1. Find all possible truth values for (PQ)(QP)(P\rightarrow Q)\vee (Q\rightarrow P)
  1. Find all possible truth values for (P¬(Q¬R))(P\wedge \neg (Q\vee \neg R))
  1. Find all possible truth values for (¬(PQ)P)(\neg (P\vee Q)\wedge P)
  1. Find all possible truth values for ¬¬(PQ)\neg\neg (P \vee Q)
  1. Find all possible truth values for the formulas PQP\rightarrow Q, ¬Q\neg Q and ¬P\neg P
  1. Find all possible truth values for the formulas PQP\wedge Q and ¬PR\neg P\vee R
  1. Find all possible truth values for (P¬P)Q(P\wedge \neg P)\rightarrow Q
  1. Find all possible truth values for the formulas PQP\rightarrow Q, P¬QP\wedge\neg Q, and ¬PQ\neg P\vee Q
  1. Find all possible truth values for (P(QP))(P\rightarrow (Q\rightarrow P))
  1. Find all possible truth values for (P(QR))(P\leftrightarrow (Q\wedge R))
  1. Find all possible truth values for (¬(PQ)P)(\neg (P\vee Q)\leftrightarrow P)
  1. Find all possible truth values for P¬PP\leftrightarrow \neg P
  1. Find all possible truth values for (PQ)(P\leftrightarrow Q) and (PQ)(P\wedge Q)
  1. Find all possible truth values for (P¬Q)(P\leftrightarrow \neg Q) and (¬QP)(\neg Q\rightarrow P)
  1. Find all possible truth values for (PQ)(P\rightarrow Q), (¬PQ)(\neg P\vee Q), and ¬(P¬Q)\neg (P\wedge \neg Q).
  1. Find all possible truth values for (PQ)(P\wedge Q), (¬P¬Q)(\neg P\vee \neg Q), and (PR)(P\rightarrow R).
  1. Find all possible truth values for (P(PQ))(P \leftrightarrow (P\wedge Q)).
  1. Find all possible truth values for (PQ)(P \rightarrow Q) and ((PR)Q)((P\wedge R) \rightarrow Q).
  1. Find all possible truth values for (PQ)(P \rightarrow Q), (QP)(Q \rightarrow P), and (PQ)(P\leftrightarrow Q).