Top Banner
Lecture 10 Methods of Proof CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine
23

Lecture 10 Methods of Proof

Feb 23, 2016

Download

Documents

Nessa

Lecture 10 Methods of Proof. CSCI – 1900 Mathematics for Computer Science Spring 2014 Bill Pine. Lecture Introduction. Reading Kolman - Section 2.3 The Nature of Proofs Components of a Proof Rule of Inference and Tautology Proving equivalences modus ponens Indirect Method - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lecture  10 Methods of Proof

Lecture 10Methods of Proof

CSCI – 1900 Mathematics for Computer ScienceFall 2014Bill Pine

Page 2: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 2

Lecture Introduction

• Reading– Rosen - Section 1.7, 1.8

• The Nature of Proofs• Components of a Proof• Rule of Inference and Tautology• Proving equivalences• modus ponens• Indirect Method• Proof by Contradiction

Page 3: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 3

Past Experience

• Until now we’ve used the following methods to write proofs:–Direct proofs with generic elements,

definitions, and given facts–Proof by enumeration of cases such as

when we used truth tables

Page 4: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 4

General Outline of a Proof

• p q denotes "q logically follows from p“• Implication may take the form (p1 p2 p3

… pn) q• q logically follows from p1, p2, p3, …, pn

Page 5: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 5

General Outline (cont)

The process is generally written as:p1

p2

p3::pn

q

Page 6: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 6

Components of a Proof

• The pi's are called hypotheses or premises• q is called the conclusion• Proof shows that if all of the pi's are true,

then q has to be true• If result is a tautology, then the implication

p q represents a universally correct method of reasoning and is called a rule of inference

Page 7: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 7

Example of a Tautology based Proof• If p implies q and q implies r, then p implies r

p qq r

p r• By replacing the bar under q r with the “”, the

proof above becomes ((p q) (q r)) (p r) • The next slide shows that this is a tautology and

therefore is universally valid.

Page 8: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 8

Tautology Example (cont)

p q r p q q r (p q) (q r)

p r ((p q) (q r)) (p r)

T T T T T T T TT T F T F F F TT F T F T F T TT F F F T F F TF T T T T T T TF T F T F F T TF F T T T T T TF F F T T T T T

Page 9: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 9

Equivalences

• Some mathematical theorems are equivalences, i.e., p q.– If and only if– Necessary and sufficient

• The proof of such a theorem requires two proofs:– Must prove p q, and – Must prove q p

Page 10: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 10

Rule of Inference: modus ponens

• modus ponens – the method of assertingpp q q

• Example: – p: It is snowing today– p q: If it is snowing, there is no school– q: There is no school today

• Supported by the tautology (p (p q)) q

Page 11: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 11

Show modus ponens = Rule of Inference

p q (p q) p (p q) (p (p q)) q

T T T T T

T F F F T

F T T F T

F F T F T

Page 12: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 12

Summary of Arguments

• An argument is a sequence of statements– All statement except the last are premises– The final statement is the conclusion– Normally place the symbol in front of the

conclusion• To say that an argument is valid means only

that its form is valid– If the premises are all true the conclusion is true

Page 13: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 13

Summary of Arguments (cont)

• It is possible for a valid argument to lead to a false conclusion

• It is possible for an invalid argument to lead to a true conclusion

• Carefully distinguish between validity of the argument and truth of the conclusion

• A valid argument is one whose form, when supplied with true premises cannot have a false conclusion

Page 14: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 14

Invalid Conclusions from Invalid Premises

• Just because the format of the argument is valid does not mean that the conclusion is true. A premise may be false. For example:

Star Trek is real If Star Trek is real we can travel faster than light

We can travel faster than light• Argument is valid since it is in modus ponens form• Conclusion is false because a premise is false

Page 15: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 15

Invalid Conclusion from Wrong Form• Sometimes, an argument that looks like modus ponens is

actually not in the correct form. For example:If I am watching Star Trek, then I am happyI am happy I am watching Star Trek

• Argument is not valid since its form is:p qq

p

Which is not modus ponens

Page 16: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 16

Invalid Argument (continued)• Truth table shows that this is not a tautology:

p q (p q) (p q) q ((p q) q) p

T T T T T

T F F F T

F T T T F

F F T F T

Page 17: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 17

Rule of Inference: Indirect Method

• Another method of proof is to use the tautology:(p q) (~q ~p)

• The form of the proof is (modus ponens):

~q~q ~p~p

Page 18: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 18

Indirect Method Example

• p: My e-mail address is available on a web site• q: I am getting spam• p q: If my e-mail address is available on a web

site, then I am getting spam• ~q ~p: If I am not getting spam, then my e-mail

address must not be available on a web site• This proof says that if I am not getting spam, then

my e-mail address is not on a web site

Page 19: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 19

Another Indirect Method Example

• Prove that if the square of an integer is odd, then the integer is odd too.

• p: n2 is odd• q: n is odd• ~q ~p: If n is even, then n2 is even.

• If n is even, then there exists an integer m for which n = 2×m. n2 therefore would equal (2×m)2 = 4×m2 which must be even.

Page 20: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 20

Rule of Inference:modus tollens

• Another method of proof is to use the tautology (p q) (~q) (~p)

• The form of the proof is:p q~q

~p• Also known as proof by contradiction

Page 21: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 21

Proof by Contradiction (cont)

p q (p q) ~q (p q) ~q ~p (p q) (~q) (~p)

T T T F F F T

T F F T F F T

F T T F F T T

F F T T T T T

Page 22: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 22

Proof by Contradiction (cont)

• The best application for this is where you cannot possibly go through a large (potentially infinite) number of cases to prove that every one is true

Page 23: Lecture  10 Methods of Proof

CSCI 1900 Lecture 10 - 23

Key Concepts Summary

• The Nature of Proofs• Components of a Proof• Rule of Inference and Tautology• Proving equivalences• modus ponens• Indirect Method• Proof by Contradiction