| {{ 'ml-lesson-number-slides' | message : article.intro.bblockCount }} |
| {{ 'ml-lesson-number-exercises' | message : article.intro.exerciseCount }} |
| {{ 'ml-lesson-time-estimation' | message }} |
The number of columns of a truth table depends on the complexity of the statement. To determine this number, the compound statement must be broken down
into simpler statements until the simplest statements are obtained. In this case, the compound statement is broken down until p and q are obtained.
The columns are formed by ordering each unique step of simplification from simplest to most complex. The last column of a truth table is always the original statement.
p | q | ¬p | ¬q | ¬p∨q | (¬p∨q)∧¬q |
---|---|---|---|---|---|
? | ? | ? | ? | ? | ? |
In this case, the truth table has six columns.
p | q | ¬p | ¬q | ¬p∨q | (¬p∨q)∧¬q |
---|---|---|---|---|---|
T | T | ? | ? | ? | ? |
T | F | ? | ? | ? | ? |
F | T | ? | ? | ? | ? |
F | F | ? | ? | ? | ? |
The general rule is that a truth table has 2n rows, where n is the number of variables.
The last step in making a truth table is to fill in the remaining empty cells, column by column. The first column that will be filled in is the negation (¬) of p. A negation has the opposite truth value than the original statement.
p | q | ¬p | ¬q | ¬p∨q | (¬p∨q)∧¬q |
---|---|---|---|---|---|
T | T | F | ? | ? | ? |
T | F | F | ? | ? | ? |
F | T | T | ? | ? | ? |
F | F | T | ? | ? | ? |
Similarly, the fourth column — the negation of q — is completed.
p | q | ¬p | ¬q | ¬p∨q | (¬p∨q)∧¬q |
---|---|---|---|---|---|
T | T | F | F | ? | ? |
T | F | F | T | ? | ? |
F | T | T | F | ? | ? |
F | F | T | T | ? | ? |
The next column is the disjunction (∨) of ¬p and q. A disjunction is true unless both statements are false.
p | q | ¬p | ¬q | ¬p∨q | (¬p∨q)∧¬q |
---|---|---|---|---|---|
T | T | F | F | T | ? |
T | F | F | T | F | ? |
F | T | T | F | T | ? |
F | F | T | T | T | ? |
Finally, the last column is the conjunction (∧) of (¬p∨q) and ¬q. A conjunction is false unless both statements are true.
p | q | ¬p | ¬q | ¬p∨q | (¬p∨q)∧¬q |
---|---|---|---|---|---|
T | T | F | F | T | F |
T | F | F | T | F | F |
F | T | T | F | T | F |
F | F | T | T | T | T |