Skip to ContentGo to accessibility pageKeyboard shortcuts menu
OpenStax Logo
Contemporary Mathematics

2.3 Constructing Truth Tables

Contemporary Mathematics2.3 Constructing Truth Tables

Table of contents
  1. Preface
  2. 1 Sets
    1. Introduction
    2. 1.1 Basic Set Concepts
    3. 1.2 Subsets
    4. 1.3 Understanding Venn Diagrams
    5. 1.4 Set Operations with Two Sets
    6. 1.5 Set Operations with Three Sets
    7. Chapter Summary
      1. Key Terms
      2. Key Concepts
      3. Videos
      4. Formula Review
      5. Projects
      6. Chapter Review
      7. Chapter Test
  3. 2 Logic
    1. Introduction
    2. 2.1 Statements and Quantifiers
    3. 2.2 Compound Statements
    4. 2.3 Constructing Truth Tables
    5. 2.4 Truth Tables for the Conditional and Biconditional
    6. 2.5 Equivalent Statements
    7. 2.6 De Morgan’s Laws
    8. 2.7 Logical Arguments
    9. Chapter Summary
      1. Key Terms
      2. Key Concepts
      3. Videos
      4. Projects
      5. Chapter Review
      6. Chapter Test
  4. 3 Real Number Systems and Number Theory
    1. Introduction
    2. 3.1 Prime and Composite Numbers
    3. 3.2 The Integers
    4. 3.3 Order of Operations
    5. 3.4 Rational Numbers
    6. 3.5 Irrational Numbers
    7. 3.6 Real Numbers
    8. 3.7 Clock Arithmetic
    9. 3.8 Exponents
    10. 3.9 Scientific Notation
    11. 3.10 Arithmetic Sequences
    12. 3.11 Geometric Sequences
    13. Chapter Summary
      1. Key Terms
      2. Key Concepts
      3. Videos
      4. Formula Review
      5. Projects
      6. Chapter Review
      7. Chapter Test
  5. 4 Number Representation and Calculation
    1. Introduction
    2. 4.1 Hindu-Arabic Positional System
    3. 4.2 Early Numeration Systems
    4. 4.3 Converting with Base Systems
    5. 4.4 Addition and Subtraction in Base Systems
    6. 4.5 Multiplication and Division in Base Systems
    7. Chapter Summary
      1. Key Terms
      2. Key Concepts
      3. Videos
      4. Projects
      5. Chapter Review
      6. Chapter Test
  6. 5 Algebra
    1. Introduction
    2. 5.1 Algebraic Expressions
    3. 5.2 Linear Equations in One Variable with Applications
    4. 5.3 Linear Inequalities in One Variable with Applications
    5. 5.4 Ratios and Proportions
    6. 5.5 Graphing Linear Equations and Inequalities
    7. 5.6 Quadratic Equations with Two Variables with Applications
    8. 5.7 Functions
    9. 5.8 Graphing Functions
    10. 5.9 Systems of Linear Equations in Two Variables
    11. 5.10 Systems of Linear Inequalities in Two Variables
    12. 5.11 Linear Programming
    13. Chapter Summary
      1. Key Terms
      2. Key Concepts
      3. Videos
      4. Formula Review
      5. Projects
      6. Chapter Review
      7. Chapter Test
  7. 6 Money Management
    1. Introduction
    2. 6.1 Understanding Percent
    3. 6.2 Discounts, Markups, and Sales Tax
    4. 6.3 Simple Interest
    5. 6.4 Compound Interest
    6. 6.5 Making a Personal Budget
    7. 6.6 Methods of Savings
    8. 6.7 Investments
    9. 6.8 The Basics of Loans
    10. 6.9 Understanding Student Loans
    11. 6.10 Credit Cards
    12. 6.11 Buying or Leasing a Car
    13. 6.12 Renting and Homeownership
    14. 6.13 Income Tax
    15. Chapter Summary
      1. Key Terms
      2. Key Concepts
      3. Videos
      4. Formula Review
      5. Projects
      6. Chapter Review
      7. Chapter Test
  8. 7 Probability
    1. Introduction
    2. 7.1 The Multiplication Rule for Counting
    3. 7.2 Permutations
    4. 7.3 Combinations
    5. 7.4 Tree Diagrams, Tables, and Outcomes
    6. 7.5 Basic Concepts of Probability
    7. 7.6 Probability with Permutations and Combinations
    8. 7.7 What Are the Odds?
    9. 7.8 The Addition Rule for Probability
    10. 7.9 Conditional Probability and the Multiplication Rule
    11. 7.10 The Binomial Distribution
    12. 7.11 Expected Value
    13. Chapter Summary
      1. Key Terms
      2. Key Concepts
      3. Formula Review
      4. Projects
      5. Chapter Review
      6. Chapter Test
  9. 8 Statistics
    1. Introduction
    2. 8.1 Gathering and Organizing Data
    3. 8.2 Visualizing Data
    4. 8.3 Mean, Median and Mode
    5. 8.4 Range and Standard Deviation
    6. 8.5 Percentiles
    7. 8.6 The Normal Distribution
    8. 8.7 Applications of the Normal Distribution
    9. 8.8 Scatter Plots, Correlation, and Regression Lines
    10. Chapter Summary
      1. Key Terms
      2. Key Concepts
      3. Videos
      4. Formula Review
      5. Projects
      6. Chapter Review
      7. Chapter Test
  10. 9 Metric Measurement
    1. Introduction
    2. 9.1 The Metric System
    3. 9.2 Measuring Area
    4. 9.3 Measuring Volume
    5. 9.4 Measuring Weight
    6. 9.5 Measuring Temperature
    7. Chapter Summary
      1. Key Terms
      2. Key Concepts
      3. Videos
      4. Formula Review
      5. Projects
      6. Chapter Review
      7. Chapter Test
  11. 10 Geometry
    1. Introduction
    2. 10.1 Points, Lines, and Planes
    3. 10.2 Angles
    4. 10.3 Triangles
    5. 10.4 Polygons, Perimeter, and Circumference
    6. 10.5 Tessellations
    7. 10.6 Area
    8. 10.7 Volume and Surface Area
    9. 10.8 Right Triangle Trigonometry
    10. Chapter Summary
      1. Key Terms
      2. Key Concepts
      3. Videos
      4. Formula Review
      5. Projects
      6. Chapter Review
      7. Chapter Test
  12. 11 Voting and Apportionment
    1. Introduction
    2. 11.1 Voting Methods
    3. 11.2 Fairness in Voting Methods
    4. 11.3 Standard Divisors, Standard Quotas, and the Apportionment Problem
    5. 11.4 Apportionment Methods
    6. 11.5 Fairness in Apportionment Methods
    7. Chapter Summary
      1. Key Terms
      2. Key Concepts
      3. Videos
      4. Formula Review
      5. Projects
      6. Chapter Review
      7. Chapter Test
  13. 12 Graph Theory
    1. Introduction
    2. 12.1 Graph Basics
    3. 12.2 Graph Structures
    4. 12.3 Comparing Graphs
    5. 12.4 Navigating Graphs
    6. 12.5 Euler Circuits
    7. 12.6 Euler Trails
    8. 12.7 Hamilton Cycles
    9. 12.8 Hamilton Paths
    10. 12.9 Traveling Salesperson Problem
    11. 12.10 Trees
    12. Chapter Summary
      1. Key Terms
      2. Key Concepts
      3. Videos
      4. Formula Review
      5. Projects
      6. Chapter Review
      7. Chapter Test
  14. 13 Math and...
    1. Introduction
    2. 13.1 Math and Art
    3. 13.2 Math and the Environment
    4. 13.3 Math and Medicine
    5. 13.4 Math and Music
    6. 13.5 Math and Sports
    7. Chapter Summary
      1. Key Terms
      2. Key Concepts
      3. Formula Review
      4. Projects
      5. Chapter Review
      6. Chapter Test
  15. A | Co-Req Appendix: Integer Powers of 10
  16. Answer Key
    1. Chapter 1
    2. Chapter 2
    3. Chapter 3
    4. Chapter 4
    5. Chapter 5
    6. Chapter 6
    7. Chapter 7
    8. Chapter 8
    9. Chapter 9
    10. Chapter 10
    11. Chapter 11
    12. Chapter 12
    13. Chapter 13
  17. Index
A photo shows four people working together to complete a puzzle.
Figure 2.8 Just like solving a puzzle, a computer programmer must consider all potential solutions in order to account for each possible outcome. (credit: modification of work “Deadline Xmas 2010” by Allan Henderson/Flickr, CC BY 2.0)

Learning Objectives

After completing this section, you should be able to:

  1. Interpret and apply negations, conjunctions, and disjunctions.
  2. Construct a truth table using negations, conjunctions, and disjunctions.
  3. Construct a truth table for a compound statement and interpret its validity.

Are you familiar with the Choose Your Own Adventure book series written by Edward Packard? These gamebooks allow the reader to become one of the characters and make decisions that affect what happens next, resulting in different sequences of events in the story and endings based on the choices made. Writing a computer program is a little like what it must be like to write one of these books. The programmer must consider all the possible inputs that a user can put into the program and decide what will happen in each case, then write their program to account for each of these possible outcomes.

A truth table is a graphical tool used to analyze all the possible truth values of the component logical statements to determine the validity of a statement or argument along with all its possible outcomes. The rows of the table correspond to each possible outcome for the given logical statement identified at the top of each column. A single logical statement pp has two possible truth values, true or false. In truth tables, a capital T will represent true values, and a capital F will represent false values.

In this section, you will use the knowledge built in Statements and Quantifiers and Compound Statements to analyze arguments and determine their truth value and validity. A logical argument is valid if its conclusion follows from its premises, regardless of whether those premises are true or false. You will then explore the truth tables for negation, conjunction, and disjunction, and use these truth tables to analyze compound logical statements containing these connectives.

Interpret and Apply Negations, Conjunctions, and Disjunctions

The negation of a statement will have the opposite truth value of the original statement. When pp is true, ~p~p is false, and when pp is false, ~p~p is true.

Example 2.12

Finding the Truth Value of a Negation

For each logical statement, determine the truth value of its negation.

  1. pp: 3+5=8.3+5=8.
  2. qq: All horses are mustangs.
  3. ~r~r: New Delhi is not the capital of India.

Your Turn 2.12

For each logical statement, determine the truth value of its negation.
1.
~ p : 3 × 5 = 14 .
2.
~ q : Some houses are built with bricks.
3.
r : Abuja is the capital of Nigeria.

A conjunction is a logical and statement. For a conjunction to be true, both statements that make up the conjunction must be true. If at least one of the statements is false, the and statement is false.

Example 2.13

Finding the Truth Value of a Conjunction

Given p: 4+7=11,p: 4+7=11, q: 11-3=7,q: 11-3=7, and r: 7×11=77,r: 7×11=77, determine the truth value of each conjunction.

  1. pqpq
  2. ~qr~qr
  3. ~pq~pq

Your Turn 2.13

Given p : Yellow is a primary color, q : Blue is a primary color, and r : Green is a primary color, determine the truth value of each conjunction.
1.
p q
2.
q r
3.
~ r p

Checkpoint

The only time a conjunction is true is if both statements that make up the conjunction are true.

A disjunction is a logical inclusive or statement, which means that a disjunction is true if one or both statements that form it are true. The only way a logical inclusive or statement is false is if both statements that form the disjunction are false.

Example 2.14

Finding the Truth Value of a Disjunction

Given p: 4+7=11,p: 4+7=11, q: 11-3=7,q: 11-3=7, and r: 7×11=77,r: 7×11=77, determine the truth value of each disjunction.

  1. pqpq
  2. ~qr~qr
  3. ~pq~pq

Your Turn 2.14

Given p : Yellow is a primary color, q : Blue is a primary color, and r : Green is a primary color, determine the truth value of each disjunction.
1.
p q
2.
~ p r
3.
q r

In the next example, you will apply the dominance of connectives to find the truth values of compound statements containing negations, conjunctions, and disjunctions and use a table to record the results. When constructing a truth table to analyze an argument where you can determine the truth value of each component statement, the strategy is to create a table with two rows. The first row contains the symbols representing the components that make up the compound statement. The second row contains the truth values of each component below its symbol. Include as many columns as necessary to represent the value of each compound statement. The last column includes the complete compound statement with its truth value below it.

Example 2.15

Finding the Truth Value of Compound Statements

Given p:4+7=11,p:4+7=11, q:11-3=7,q:11-3=7, and r:7×11=77,r:7×11=77, construct a truth table to determine the truth value of each compound statement

  1. ~pqr~pqr
  2. ~pqr~pqr
  3. ~(pr)q~(pr)q

Your Turn 2.15

Given p : Yellow is a primary color, q : Blue is a primary color, and r : Green is a primary color, determine the truth value of each compound statement, by constructing a truth table.
1.
~ q p r
2.
p q ~ r
3.
~ ( p r ) q

Construct Truth Tables to Analyze All Possible Outcomes

Recall from Statements and Questions that the negation of a statement will always have the opposite truth value of the original statement; if a statement pp is false, then its negation ~p~p is true, and if a statement pp is true, then its negation ~p~p is false. To create a truth table for the negation of statement pp, add a column with a heading of ~p~p, and for each row, input the truth value with the opposite value of the value listed in the column for pp, as depicted in the table below.

Negation
pp ~p~p
T F
F T

Conjunctions and disjunctions are compound statements formed when two logical statements combine with the connectives “and” and “or” respectively. How does that change the number of possible outcomes and thus determine the number of rows in our truth table? The multiplication principle, also known as the fundamental counting principle, states that the number of ways you can select an item from a group of nn items and another item from a group with mm items is equal to the product of mm and nn. Because each proposition pp and qq has two possible outcomes, true or false, the multiplication principle states that there will be 2×2=42×2=4 possible outcomes: {TT, TF, FT, FF}.

The tree diagram and table in Figure 2.9 demonstrate the four possible outcomes for two propositions pp and qq.

A horizontal flowchart and a table with five rows and three columns.
Figure 2.9

A conjunction is a logical and statement. For a conjunction to be true, both the statements that make up the conjunction must be true. If at least one of the statements is false, the and statement is false.

A disjunction is a logical inclusive or statement. Which means that a disjunction is true if one or both statements that make it are true. The only way a logical inclusive or statement is false is if both statements that make up the disjunction are false.

Conjunction (AND) Disjunction (OR)
pp qq pqpq pp qq pqpq
T T T T T T
T F F T F T
F T F F T T
F F F F F F

Example 2.16

Constructing Truth Tables to Analyze Compound Statements

Construct a truth table to analyze all possible outcomes for each of the following arguments.

  1. p~qp~q
  2. ~(pq)~(pq)
  3. (p~q)r(p~q)r

Your Turn 2.16

Construct a truth table to analyze all possible outcomes for each of the following arguments.
1.
p ~ q
2.
~ ( p q )
3.
( p ~ q ) r

Determine the Validity of a Truth Table for a Compound Statement

A logical statement is valid if it is always true regardless of the truth values of its component parts. To test the validity of a compound statement, construct a truth table to analyze all possible outcomes. If the last column, representing the complete statement, contains only true values, the statement is valid.

Example 2.17

Determining the Validity of Compound Statements

Construct a truth table to determine the validity of each of the following statements.

  1. ~pq~pq
  2. ~(p~p)~(p~p)

Your Turn 2.17

Construct a truth table to determine the validity of each of the following statements.
1.
p ~ p
2.
~ p ~ q

Check Your Understanding

14.
A logical argument is _____ if its conclusion follows from its premises.
15.
A logical statement is valid if it is always _____.
16.
A _____ _____ is a tool used to analyze all the possible outcomes for a logical statement.
17.
The truth table for the conjunction, p q , has _____ rows of truth values.
18.

The truth table for the negation of a logical statement, ~ p , has _____ rows of truth values.

Section 2.3 Exercises

For the following exercises, find the truth value of each statement.
1 .
p : 7 × 3 = 21 . What is the truth value of ~ p ?
2 .
q : The sun revolves around the Earth. What is the truth value of ~ q ?
3 .
~ r : The acceleration of gravity is 9.81 m/sec2. What is the truth value of r ?
4 .
s : Dan Brown is not the author of the book, The Davinci Code. What is the truth value of ~ ( ~ s ) ?
5 .
t : Broccoli is a vegetable. What is the truth value of ~ ( ~ t ) ?
For the following exercises, given p : 1 + 2 = 3 , q : Five is an even number, and r : Seven is a prime number, find the truth value of each of the following statements.
6 .
~ q
7 .
p q
8 .
p q
9 .
~ p ~ q
10 .
p ~ q
11 .
p r
12 .
q r
13 .
q ~ r
14 .
q ~ r
15 .
~ ( p r )
16 .
p q r
17 .
~ p ( q r )
18 .
~ ( q r ) ~ p
19 .
q r p
20 .
~ q r p
For the following exercises, complete the truth table to determine the truth value of the proposition in the last column.
21 .
p q r ~ p ~ p q ( ~ p q ) r
T T T
22 .
p q r ~ p ~ p q ( ~ p q ) r
F T F
23 .
p q r ~ p ~ r ~ p q ( ~ p q ) ~ r
F F F
24 .
p q r ~ p ~ r ~ p q ( ~ p q ) ~ r
F F F
For the following exercises, given p : All triangles have three sides, q : Some rectangles are not square, and r : A pentagon has eight sides, determine the truth value of each compound statement by constructing a truth table.
25 .
~ r q p
26 .
~ ( q p ) r
27 .
~ p q r
28 .
~ p ~ q r

For the following exercises, construct a truth table to analyze all the possible outcomes for the following arguments.

29 .

~ q q

30 .

~ p ~ q

31 .

~ p ~ q

32 .

p q r

For the following exercises, construct a truth table to determine the validity of each statement.

33 .

~ q q

34 .

p ~ q

35 .

p q ~ p

36 .

( p q ) ( ~ p ~ q )

Order a print copy

As an Amazon Associate we earn from qualifying purchases.

Citation/Attribution

Want to cite, share, or modify this book? This book uses the Creative Commons Attribution License and you must attribute OpenStax.

Attribution information
  • If you are redistributing all or part of this book in a print format, then you must include on every physical page the following attribution:
    Access for free at https://openstax.org/books/contemporary-mathematics/pages/1-introduction
  • If you are redistributing all or part of this book in a digital format, then you must include on every digital page view the following attribution:
    Access for free at https://openstax.org/books/contemporary-mathematics/pages/1-introduction
Citation information

© Apr 17, 2023 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution License . The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.