#set document(title: "2.3 Constructing Truth Tables", author: "OpenStax / XYZ Homework") #set page(width: 8.5in, height: auto, margin: 1in) #import "@preview/cetz:0.5.2" #set text(font: ("STIX Two Text", "Libertinus Serif", "New Computer Modern"), size: 10.5pt, lang: "en") #show math.equation: set text(font: ("STIX Two Math", "New Computer Modern Math")) #set par(justify: true, leading: 0.62em, spacing: 0.9em) #set enum(spacing: 1.1em) // room between list items so tall inline fractions don't collide #set list(spacing: 1.1em) #set table(stroke: 0.5pt + rgb("#c7ccd3")) #let BLUE = rgb("#183B6F") // brand navy — section bars + example/solution labels (white on navy 11.09:1) #let ORANGE = rgb("#A94509") // brand primary-700 — AA-safe deep orange for TEXT (5.93:1 on white; raw brand #F37021 is 2.94:1 and must never carry text) #let RED = rgb("#DC2626") // brand error-600 #let GREEN = rgb("#059669") // brand success-600 (decoration only; small green text uses green-text #007942) #show heading.where(level: 1): it => block(width: 100%, above: 0pt, below: 16pt, fill: gradient.linear(BLUE, rgb("#2C5AA0")), inset: (x: 14pt, y: 12pt), radius: 3pt, text(fill: white, weight: "bold", size: 19pt, it.body)) #show heading.where(level: 2): it => block(width: 100%, above: 18pt, below: 10pt, fill: BLUE, inset: (x: 10pt, y: 6pt), radius: 2pt, text(fill: white, weight: "bold", size: 12pt, it.body)) #show heading.where(level: 3): it => text(fill: ORANGE, weight: "bold", size: 12.5pt, it.body) #show heading.where(level: 4): it => text(fill: BLUE, weight: "bold", size: 10.5pt, it.body) #let examplebox(label, title, body) = block(width: 100%, breakable: true, fill: rgb("#EFF1F5"), stroke: 0.5pt + rgb("#CFDDF0"), radius: 4pt, inset: 10pt, above: 12pt, below: 12pt)[ #block(below: 6pt)[#box(fill: BLUE, inset: (x: 6pt, y: 2pt), radius: 2pt, text(fill: white, weight: "bold", size: 8.5pt, label)) #h(0.4em) #strong[#title]] #body] // rail = decorative left rule (raw brand token); labelcolor = AA-safe label text shade #let notebox(label, rail, labelcolor, tint, body) = block(width: 100%, breakable: true, fill: tint, stroke: (left: 3pt + rail), inset: (left: 10pt, rest: 8pt), radius: (right: 4pt), above: 11pt, below: 11pt)[ #text(fill: labelcolor, weight: "bold", size: 7.5pt, tracking: 0.5pt)[#upper(label)] #linebreak() #body] #let solutionbox(body) = block(above: 4pt, below: 8pt)[ #text(fill: BLUE, weight: "bold", size: 8.5pt)[Solution] #linebreak() #body] #let figph(msg) = block(width: 100%, height: 60pt, fill: rgb("#f6f7f9"), stroke: (paint: rgb("#c7ccd3"), dash: "dashed"), radius: 4pt, inset: 10pt)[ #align(center + horizon, text(fill: rgb("#889"), style: "italic", size: 9pt, msg))] // Standardize inlined figure sizes: measure the natural CeTZ canvas, then scale to a // consistent envelope (aspect-aware; see build_typst.py FIG_* constants). Unlike the // print preamble, dimensions are FLOORED: in an editor a user can trim a figure to a // degenerate 1-D shape (a bare line), and w/h or tw/w would then divide by zero. #let _STD_W = 3.5 #let _WIDE_W = 5.6 #let _MAX_H = 3.4 #let _ASPECT_WIDE = 2.2 #let _UPSCALE_MAX = 1.15 #let stdfig(body) = context { let m = measure(body) let w = calc.max(m.width / 1in, 0.01) let h = calc.max(m.height / 1in, 0.01) let tw = if w / h > _ASPECT_WIDE { _WIDE_W } else { _STD_W } let s = calc.min(tw / w, _MAX_H / h, _UPSCALE_MAX) align(center, box(scale(x: s * 100%, y: s * 100%, reflow: true, body))) } #show figure: set block(breakable: false) #set figure(gap: 8pt) #show figure.caption: set text(size: 8.5pt, fill: rgb("#555")) == 2.3#h(0.6em)Constructing Truth Tables #figure(figph[A photo shows four people working together to complete a puzzle.], alt: "A photo shows four people working together to complete a puzzle.", caption: [Just like solving a puzzle, a computer programmer must consider all potential solutions in order to account for each possible outcome.]) === Learning Objectives After completing this section, you should be able to: + Interpret and apply negations, conjunctions, and disjunctions. + Construct a truth table using negations, conjunctions, and disjunctions. + 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 #strong[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 #math.equation(block: false, alt: "p")[$p$] 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 #math.equation(block: false, alt: "p")[$p$] is true, #math.equation(block: false, alt: "~ p")[$∼ p$] is false, and when #math.equation(block: false, alt: "p")[$p$] is false, #math.equation(block: false, alt: "~ p")[$∼ p$] is true. #examplebox("Example 1")[Finding the Truth Value of a Negation][ For each logical statement, determine the truth value of its negation. + #math.equation(block: false, alt: "p")[$p$]: #math.equation(block: false, alt: "3 plus 5 equals 8.")[$3 + 5 = 8.$] + #math.equation(block: false, alt: "q")[$q$]: All horses are mustangs. + #math.equation(block: false, alt: "~ r")[$∼ r$]: New Delhi is not the capital of India. #solutionbox[ + #math.equation(block: false, alt: "p")[$p$] is true because 3 + 5 does equal 8; therefore, the negation of #math.equation(block: false, alt: "p")[$p$], #math.equation(block: false, alt: "~ p : 3 plus 5 not equal to 8")[$∼ p : 3 + 5 ≠ 8$], is false. + #math.equation(block: false, alt: "q")[$q$] is false because there are other types of horses besides mustangs, such as Clydesdales or Arabians; therefore, the negation of #math.equation(block: false, alt: "q")[$q$], #math.equation(block: false, alt: "~ q")[$∼ q$], is true. + #math.equation(block: false, alt: "~ r")[$∼ r$] is false because New Delhi is the capital of India; therefore, the negation of #math.equation(block: false, alt: "~ r")[$∼ r$], #math.equation(block: false, alt: "r")[$r$], is true. ] ] A conjunction is a logical #emph[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 #emph[and] statement is false. #examplebox("Example 2")[Finding the Truth Value of a Conjunction][ Given #math.equation(block: false, alt: "p : 4 plus 7 equals 11 ,")[$p : 4 + 7 = 11 ,$] #math.equation(block: false, alt: "q : 11 minus 3 equals 7 ,")[$q : 11 − 3 = 7 ,$] and #math.equation(block: false, alt: "r : 7 times 11 equals 77 ,")[$r : 7 × 11 = 77 ,$] determine the truth value of each conjunction. + #math.equation(block: false, alt: "p ∧ q")[$p ∧ q$] + #math.equation(block: false, alt: "~ q ∧ r")[$∼ q ∧ r$] + #math.equation(block: false, alt: "~ p ∧ q")[$∼ p ∧ q$] #solutionbox[ + #math.equation(block: false, alt: "p")[$p$] is true, and #math.equation(block: false, alt: "q")[$q$] is false. Because one statement is true, and the other statement is false, this makes the complete conjunction false. + #math.equation(block: false, alt: "q")[$q$] is false, so #math.equation(block: false, alt: "~ q")[$∼ q$] is true, and #math.equation(block: false, alt: "r")[$r$] is true. Therefore, both statements are true, making the complete conjunction true. + #math.equation(block: false, alt: "~ p")[$∼ p$] is false, and #math.equation(block: false, alt: "q")[$q$] is false. Because both statements are false, the complete conjunction is false. ] ] #notebox("Checkpoint", rgb("#059669"), rgb("#007942"), rgb("#EAF3EC"))[ #emph[The only time a conjunction is true is if both statements that make up the conjunction are true.] ] A disjunction is a logical inclusive #emph[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 #emph[or] statement is false is if both statements that form the disjunction are false. #examplebox("Example 3")[Finding the Truth Value of a Disjunction][ Given #math.equation(block: false, alt: "p : 4 plus 7 equals 11 ,")[$p : 4 + 7 = 11 ,$] #math.equation(block: false, alt: "q : 11 minus 3 equals 7 ,")[$q : 11 − 3 = 7 ,$] and #math.equation(block: false, alt: "r : 7 times 11 equals 77 ,")[$r : 7 × 11 = 77 ,$] determine the truth value of each disjunction. + #math.equation(block: false, alt: "p ∨ q")[$p ∨ q$] + #math.equation(block: false, alt: "~ q ∨ r")[$∼ q ∨ r$] + #math.equation(block: false, alt: "~ p ∨ q")[$∼ p ∨ q$] #solutionbox[ + #math.equation(block: false, alt: "p")[$p$] is true, and #math.equation(block: false, alt: "q")[$q$] is false. One statement is true, and one statement is false, which makes the complete disjunction true. + #math.equation(block: false, alt: "q")[$q$] is false, so #math.equation(block: false, alt: "~ q")[$∼ q$] is true, and #math.equation(block: false, alt: "r")[$r$] is true. Therefore, one statement is true, and the other statement is true, which makes the complete disjunction true. + #math.equation(block: false, alt: "~ p")[$∼ p$] is false, and #math.equation(block: false, alt: "q")[$q$] is false. When all of the component statements are false, the disjunction is false. ] ] 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. #notebox("Video", rgb("#DC2626"), rgb("#DC2626"), rgb("#f7f8fa"))[ #link("https://openstax.org/r/Truth_Values_of_Conjunctions")[Logic Part 2: Truth Values of Conjunctions: Is an "AND" statement true or false?] #link("https://openstax.org/r/Truth_Values_of_Disjunctions")[Logic Part 3: Truth Values of Disjunctions: Is an "OR" statement true or false?] ] #examplebox("Example 4")[Finding the Truth Value of Compound Statements][ Given #math.equation(block: false, alt: "p : 4 plus 7 equals 11 ,")[$p : 4 + 7 = 11 ,$] #math.equation(block: false, alt: "q : 11 minus 3 equals 7 ,")[$q : 11 − 3 = 7 ,$] and #math.equation(block: false, alt: "r : 7 times 11 equals 77 ,")[$r : 7 × 11 = 77 ,$] construct a truth table to determine the truth value of each compound statement + #math.equation(block: false, alt: "~ p ∧ q ∨ r")[$∼ p ∧ q ∨ r$] + #math.equation(block: false, alt: "~ p ∨ q ∧ r")[$∼ p ∨ q ∧ r$] + #math.equation(block: false, alt: "~ open parenthesis p ∧ r close parenthesis ∨ q")[$∼ ( p ∧ r ) ∨ q$] #solutionbox[ + #strong[Step 1:] The statement “#math.equation(block: false, alt: "~ p ∧ q ∨ r")[$∼ p ∧ q ∨ r$]” contains three basic logical statements, #math.equation(block: false, alt: "p")[$p$], #math.equation(block: false, alt: "q")[$q$], and #math.equation(block: false, alt: "r")[$r$], and three connectives, #math.equation(block: false, alt: "~ , ∧ , ∨ .")[$∼ , ∧ , ∨ .$] When we place parentheses in the statement to indicate the dominance of connectives, the statement becomes #math.equation(block: false, alt: "open parenthesis open parenthesis open parenthesis ~ p close parenthesis ∧ q close parenthesis ∨ r close parenthesis .")[$( ( ( ∼ p ) ∧ q ) ∨ r ) .$] #linebreak() #strong[Step 2:] After we have applied the dominance of connectives, we create a two row table that includes a column for each basic statement that makes up the compound statement, and an additional column for the contents of each parentheses. Because we have three sets of parentheses, we include a column for #math.equation(block: false, alt: "~ p ,")[$∼ p ,$] the innermost parentheses, a column for #math.equation(block: false, alt: "open parenthesis ~ p close parenthesis ∧ q ,")[$( ∼ p ) ∧ q ,$] the next set of parentheses, and #math.equation(block: false, alt: "open parenthesis open parenthesis ~ p close parenthesis ∧ q close parenthesis ∨ r")[$( ( ∼ p ) ∧ q ) ∨ r$] in the last column for the third parentheses. #linebreak() #strong[Step 3:] Once the table is created, we determine the truth value of each statement starting from left to right. The truth values of #math.equation(block: false, alt: "p")[$p$], #math.equation(block: false, alt: "q")[$q$], and #math.equation(block: false, alt: "r")[$r$] are true, false, and true, respectively, so we place T, F, and T in the second row of the table. Because #math.equation(block: false, alt: "p")[$p$] is true, #math.equation(block: false, alt: "~ p")[$∼ p$] is false. #linebreak() #strong[Step 4:] Next, evaluate #math.equation(block: false, alt: "~ p ∧ q")[$∼ p ∧ q$] from the table: #math.equation(block: false, alt: "~ p")[$∼ p$] is false, and #math.equation(block: false, alt: "q")[$q$] is also false, so #math.equation(block: false, alt: "~ p ∧ q")[$∼ p ∧ q$] is false, because a conjunction is only true if both of the statements that make it are true. Place an F in the table below its heading. #linebreak() #strong[Step 5:] Finally, using the table, we understand that #math.equation(block: false, alt: "open parenthesis ~ p ∧ q close parenthesis")[$( ∼ p ∧ q )$] is false and #math.equation(block: false, alt: "r")[$r$] is true, so the complete statement #math.equation(block: false, alt: "open parenthesis ~ p ∧ q close parenthesis ∨ r")[$( ∼ p ∧ q ) ∨ r$] is false or true, which is true (because a disjunction is true whenever at least one of the statements that make it is true). Place a T in the last column of the table. The complete statement #math.equation(block: false, alt: "~ p ∧ q ∨ r")[$∼ p ∧ q ∨ r$] is true. #figure(table( columns: 6, align: left, inset: 6pt, table.header([#math.equation(block: false, alt: "p")[$p$]], [#math.equation(block: false, alt: "q")[$q$]], [#math.equation(block: false, alt: "r")[$r$]], [#math.equation(block: false, alt: "~ p")[$∼ p$]], [#math.equation(block: false, alt: "open parenthesis ~ p close parenthesis ∧ q")[$( ∼ p ) ∧ q$]], [#math.equation(block: false, alt: "open parenthesis open parenthesis ~ p close parenthesis ∧ q close parenthesis ∨ r")[$( ( ∼ p ) ∧ q ) ∨ r$]]), [T], [F], [T], [F], [F], [#strong[T]], )) + #strong[Step 1:] Applying the dominance of connectives to the original compound statement #math.equation(block: false, alt: "~ p ∨ q ∧ r")[$∼ p ∨ q ∧ r$], we get #math.equation(block: false, alt: "open parenthesis open parenthesis open parenthesis ~ p close parenthesis ∨ q close parenthesis ∧ r close parenthesis .")[$( ( ( ∼ p ) ∨ q ) ∧ r ) .$] #linebreak() #strong[Step 2:] The table needs columns for #math.equation(block: false, alt: "p , q , r , ~ p , open parenthesis ~ p close parenthesis ∨ q ,")[$p , q , r , ∼ p , ( ∼ p ) ∨ q ,$] and #math.equation(block: false, alt: "open parenthesis open parenthesis ~ p close parenthesis ∨ q close parenthesis ∧ r .")[$( ( ∼ p ) ∨ q ) ∧ r .$] #linebreak() #strong[Step 3:]The truth values of #math.equation(block: false, alt: "p")[$p$], #math.equation(block: false, alt: "q")[$q$], #math.equation(block: false, alt: "r")[$r$], and #math.equation(block: false, alt: "~ p")[$∼ p$] are the same as in Question 1. #linebreak() #strong[Step 4:] Next, #math.equation(block: false, alt: "~ p ∨ q")[$∼ p ∨ q$] is false or false, which is false, so we place an F below this statement in the table. This is the only time that a disjunction is false. #linebreak() #strong[Step 5:] Finally, #math.equation(block: false, alt: "~ p ∨ q")[$∼ p ∨ q$] and #math.equation(block: false, alt: "r")[$r$] are the conjunction of the statements, #math.equation(block: false, alt: "~ p ∨ q")[$∼ p ∨ q$] and #math.equation(block: false, alt: "r")[$r$], and so the expressions evaluate to false and true, which is false. Recall that the only time an "and" statement is true is when both statements that form it are also true. The complete statement #math.equation(block: false, alt: "~ p ∨ q ∧ r")[$∼ p ∨ q ∧ r$] is false. #linebreak() #linebreak() #figure(table( columns: 6, align: left, inset: 6pt, table.header([#math.equation(block: false, alt: "p")[$p$]], [#math.equation(block: false, alt: "q")[$q$]], [#math.equation(block: false, alt: "r")[$r$]], [#math.equation(block: false, alt: "~ p")[$∼ p$]], [#math.equation(block: false, alt: "open parenthesis ~ p close parenthesis ∨ q")[$( ∼ p ) ∨ q$]], [#math.equation(block: false, alt: "open parenthesis open parenthesis ~ p close parenthesis ∨ q close parenthesis ∧ r")[$( ( ∼ p ) ∨ q ) ∧ r$]]), [T], [F], [T], [F], [F], [#strong[F]], )) + #strong[Step 1:] Applying the dominance of connectives to the original statement, we have: #math.equation(block: false, alt: "open parenthesis open parenthesis ~ open parenthesis p ∧ r close parenthesis close parenthesis ∨ q close parenthesis")[$( ( ∼ ( p ∧ r ) ) ∨ q )$]. #linebreak() #strong[Step 2:] So, the table needs the following columns: #math.equation(block: false, alt: "p , q , r , p ∧ r , ~ open parenthesis p ∧ r close parenthesis ,")[$p , q , r , p ∧ r , ∼ ( p ∧ r ) ,$] and #math.equation(block: false, alt: "~ open parenthesis p ∧ r close parenthesis ∨ q .")[$∼ ( p ∧ r ) ∨ q .$] #linebreak() #strong[Step 3:] The truth values of #math.equation(block: false, alt: "p")[$p$], #math.equation(block: false, alt: "q")[$q$], and #math.equation(block: false, alt: "r")[$r$] are the same as in Questions 1 and 2. #linebreak() #strong[Step 4:] From the table it can be seen that #math.equation(block: false, alt: "p ∧ r")[$p ∧ r$] is true and true, which is true. So the negation of #math.equation(block: false, alt: "p")[$p$] and #math.equation(block: false, alt: "r")[$r$] is false, because the negation of a statement always has the opposite truth value of the original statement. #linebreak() #strong[Step 5:] Finally, #math.equation(block: false, alt: "~ open parenthesis p ∧ r close parenthesis ∨ q")[$∼ ( p ∧ r ) ∨ q$] is the disjunction of #math.equation(block: false, alt: "~ open parenthesis p ∧ r close parenthesis")[$∼ ( p ∧ r )$] with #math.equation(block: false, alt: "q")[$q$], and so we have false or false, which makes the complete statement false. #figure(table( columns: 6, align: left, inset: 6pt, table.header([#math.equation(block: false, alt: "p")[$p$]], [#math.equation(block: false, alt: "q")[$q$]], [#math.equation(block: false, alt: "r")[$r$]], [#math.equation(block: false, alt: "p ∧ r")[$p ∧ r$]], [#math.equation(block: false, alt: "~ open parenthesis p ∧ r close parenthesis")[$∼ ( p ∧ r )$]], [#math.equation(block: false, alt: "~ open parenthesis p ∧ r close parenthesis ∨ q")[$∼ ( p ∧ r ) ∨ q$]]), [T], [F], [T], [T], [F], [#strong[F]], )) ] ] === 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 #math.equation(block: false, alt: "p")[$p$] is false, then its negation #math.equation(block: false, alt: "~ p")[$∼ p$] is true, and if a statement #math.equation(block: false, alt: "p")[$p$] is true, then its negation #math.equation(block: false, alt: "~ p")[$∼ p$] is false. To create a truth table for the negation of statement #math.equation(block: false, alt: "p")[$p$], add a column with a heading of #math.equation(block: false, alt: "~ p")[$∼ p$], and for each row, input the truth value with the opposite value of the value listed in the column for #math.equation(block: false, alt: "p")[$p$], as depicted in the table below. #figure(table( columns: 2, align: left, inset: 6pt, [Negation], [], [#math.equation(block: false, alt: "p")[$bold(italic(p))$]], [#math.equation(block: false, alt: "~ p")[$∼ bold(italic(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 #strong[multiplication principle], also known as the #emph[fundamental counting principle], states that the number of ways you can select an item from a group of #math.equation(block: false, alt: "n")[$n$] items and another item from a group with #math.equation(block: false, alt: "m")[$m$] items is equal to the product of #math.equation(block: false, alt: "m")[$m$] and #math.equation(block: false, alt: "n")[$n$]. Because each proposition #math.equation(block: false, alt: "p")[$p$] and #math.equation(block: false, alt: "q")[$q$] has two possible outcomes, true or false, the multiplication principle states that there will be #math.equation(block: false, alt: "2 times 2 equals 4")[$2 × 2 = 4$] possible outcomes: {TT, TF, FT, FF}. The tree diagram and table in demonstrate the four possible outcomes for two propositions #math.equation(block: false, alt: "p")[$p$] and #math.equation(block: false, alt: "q")[$q$]. #figure(figph[A horizontal flowchart and a table with five rows and three columns.], alt: "A horizontal flowchart and a table with five rows and three columns.", caption: none) A conjunction is a logical #emph[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 #emph[and] statement is false. A disjunction is a logical inclusive #emph[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 #emph[or] statement is false is if both statements that make up the disjunction are false. #figure(table( columns: 7, align: left, inset: 6pt, [Conjunction (AND)], [], [Disjunction (OR)], [], [], [], [], [#math.equation(block: false, alt: "p")[$p$]], [#math.equation(block: false, alt: "q")[$q$]], [#math.equation(block: false, alt: "p ∧ q")[$p ∧ q$]], [], [#math.equation(block: false, alt: "p")[$p$]], [#math.equation(block: false, alt: "q")[$q$]], [#math.equation(block: false, alt: "p ∨ q")[$p ∨ q$]], [T], [T], [T], [], [T], [T], [T], [T], [F], [F], [], [T], [F], [T], [F], [T], [F], [], [F], [T], [T], [F], [F], [F], [], [F], [F], [F], )) #notebox("Video", rgb("#DC2626"), rgb("#DC2626"), rgb("#f7f8fa"))[ #link("https://openstax.org/r/opL9I4tZCC0")[Logic Part 4: Truth Values of Compound Statements with "and", "or", and "not"] #link("https://openstax.org/r/-tdSRqLGhaw")[Logic Part 5: What are truth tables? How do you set them up?] ] #examplebox("Example 5")[Constructing Truth Tables to Analyze Compound Statements][ Construct a truth table to analyze all possible outcomes for each of the following arguments. + #math.equation(block: false, alt: "p ∨ ~ q")[$p ∨ ∼ q$] + #math.equation(block: false, alt: "~ open parenthesis p ∧ q close parenthesis")[$∼ ( p ∧ q )$] + #math.equation(block: false, alt: "open parenthesis p ∨ ~ q close parenthesis ∧ r")[$( p ∨ ∼ q ) ∧ r$] #solutionbox[ + #strong[Step 1:] Because there are two basic statements, #math.equation(block: false, alt: "p")[$p$] and #math.equation(block: false, alt: "q")[$q$], and each of these has two possible outcomes, we will have #math.equation(block: false, alt: "2 open parenthesis 2 close parenthesis equals 4")[$2 ( 2 ) = 4$] rows in our table to represent all possible outcomes: TT, TF, FT, and FF. The columns will include #math.equation(block: false, alt: "p")[$p$], #math.equation(block: false, alt: "q")[$q$], #math.equation(block: false, alt: "~ q")[$∼ q$], and #math.equation(block: false, alt: "p ∨ ~ q .")[$p ∨ ∼ q .$] #linebreak() #strong[Step 2:] Every value in column #math.equation(block: false, alt: "~ q")[$∼ q$] will have the opposite truth value of the corresponding value in column #math.equation(block: false, alt: "q")[$q$]: F, T, F, and T. #linebreak() #strong[Step 3:] To complete the last column, evaluate each element in column #math.equation(block: false, alt: "p")[$p$] with the corresponding element in column #math.equation(block: false, alt: "~ q")[$∼ q$] using the connective #emph[or]. #figure(table( columns: 4, align: left, inset: 6pt, table.header([#math.equation(block: false, alt: "p")[$p$]], [#math.equation(block: false, alt: "q")[$q$]], [#math.equation(block: false, alt: "~ q")[$∼ q$]], [#math.equation(block: false, alt: "p ∨ ~ q")[$p ∨ ∼ q$]]), [T], [T], [F], [#strong[T]], [T], [F], [T], [#strong[T]], [F], [T], [F], [#strong[F]], [F], [F], [T], [#strong[T]], )) + #strong[Step 1:] The columns will include #math.equation(block: false, alt: "p")[$p$], #math.equation(block: false, alt: "q")[$q$], #math.equation(block: false, alt: "p ∧ q ,")[$p ∧ q ,$] and #math.equation(block: false, alt: "~ open parenthesis p ∧ q close parenthesis")[$∼ ( p ∧ q )$]. Because there are two basic statements, #math.equation(block: false, alt: "p")[$p$] and #math.equation(block: false, alt: "q")[$q$], the table will have four rows to account for all possible outcomes. #linebreak() #strong[Step 2:] The #math.equation(block: false, alt: "p ∧ q")[$p ∧ q$] column will be completed by evaluating the corresponding elements in columns #math.equation(block: false, alt: "p")[$p$] and #math.equation(block: false, alt: "q")[$q$] respectively with the #emph[and] connective. #linebreak() #strong[Step 3:] The final column, #math.equation(block: false, alt: "~ open parenthesis p ∧ q close parenthesis")[$∼ ( p ∧ q )$], will be the negation of the #math.equation(block: false, alt: "p ∧ q")[$p ∧ q$] column. #linebreak() #figure(table( columns: 4, align: left, inset: 6pt, table.header([#math.equation(block: false, alt: "p")[$p$]], [#math.equation(block: false, alt: "q")[$q$]], [#math.equation(block: false, alt: "p ∧ q")[$p ∧ q$]], [#math.equation(block: false, alt: "~ open parenthesis p ∧ q close parenthesis")[$∼ ( p ∧ q )$]]), [T], [T], [T], [#strong[F]], [T], [F], [F], [#strong[T]], [F], [T], [F], [#strong[T]], [F], [F], [F], [#strong[T]], )) + #strong[Step 1:] This statement has three basic statements, #math.equation(block: false, alt: "p")[$p$], #math.equation(block: false, alt: "q")[$q$], and #math.equation(block: false, alt: "r")[$r$]. Because each basic statement has two possible truth values, true or false, the multiplication principal indicates there are #math.equation(block: false, alt: "2 open parenthesis 2 close parenthesis open parenthesis 2 close parenthesis equals 8")[$2 ( 2 ) ( 2 ) = 8$] possible outcomes. So eight rows of outcomes are needed in the truth table to account for each possibility. Half of the eight possibilities must be true for the first statement, and half must be false. #linebreak() #strong[Step 2:] So, the first column for statement #math.equation(block: false, alt: "p")[$p$], will have four T’s followed by four F’s. In the second column for statement #math.equation(block: false, alt: "q")[$q$], when #math.equation(block: false, alt: "p")[$p$] is true, half the outcomes for #math.equation(block: false, alt: "q")[$q$] must be true and the other half must be false, and the same pattern will repeat for when #math.equation(block: false, alt: "p")[$p$] is false. So, column #math.equation(block: false, alt: "q")[$q$] will have TT, FF, FF, FF. #linebreak() #strong[Step 3:] The column for the third statement, #math.equation(block: false, alt: "r")[$r$], must alternate between T and F. Once, the three basic propositions are listed, you will need a column for#math.equation(block: false, alt: "~ q")[$∼ q$], #math.equation(block: false, alt: "p ∨ ~ q")[$p ∨ ∼ q$], and #math.equation(block: false, alt: "open parenthesis p ∨ ~ q close parenthesis ∧ r")[$( p ∨ ∼ q ) ∧ r$]. #linebreak() #strong[Step 4:] The column for the negation of #math.equation(block: false, alt: "q")[$q$], #math.equation(block: false, alt: "~ q")[$∼ q$], will have the opposite truth value of each value in column #math.equation(block: false, alt: "q")[$q$]. #linebreak() #strong[Step 5:] Next, fill in the truth values for the column containing the statement #math.equation(block: false, alt: "p ∨ ~ q .")[$p ∨ ∼ q .$] The #emph[or] statement is true if at least one of #math.equation(block: false, alt: "p")[$p$] or #math.equation(block: false, alt: "~ q")[$∼ q$] is true, otherwise it is false. #linebreak() #strong[Step 6:] Finally, fill in the column containing the conjunction #math.equation(block: false, alt: "open parenthesis p ∨ ~ q close parenthesis ∧ r")[$( p ∨ ∼ q ) ∧ r$]. To evaluate this statement, combine column #math.equation(block: false, alt: "p ∨ ~ q")[$p ∨ ∼ q$] and column #math.equation(block: false, alt: "r")[$r$] with the #emph[and] connective. Recall, that only time "and" is true is when both values are true, otherwise the statement is false. The complete truth table is: #linebreak() #figure(table( columns: 6, align: left, inset: 6pt, table.header([#math.equation(block: false, alt: "p")[$p$]], [#math.equation(block: false, alt: "q")[$q$]], [#math.equation(block: false, alt: "r")[$r$]], [#math.equation(block: false, alt: "~ q")[$∼ q$]], [#math.equation(block: false, alt: "p ∨ ~ q")[$p ∨ ∼ q$]], [#math.equation(block: false, alt: "open parenthesis p ∨ ~ q close parenthesis ∧ r")[$( p ∨ ∼ q ) ∧ r$]]), [T], [T], [T], [F], [T], [#strong[T]], [T], [T], [F], [F], [T], [#strong[F]], [T], [F], [T], [T], [T], [#strong[T]], [T], [F], [F], [T], [T], [#strong[F]], [F], [T], [T], [F], [F], [#strong[F]], [F], [T], [F], [F], [F], [#strong[F]], [F], [F], [T], [T], [T], [#strong[T]], [F], [F], [F], [T], [T], [#strong[F]], )) ] ] #notebox("Video", rgb("#DC2626"), rgb("#DC2626"), rgb("#f7f8fa"))[ #link("https://openstax.org/r/j3kKnUNIt6c")[Logic Part 6: More on Truth Tables and Setting Up Rows and Column Headings] ] === Determine the Validity of a Truth Table for a Compound Statement A logical statement is #strong[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. #examplebox("Example 6")[Determining the Validity of Compound Statements][ Construct a truth table to determine the validity of each of the following statements. + #math.equation(block: false, alt: "~ p ∧ q")[$∼ p ∧ q$] + #math.equation(block: false, alt: "~ open parenthesis p ∧ ~ p close parenthesis")[$∼ ( p ∧ ∼ p )$] #solutionbox[ + #strong[Step 1:]Because there are two statements, #math.equation(block: false, alt: "p")[$p$] and #math.equation(block: false, alt: "q")[$q$], and each of these has two possible outcomes, there will be #math.equation(block: false, alt: "2 open parenthesis 2 close parenthesis equals 4")[$2 ( 2 ) = 4$] rows in our table to represent all possible outcomes: TT, TF, FT, and FF. #linebreak() #strong[Step 2:] The columns, will include #math.equation(block: false, alt: "p")[$p$], #math.equation(block: false, alt: "q")[$q$], #math.equation(block: false, alt: "~ p")[$∼ p$] and #math.equation(block: false, alt: "~ p ∧ q .")[$∼ p ∧ q .$] Every value in column #math.equation(block: false, alt: "~ p")[$∼ p$] will have the opposite truth value of the corresponding value in column #math.equation(block: false, alt: "p")[$p$]. #linebreak() #strong[Step 3:] To complete the last column, evaluate each element in column #math.equation(block: false, alt: "~ p")[$∼ p$] with the corresponding element in column #math.equation(block: false, alt: "q")[$q$] using the connective #emph[and]. The last column contains at least one false, therefore the statement #math.equation(block: false, alt: "~ p ∧ q")[$∼ p ∧ q$] is not valid. #figure(table( columns: 4, align: left, inset: 6pt, table.header([#math.equation(block: false, alt: "p")[$p$]], [#math.equation(block: false, alt: "q")[$q$]], [#math.equation(block: false, alt: "~ p")[$∼ p$]], [#math.equation(block: false, alt: "~ p ∧ q")[$∼ bold(italic(p)) ∧ bold(italic(q))$]]), [T], [T], [F], [#strong[F]], [T], [F], [F], [#strong[F]], [F], [T], [T], [#strong[T]], [F], [F], [T], [#strong[F]], )) + #strong[Step 1:] Because the statement #math.equation(block: false, alt: "~ open parenthesis p ∧ ~ p close parenthesis")[$∼ ( p ∧ ∼ p )$] only contains one basic proposition, the truth table will only contain two rows. Statement #math.equation(block: false, alt: "p")[$p$] may be either true or false. #linebreak() #strong[Step 2:] The columns will include #math.equation(block: false, alt: "p")[$p$], #math.equation(block: false, alt: "~ p")[$∼ p$], #math.equation(block: false, alt: "p ∧ ~ p ,")[$p ∧ ∼ p ,$] and #math.equation(block: false, alt: "~ open parenthesis p ∧ ~ p close parenthesis .")[$∼ ( p ∧ ∼ p ) .$] Evaluate column #math.equation(block: false, alt: "p ∧ ~ p")[$p ∧ ∼ p$] with the #emph[and] connective, because the symbol #math.equation(block: false, alt: "∧")[$∧$] represents a conjunction or logical #emph[and] statement. True and false is false, and false and true is also false. #linebreak() #strong[Step 3:] The final column is the negation of each entry in the third column, both of which are false, so the negation of false is true. Because all the truth values in the final column are true, the statement #math.equation(block: false, alt: "~ open parenthesis p ∧ ~ p close parenthesis")[$∼ ( p ∧ ∼ p )$] is valid. #figure(table( columns: 4, align: left, inset: 6pt, table.header([#math.equation(block: false, alt: "p")[$p$]], [#math.equation(block: false, alt: "~ p")[$∼ p$]], [#math.equation(block: false, alt: "p ∧ ~ p")[$p ∧ ∼ p$]], [#math.equation(block: false, alt: "~ open parenthesis p ∧ ~ p close parenthesis")[$∼ ( p ∧ ∼ p )$]]), [T], [F], [F], [#strong[T]], [F], [T], [F], [#strong[T]], )) ] ] === Key Terms - Truth table - Multiplication principle - Valid === Key Concepts - Determine the true values of logical statements involving negations, conjunctions, and disjunctions. - The negation of a logical statement has the opposite true value of the original statement. - A conjunction is true when both #math.equation(block: false, alt: "p")[$p$] and #math.equation(block: false, alt: "q")[$q$] are true, otherwise it is false. - A disjunction is false when both #math.equation(block: false, alt: "p")[$p$] and #math.equation(block: false, alt: "q")[$q$] are false, otherwise it is true. - Know how to construct a truth table involving negations, conjunctions, and disjunctions and apply the dominance of connectives to determine the truth value of a compound logical statement containing, negations, conjunctions, and disjunctions. #figure(table( columns: 10, align: left, inset: 6pt, [Negation], [], [Conjunction (AND)], [], [Disjunction (OR)], [], [], [], [], [], [#math.equation(block: false, alt: "p")[$p$]], [#math.equation(block: false, alt: "~ p")[$∼ p$]], [], [#math.equation(block: false, alt: "p")[$p$]], [#math.equation(block: false, alt: "q")[$q$]], [#math.equation(block: false, alt: "p ∧ q")[$p ∧ q$]], [], [#math.equation(block: false, alt: "p")[$p$]], [#math.equation(block: false, alt: "q")[$q$]], [#math.equation(block: false, alt: "p ∨ q")[$p ∨ q$]], [T], [F], [], [T], [T], [T], [], [T], [T], [T], [F], [T], [], [T], [F], [F], [], [T], [F], [T], [], [], [], [F], [T], [F], [], [F], [T], [T], [], [], [], [F], [F], [F], [], [F], [F], [F], )) - A logical statement is valid if it is always true. Know how to construct a truth table for a compound statement and use it to determine the validity of compound statements involving negations, conjunctions, and disjunctions. === Video - #link("https://openstax.org/r/Truth_Values_of_Conjunctions")[Logic Part 2: Truth Values of Conjunctions: Is an "AND" statement true or false?] - #link("https://openstax.org/r/Truth_Values_of_Disjunctions")[Logic Part 3: Truth Values of Disjunctions: Is an "OR" statement true or false?] - #link("https://openstax.org/r/opL9I4tZCC0")[Logic Part 4: Truth Values of Compound Statements with "and", "or", and "not"] - #link("https://openstax.org/r/-tdSRqLGhaw")[Logic Part 5: What are truth tables? How do you set them up?] - #link("https://openstax.org/r/j3kKnUNIt6c")[Logic Part 6: More on Truth Tables and Setting Up Rows and Column Headings]