chapter 5: section 5-2 truth tables and equivalent statements · pdf filechapter 5: section...

25
Chapter 5: Section 5-2 Truth Tables and Equivalent Statements D. S. Malik Creighton University, Omaha, NE D. S. Malik Creighton University, Omaha, NE () Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 1 / 25

Upload: lenhi

Post on 16-Feb-2018

225 views

Category:

Documents


8 download

TRANSCRIPT

Chapter 5: Section 5-2Truth Tables and Equivalent Statements

D. S. MalikCreighton University, Omaha, NE

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 1 / 25

Consider the statement: � (p^ � q) _ qThe truth table of this statement is:

p q � q p^ � q � (p^ � q) � (p^ � q) _ qT T F F T TT F T T F FF T F F T TF F T F T F

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 2 / 25

Remark(Number of rows in a truth table) The number of rows in the truthtable of a compound statement depends on the number of variables in thecompound statement. As we have seen, if the number of variables in acompound statement is 2, then the variables has four choices, so thenumber of rows is 22 = 4. Note that these are the rows below the �rst rowthat contains column headings.In general, if a compound statement has n variables, then the number ofrows, below the columns headings row, is 2n.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 3 / 25

ExampleLet p, q, and r be statements. We construct the truth table for thecompound statement (s p ^ q)! r .Because the compound statement (s p ^ q)! r has 3 variables, thenumber of rows in the truth table is 23 = 8. The truth table for(s p ^ q)! r is

p q r s p s p ^ q (s p ^ q)! rT T T F F TT T F F F TT F T F F TT F F F F TF T T T T TF T F T T FF F T T F TF F F T F T

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 4 / 25

Example

Let A be the statement (s p ^ q)! (s (q ! p)). We construct thetruth table for A. This statement contains two statement variables. So, toconstruct the truth table for A we have to consider four di¤erentassignments of truth values. The following is the truth table of A.

p q s p (s p ^ q) q ! p s (q ! p) AT T F F T F TT F F F T F TF F T F T F TF T T T F T T

From the truth table it follows that the truth value of A is T for anyassignments of truth values T and F to p and q. Such a statement iscalled a tautology.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 5 / 25

De�nition(i) A statement A is said to be a tautology if the truth value of A is T forany assignment of the truth values T and F to the statement(s) occurringin A.(ii) A statement A is said to be a contradiction if the truth value of A isF for any assignment of the truth values T and F to the statement(s)occurring in A.

Notation: For a statement A, we use the notation � A to indicate thatA is a tautology.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 6 / 25

Logically Equivalent Statements

The truth table of the statement (p ^ (p ! q))! q is:

p q p ! q p ^ (p ! q) (p ^ (p ! q))! qT T T T TT F F F TF T T F TF F T F T

From the table it follows that (p ^ (p ! q))! q is a tautology.

In this case, we say that the statement (p ^ (p ! q)) logicallyimplies the statement q.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 7 / 25

Example

Consider the statements � (p _ q) and s p^ s q. The truth table ofA =� (p _ q)!s p^ s q is

p q p _ q s (p _ q) s p s q s p^ s q AT T T F F F F TT F T F F T F TF T T F T F F TF F F T T T T T

This implies that � (p _ q) logically implies s p^ s q.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 8 / 25

Example

The truth table of B = (s p^ s q)!� (p _ q) is

p q s p s q s p^ s q p _ q s (p _ q) BT T F F F T F TT F F T F T F TF T T F F T F TF F T T T F T T

This implies that s p^ s q logically implies � (p _ q).

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 9 / 25

De�nitionA statement A is said to be logically equivalent to a statement B if thestatement A logically implies B and the statement B logically implies A,i.e., A! B and B ! A are tautologies. If A is logically equivalent to B,then symbolically we write A � B.

RemarkLet A and B be (compound) statements. To show that A � B, we canshow that A! B and B ! A are tautologies or equivalently we canconstruct the truth tables of the statements A and B and show that thecolumns labeled A and B are the same. Note that when you use truthtables to show that two statements are equivalent, you can construct thetruth tables of both the statements in the same table. However, when youseparately construct the truth tables for A and B, then the columnslabeled by the variables in the statements A and B must list the truthvalues of the variables in the same order.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 10 / 25

ExampleIn this example, we show that the implication p ! q is equivalent tos p _ q. For this we construct the truth table for (p ! q) and s p _ q.

p q s p p ! q s p _ qT T F T TT F F F FF T T T TF F T T T

From the last two columns of this table, it follows that (p ! q) and ares p _ q are equivalent.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 11 / 25

Example

Consider the statement: ((p ! q)^ � q)!� p. The truth table of thisstatement is:

p q p ! q � q (p ! q)^ � q � p ((p ! q)^ � q)!� pT T T F F F TT F F T F F TF T T F F T TF F T T T T T

This implies that ((p ! q)^ � q)!� p is a tautology. Hence,(p ! q)^ � q logically implies � p

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 12 / 25

De Morgan�s Laws and the Negation of Conjunctions andDisjunctions

Theorem(De Morgan�s laws) Let p and q be statements. Then

s (p ^ q) � (s p) _ (s q),s (p _ q) � (s p) ^ (s q).

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 13 / 25

ExampleLet p : �Today is Sunday� ; q : �It is a nice day to go for a walk.�Then, in words, the statement p ^ q is

Today is Sunday and it is a nice day to go for a walk.

Nows (p ^ q) � (s p) _ (s q),s p : Today is not Sunday,

s q : It is not a nice day to go for a walk.

(s p)_ (s q) : Today is not Sunday or it is not a nice day to go for a walk.

Thus, the negation of the statement �Today is Sunday and it is a nice dayto go for a walk� is the statement

Today is not Sunday or it is not a nice day to go for a walk.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 14 / 25

ExampleConsider the statement

Amanda will not win the marathon or her husband will not buy her a car.

We write the negation of this statement.The given statement consists of the statements �Amanda will not win themarathon�and �Her husband will not buy her a car.�These statementsare connected by using the connective or. So we write the negation ofeach of these statements and then connect them using the connective and.Hence, the negation of the given compound statement is

Amanda will win the marathon and her husband will buy her a car.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 15 / 25

Negation of an Implication (Conditional Statement)

Consider the compound statement

�If I get a penny every time you lie, then I will be very rich.�

Suppose that we want to negate this statement. Let p : �I get a pennyevery time you lie�; q : �I will be very rich�. Then in symbol form thegiven statement is

p ! q.

We want to determine � (p ! q). Recall that

p ! q � (� p _ q)This implies that

� (p ! q) �� (� p _ q)By the DeMorgan�s law

� (� p _ q) =� (� p) ^ (� q) = p^ � q.Hence,

� (p ! q) � p^ � qD. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 16 / 25

� (p ! q) � p^ � qNow p is the statement �I get a penny every time you lie� and � q is thestatement �I will not be very rich�. Hence, the negation of the statement�If I get a penny every time you lie, then I will be very rich� is thestatement

I get a penny every time you lie and I will not be very rich.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 17 / 25

To write the negation of the implication, p ! q, we do the following:

1 Negate the conclusion (consequent).2 Connect the hypothesis (antecedent), p, and the negated conclusion(consequent), � q, using the logical connective �and�.

That is:� (p ! q) � p^ � q

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 18 / 25

ExampleConsider the conditional statement

If I pay my taxes on time, then I will not be penalized.

We write the negation of this statement.Here the hypothesis is �I pay my taxes on time�and the conclusion is �Iwill not be penalized.�The negation of the conclusion is �I will bepenalized.�Hence, the negation of the given statement is

I pay my taxes on time and I will be penalized.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 19 / 25

More on Implications

Consider the statement: �Orange juice contains vitamin C .�This statement is an implication and can be written as

�If it is orange juice, then it contains vitamin C .�

This means that there is more than one way to write an implication.Let us consider some more examples.

Example(i) Consider the statement: �July 4th is a federal holiday.�Using if...thenform, this statement can be written as:

If it is July 4th, then it is a federal holiday.

(ii) Consider the statement: Every doctor carries a stethoscope.Theequivalent statement is:

If he/she is a doctor, then he/she carries a stethoscope.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 20 / 25

De�nitionLet p and q be statements.(i) The statement q ! p is called the converse of the implication p ! q.(ii) The statement s p ! s q is called the inverse of the implicationp ! q.(iii) The statement s q ! s p is called the contrapositive of theimplication p ! q.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 21 / 25

ExampleConsider the statement �If today is Sunday, then I will go for a walk.�Letp and q be the following statements:

p : Today is Sunday.q : I will go for a walk

Then the given statement can be written as p ! q. The converse of thisimplication is q ! p, which is

q ! p : If I will go for a walk, then today is Sunday.

The inverse of the above implication is s p ! s q, which is

s p !s q : If today is not Sunday, then I will not go for a walk.

The contrapositive of the above implication is s q ! s p, which is

s q !s p : If I will not go for a walk, then today is not Sunday.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 22 / 25

Exercise: Determine whether the statements s p^ s q ands (s p ! q) are equivalent.

Solution: Now

p q � p s q s p^ s q s p ! q s (s p ! q)T T F F F T FT F F T F T FF T T F F T FF F T T T F T

From the truth table, it follows that the statementss p^ s q and s (s p ! q) are equivalent

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 23 / 25

Exercise: Use De Morgan�s law to write the negation of the statement:This is New Year�s Day and it is very cold.

Solution: The statement �This is New Year�s Day and it is very cold�contains the statements �This is New Year�s Day�and �It isvery cold,� and the logical connective �and�.

The negation of the statement �This is New Year�s Day� isthe statement �This is not New Year�s Day.�Also thenegation of the statement �It is very cold� is the statement�It is not very cold.�Now, because � (p ^ q) �� p_ � q,it follows that the negation of the given statement is

This is not New Year�s Day or it is not very cold.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 24 / 25

Exercise: Write the inverse, converse, and the contrapositive of thefollowing statement:

If it is a rose, then it is a �ower.

Solution: Let p : It is a rose; and q : It is a �ower.In symbols, the statement �If it is a rose, then it is a �ower�is:

p ! q.

The converse of this implication is q ! p, which is

q ! p : If it is a �ower, then it is a rose.

The inverse of the above implication is s p ! s q, which is

s p !s q : If it is not a rose, then it is not a �ower.

The contrapositive of the above implication is s q ! s p,which is

s q !s p : If it is not a �ower, then it is not a rose.

D. S. Malik Creighton University, Omaha, NE ()Chapter 5: Section 5-2 Truth Tables and Equivalent Statements 25 / 25