# TRUTH TABLES - Waller's Wall TRUTH TABLES Edited from the original by: Mimi Opkins CECS 100 Fall 2011 Thanks for the ppt Introduction The truth value of a statement is the classification as true or false which denoted by T or F. A truth table is a listing of all possible combinations of the individual statements as true or false, along with the resulting truth value of the compound statements. Truth tables are an aide in distinguishing valid and invalid arguments. What are truth tables? Tables that give the truth-values of statements using AND, NOT, OR, IF THEN, and IF AND ONLY IF

for every possible combination of truth-values. Visual aids for showing all possible true or false inputs and all possible true or false outputs. We will use the variables p, q, and r to represent the truth table values. Symbols Number of Rows If a compound statement consists of n individual statements, each represented by a different letter, the number of rows required in the truth table is 2n . Truth Table for ~p The negation of a statement is the denial of the statement. If the statement p is true, the negation of p,

i.e. ~p is false. If the statement p is false, then ~p is true. Note that since the statement p could be true or false, we have 2 rows in the truth table. p ~p T F F T Example: If P = everyone loves math If not P = not everyone loves math Truth Table for p ^ q

The conjunction is the joining of two statements with the word and. The number of rows in this truth table will be 4. (Since p has 2 values, and q has 2 value.) For p ^ q to be true, then both statements p, q, must be true. If either statement or if both statements are false, then the conjunction is Example: false. If p = I got an A on the test. p q p^q

T T F F T F T F T F F F If q = My friend got an A on the test. If p and q = Both my friend and I got an A on the test. Truth Table for p v q A disjunction is the joining

of two statements with the word or. The number of rows in this table will be 4, since we have two statements and they can take on the two values of true and false. For a disjunction to be true, at least one of the statements must be true. A disjunction is only false, if both statements are Example: false. Either one makes a success but both is fine!! p q pvq T

T T T F T F T T F F F If p = I got an A on the test. If q = My friend got an A on the test. If p or q = Either my friend or I got an A on the test. Truth Table for p q

Conditional is a compound statement of the form if p then q. Think of a conditional as a promise. If I dont keep my promise, in other words q is false, then the conditional is false if the premise is true. If I keep my promise, that is q is true, and the premise is true, then the conditional is true. When the premise is false (i.e. p is false), then there was no Example: promise. Hence by default the conditional If p = Roy Halladay is true. pitches a no-hitter. p q pq

T T T T F F F T T F F T If q = The Phillies win the game. If p, then q = If Halladay pitches a no-hitter, then the Phillies will win. Truth Table for p

Biconditional is a connective statement of the form p if and only if q. The result is that the truth of either one of the connected statements requires the truth of the other. Another way to say the same things is: "Q is necessary, and sufficient for P". This means two things: "If P, Then Q" and "If Q, Then P" q p q p q

T T T T F F F T F F F T Example: If p = I study for the test. If q = I will get an A.

If p, and only if, then q = If and only if I study, I will get an A. (I cant get an A without studying). Equivalent Expressions Equivalent expressions are symbolic expressions that have identical truth values for each corresponding entry in a truth table. Hence ~(~p) p. The symbol means equivalent to. p ~p ~(~p) T F T F T F Negation of the Conditional Here we look at the negation of the conditional.

Note that the 4th and 6th columns are identical. Hence p ^ ~q is equivalent to ~(p q). p q ~q p ^ ~q p q ~(p q) T T F F T ~F T

F T T F T F T F F T F F F T

F T F De Morgans Laws The negation of the conjunction p ^ q is given by ~(p ^ q) ~p v ~q. Not p and q is equivalent to not p or not q. The negation of the disjunction p v q is given by ~(p v q) ~p ^ ~q. Not p or q is equivalent to not p and not q. Lets set up truth tables One variable/ two rows p T

F Two variables If a compound statement consists of n individual statements, each represented by a different letter, the number of rows required in the truth table is 2n How to set up truth tables (cont.) Three variables Practice Examples