Truth Tables

Learning Outcomes

  • Combine sets using Boolean logic, using proper notations
  • Use statements and conditionals to write and interpret expressions
  • Use a truth table to interpret complex statements or conditionals
  • Write truth tables given a logical implication, and it’s related statements – converse, inverse, and contrapositive
  • Determine whether two statements are logically equivalent
  • Use DeMorgan’s laws to define logical equivalences of a statement

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 table showing what the resulting truth value of a complex statement is for all the possible truth values for the simple statements.

Example

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.

Some symbols that are commonly used for and, or, and not make using a truth table easier.

Symbols

The symbol [latex]\wedge[/latex] is used for and: A and B is notated [latex]A\wedge{B}[/latex].

The symbol [latex]\vee[/latex] is used for or: A or B is notated [latex]A\vee{B}[/latex]

The symbol [latex]\sim[/latex] is used for not: not A 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].
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

A B [latex]A\wedge{B}[/latex]
T T T
T F F
F T F
F F F
A B [latex]A\vee{B}[/latex]
T T T
T F T
F T T
F F F
A [latex]\sim{A}[/latex]
T F
F T

Try It

Truth tables really become useful when analyzing more complex Boolean statements.

Example

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

Try It

When we discussed conditions earlier, we discussed the type where we take an action based on the value of the condition. We are now going to talk about a more general version of a conditional, sometimes called an implication.

Implications

Implications are logical conditional sentences stating that a statement p, called the antecedent, implies a consequence q.

Implications are commonly written as [latex]p\rightarrow{q}[/latex]

Implications are similar to the conditional statements we looked at earlier; [latex]p\rightarrow{q}[/latex] is typically written as “if p then q,” or “p therefore q.” The difference between implications and conditionals is that conditionals we discussed earlier suggest an action—if the condition is true, then we take some action as a result. Implications are a logical statement that suggest that the consequence must logically follow if the antecedent is true.

Example

The English statement “If it is raining, then there are clouds is the sky” is a logical implication. Is this a valid argument, why or why not?

Notice that the statement tells us nothing of what to expect if it is not raining. If the antecedent is false, then the implication becomes irrelevant.

Example

A friend tells you that “if you upload that picture to Facebook, you’ll lose your job.” Describe the possible outcomes related to this statement, and determine whether your friend’s statement is invalid.

In traditional logic, an implication is considered valid (true) as long as there are no cases in which the antecedent is true and the consequence is false. It is important to keep in mind that symbolic logic cannot capture all the intricacies of the English language.

Truth Values for Implications

p q pq
T T T
T F F
F T T
F F T

Example

Construct a truth table for the statement [latex]\left(m\wedge\sim{p}\right)\rightarrow{r}[/latex]

Try It

For any implication, there are three related statements, the converse, the inverse, and the contrapositive.

Related Statements

The original implication is “if p then q”: [latex]p\rightarrow{q}[/latex]

The converse is “if q then p”: [latex]q\rightarrow{p}[/latex]

The inverse is “if not p then not q”: [latex]\sim{p}\rightarrow\sim{q}[/latex]

The contrapositive is “if not q then not p”: [latex]\sim{q}\rightarrow{p}[/latex]

Example

Consider again the valid implication “If it is raining, then there are clouds in the sky.”

Write the related converse, inverse, and contrapositive statements.

Try It

Looking at truth tables, we can see that the original conditional and the contrapositive are logically equivalent, and that the converse and inverse are logically equivalent.

Implication Converse Inverse Contrapositive
p q [latex]p\rightarrow{q}[/latex] [latex]q{\rightarrow}p[/latex] [latex]\sim{p}\rightarrow\sim{q}[/latex] [latex]\sim{q}\rightarrow\sim{p}[/latex]
T T T T T T
T F F T T F
F T T F F T
F F T T T T

Equivalence

A conditional statement and its contrapositive are logically equivalent.

The converse and inverse of a statement are logically equivalent.