- Last updated
- Save as PDF
- Page ID
- 129511
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}}}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}}}\)
\( \newcommand{\vectorC}[1]{\textbf{#1}}\)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}}\)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}\)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}}}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)
Figure \(\PageIndex{1}\):If-then statements use logic to execute directions. (credit: “Coding” by Carlos Varela/Flickr, CC BY 2.0)
Learning Objectives
After completing this section, you should be able to:
- Use and apply the conditional to construct a truth table.
- Use and apply the biconditional to construct a truth table.
- Use truth tables to determine the validity of conditional and biconditional statements.
Computer languages use if-then or if-then-else statements as decision statements:
- If the hypothesis is true, then do something.
- Or, if the hypothesis is true, then do something; else do something else.
For example, the following representation of computer code creates an if-then-else decision statement:
Check value of variable .
If , then print "Hello, World!" else print "Goodbye".
In this imaginary program, the if-then statement evaluates and acts on the value of the variable . For instance, if , the program would consider the statement as true and “Hello, World!” would appear on the computer screen. If instead, , the program would consider the statement as false (because 3 is greater than 1), and print “Goodbye” on the screen.
In this section, we will apply similar reasoning without the use of computer programs.
People in Mathematics
The Countess of Lovelace, Ada Lovelace, is credited with writing the first computer program. She wrote an algorithm to work with Charles Babbage’s Analytical Engine that could compute the Bernoulli numbers in 1843. In doing so, she became the first person to write a program for a machine that would produce more than just a simple calculation. The computer programming language ADA is named after her.
Reference: Posamentier, Alfred and Spreitzer Christian, “Chapter 34 Ada Lovelace: English (1815-1852)” pp. 272-278, Math Makers: The Lives and Works of 50 Famous Mathematicians, Prometheus Books, 2019.
Use and Apply the Conditional to Construct a Truth Table
A conditional is a logical statement of the form if , then . The conditional statement in logic is a promise or contract. The only time the conditional, is false is when the contract or promise is broken.
For example, consider the following scenario. A child’s parent says, “If you do your homework, then you can play your video games.” The child really wants to play their video games, so they get started right away, finish within an hour, and then show their parent the completed homework. The parent thanks the child for doing a great job on their homework and allows them to play video games. Both the parent and child are happy. The contract was satisfied; true implies true is true.
Now, suppose the child does not start their homework right away, and then struggles to complete it. They eventually finish and show it to their parent. The parent again thanks the child for completing their homework, but then informs the child that it is too late in the evening to play video games, and that they must begin to get ready for bed. Now, the child is really upset. They held up their part of the contract, but they did not receive the promised reward. The contract was broken; true implies false is false.
So, what happens if the child does not do their homework? In this case, the hypothesis is false. No contract has been entered, therefore, no contract can be broken. If the conclusion is false, the child does not get to play video games and might not be happy, but this outcome is expected because the child did not complete their end of the bargain. They did not complete their homework. False implies false is true. The last option is not as intuitive. If the parent lets the child play video games, even if they did not do their homework, neither parent nor child are going to be upset. False implies true is true.
The truth table for the conditional statement below summarizes these results.
T | T | T |
T | F | F |
F | T | T |
F | F | T |
Checkpoint
Notice that the only time the conditional statement, is false is when the hypothesis, , is true and the conclusion, , is false.
Exercise \(\PageIndex{1}\)
Constructing Truth Tables for Conditional Statements
Assume both of the following statements are true: : My sibling washed the dishes, and : My parents paid them $5.00. Create a truth table to determine the truth value of each of the following conditional statements.
- Answer
-
Because pis true and q is true, the statement p → q is, “If my sibling washed the dishes, then my parents paid them $5.00.” My sibling did wash the dishes, since p p is true, and the parents did pay the sibling $5.00, so the contract was entered and completed. The conditional statement is true, as indicated by the truth table representing this case:
T → T = T.T T T p → ~ q p
2. p → ~ q p → ~ q translates to the statement, “If my sibling washed the dishes, then my parents did not pay them $5.00.” p p is true, but ~ q ~ q is false. The sibling completed their end of the contract, but they did not get paid. The contract was broken by the parents. The conditional statement is false, as indicated by the truth table representing this case:T → F = F.
T T F F 3. ~ p → q translates to the statement, “If my sibling did not wash the dishes, then my parents paid them $5.00.” ~ p is false, but q is true. The sibling did not do the dishes. No contract was entered, so it could not be broken. The parents decided to pay them $5.00 anyway. The conditional statement is true, as indicated by the truth table representing this case: F → T = T.
T T F T
Exercise \(\PageIndex{2}\)
Determining Validity of Conditional Statements
Construct a truth table to analyze all possible outcomes for each of the following statements then determine whether they are valid.
- p∧q→~q
- p→~p∨q
- Answer
-
1. Applying the dominance of connectives, the statement p ∧ q → ~ q is equivalent to ( p ∧ q ) → ( ~ q ).So, the columns of the truth table will include p , q, p ∧ q, ~ q, and p ∧ q → ~ q. Because there are only two basic propositions, pand q, the table will have 2 ( 2 ) = 4 2 ( 2 ) = 4 rows of truth values to account for all the possible outcomes. The statement is not valid because the last column is not all true.
T T T F F T F F T T F T F F T F F F T T Applying the dominance of connectives, the statement p → ~ p ∨ q is equivalent to ( p ) → ( ( ~ p ) ∨ q ).So, the columns of the truth table will include p , q , ~ p, ~ p ∨ q, and p → ( ~ p ∨ q ). Because there are only two basic propositions, p and q , the table will have 2 ( 2 ) = 4 2 ( 2 ) = 4 rows of truth values to account for all the possible outcomes. The statement is not valid because the last column is not all true.
T T F T T T F F F F F T T T T F F T T T
Your Turn \(\PageIndex{2}\)
Construct a truth table to analyze all possible outcomes for each of the following statements, then determine whether they are valid.
1. \(q \rightarrow \sim p \vee q\)
2. \(\sim p \rightarrow q \wedge p\)
Use and Apply the Biconditional to Construct a Truth Table
The biconditional, , is a two way contract; it is equivalent to the statement A biconditional statement, is true whenever the truth value of the hypothesis matches the truth value of the conclusion, otherwise it is false.
The truth table for the biconditional is summarized below.
T | T | T |
T | F | F |
F | T | F |
F | F | T |
Video
Logic Part 11B: Biconditional and Summary of Truth Value Rules in Logic
Exercise \(\PageIndex{3}\)
Constructing Truth Tables for Biconditional Statements
Assume both of the following statements are true: \(p\) : The plumber fixed the leak, and \(q\) : The homeowner paid the plumber \(\$ 150.00\). Create a truth table to determine the truth value of each of the following biconditional statements.
1. \(p \leftrightarrow q\)
2. \(p \leftrightarrow \sim q\)
3. \(\sim p \leftrightarrow \sim q\)
- Answer
-
1. Because p p is true and q q is true, the statement p ↔ q p ↔ q is “The plumber fixed the leak if and only if the homeowner paid them $150.00.” Because both p p and q q are true, the leak was fixed and the plumber was paid, meaning both parties satisfied their end of the bargain. The biconditional statement is true, as indicated by the truth table representing this case: T ↔ T = T.
T T T 2. p → ~ q p → ~ q translates to the statement, “The plumber fixed the leak if and only if the homeowner did not pay them $150.” If the plumber fixed the leak and the homeowner did not pay them, the homeowner will have broken their end of the contract. The biconditional statement is false, as indicated by the truth table representing this case:
T ↔ F = F.T T F F 3. ~ p ↔ ~ q ~ p ↔ ~ q translates to the statement, “The plumber did not fix the leak if and only if the homeowner did not pay them $150.” In this case, neither party—the plumber nor the homeowner—entered into the contract. The leak was not repaired, and the plumber was not paid. No agreement was broken. The biconditional statement is true, as indicated by the truth table representing this case: F ↔ F = T.
T T F F T
Your Turn \(\PageIndex{3}\)
Assume \(p\) is true and \(q\) is false: \(p\) : The contractor fixed the broken window, and \(q\) : The homeowner paid the contractor \(\$ 200\). Create a truth table to determine the truth value of each of the following biconditional statements.
1. \(p \leftrightarrow q\)
2. \(p \leftrightarrow \sim q\)
3. \(\sim p \leftrightarrow q\)
Checkpoint
The biconditional, is true whenever the truth values of and match, otherwise it is false.
Video
Logic Part 13: Truth Tables to Determine if Argument is Valid or Invalid
Exercise \(\PageIndex{1}\)
Determining Validity of Biconditional Statements
Construct a truth table to analyze all possible outcomes for each of the following statements, then determine whether they are valid.
1. \(p \wedge q \leftrightarrow p \wedge \sim q\)
2. \(p \vee q \leftrightarrow \sim p \vee q\)
3. \(p \rightarrow q \leftrightarrow \sim q \rightarrow \sim p\)
4. \(p \wedge q \rightarrow \sim r \leftrightarrow p \wedge q \wedge r\)
- Answer
-
1. Applying the dominance of connectives, the statement \(p \wedge q \leftrightarrow p \wedge \sim q\) is equivalent to \((p \wedge q) \leftrightarrow(p \wedge(\sim q))\). So, the columns of the truth table will include \(p, q, p \wedge q, \sim q, p \wedge \sim q\) and \((p \wedge q) \leftrightarrow(p \wedge \sim q)\). Because there are only two basic propositions, \(p\) and \(q\), the table will have \(2(2)=4\) rows of truth values to account for all the possible outcomes. The statement is not valid because the last column is not all true.
T T T F F F T F F T T F F T F F F T F F F T F T 2. Applying the dominance of connectives, the statement \(p \vee q \leftrightarrow \sim p \vee q\) is equivalent to \((p \vee q) \leftrightarrow((\sim p) \vee q)\). So, the columns of the truth table will include \(p, q, p \vee q, \sim p, \sim p \vee q\), and \((p \vee q) \leftrightarrow(\sim p \vee q)\). Because there are only two basic propositions, \(p\) and \(q\), the table will have \(2(2)=4\) rows of truth values to account for all the possible outcomes. The statement is not valid because the last column is not all true.
T T T F T T T F T F F F F T T T T T F F F T T F 3. Applying the dominance of connectives, the statement \(p \rightarrow q \leftrightarrow \sim q \rightarrow \sim p\) is equivalent to \((p \rightarrow q) \leftrightarrow((\sim q) \rightarrow(\sim p))\). So, the columns of the truth table will include \(p, q, p \rightarrow q, \sim q\), \(\sim p, \sim q \rightarrow \sim p\), and \((p \rightarrow q) \leftrightarrow(\sim q \rightarrow \sim p)\). Because there are only two basic propositions, \(p\) and \(q\) the table will have \(2(2)=4\) rows of truth values to account for all the possible outcomes. The statement is valid because the last column is all true.
T T T F F T T T F F T F F T F T T F T T T F F T T T T T 4. Applying the dominance of connectives, the statement \(p \wedge q \rightarrow \sim r \leftrightarrow p \wedge q \wedge r\) is equivalent to \(((p \wedge q) \rightarrow(\sim r)) \leftrightarrow((p \wedge q) \wedge r)\). So, the columns of the truth table will include \(p, q, r\), \(\sim r, p \wedge q,(p \wedge q) \wedge \sim r,(p \wedge q) \wedge r\), and \(((p \wedge q) \rightarrow(\sim r)) \leftrightarrow((p \wedge q) \wedge r)\). Because there are three basic propositions, \(p, q\), and \(r\), the table will have \(2(2)(2)=8\) rows of truth values to account for all the possible outcomes. The statement is not valid because the last column is not all true.
T T T F T F T T T T F T T T F T T F T F F T F F T F F T F T F F F T T F F T F F F T F T F T F F F F T F F T F F F F F T F T F F
Your Turn\(\PageIndex{1}\)
Construct a truth table to analyze all possible outcomes for each of the following statements, then determine whether they are valid.
1. \(\sim(p \wedge q) \leftrightarrow(\sim p \vee \sim q)\)
2. \(\sim p \leftrightarrow q \wedge p\)
3. \(p \rightarrow q \leftrightarrow \sim p \vee q\)
4. \(p \wedge q \rightarrow r \leftrightarrow \sim p \vee \sim q \vee r\)
Check Your Understanding
- 1. In logic, a conditional statement can be thought of as a _____________.
- If the hypothesis, p, of a conditional statement is true, the _____,q, must also be true for the conditional statement \(p \leftrightarrow q\) to be true.
- If the ______________ of a conditional statement is false, the conditional statement is true.
- The symbolic form of the _____________________ statement is \(p \leftrightarrow q\).
- The _____________________ statement is equivalent to the statement \((p \rightarrow q) \wedge(q \rightarrow p)\)
- pif and only if qis ____________ whenever the truth value of p matches the truth value of q, otherwise it is false.
Section 2.4 Exercises
For the following exercises, complete the truth table to determine the truth value of the proposition in the last column.
1.
p | q | ~p | \(\sim p \rightarrow q\) |
---|---|---|---|
T | T |
2.
p | q | ~q | \(p \rightarrow \sim q\) |
---|---|---|---|
T | T |
3.
p | q | ~p | \(~p \leftrightarrow q\) |
---|---|---|---|
F | T |
4.
p | q | ~q | \(\sim p \leftrightarrow q\) |
---|---|---|---|
F | T |
5.
p | q | r | ~p | \(\sim p \wedge q\) | \((\sim p \wedge q) \rightarrow r\) |
---|---|---|---|---|---|
F | T | F |
6.
p | q | r | ~p | ~r | \(\sim p \wedge q\) | \((\sim p \wedge q) \rightarrow \sim r\) |
---|---|---|---|---|---|---|
F | F | F |
7.
p | q | r | ~p | ~r | \(\sim p \vee q\) | \((\sim p \vee q) \leftrightarrow \sim r\) |
---|---|---|---|---|---|---|
F | F | F |
8.
p | q | r | ~p | ~r | \(\sim p \vee q\) | \((\sim p \vee q) \leftrightarrow \sim r\) |
---|---|---|---|---|---|---|
T | F | F |
9.
p | q | r | ~p | ~r | \(\sim p \vee q\) | \(p \rightarrow \sim r\) | \((\sim p \vee r) \leftrightarrow(p \rightarrow \sim r)\) |
---|---|---|---|---|---|---|---|
F | F | F |
10.
p | q | r | ~p | ~r | \(\sim p \wedge q\) | \(p \rightarrow \sim r\) | \((\sim p \wedge q) \leftrightarrow(p \rightarrow \sim r)\) |
---|---|---|---|---|---|---|---|
T | T | T |
For the following exercises, assume these statements are true: p:Faheem is a software engineer, q:Ann is a project manager, r:Giacomo works with Faheem, and s{\text{:}} The software application was completed on time. Translate each of the following statements to symbols, then construct a truth table to determine its truth value.
11. If Giacomo works with Faheem, then Faheem is not a software engineer.
12. If the software application was not completed on time, then Ann is not a project manager.
13. The software application was completed on time if and only if Giacomo worked with Faheem.
14. Ann is not a project manager if and only if Faheem is a software engineer.
15. If the software application was completed on time, then Ann is a project manager, but Faheem is not a software engineer.
16. If Giacomo works with Faheem and Ann is a project manager, then the software application was completed on time.
17. The software application was not completed on time if and only if Faheem is a software engineer or Giacomo did not work with Faheem.
18. Faheem is a software engineer or Ann is not a project manager if and only if Giacomo did not work with Faheem and the software application was completed on time.
19. Ann is a project manager implies Faheem is a software engineer if and only if the software application was completed on time implies Giacomo worked with Faheem.
20. If Giacomo did not work with Faheem implies that the software application was not completed on time, then Ann was not the project manager.
For the following exercises, construct a truth table to analyze all the possible outcomes and determine the validity of each argument.
21. \(p \vee \sim q \rightarrow q\)
22. \(\sim q \rightarrow p \wedge \sim q\)
23. \((p \rightarrow q) \leftrightarrow q\)
24. \((p \rightarrow q) \leftrightarrow p\)
25. \(\sim(p \vee q) \leftrightarrow(\sim p \wedge \sim q)\)
26. \((p \rightarrow q) \wedge p \rightarrow q\)
27. \(p \rightarrow q \rightarrow r\)
28. \((p \rightarrow q) \wedge(q \rightarrow r) \leftrightarrow(p \rightarrow r)\)
29. \(p \vee(q \wedge r) \leftrightarrow(p \vee q) \wedge(p \vee r)\)
30. \(p \vee(q \vee r) \leftrightarrow(p \vee q) \vee r\)