Mathematics normally uses a two-valued logic: every statement is either true or false. You use truth tables to determine how the truth or falsity of a complicated statement depends on the truth or falsity of its components.
Complex, compound statements can be composed of simple statements linked together with logical connectives (also known as "logical operators") similarly to how algebraic operators like addition and subtraction are used in combination with numbers and variables in algebra. Conjunction (AND), disjunction (OR), negation (NOT), implication (IF...THEN), and biconditionals (IF AND ONLY IF), are all different types of connectives.
Independent, simple components of a logical statement are represented by either lowercase or capital letter variables. These variables are "independent" in that each variable can be either true or false independently of the others, and a truth table is a chart of all of the possibilities. Therefore, if there are variables in a logical statement, there need to be rows in the truth table in order to list out all combinations of each variable being either true (T) or false (F). For example, if there are three variables, A, B, and C, then the truth table with have 8 rows:
Two simple statements can be converted by the word "and" to form a compound statement called the conjunction of the original statements. We use the symbol to denote the conjunction. If and are two simple statements, then denotes the conjunction of and and it is read as " and ."
The truth table for the conjunction of two simple statements and :
- The statement has the truth value T whenever both and have the truth value T.
- The statement has the truth value F whenever either or or both have the truth value F.
Two simple statements can be converted by the word "or" to form a compound statement called the disjunction of the original statements. We use the symbol to denote the disjunction. If and are two simple statements, then denotes the disjunction of and and it is read as " or ."
The truth table for the disjunction of two simple statements:
- The statement has the truth value T whenever either and or both have the truth value T.
- The statement has the truth value F if both and have the truth value F.
An assertion that a statement fails or denial of a statement is called the negation of a statement. The negation of a statement is generally formed by introducing the word "no" at some proper place in the statement or by prefixing the statement with "it is not the case" or "it is false that." The negation of statement is denoted by ""
Truth table for :
Negation of Compound Statements
a) Negation of a conjunction
The negation of a conjunction is the disjunction of the negation of and the negation of
b) Negation of a disjunction
The negation of a disjunction is the conjunction of the negation of and the negation of
c) Negation of a negation
The negation of a negation of a statement is the statement itself:
Two statements, when connected by the connective phrase "if... then," give a compound statement known as an implication or a conditional statement.
If and are two statements, then it is denoted by and read as " implies ." Here is called the antecedent, and the consequent.
The truth table for the implication of two simple statements and
That is, is false (if and only if) and
Mr. and Mrs. Tan have five children--Alfred, Brenda, Charles, Darius, Eric--who are assumed to be of different ages.
If Charles is not the oldest, then Alfred is.
If Eric is not the youngest, then Brenda is.
If Darius is not the oldest, then he is immediately younger than Charles.
If Alfred is older than Brenda, then Darius is the oldest.
Determine the order of birth of the five children given the above facts.
- be the proposition that Charles isn't the oldest;
- be the proposition that Alfred is the oldest;
- be the proposition that Eric isn't the youngest;
- be the proposition that Brenda is the youngest;
- be the proposition that Darius isn't the oldest;
- be the proposition that Darius is just younger than Charles;
- be the proposition that Alfred is older than Brenda.
From statement 1, .
From statement 2, .
From statement 3, .
From statement 4, , where denotes the negation of .
Note that if Alfred is the oldest , he is older than all his four siblings including Brenda, so . Since (statement 4), by transitivity. But if we have which means Alfred is the oldest, it follows logically that because Darius cannot be the oldest (only one person can be the oldest). Translating this, we have .
Hence, where denotes a contradiction. The only possible conclusion is , where Alfred isn't the oldest. From statement 1, , so by modus tollens, . Hence Charles is the oldest.
Note that by pure logic, , where Charles being the oldest means Darius cannot be the oldest. From statement 4, , so by modus tollens, . From statement 3, , so by modus ponens, our deduction leads to another deduction . With , since Charles is the oldest, Darius must be the second oldest.
Since means Alfred is older than Brenda, means Alfred is younger than Brenda since they can't be of the same age. Since there is someone younger than Brenda, she cannot be the youngest, so we have . Since from statement 2, by modus tollens, . Hence Eric is the youngest.
Considering all the deductions in bold, the only possible order of birth is Charles, Darius, Brenda, Alfred, Eric.
Biconditional logic is a way of connecting two statements, and , logically by saying, "Statement holds if and only if statement holds." In mathematics, "if and only if" is often shortened to "iff" and the statement above can be written as
The truth table for biconditional logic is as follows:
This can be interpreted by considering the following statement:
I go for a run if and only if it is Saturday. This combines both of the following:
- If it is Saturday, I go for a run.
- If I go for a run, it will be a Saturday. (Or "I only run on Saturdays.")
These are consistent only when the two statements "I go for a run today" and "It is Saturday" are both true or both false, as indicated by the above table.
Truth tables are often used in conjunction with logic gates. A few common examples are the following:
For example, the truth table for the AND gate OUT = A & B is given as follows:
The truth table for the XOR gate OUT is given as follows:
ALWAYS REMEMBER THE GOLDEN RULE: "And before or"
When combining arguments, the truth tables follow the same patterns. It is simplest but not always best to solve these by breaking them down into small componentized truth tables.
p \rightarrow q ||p||row 1 col 2||q|| ||row 2 col 1||row 2 col 2||row 2 col 1||row 2 col 2||