4.3: Truth Tables
- Page ID
- 59946
\( \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}\)Because complex Boolean statements can get tricky to think about, we can create a truth table to keep track of what truth values for the simple statements make the complex statement true and false.
A table showing what the resulting truth value of a complex statement is for all the possible truth values for the simple statements.
Suppose you’re picking out a new couch, and your significant other says “get a sectional or something with a chaise”.
Solution
This is a complex statement made of two simpler conditions: “is a sectional”, and “has a chaise”. For simplicity, let’s use S to designate “is a sectional”, and C to designate “has a chaise”. The condition S is true if the couch is a sectional.
A truth table for this would look like this:
S | C | S or C |
T | T | T |
T | F | T |
F | T | T |
F | F | F |
In the table, T is used for true, and F for false. In the first row, if \(S\) is true and \(C\) is also true, then the complex statement “\(S\) or \(C\)” is true. This would be a sectional that also has a chaise, which meets our desire.
Remember also that or in logic is not exclusive; if the couch has both features, it does meet the condition.
To shorthand our notation further, we’re going to introduce some symbols that are commonly used for and, or, and not.
The symbol \(⋀\) is used for and: A and B is notated \(A ⋀ B\).
The symbol \(⋁\) is used for or: A or B is notated \(A ⋁ B\)
The symbol ~ is used for not: not A is notated ~\(A\)
You can remember the first two symbols by relating them to the shapes for the union and intersection. \(A ⋀ B\) would be the elements that exist in both sets, in \(A ⋂ B\). Likewise, \(A ⋁ B\) would be the elements that exist in either set, in \(A ⋃ B\).
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.
A | B | A ⋀ B |
T | T | T |
T | F | F |
F | T | F |
F | F | F |
A | B | A ⋁ B |
T | T | T |
T | F | F |
F | T | F |
F | F | F |
A | ~A |
T | F |
F | T |
Truth tables really become useful when analyzing more complex Boolean statements.
Create a truth table for the statement \(A ⋀\) ~\((B ⋁ C)\).
Solution
It helps to work from the inside out when creating truth tables, and create tables for intermediate operations. We start by listing all the possible truth value combinations for \(A\), \(B\), and \(C\). Notice how the first column contains 4 Ts followed by 4 Fs, the second column contains 2 Ts, 2 Fs, then repeats, and the last column alternates. This pattern ensures that all combinations are considered. Along with those initial values, we’ll list the truth values for the innermost expression, \(B ⋁ C\).
A | B | C | B ⋁ C |
T | T | T | T |
T | T | F | T |
T | F | T | T |
T | F | F | F |
F | T | T | T |
F | T | F | T |
F | F | T | T |
F | F | F | F |
Next, we can find the negation of \(B ⋁ C\), working off the \(B ⋁ C\) column we just created.
A | B | C | B ⋁ C | ~(B ⋁ C) |
T | T | T | T | F |
T | T | F | T | F |
T | F | T | T | F |
T | F | F | F | T |
F | T | T | T | F |
F | T | F | T | F |
F | F | T | T | F |
F | F | F | F | T |
Finally, we find the values of \(A\) and ~\((B ⋁ C)\)
A | B | C | B ⋁ C | ~(B ⋁ C) | A ⋀ ~(B ⋁ C) |
T | T | T | T | F | F |
T | T | F | T | F | F |
T | F | T | T | F | F |
T | F | F | F | T | T |
F | T | T | T | F | F |
F | T | F | T | F | F |
F | F | T | T | F | F |
F | F | F | F | T | F |
It turns out that this complex expression is only true in one case: if A is true, B is false, and C is false.
Create a truth table for this statement: (~\(A ⋀ B) ⋁\) ~\(B\)
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 are logical conditional sentences stating that a statement \(p\), called the antecedent, implies a consequence \(q\).
Implications are commonly written as \(p → q\)
Implications are similar to the conditional statements we looked at earlier; p \(→\) q 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 logical statements that suggest that the consequence must logically follow if the antecedent is true.
The English statement “If it is raining, then there are clouds is the sky” is a logical implication. It is a valid argument because if the antecedent “it is raining” is true, then the consequence “there are clouds in the sky” must also be true.
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.
A friend tells you that “if you upload that picture to Facebook, you’ll lose your job”. There are four possible outcomes:
- You upload the picture and keep your job
- You upload the picture and lose your job
- You don’t upload the picture and keep your job
- You don’t upload the picture and lose your job
There is only one possible case where your friend was lying – the first option where you upload the picture and keep your job. In the last two cases, your friend didn’t say anything about what would happen if you didn’t upload the picture, so you can’t conclude their statement is invalid, even if you didn’t upload the picture and still lost your job.
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.
p | q | p → q |
T | T | T |
T | F | F |
F | T | T |
F | F | T |
Construct a truth table for the statement \((m ⋀\) ~\(p) → r\)
Solution
We start by constructing a truth table for the antecedent.
m | p | ~p | m ⋀ ~p |
T | T | F | F |
T | F | T | T |
F | T | F | F |
F | F | T | F |
Now we can build the truth table for the implication
m | p | ~p | m ⋀ ~p | r | (m ⋀ ~p) → r |
T | T | F | F | T | T |
T | F | T | T | T | T |
F | T | F | F | T | T |
F | F | T | F | T | T |
T | T | F | F | F | T |
T | F | T | T | F | F |
F | T | F | F | F | T |
F | F | T | F | F | T |
In this case, when \(m\) is true, \(p\) is false, and \(r\) is false, then the antecedent \(m ⋀\) ~\(p\) will be true but the consequence false, resulting in an invalid implication; every other case gives a valid implication.
For any implication, there are three related statements, the converse, the inverse, and the contrapositive.
The original implication is “if p then q” p → q
The converse is: “if q then p” q → p
The inverse is “if not p then not q” ~p → ~q
The contrapositive is “if not q then not p” ~q → ~p
Consider again the valid implication “If it is raining, then there are clouds in the sky”.
The converse would be “If there are clouds in the sky, it is raining.” This is certainly not always true.
The inverse would be “If it is not raining, then there are not clouds in the sky.” Likewise, this is not always true.
The contrapositive would be “If there are not clouds in the sky, then it is not raining.” This statement is valid, and is equivalent to the original implication.
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 | p → q | q → p | ~p → ~q | ~q → ~p | ||||
T | T | T | T | T | T | ||||
T | F | F | T | T | F | ||||
F | T | T | F | F | T | ||||
F | F | T | T | T | T |
A conditional statement and its contrapositive are logically equivalent.
The converse and inverse of a statement are logically equivalent.