You are on page 1of 7

Truth Tables

In algebra, it is rarely possible to guess the numerical solution to a problem, and because there are an infinite number of numbers it is obvious that one cannot try all possible solutions in order to find one that solves the problem. But in logic, we only have two "numbers": True and False. Therefore, any logical statement which contains a finite number of logical variables (which of course covers any problem we have to deal with) can be analyzed using a table which lists all possible values of the variables: a "truth table". Since each variable can take only two values, a statement with "n" variables requires a table with 2 n rows. Using the letters "p", "q", "r", etc., to represent logical variables, we can construct truth tables for statements involving any number of variables (although we will usually limit ourselves to at most three variables per statement to simplify the matter):

p T F
for statements with one variable,

p T T F F

q T F T F

for statements with two variables and

p T T T T F F F F

q T T F F T T F F

r T F T F T F T F

for statements with three variables (where in every case, "T" stands for True and "F" for False). The extension to more than three variables should now be obvious: for the first variable, the first half of the rows are T while the second half are F for the second variable, the rows are split into four sections: the first and third quarters are T while the second and fourth quarters are F for the third variable, the rows are split into eighths, with alternating eighths having T's and F's in general, for the nth variable, the rows are split into 2 n parts, with alternating T's and F's in each part

Logical Operators
We will now define the logical operators which we mentioned earlier, using truth tables. But let us proceed with caution: most of the operators have names which we may be accustomed to using in ways that are fuzzy or even contradictory to their proper definitions. In all cases, use the truth table for an operator as its exact and only definition; try not to bring to logic the baggage of your colloquial use of the English language. 1. The negation of a proposition P, denoted by ~P which is read as not P, is called the proposition whose truth value depends on P as shown below

p T F

~p F T

2. Let P and Q be propositions. The conjunction of P and Q denoted by P ^Q which is read as P and Q is the proposition whose truth value depends on P and Q as shown below. We call each P and

Q a conjunction.

p T T F F

q T F T F

p^q T F F F

3. Let P and Q be propositions. The disjunction of P and Q denoted by P vQ which is read as P or

Q is the proposition whose truth value depends on P and Q as shown below. We call each P and Q a disjunction.

p T T F F

q T F T F

pvq T T T F

4. Let P and Q be propositions. The conditional statement or implication if P then Q, denoted by

P -> Q is the proposition whose truth value depends on P and Q as shown below. We refer P as the hypothesis or premise and we call Q as the conclusion.

p T T F F

q T F T F

p -> q T F T T

5. Let P and Q be propositions. The biconditional statement P if and only if Q, denoted by P <-> Q is the proposition whose truth value depends on P and Q as shown below.

p T T F F

q T F T F

p <->q T F F T

Examples: 1. p v ( p ^ q ) <-> p p T T F F q T F T F p v (p^q) T T T F F F F F <-> T T T T p T T F F

2. p v (~p ^ q ) <-> p v q p T T F F q T F T F p v (~p ^ q ) T F T F T T F F <-> T T T T pvq T T T F

3. q ^ ( p ^ q ) v ( q ^ r ) <-> q ^ ( p v r ) p T T T T F F F F q T T F F T T F F r T F T F T F T F q ^ (p^q) v (q^r) T T T T T T T F F F F F F F F F F F T T F F F F F F F F F F F F <-> T T T T T T T T (pvr) T T F F T F F F

4. ( p v q v r ) ^ ~( p ^ ~q ^ ~r ) ^ ~r <-> q ^ ~r p T T T T F F F F q T T F F T T F F r T F T F T F T F ( p v q v r ) ^ ~( p ^ ~q ^ ~r ) ^ ~r T T T T F F F T T T T F F T T T T T T F F T T F F T T F T T T T F F F T T T T F F T F T T T F F F F F F T F F F <-> T T T T T T T T q ^ ~r F T F F F T F F

5. ( p v q ) <-> ( q v p ) p T T F F q T F T F (pvq) T T T F <-> T T T T (qvp) T T T F

6. [ ( p -> q ) ^ q ] -> p p T T F F q T F T F ( p -> q ) T F T F [ ( p -> q ) ^ q ] T F T F [ ( p -> q ) ^ q ] -> p T T F T

7. ( p v q ) -> p p T T F F q T F T F (pvq) T T T F ( p v q ) -> p T T F T

8. ~( p ^ q ) <-> ( q v p ) p T T F F q T F T F (p^q) T F F F ~( p ^ q ) F T T T (qvp) T T T F ~( p ^ q ) <-> ( q v p ) F T T F

9. ( p <-> q ) ^ r -> [ ( p ^ r ) v ~q ] p T T T T F F F F q T T F F T T F F r T F T F T F T F ( p <-> q ) T T F F F F T T ( p <-> q ) ^ r T F F F F F T F (p^r) T F T F F F F F [ ( p ^ r ) v ~q ] T F T T F F T T ( p <-> q ) ^ r -> [ ( p ^ r ) v ~q ] T T T T T T T T

10. [ ( q ^ r ) v p ] v ~( p ^ ~p ) p T T T T F F F F q T T F F T T F F r T F T F T F T F (q^r) T F F F T F F F [(q^r)vp] T T T T T F F F ( p ^ ~p ) F F F F F F F F ~( p ^ ~p ) T T T T T T T T [ ( q ^ r ) v p ] v ~( p ^ ~p ) T T T T T T T T

11. [ ~( p ^ s ) -> ( q ^ ~r ) ] ^ ~ ( p v ~p ) p T T T T T T T T F F F F F F F F q T T T T F F F F T T T T F F F F r T T F F T T F F T T F F T T F F s (p^s) T T F F T T F F T T F F T T F F T F F F T F F F T F F F T F F F ~(p^s) F T F T F T F T T T T T T T T T (q^~r) F F T T F F F F F F T T F F F F [~(p^s)->(q^~r) T F T T T F T F F F T T F F F F (pv~p) T T T T T T T T T T T T T T T T ~(pv~p) [~( p^s)->(q^~r)] ^ ~(pv~p) F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F

You might also like