Truth tables are very important in Discrete Mathematics. You can use them to calculate the truth value of (compound) propositions, to determine if a compound proposition is a tautology or a contradiction, and also to verify whether two propositions are logically equivalent.
Let’s see an example of how to create a truth table for the compound proposition below.
![Compound proposition to calculate the truth table](https://computinglearner.com/wp-content/uploads/2022/02/example.png)
The first step is to have at hand if you didn’t learn it yet, the truth values for the conjunction, disjunction, and conditional. You can find it in the picture below.
![](https://computinglearner.com/wp-content/uploads/2022/02/truth-values-1024x615.png)
The second step is to create a table. The first two columns will be for the two propositional variables p and q. In the two columns, we write all possible combinations of truth values for the two variables.
![Truth table: Adding a column for each variable. p and q in this case](https://computinglearner.com/wp-content/uploads/2022/02/p-q-columns.png)
In this case, we only have two variables, but it can be more.
Because we are calculating the truth value for a compound proposition, we must first divide it. In this case, we are going to start with the negation of q.
![Truth table: Add first a column for negation of single variables present in the compound proposition](https://computinglearner.com/wp-content/uploads/2022/02/not-q.png)
The next step is to calculate the value of the left side of the compound proposition. Notice that we must calculate the value of one operation at a time.
![](https://computinglearner.com/wp-content/uploads/2022/02/p-or-not-q.png)
To calculate the value of the next column (p v not q), we use the values on the first column (p) and the third column (not q). If you don’t remember when the disjunction (v) results in T or F, check the image above with the truth values of the disjunction.
From that table, you will see that the disjunction is false only when both variables are false.
The next step is to calculate the right side of the compound proposition. In this case, we have a conjunction (p^q), so we need to review the truth values for the conjunction. See the picture above.
![](https://computinglearner.com/wp-content/uploads/2022/02/p-and-q.png)
Now, we only have to calculate the value of the whole compound proposition. For that, we are going to use the values of the last two columns shown in the picture above, and the result of the conditional we will write it in a new column, as shown below.
![](https://computinglearner.com/wp-content/uploads/2022/02/example-completed-1024x490.png)
Key points to remember
- Know or have at hand, the truth values for the negation, conjunction, disjunction, conditionals, and biconditionals.
- First, write each variable present in the compound proposition in one column. Then write all the possible combinations of truth values for the variables.
- If there is a negation of a variable, then start calculating the truth values of the negation for that specific variable.
- Add a new column at a time, for each conjunction, disjunction, conditional, or biconditional that involves only two variables.
- Add more columns as needed for compound propositions and calculate the truth values using the values previously calculated, the ones in the new columns you added to the table.
- Repeat step 5 until you have the full compound proposition in the last column.
The order of the columns does not matter. But usually, they are added in the order I gave you here. First the variables, then the negation of single variables, then compound propositions, and in the last column, the whole compound proposition that you are calculating the truth values.
You can also watch an explanation of the same example in the following video.
Related posts: