Lecture 2: Proofs and Recursion. Lecture 2-1: Proof Techniques Proof methods : –Inductive reasoning Lecture 2-2 –Deductive reasoning Using counterexample.

Slides:



Advertisements
Similar presentations
With examples from Number Theory
Advertisements

Discrete Math Methods of proof 1.
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
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
So far we have learned about:
Copyright © Zeph Grunschlag,
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2.1 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Introduction to Proofs ch. 1.6, pg. 87,93 Muhammad Arief download dari
C OURSE : D ISCRETE STRUCTURE CODE : ICS 252 Lecturer: Shamiel Hashim 1 lecturer:Shamiel Hashim second semester Prepared by: amani Omer.
Methods of Proof & Proof Strategies
Introduction to Proofs
1 Methods of Proof CS/APMA 202 Epp, chapter 3 Aaron Bloomfield.
Copyright © Cengage Learning. All rights reserved. CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF ELEMENTARY NUMBER THEORY AND METHODS OF PROOF.
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.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: More Proofs.
Section 1.8. Section Summary Proof by Cases Existence Proofs Constructive Nonconstructive Disproof by Counterexample Nonexistence Proofs Uniqueness Proofs.
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
Methods of Proofs PREDICATE LOGIC The “Quantifiers” and are known as predicate quantifiers. " means for all and means there exists. Example 1: If we.
CSci 2011 Discrete Mathematics Lecture 6
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.
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.
Proofs, Induction and Recursion Basic Proof Techniques Mathematical Induction Recursive Functions and Recurrence Relations.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 The Foundations: Logic and Proofs Introduction to Proofs.
Methods of Proof Dr. Yasir Ali. Proof A (logical) proof of a statement is a finite sequence of statements (called the steps of the proof) leading 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.
2.3 Methods of Proof.
CS104:Discrete Structures Chapter 2: Proof Techniques.
Introduction to Proofs
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.
1 Introduction to Abstract Mathematics Proof Methods , , ~, ,  Instructor: Hayk Melikya Purpose of Section:Most theorems in mathematics.
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
Chapter 5 1. Chapter Summary  Mathematical Induction  Strong Induction  Recursive Definitions  Structural Induction  Recursive Algorithms.
Proof And Strategies Chapter 2. Lecturer: Amani Mahajoub Omer Department of Computer Science and Software Engineering Discrete Structures Definition Discrete.
Proof Techniques CS160/CS122 Rosen: 1.5, 1.6, 1.7.
CS151: Mathematical Foundations of Computing Mathematical Induction.
Chapter 1 Logic and Proof.
The Foundations: Logic and Proofs
Indirect Argument: Contradiction and Contraposition
CSE15 Discrete Mathematics 02/01/17
CSE15 Discrete Mathematics 02/08/17
Chapter 4 (Part 1): Induction & Recursion
Argument An argument is a sequence of statements.
Proof methods We will discuss ten proof methods: Direct proofs
Methods of Proof CS 202 Epp, chapter 3.
Induction and recursion
Predicate Calculus Validity
Chapter 1: The Foundations: Logic and Proofs
Proof Techniques.
Methods of Proof A mathematical theorem is usually of the form pq
The Foundations: Logic and Proofs
CS201: Data Structures and Discrete Mathematics I
Induction and recursion
Applied Discrete Mathematics Week 2: Proofs
CS 220: Discrete Structures and their Applications
CS 220: Discrete Structures and their Applications
First Order Logic Rosen Lecture 3: Sept 11, 12.
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.
Direct Proof and Counterexample I
Copyright © Cengage Learning. All rights reserved.
Mathematical Induction
Introduction to Proofs
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Methods of Proof Rosen 1.7, 1.8 Lecture 4: Sept, 2019.
Presentation transcript:

Lecture 2: Proofs and Recursion

Lecture 2-1: Proof Techniques Proof methods : –Inductive reasoning Lecture 2-2 –Deductive reasoning Using counterexample –Proof by exhaustion List all possible cases –Direct proof Construct a proof sequence from P to Q –Indirect proof (proof by contradiction) To prove P->Q, we prove P Λ Q  F

Proof methods (cont.) –Proof by contraposition To prove P->Q, we prove Q’ -> P’ –Serendipity Informal proof (optional coverage)

Terminology A few terms to remember: –Axioms: Statements that are always true. Example: Given two distinct points, there is exactly one line that contains them. –Definitions: Used to create new concepts in terms of existing ones. –Theorem: A proposition that has been proved to be true. Two special kinds of theorems: Lemma and Corollary. Lemma: A theorem that is usually not too interesting in its own right but is useful in proving another theorem. Corollary: A theorem that follows quickly from another theorem.

Deductive Reasoning Deductive Reasoning: Drawing a conclusion from a hypothesis based on experience. –Hence the more cases you find where P follows from Q, the more confident you are about the conjecture P  Q. Deductive reasoning looks for a counterexample that disproves the conjecture, i.e. a case when P is true but Q is false. –Often used to “disprove” Counterexample

Example: Prove or disprove that “For every positive integer n, n!  n 2.” –Start testing some cases say, n = 1, 2, 3 etc. –It might seem like it is true for some cases but how far do you test, say n = 4. –We get n! = 24 and n 2 = 16 which is a counter example for this theorem. Hence, even finding a single case that doesn’t satisfy the condition is enough to disprove the theorem.

Counterexample More examples of counterexample: –All animals living in the ocean are fish. –Every integer less than 10 is bigger than 5. Counterexample is not trivial for all cases, so we have to use other proof methods. Conclusion: to disprove a statement, find a counterexample that makes the statement not true.

Exhaustive Proof If dealing with a finite domain in which the proof is to be shown to be valid, then using the exhaustive proof technique, one can go over all the possible cases for each member of the finite domain. Final result of this exercise: you prove or disprove the theorem but you could be definitely exhausted. Key: domain must be finite.

Exhaustive Proof: Example Example: For any non- negative integer less than or equal to 5, the square of the integer is less than or equal to the sum of 10 plus 5 times the integer. nn2n2 10+5nn 2 < 10+5n 0010yes 1115yes 2420yes 3925yes 41630yes 52535yes

Direct Proof –Used when exhaustive proof doesn’t work. Using the rules of propositional and predicate logic, prove P  Q. Assume the hypothesis P and prove Q. Hence, a formal proof would consist of a proof sequence to go from P to Q. Consider the conjecture x is an even integer Λ y is an even integer  the product xy is an even integer.

A Formal Proof Sequence A formal proof sequence might look like the following: 1. x is an even integer Λ y is an even integer 2. x is even integer  (  m)(m is an integer Λ x = 2m) def 3. y is even integer  (  n)(n is an integer Λ y = 2n) 4. x=2m, y=2n 5. xy = (2m) (2n) = 2(2mn) 6. m, n are integers, so 2mn is an integer. 7. (  k)(k is an integer Λ xy = 2k) 8. (  k)(k an integer Λ xy = 2k)  xy is even integer 9. xy is an even integer

Indirect Proof: Proof by Contradiction In a proof of contradiction, one assumes that the hypothesis and the negation of the conclusion are true and then to deduce some contradiction from these assumptions. To prove P->Q, instead we prove P Λ Q  F (note: (P Λ Q  F) equivalent to (P  Q).) Example 1: Prove that “If a number added to itself gives itself, then the number is 0.” –The hypothesis (P) is x + x = x and the conclusion (Q) is x = 0. Hence, the hypotheses for the proof by contradiction are: –x + x = x and x  0 (the negation of the conclusion) –Then 2x = x and x  0, hence dividing both sides by x, the result is 2 = 1, which is a contradiction. Hence, (x + x = x)  (x = 0).

Proof by Contradiction Example 2: Prove “For all real numbers x and y, if x + y  2, then either x  1 or y  1.” –Proof: Say the conclusion is false, i.e. x < 1 and y < 1. (Note: or becomes and in negation.) –Adding the two conditions, the result is x + y < 2. –At this point, this condition is P if P = x + y  2, hence, P Λ P which is a contradiction. Hence, the statement above is true. Example 3: The sum of even integers is even. –Proof: Let x = 2m, y = 2n for integers m and n and assume that x + y is odd. –Then x + y = 2m + 2n = 2k + 1 for some integer k. –Hence, 2*(m - k + n) = 1, where m + n - k is some integer. –This is a contradiction since 1 is not even.

Proof by Contraposition Rule of contraposition (termed “cont” in short). –(Q  P) is equivalent to (P  Q). –To prove P->Q, instead we prove Q’->P’. (Q  P is the contrapositive of P  Q. ) Example: Prove that if the square of an integer is odd, then the integer must be odd –Hence, prove n 2 odd  n odd –To do a proof by contraposition prove n even  n 2 even –If n is even, then it can be written as 2m where m is an integer, i.e. even/odd. –Then, n 2 = 4m 2 which is always even no matter what m 2 is because of the factor 4.

Serendipity Serendipity: Fortuitous happening or something by chance or good luck. Not a formal proof technique. Interesting proofs provided by this method although other methods can be used as well. Example: 342 players in a tennis tournament. One winner in the end. Each match is between two players with exactly one winner and the loser gets eliminated. Prove the total number of matches played in the tournament are 341. –Solution: Only one champion at the end of the tournament, hence 341 losers at the end, hence 341 matches should have been played to have 341 losers.

Summarizing Proof techniques Proof Technique Approach to prove P  Q Remarks DeductiveTo disprove P->Q, find a counterexample that makes P true but Q false Used for disprove Exhaustive Proof Demonstrate P  Q for all cases May only be used for finite number of cases Direct ProofAssume P, deduce QStandard approach Proof by Contraposition Assume Q, derive PUse this Q if as a hypothesis seems to give more ammunition than P would Proof by Contradiction Assume P Λ Q, deduce a contradiction Use this when Q says something is not true SerendipityNot really a proof technique Fun to know

Class Exercise 1.Product of any 2 consecutive integers is even. 2.The sum of 3 consecutive integers is even. 3.Product of 3 consecutive integers is even. 4.The square of an odd integer equals 8k+1 for some integer k. 5.The sum of two rational numbers is rational. 6.For some positive integer x, x + 1/x ≥ 2. End of Lecture 2-1