1 Methods of Proof CS/APMA 202 Epp, chapter 3 Aaron Bloomfield.

Slides:



Advertisements
Similar presentations
Methods of Proof. Methods of Proof The Vicky Pollard Proof Technique Prove that when n is even n2 is even. Assume n is 0, then n2 is 0, and that is.
Advertisements

Lecture 3 – February 17, 2003.
With examples from Number Theory
Introduction to Proofs
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Elementary Number Theory and Methods of Proof
22C:19 Discrete Structures Logic and Proof Spring 2014 Sukumar Ghosh.
More Number Theory Proofs Rosen 1.5, 3.1. Prove or Disprove If m and n are even integers, then mn is divisible by 4. The sum of two odd integers is odd.
Logic and Proof. Argument An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement.
CSE115/ENGR160 Discrete Mathematics 01/31/12 Ming-Hsuan Yang UC Merced 1.
CSE115/ENGR160 Discrete Mathematics 02/01/11
Logic: Connectives AND OR NOT P Q (P ^ Q) T F P Q (P v Q) T F P ~P T F
CMSC 250 Discrete Structures Number Theory. 20 June 2007Number Theory2 Exactly one car in the plant has color H( a ) := “ a has color”  x  Cars –H(
Introduction to Proofs ch. 1.6, pg. 87,93 Muhammad Arief download dari
CS 202 Rosen section 1.5 Aaron Bloomfield
CS 2210 (22C:019) Discrete Structures Logic and Proof Spring 2015 Sukumar Ghosh.
Methods of Proof & Proof Strategies
Introduction to Proofs
Introduction to Proofs
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 03: PROOFS Section 1.5 Jarek Rossignac CS1050: Understanding.
Methods of Proof. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical theorems. Direct.
Conditional Statements CS 2312, Discrete Structures II Poorvi L. Vora, GW.
Section 1.8. Section Summary Proof by Cases Existence Proofs Constructive Nonconstructive Disproof by Counterexample Nonexistence Proofs Uniqueness Proofs.
Review I Rosen , 3.1 Know your definitions!
Methods of Proofs PREDICATE LOGIC The “Quantifiers” and are known as predicate quantifiers. " means for all and means there exists. Example 1: If we.
1 Section 1.1 A Proof Primer A proof is a demonstration that some statement is true. We normally demonstrate proofs by writing English sentences mixed.
1 Basic Proof Methods I Basic Proof Methods II Proofs Involving Quantifiers.
CSci 2011 Discrete Mathematics Lecture 6
1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT.
10/17/2015 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(1) Dr.Saad Alabbad Department of Computer Science
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
1 Proof Strategies CS/APMA 202 Rosen section 3.1 Aaron Bloomfield.
Chapter 5 Existence and Proof by contradiction
Methods of Proof Lecture 3: Sep 9. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 The Foundations: Logic and Proofs Introduction to Proofs.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 3 The Foundations: Logic and Proof,
Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases.
1 Course Summary CS 202 Aaron Bloomfield. 2 Outline A review of the proof methods gone over in class Interspersed with the most popular demotivators from.
Method of proofs.  Consider the statements: “Humans have two eyes”  It implies the “universal quantification”  If a is a Human then a has two eyes.
22C:19 Discrete Structures Logic and Proof Fall 2014 Sukumar Ghosh.
CSci 2011 Discrete Mathematics Lecture 4 CSci 2011.
CS104:Discrete Structures Chapter 2: Proof Techniques.
Week 3 - Monday.  What did we talk about last time?  Predicate logic  Multiple quantifiers  Negating multiple quantifiers  Arguments with quantified.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
Introduction to Proofs
1 CMSC 250 Chapter 3, Number Theory. 2 CMSC 250 Introductory number theory l A good proof should have: –a statement of what is to be proven –"Proof:"
Week 4 - Wednesday.  What did we talk about last time?  Divisibility  Proof by cases.
Section 1.7. Definitions A theorem is a statement that can be shown to be true using: definitions other theorems axioms (statements which are given as.
Proof Review CS 202 Aaron Bloomfield Spring 2007.
EXAMPLE 3 Write an indirect proof Write an indirect proof that an odd number is not divisible by 4. GIVEN : x is an odd number. PROVE : x is not divisible.
Methods of Proof Lecture 4: Sep 20 (chapter 3 of the book, except 3.5 and 3.8)
CS 173, Lecture B August 27, 2015 Tandy Warnow. Proofs You want to prove that some statement A is true. You can try to prove it directly, or you can prove.
CSci 2011 Discrete Mathematics Lecture 5 CSci 2011.
Section 1.7. Section Summary Mathematical Proofs Forms of Theorems Direct Proofs Indirect Proofs Proof of the Contrapositive Proof by Contradiction.
Chapter 1 Logic and proofs
Lecture 2: Proofs and Recursion. Lecture 2-1: Proof Techniques Proof methods : –Inductive reasoning Lecture 2-2 –Deductive reasoning Using counterexample.
Chapter 1 Logic and Proof.
The Foundations: Logic and Proofs
CS 2210:0001 Discrete Structures Logic and Proof
Methods of Proof Aaron Bloomfield.
In this slide set… Rules of inference for propositions
Proof methods We will discuss ten proof methods: Direct proofs
Methods of Proof CS 202 Epp, chapter 3.
Chapter 1: The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
Section 2.1 Proof Techniques Introduce proof techniques:   o        Exhaustive Proof: to prove all possible cases, Only if it is about a.
Methods of Proof Rosen 1.7, 1.8 Lecture 4: Sept 24, 25.
Information Technology Department SKN-SITS,Lonavala.
Introduction to Proofs
Methods of Proof Rosen 1.7, 1.8 Lecture 4: Sept, 2019.
Presentation transcript:

1 Methods of Proof CS/APMA 202 Epp, chapter 3 Aaron Bloomfield

2 Proof methods We will discuss ten proof methods: 1.Direct proofs 2.Indirect proofs 3.Vacuous proofs 4.Trivial proofs 5.Proof by contradiction 6.Proof by cases 7.Proofs of equivalence 8.Existence proofs 9.Uniqueness proofs 10.Counterexamples

3 Direct proofs Consider an implication: p→q –If p is false, then the implication is always true –Thus, show that if p is true, then q is true To perform a direct proof, assume that p is true, and show that q must therefore be true

4 Direct proof example Rosen, section 1.5, question 20 –Show that the square of an even number is an even number –Rephrased: if n is even, then n 2 is even Assume n is even –Thus, n = 2k, for some k (definition of even numbers) –n 2 = (2k) 2 = 4k 2 = 2(2k 2 ) –As n 2 is 2 times an integer, n 2 is thus even

5 Indirect proofs Consider an implication: p→q –It’s contrapositive is ¬q→¬p Is logically equivalent to the original implication! –If the antecedent (¬q) is false, then the contrapositive is always true –Thus, show that if ¬q is true, then ¬p is true To perform an indirect proof, do a direct proof on the contrapositive

6 Indirect proof example If n 2 is an odd integer then n is an odd integer Prove the contrapositive: If n is an even integer, then n 2 is an even integer Proof: n=2k for some integer k (definition of even numbers) n 2 = (2k) 2 = 4k 2 = 2(2k 2 ) Since n 2 is 2 times an integer, it is even

7 Which to use When do you use a direct proof versus an indirect proof? If it’s not clear from the problem, try direct first, then indirect second –If indirect fails, try the other proofs

8 Example of which to use Rosen, section 1.5, question 21 –Prove that if n is an integer and n 3 +5 is odd, then n is even Via direct proof –n 3 +5 = 2k+1 for some integer k (definition of odd numbers) –n 3 = 2k-4 – –Umm… So direct proof didn’t work out. Next up: indirect proof

9 Example of which to use Rosen, section 1.5, question 21 (a) –Prove that if n is an integer and n 3 +5 is odd, then n is even Via indirect proof –Contrapositive: If n is odd, then n 3 +5 is even –Assume n is odd, and show that n 3 +5 is even –n=2k+1 for some integer k (definition of odd numbers) –n 3 +5 = (2k+1) 3 +5 = 8k 3 +12k 2 +6k+6 = 2(4k 3 +6k 2 +3k+3) –As 2(4k 3 +6k 2 +3k+3) is 2 times an integer, it is even

10 Proof by contradiction Given a statement p, assume it is false –Assume ¬p Prove that ¬p cannot occur –A contradiction exists Given a statement of the form p→q –To assume it’s false, you only have to consider the case where p is true and q is false

11 Proof by contradiction example 1 Theorem (by Euclid): There are infinitely many prime numbers. Proof. Assume there are a finite number of primes List them as follows: p 1, p 2 …, p n. Consider the number q = p 1 p 2 … p n + 1 –This number is not divisible by any of the listed primes If we divided p i into q, there would result a remainder of 1 –We must conclude that q is a prime number, not among the primes listed above This contradicts our assumption that all primes are in the list p 1, p 2 …, p n.

12 Proof by contradiction example 2 Rosen, section 1.5, question 21 (b) –Prove that if n is an integer and n 3 +5 is odd, then n is even –Rephrased: If n 3 +5 is odd, then n is even Thus, p is “n 3 +5” is odd, q is “n is even” Assume p and  q –Assume that n 3 +5 is odd, and n is odd Since n is odd: –n=2k+1 for some integer k (definition of odd numbers) –n 3 +5 = (2k+1) 3 +5 = 8k 3 +12k 2 +6k+6 = 2(4k 3 +6k 2 +3k+3) –As n = 2(4k 3 +6k 2 +3k+3) is 2 times an integer, n must be even –Thus, we have concluded q Contradiction! –We assumed q was false, and showed that this assumption implies that q must be true –As q cannot be both true and false, we have reached our contradiction

13 End of lecture on 31 January 2007

14 A note on that problem… Rosen, section 1.5, question 21 –Prove that if n is an integer and n 3 +5 is odd, then n is even –Here, our implication is: If n 3 +5 is odd, then n is even The indirect proof proved the contrapositive: ¬q → ¬p –I.e., If n is odd, then n 3 +5 is even The proof by contradiction assumed that the implication was false, and showed that led to a contradiction –If we assume p and ¬q, we can show that implies q –The contradiction is q and ¬q Note that both used similar steps, but are different means of proving the implication

15 How others explain proof by contradiction A very poor explanation, IMHO Suppose q is a contradiction (i.e. is always false) Show that ¬p→q is true –Since the consequence is false, the antecedent must be false –Thus, p must be true Find a contradiction, such as (r  ¬r), to represent q Thus, you are showing that ¬p→(r  ¬r) –Or that assuming p is false leads to a contradiction

16 Vacuous proofs Consider an implication: p→q If it can be shown that p is false, then the implication is always true –By definition of an implication Note that you are showing that the antecedent is false

17 Vacuous proof example Consider the statement: –All criminology majors in CS 202 are female –Rephrased: If you are a criminology major and you are in CS 202, then you are female Could also use quantifiers! Since there are no criminology majors in this class, the antecedent is false, and the implication is true

18 Trivial proofs Consider an implication: p→q If it can be shown that q is true, then the implication is always true –By definition of an implication Note that you are showing that the conclusion is true

19 Trivial proof example Consider the statement: –If you are tall and are in CS 202 then you are a student Since all people in CS 202 are students, the implication is true regardless

20 Proof by cases Show a statement is true by showing all possible cases are true Thus, you are showing a statement of the form: is true by showing that:

21 Proof by cases example Prove that –Note that b ≠ 0 Cases: –Case 1: a ≥ 0 and b > 0 Then |a| = a, |b| = b, and –Case 2: a ≥ 0 and b < 0 Then |a| = a, |b| = -b, and –Case 3: a 0 Then |a| = -a, |b| = b, and –Case 4: a < 0 and b < 0 Then |a| = -a, |b| = -b, and

22 The thing about proof by cases Make sure you get ALL the cases –The biggest mistake is to leave out some of the cases Don’t have extra cases –We could have 9 cases in the last example Positive numbers Negative numbers Zero –Those additional cases wouldn’t have added anything to the proof

23 End of lecture on 2 February 2007

24 Proofs of equivalences This is showing the definition of a bi- conditional Given a statement of the form “p if and only if q” –Show it is true by showing (p→q)  (q→p) is true

25 Proofs of equivalence example Rosen, section 1.5, question 40 –Show that m 2 =n 2 if and only if m=n or m=-n –Rephrased: (m 2 =n 2 ) ↔ [(m=n)  (m=-n)] Need to prove two parts: –[(m=n)  (m=-n)] → (m 2 =n 2 ) Proof by cases! Case 1: (m=n) → (m 2 =n 2 ) –(m) 2 = m 2, and (n) 2 = n 2, so this case is proven Case 2: (m=-n) → (m 2 =n 2 ) –(m) 2 = m 2, and (-n) 2 = n 2, so this case is proven –(m 2 =n 2 ) → [(m=n)  (m=-n)] Subtract n 2 from both sides to get m 2 -n 2 =0 Factor to get (m+n)(m-n) = 0 Since that equals zero, one of the factors must be zero Thus, either m+n=0 (which means m=n) or m-n=0 (which means m=-n)

26 Existence proofs Given a statement:  x P(x) We only have to show that a P(c) exists for some value of c Two types: –Constructive: Find a specific value of c for which P(c) exists –Nonconstructive: Show that such a c exists, but don’t actually find it Assume it does not exist, and show a contradiction

27 Constructive existence proof example Show that a square exists that is the sum of two other squares –Proof: = 5 2 Show that a cube exists that is the sum of three other cubes –Proof: = 6 3

28 Non-constructive existence proof example Rosen, section 1.5, question 50 Prove that either 2* or 2* is not a perfect square –A perfect square is a square of an integer –Rephrased: Show that a non-perfect square exists in the set {2* , 2* } Proof: The only two perfect squares that differ by 1 are 0 and 1 –Thus, any other numbers that differ by 1 cannot both be perfect squares –Thus, a non-perfect square must exist in any set that contains two numbers that differ by 1 –Note that we didn’t specify which one it was!

29 Uniqueness proofs A theorem may state that only one such value exists To prove this, you need to show: –Existence: that such a value does indeed exist Either via a constructive or non-constructive existence proof –Uniqueness: that there is only one such value

30 Uniqueness proof example If the real number equation 5x+3=a has a solution then it is unique Existence –We can manipulate 5x+3=a to yield x=(a-3)/5 –Is this constructive or non-constructive? Uniqueness –If there are two such numbers, then they would fulfill the following: a = 5x+3 = 5y+3 –We can manipulate this to yield that x = y Thus, the one solution is unique!

31 Counterexamples Given a universally quantified statement, find a single example which it is not true Note that this is DISPROVING a UNIVERSAL statement by a counterexample  x ¬R(x), where R(x) means “x has red hair” –Find one person (in the domain) who has red hair Every positive integer is the square of another integer –The square root of 5 is 2.236, which is not an integer

32 A note on counterexamples You can DISPROVE something by showing a single counter example –You are finding an example to show that something is not true You cannot PROVE something by example Example: prove or disprove that all numbers are even –Proof by contradiction: 1 is not even –(Invalid) proof by example: 2 is even

33 Mistakes in proofs Modus Badus –Fallacy of denying the hypothesis –Fallacy of affirming the conclusion Proving a universal by example –You can only prove an existential by example! Disproving an existential by example –You can only disprove a universal by example!