maths.free › Discrete Math & Logic › 2. Logic › Constructing Truth Tables
Constructing Truth Tables
Interpret and apply negations, conjunctions, and disjunctions.
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.
Interpret and Apply Negations, Conjunctions, and Disjunctions
The negation of a statement will have the opposite truth value of the original statement. When \(p\) is true, \(\sim p\) is false, and when \(p\) is false, \(\sim p\) is true.
Finding the Truth Value of a Negation
Try it.
For each logical statement, determine the truth value of its negation.
- \(p\): \(3+5=8.\)
- \(q\): All horses are mustangs.
- \(\sim r\): New Delhi is not the capital of India.
Solution
- \(p\) is true because 3 + 5 does equal 8; therefore, the negation of \(p\), \(\sim p:3+5\ne 8\), is false.
- \(q\) is false because there are other types of horses besides mustangs, such as Clydesdales or Arabians; therefore, the negation of \(q\), \(\sim q\), is true.
- \(\sim r\) is false because New Delhi is the capital of India; therefore, the negation of \(\sim r\), \(r\), is true.
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.
Finding the Truth Value of a Conjunction
Try it.
Given \(p:4+7=11,\) \(q:11-3=7,\) and \(r:7\times 11=77,\) determine the truth value of each conjunction.
- \(p∧q\)
- \(\sim q∧r\)
- \(\sim p∧q\)
Solution
- \(p\) is true, and \(q\) is false. Because one statement is true, and the other statement is false, this makes the complete conjunction false.
- \(q\) is false, so \(\sim q\) is true, and \(r\) is true. Therefore, both statements are true, making the complete conjunction true.
- \(\sim p\) is false, and \(q\) is false. Because both statements are false, the complete conjunction is false.
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.
Finding the Truth Value of a Disjunction
Try it.
Given \(p:4+7=11,\) \(q:11-3=7,\) and \(r:7\times 11=77,\) determine the truth value of each disjunction.
- \(p∨q\)
- \(\sim q∨r\)
- \(\sim p∨q\)
Solution
- \(p\) is true, and \(q\) is false. One statement is true, and one statement is false, which makes the complete disjunction true.
- \(q\) is false, so \(\sim q\) is true, and \(r\) is true. Therefore, one statement is true, and the other statement is true, which makes the complete disjunction true.
- \(\sim p\) is false, and \(q\) is false. When all of the component statements are false, the disjunction is false.
Condensed — the full section is in OpenStax Contemporary Mathematics.
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 \(p\) is false, then its negation \(\sim p\) is true, and if a statement \(p\) is true, then its negation \(\sim p\) is false. To create a truth table for the negation of statement \(p\), add a column with a heading of \(\sim p\), and for each row, input the truth value with the opposite value of the value listed in the column for \(p\), as depicted in the table below.
| Negation | |
| \(p\) | \(\sim 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 \(n\) items and another item from a group with \(m\) items is equal to the product of \(m\) and \(n\). Because each proposition \(p\) and \(q\) has two possible outcomes, true or false, the multiplication principle states that there will be \(2\times 2=4\) possible outcomes: {TT, TF, FT, FF}.
The tree diagram and table in demonstrate the four possible outcomes for two propositions \(p\) and \(q\).
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) | |||||
| \(p\) | \(q\) | \(p∧q\) | \(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 |
Condensed — the full section is in OpenStax Contemporary Mathematics.
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.
Determining the Validity of Compound Statements
Try it.
Construct a truth table to determine the validity of each of the following statements.
- \(\sim p∧q\)
- \(\sim (p∧\sim p)\)
Solution
- Step 1: Because there are two statements, \(p\) and \(q\), and each of these has two possible outcomes, there will be \(2(2)=4\) rows in our table to represent all possible outcomes: TT, TF, FT, and FF.
Step 2: The columns, will include \(p\), \(q\), \(\sim p\) and \(\sim p∧q.\) Every value in column \(\sim p\) will have the opposite truth value of the corresponding value in column \(p\).
Step 3: To complete the last column, evaluate each element in column \(\sim p\) with the corresponding element in column \(q\) using the connective and . The last column contains at least one false, therefore the statement \(\sim p∧q\) is not valid.\(p\) \(q\) \(\sim p\) \(\sim p∧q\) T T F F T F F F F T T T F F T F - Step 1: Because the statement \(\sim (p∧\sim p)\) only contains one basic proposition, the truth table will only contain two rows. Statement \(p\) may be either true or false.
Step 2: The columns will include \(p\), \(\sim p\), \(p∧\sim p,\) and \(\sim (p∧\sim p).\) Evaluate column \(p∧\sim p\) with the and connective, because the symbol \(∧\) represents a conjunction or logical and statement. True and false is false, and false and true is also false.
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 \(\sim (p∧\sim p)\) is valid.\(p\) \(\sim p\) \(p∧\sim p\) \(\sim (p∧\sim p)\) T F F T F T F T
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 \(p\) and \(q\) are true, otherwise it is false.
- A disjunction is false when both \(p\) and \(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.
Negation Conjunction (AND) Disjunction (OR) \(p\) \(\sim p\) \(p\) \(q\) \(p∧q\) \(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
- Logic Part 2: Truth Values of Conjunctions: Is an "AND" statement true or false?
- Logic Part 3: Truth Values of Disjunctions: Is an "OR" statement true or false?
- Logic Part 4: Truth Values of Compound Statements with "and", "or", and "not"
- Logic Part 5: What are truth tables? How do you set them up?
- Logic Part 6: More on Truth Tables and Setting Up Rows and Column Headings
Practice (6)
Try each one on paper first. Reveal the answer to check; verified ones can be opened in the solver for every step.
-
For each logical statement, determine the truth value of its negation.
- \(p\): \(3+5=8.\)
- \(q\): All horses are mustangs.
- \(\sim r\): New Delhi is not the capital of India.
Mengungkapkan jawabannya
- \(p\) is true because 3 + 5 does equal 8; therefore, the negation of \(p\), \(\sim p:3+5\ne 8\), is false.
- \(q\) is false because there are other types of horses besides mustangs, such as Clydesdales or Arabians; therefore, the negation of \(q\), \(\sim q\), is true.
- \(\sim r\) is false because New Delhi is the capital of India; therefore, the negation of \(\sim r\), \(r\), is true.
-
Given \(p:4+7=11,\) \(q:11-3=7,\) and \(r:7\times 11=77,\) determine the truth value of each conjunction.
- \(p∧q\)
- \(\sim q∧r\)
- \(\sim p∧q\)
Mengungkapkan jawabannya
- \(p\) is true, and \(q\) is false. Because one statement is true, and the other statement is false, this makes the complete conjunction false.
- \(q\) is false, so \(\sim q\) is true, and \(r\) is true. Therefore, both statements are true, making the complete conjunction true.
- \(\sim p\) is false, and \(q\) is false. Because both statements are false, the complete conjunction is false.
-
Given \(p:4+7=11,\) \(q:11-3=7,\) and \(r:7\times 11=77,\) determine the truth value of each disjunction.
- \(p∨q\)
- \(\sim q∨r\)
- \(\sim p∨q\)
Mengungkapkan jawabannya
- \(p\) is true, and \(q\) is false. One statement is true, and one statement is false, which makes the complete disjunction true.
- \(q\) is false, so \(\sim q\) is true, and \(r\) is true. Therefore, one statement is true, and the other statement is true, which makes the complete disjunction true.
- \(\sim p\) is false, and \(q\) is false. When all of the component statements are false, the disjunction is false.
-
Given \(p:4+7=11,\) \(q:11-3=7,\) and \(r:7\times 11=77,\) construct a truth table to determine the truth value of each compound statement
- \(\sim p∧q∨r\)
- \(\sim p∨q∧r\)
- \(\sim (p∧r)∨q\)
Mengungkapkan jawabannya
Step 1: The statement “\(\sim p∧q∨r\)” contains three basic logical statements, \(p\), \(q\), and \(r\), and three connectives, \(\sim ,∧,∨.\) When we place parentheses in the statement to indicate the dominance of connectives, the statement becomes \((((\sim p)∧q)∨r).\)
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 \(\sim p,\) the innermost parentheses, a column for \((\sim p)∧q,\) the next set of parentheses, and \(((\sim p)∧q)∨r\) in the last column for the third parentheses.
Step 3: Once the table is created, we determine the truth value of each statement starting from left to right. The truth values of \(p\), \(q\), and \(r\) are true, false, and true, respectively, so we place T, F, and T in the second row of the table. Because \(p\) is true, \(\sim p\) is false.
Step 4: Next, evaluate \(\sim p∧q\) from the table: \(\sim p\) is false, and \(q\) is also false, so \(\sim 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.
Step 5: Finally, using the table, we understand that \((\sim p∧q)\) is false and \(r\) is true, so the complete statement \((\sim 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 \(\sim p∧q∨r\) is true.\(p\) \(q\) \(r\) \(\sim p\) \((\sim p)∧q\) \(((\sim p)∧q)∨r\) T F T F F T - Step 1: Applying the dominance of connectives to the original compound statement \(\sim p∨q∧r\), we get \((((\sim p)∨q)∧r).\)
Step 2: The table needs columns for \(p,q,r,\sim p,(\sim p)∨q,\) and \(((\sim p)∨q)∧r.\)
Step 3:The truth values of \(p\), \(q\), \(r\), and \(\sim p\) are the same as in Question 1.
Step 4: Next, \(\sim 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.
Step 5: Finally, \(\sim p∨q\) and \(r\) are the conjunction of the statements, \(\sim p∨q\) and \(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 \(\sim p∨q∧r\) is false.
\(p\) \(q\) \(r\) \(\sim p\) \((\sim p)∨q\) \(((\sim p)∨q)∧r\) T F T F F F - Step 1: Applying the dominance of connectives to the original statement, we have: \(((\sim (p∧r))∨q)\).
Step 2: So, the table needs the following columns: \(p,q,r,p∧r,\sim (p∧r),\) and \(\sim (p∧r)∨q.\)
Step 3: The truth values of \(p\), \(q\), and \(r\) are the same as in Questions 1 and 2.
Step 4: From the table it can be seen that \(p∧r\) is true and true, which is true. So the negation of \(p\) and \(r\) is false, because the negation of a statement always has the opposite truth value of the original statement.
Step 5: Finally, \(\sim (p∧r)∨q\) is the disjunction of \(\sim (p∧r)\) with \(q\), and so we have false or false, which makes the complete statement false.\(p\) \(q\) \(r\) \(p∧r\) \(\sim (p∧r)\) \(\sim (p∧r)∨q\) T F T T F F
-
Construct a truth table to analyze all possible outcomes for each of the following arguments.
- \(p∨\sim q\)
- \(\sim (p∧q)\)
- \((p∨\sim q)∧r\)
Mengungkapkan jawabannya
- Step 1: Because there are two basic statements, \(p\) and \(q\), and each of these has two possible outcomes, we will have \(2(2)=4\) rows in our table to represent all possible outcomes: TT, TF, FT, and FF. The columns will include \(p\), \(q\), \(\sim q\), and \(p∨\sim q.\)
Step 2: Every value in column \(\sim q\) will have the opposite truth value of the corresponding value in column \(q\): F, T, F, and T.
Step 3: To complete the last column, evaluate each element in column \(p\) with the corresponding element in column \(\sim q\) using the connective or.\(p\) \(q\) \(\sim q\) \(p∨\sim q\) T T F T T F T T F T F F F F T T - Step 1: The columns will include \(p\), \(q\), \(p∧q,\) and \(\sim (p∧q)\). Because there are two basic statements, \(p\) and \(q\), the table will have four rows to account for all possible outcomes.
Step 2: The \(p∧q\) column will be completed by evaluating the corresponding elements in columns \(p\) and \(q\) respectively with the and connective.
Step 3: The final column, \(\sim (p∧q)\), will be the negation of the \(p∧q\) column.
\(p\) \(q\) \(p∧q\) \(\sim (p∧q)\) T T T F T F F T F T F T F F F T - Step 1: This statement has three basic statements, \(p\), \(q\), and \(r\). Because each basic statement has two possible truth values, true or false, the multiplication principal indicates there are \(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.
Step 2: So, the first column for statement \(p\), will have four T’s followed by four F’s. In the second column for statement \(q\), when \(p\) is true, half the outcomes for \(q\) must be true and the other half must be false, and the same pattern will repeat for when \(p\) is false. So, column \(q\) will have TT, FF, FF, FF.
Step 3: The column for the third statement, \(r\), must alternate between T and F. Once, the three basic propositions are listed, you will need a column for\(\sim q\), \(p∨\sim q\), and \((p∨\sim q)∧r\).
Step 4: The column for the negation of \(q\), \(\sim q\), will have the opposite truth value of each value in column \(q\).
Step 5: Next, fill in the truth values for the column containing the statement \(p∨\sim q.\) The or statement is true if at least one of \(p\) or \(\sim q\) is true, otherwise it is false.
Step 6: Finally, fill in the column containing the conjunction \((p∨\sim q)∧r\). To evaluate this statement, combine column \(p∨\sim q\) and column \(r\) with the 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:
\(p\) \(q\) \(r\) \(\sim q\) \(p∨\sim q\) \((p∨\sim q)∧r\) T T T F T T T T F F T F T F T T T T T F F T T F F T T F F F F T F F F F F F T T T T F F F T T F
-
Construct a truth table to determine the validity of each of the following statements.
- \(\sim p∧q\)
- \(\sim (p∧\sim p)\)
Mengungkapkan jawabannya
- Step 1: Because there are two statements, \(p\) and \(q\), and each of these has two possible outcomes, there will be \(2(2)=4\) rows in our table to represent all possible outcomes: TT, TF, FT, and FF.
Step 2: The columns, will include \(p\), \(q\), \(\sim p\) and \(\sim p∧q.\) Every value in column \(\sim p\) will have the opposite truth value of the corresponding value in column \(p\).
Step 3: To complete the last column, evaluate each element in column \(\sim p\) with the corresponding element in column \(q\) using the connective and . The last column contains at least one false, therefore the statement \(\sim p∧q\) is not valid.\(p\) \(q\) \(\sim p\) \(\sim p∧q\) T T F F T F F F F T T T F F T F - Step 1: Because the statement \(\sim (p∧\sim p)\) only contains one basic proposition, the truth table will only contain two rows. Statement \(p\) may be either true or false.
Step 2: The columns will include \(p\), \(\sim p\), \(p∧\sim p,\) and \(\sim (p∧\sim p).\) Evaluate column \(p∧\sim p\) with the and connective, because the symbol \(∧\) represents a conjunction or logical and statement. True and false is false, and false and true is also false.
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 \(\sim (p∧\sim p)\) is valid.\(p\) \(\sim p\) \(p∧\sim p\) \(\sim (p∧\sim p)\) T F F T F T F T
Symbols used here
The two sides are different.
n × (n−1) × … × 1; the number of orderings of n things. 0! = 1.
Number of k-element subsets of n things: n!/(k!(n−k)!).
Add a_k for k = 1 up to n.
x belongs to A; every element of A is in B.
In either; in both; in A but not B.
The set with no elements; the number of elements of A.
Quantifiers: every x; at least one x.
Logical connectives.
Marks the point where the statement has been established.
n divides a − b; a and b have the same remainder.
Grows no faster than n² (up to a constant), for large n.
What is left after dividing a by n.
How to: Constructing Truth Tables
- 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.
- Truth table
- Multiplication principle
- Valid
- 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.
Questions people ask
What makes mathematics "discrete"?
It deals with separate, countable objects — integers, graphs, statements — rather than continuous quantities. No limits, no infinitesimals; instead induction, counting and logic.
How does a proof by induction work?
Show the statement for the first case, then show that whenever it holds for n it holds for n + 1. Like dominoes: the first falls, and each knocks over the next.
Cobalah sendiri
Parts of this page are adapted from OpenStax Contemporary Mathematics (CC BY-NC-SA 4.0). Condensed and re-explained here; errors are ours.
Lebih dalam Discrete Math & Logic
Truth tablesSums and inductionProof by inductionAlgorithms and growth of functions