- Last updated
- Save as PDF
- Page ID
- 80505
\( \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}\)
Truth Tables
Consider the compound proposition \(c= (p \land q)\lor (\neg q \land r)\text{,}\) where \(p\text{,}\) \(q\text{,}\) and \(r\) are propositions. This is an example of a proposition generated by \(p\text{,}\) \(q\text{,}\) and \(r\text{.}\) We will define this terminology later in the section. Since each of the three simple propositions has two possible truth values, it follows that there are eight different combinations of truth values that determine a value for \(c\text{.}\) These values can be obtained from a truth table for \(c\text{.}\) To construct the truth table, we build \(c\) from \(p\text{,}\) \(q\text{,}\) and \(r\) and from the logical operators. The result is the truth table below. Strictly speaking, the first three columns and the last column make up the truth table for \(c\text{.}\) The other columns are work space needed to build up to \(c\text{.}\)
Table \(\PageIndex{1}\): Truth Table for \(c= (p \land q)\lor (\neg q \land r)\)
\(p\) | \(q\) | \(r\) | \(p\land q\) | \(\neg q\) | \(\negq\land r\) | \((p\land q)\lor(\neg q\land r)\) |
---|---|---|---|---|---|---|
\(0\) | \(0\) | \(0\) | \(0\) | \(1\) | \(0\) | \(0\) |
\(0\) | \(0\) | \(1\) | \(0\) | \(1\) | \(1\) | \(1\) |
\(0\) | \(1\) | \(0\) | \(0\) | \(0\) | \(0\) | \(0\) |
\(0\) | \(1\) | \(1\) | \(0\) | \(0\) | \(0\) | \(0\) |
\(1\) | \(0\) | \(0\) | \(0\) | \(1\) | \(0\) | \(0\) |
\(1\) | \(0\) | \(1\) | \(0\) | \(1\) | \(1\) | \(1\) |
\(1\) | \(1\) | \(0\) | \(1\) | \(0\) | \(0\) | \(1\) |
\(1\) | \(1\) | \(1\) | \(1\) | \(0\) | \(0\) | \(1\) |
Note that the first three columns of the truth table are an enumeration of the eight three-digit binary integers. This standardizes the order in which the cases are listed. In general, if \(c\) is generated by \(n\) simple propositions, then the truth table for \(c\) will have \(2^n\) rows with the first \(n\) columns being an enumeration of the \(n\) digit binary integers. In our example, we can see at a glance that for exactly four of the eight cases, \(c\) will be true. For example, if \(p\) and \(r\) are true and \(q\) is false (the sixth case), then \(c\) is true.
Let \(S\) be any set of propositions. We will give two definitions of a proposition generated by S. The first is a bit imprecise, but should be clear. The second definition is called a recursive definition. If you find it confusing, use the first definition and return to the second later.
Propositions Generated by a Set
Definition \(\PageIndex{1}\): Proposition Generated by a Set
Let \(S\) be any set of propositions. A proposition generated by \(S\) is any valid combination of propositions in \(S\) with conjunction, disjunction, and negation. Or, to be more precise,
- If \(p \in S\text{,}\) then \(p\) is a proposition generated by \(S\text{,}\) and
- If \(x\) and \(y\) are propositions generated by \(S\text{,}\) then so are \((x)\text{,}\) \(\neg x\text{,}\) \(x\lor y\) , and \(x\land y\text{.}\)
Note \(\PageIndex{1}\)
We have not included the conditional and biconditional in the definition because they can both be generated from conjunction, disjunction, and negation, as we will see later.
If \(S\) is a finite set, then we may use slightly different terminology. For example, if \(S = \{p, q, r\}\text{,}\) we might say that a proposition is generated by \(p, q\text{,}\) and \(r\) instead of from \(\{p, q, r\}\text{.}\)
It is customary to use the following hierarchy for interpreting propositions, with parentheses overriding this order:
- First: Negation
- Second: Conjunction
- Third: Disjunction
- Fourth: The conditional operation
- Fifth: The biconditional operation
Within any level of the hierarchy, work from left to right. Using these rules, \(p \land q \lor r\) is taken to mean \((p \land q)\lor r\text{.}\) These precedence rules are universal, and are exactly those used by computer languages to interpret logical expressions.
Example \(\PageIndex{1}\): Examples of the Hierarchy of Logical Operations
A few shortened expressions and their fully parenthesized versions:
- \(p \land q \land r\) is \((p \land q) \land r\text{.}\)
- \(\neg p \lor \neg r\) is \((\neg p) \lor (\neg r)\text{.}\)
- \(\neg \neg p\) is \(\neg (\neg p)\text{.}\)
- \(p \leftrightarrow q\land r\rightarrow s \) is \(p \leftrightarrow ((q\land r)\rightarrow s)\text{.}\)
A proposition generated by a set \(S\) need not include each element of \(S\) in its expression. For example, \(\neg q \land r\) is a proposition generated by \(p, q\text{,}\) and \(r\text{.}\)
Exercises
Exercise \(\PageIndex{1}\)
Construct the truth tables of:
- \(\displaystyle p\lor p\)
- \(\displaystyle p\land (\neg p)\)
- \(\displaystyle p\lor (\neg p)\)
- \(\displaystyle p \land p\)
- Answer
-
- \(\displaystyle \begin{array}{cc} p & p\lor p \\ \hline 0 & 0 \\ 1 & 1 \\ \end{array}\)
- \(\displaystyle \begin{array}{ccc} p & \neg p & p\land (\neg p) \\ \hline 0 & 1 & 0 \\ 1 & 0 & 0 \\ \end{array}\)
- \(\displaystyle \begin{array}{ccc} p & \neg p & p\lor (\neg p) \\ \hline 0 & 1 & 1 \\ 1 & 0 & 1 \\ \end{array}\)
- \(\displaystyle \begin{array}{cc} p & p\land p \\ \hline 0 & 0 \\ 1 & 1 \\ \end{array}\)
Exercise \(\PageIndex{2}\)
Construct the truth tables of:
- \(\displaystyle \neg (p\land q )\)
- \(\displaystyle p \land (\neg q)\)
- \(\displaystyle (p \land q)\land r\)
- \(\displaystyle (p \land q) \lor (q \land r)\lor (r \land p)\)
- \(\displaystyle \text{ }\neg p\lor \neg q\)
- \(\displaystyle p \lor q \lor r \lor s\)
Exercise \(\PageIndex{3}\)
Rewrite the following with as few extraneous parentheses as possible:
- \(\displaystyle (\neg ((p) \land (r))) \lor (s)\)
- \(\displaystyle ((p) \lor (q)) \land ((r) \lor (q))\)
- Answer
-
- \(\displaystyle \neg (p\land r)\lor s\)
- \(\displaystyle (p\lor q) \land (r\lor q)\)
Exercise \(\PageIndex{4}\)
In what order are the operations in the following propositions performed?
- \(\displaystyle p \lor \neg q \lor r\land \neg p\)
- \(\displaystyle p \land \neg q \land r \land \neg p\)
Exercise \(\PageIndex{5}\)
Determine the number of rows in the truth table of a proposition containing four variables \(p, q, r, \textrm{ and } s\text{.}\)
- Answer
-
\(2^4 = 16\) rows.
Exercise \(\PageIndex{6}\)
If there are 45 lines on a sheet of paper, and you want to reserve one line for each line in a truth table, how large could \(\lvert S\rvert \) be if you can write truth tables of propositions generated by \(S\) on the sheet of paper?