Docsity

Discrete Structures Lecture 11: Methods of Proof, Study notes of Discrete Structures and Graph Theory

Partial preview of the text

Download Discrete Structures Lecture 11: Methods of Proof and more Study notes Discrete Structures and Graph Theory in PDF only on Docsity!

9/25/^

CSci 243Discrete StructuresLecture 11Methods of Proof

9/25/^

Outline^ • Rules of Inference—Recap• Practice• Proof Methods• ā€œDisā€proof Methods

9/25/^

Rules of Inference—Recap (cont)^ • Universal Instantiation:

Ax:U P(x)^ Ć ^ P(c) if c

e^ U

  • Universal Generalization:

P(c) for arb. c

e^ U Ć  Ax:U P(x)

  • Existential Instantiation:

Ex:U P(x)^ Ć ^ P(c) for some c

e^ U

  • Existential Generalization:

P(c) for some c

e^ U Ć  Ex:U P(x)

9/25/^

Slashdot Revisited (Quick Analysis)^ • Seen on Slashdot, 9/17/2002:•^ Poster 1: ā€œ[Convicted software pirate Chris Trescowas] intelligent enough to know it was wrong.ā€ā€¢^ Poster 2: ā€œ[So] anyone who doesn't think it waswrong must not be intelligent.ā€ā€¢ P(x): A person x is intelligent• Q(x): A person x knows piracy is wrong• P(x)^ f^

Q(x)

-^ !Q(x)^ f!

P(x) (contrapositive) (Seems true!)

9/25/^

Example^ •^ ā€œIf I get email, then I will finish the program. If I do notget email, I will go to sleep early. If I go to sleep early, Iwill be rested. Therefore, if I do not finish the program, Iwill be rested.ā€ā€¢^ p=ā€œI get emailā€

q=ā€œI will finish the programā€

-^ r=ā€œI will go to sleep earlyā€

s=ā€œI will be restedā€

-^ If I get email, then I will finish the program

pfq

-^ If I do not get email, I will go to sleep early

!pfr

-^ If I go to sleep early, I will be rested.

rf

s

-^ If I do not finish the program, I will be rested

!qfs

9/25/^

Example (cont)^ 1.^ pfq^

Hypothesis

2.^ !qf!

p^ Contrapositive of 1

3.^ !pfr^

Hypothesis

4.^ !qfr^

Hypothetical syllogism 2 & 3

5.^ rfs^

Hypothesis

6.^ !qfs^

Hypothetical syllogism 4 & 5

-^ So we proved

!qfs (If I do not finish the program, I will be rested) by using the rules ofinference!

9/25/^ Application: Logic Programming in Prolog^ • Kowalski: algorithm = logic+control• Declarative language, not imperative/procedural•^ You say ā€œwhatā€, engine handles ā€œhowā€ā€¢ age(freddie, 27)age(anne,28)older_than (X, Y) :- age (X, Age_of_X),age (Y, Age_of_Y) , Age_of_X > Age_of_Y• ?- older_than (

Who, freddie)

Who=anne

9/25/^

Fallacies^ • Fallacy: A method of proof which is invalid• ā€œMr. Smith argues that CO

causes global 2 warming.ā€ā€œBut Mr. Smith was once convicted of a felony.ā€ā€œSo it is obvious that he is wrong.ā€ā€¢ ā€œArgumentum ad Hominemā€ — against the man• http://gncurtis.home.texas.net/taxonomy.html

9/25/^

Proof Methods^ • Given an argument: p

fq

  • Direct Proof: p

fq

  • Indirect Proof:

!qf!p (contrapositive)

  • Vacuous Proof: p

fq, show p false

  • Trivial Proof: p

fq, show q true without using p

  • Proof By Contradiction:

!pf(r^ ¶!

r)

  • Proof By Cases: (p

vp)fq^ ¤ 12

pfq^ ¶^ p^1

fq 2

  • Existence Proof (Constructive/Nonconstructive)

9/25/^

Direct Proof (p

fq)

  • Prove: ā€œIf n is odd, n

2 is oddā€

  • n is odd means n = 2k + 1, for some integer k^2 • n= (2k + 1)

2

-^ = 4k

2 + 4k + 1

-^ = 2(2k

2 +2k) + 1

-^ = 2m + 1, where integer m = 2k

2 + 2k

(^2) • Ć  nis odd• Good if p is simple and q is complex

9/25/^

Vacuous Proof (p

fq, show p false)

  • Prove: P(0) true, where P(n) = n>

(^2) f n>n

• P(0) = 0>

(^2) f 0 >

  • 0>1 is false•^ Ć ^ P(0) is true• Recall p

fq is true if p is false, regardless of q

  • Useful for proving more general theorems^ Ax P(x)^

versus^ Ax | x > 0

-^ P(x)

9/25/^

17

Trivial Proof (p

fq, q true p not used)

  • Prove: P(0) true, where P(n) = a

n≄b f a≄ nb

  • P(0) = a

(^0) ≄b f a≄ (^0) b

  • 1≄^1 • Consequence is proven already!•^ Ć ^ P(0) is true• Usually obvious when trivial proof applicable

9/25/^

19

Proof By Cases ((p

vp^ )fq) 12 =  • p: x is odd (x = 2k+1)^2 • • •

2 xxx   422 

 +   + (^) = + (^) 

) (^12) ( 4 (^1212 )

(^2) k kk

   ^ +++=Ɨ ^4 

(^144) (^2 222 ) kk kk =   ^4 

) (^2) ( 2 2 2 2

(^2) kk k

(^44242) (^22 )

2 kkk k^

++= Ɨ ) (^2) ( 2 42 2 2

(^2) kk

  • Prove:• p: x is even (x = 2k)^1 • k^ =ו

9/25/^

Existence Proof (

Ex P(x))

  • Constructive: Find suitable x• Non-constructive: Show suitable x exists• Prove: ā€œThere is a prime greater than 4ā€ā€¢ Easy constructive proof: prime = 7•^ Ć ^ There is prime greater than 4• Obviously for existential statements