10/17/2015 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(1) Dr.Saad Alabbad Department of Computer Science

Slides:



Advertisements
Similar presentations
With examples from Number Theory
Advertisements

Discrete Mathematics University of Jazeera College of Information Technology & Design Khulood Ghazal Mathematical Reasoning Methods of Proof.
Discrete Math Methods of proof 1.
Introduction to Proofs
Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Elementary Number Theory and Methods of Proof
CS128 – Discrete Mathematics for Computer Science
CS104 : Discrete Structures
CSE115/ENGR160 Discrete Mathematics 02/07/12
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
So far we have learned about:
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Introduction to Proofs ch. 1.6, pg. 87,93 Muhammad Arief download dari
1 Section 3.3 Mathematical Induction. 2 Technique used extensively to prove results about large variety of discrete objects Can only be used to prove.
Fall 2002CMSC Discrete Structures1 Let’s proceed to… Mathematical Reasoning.
Adapted from Discrete Math
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
Mathematics Review Exponents Logarithms Series Modular arithmetic Proofs.
Introduction to Proofs
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 03: PROOFS Section 1.5 Jarek Rossignac CS1050: Understanding.
MATH 224 – Discrete Mathematics
1 Methods of Proof CS/APMA 202 Epp, chapter 3 Aaron Bloomfield.
CS 103 Discrete Structures Lecture 07b
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!
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
Proofs1 Elementary Discrete Mathematics Jim Skon.
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.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Discrete Structures (DS)
Chap 3 –A theorem is a statement that can be shown to be true –A proof is a sequence of statements to show that a theorem is true –Axioms: statements which.
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,
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.
CSci 2011 Discrete Mathematics Lecture 4 CSci 2011.
CS104:Discrete Structures Chapter 2: Proof Techniques.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
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.
Lecture 10 Methods of Proof CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
CSci 2011 Discrete Mathematics Lecture 5 CSci 2011.
Chapter 1, Part III: Proofs With Question/Answer Animations Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without.
Notions & Notations - 1ICOM 4075 (Fall 2010) UPRM Department of Electrical and Computer Engineering University of Puerto Rico at Mayagüez Fall 2010 ICOM.
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
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.
Lecture 2: Proofs and Recursion. Lecture 2-1: Proof Techniques Proof methods : –Inductive reasoning Lecture 2-2 –Deductive reasoning Using counterexample.
The Foundations: Logic and Proofs
CSE15 Discrete Mathematics 02/01/17
CSE15 Discrete Mathematics 02/08/17
Discrete Mathematics Logic.
Methods of Proof CS 202 Epp, chapter 3.
Proof Techniques.
The Foundations: Logic and Proofs
CS 220: Discrete Structures and their Applications
Discrete Mathematics Logic.
Foundations of Discrete Mathematics
Foundations of Discrete Mathematics
Introduction to Proofs
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Presentation transcript:

10/17/2015 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(1) Dr.Saad Alabbad Department of Computer Science Office # SR 068 Tel #

10/17/ Rules of Inference – Valid Arguments in Propositional Logic  Argument: An argument is a sequence of statements that end with a conclusion.  Valid: An argument is valid if and only if it is impossible for all premises (preceding statements) to be true and the conclusion to be false. By valid, we mean that the conclusion of the argument must follow from the truth of the premises of the argument.  Consider the arguments: “If you have a current password, then you can log onto the network.” “You have a current password.” Therefore, “You can log onto the network.”

10/17/ Rules of Inference – Valid Arguments in Propositional Logic  The conclusion “You can log onto the network” must be true when the premises “If you have a current password, then you can log onto the network” and “You have a current password” are true.  Let p= “You have a current password.” and q=“You can log onto the network.” Then the argument has the form where  is the symbol that denotes “therefore.”  The statement ((p → q) ⌃ p) → q is a tautology. p → q p  q

10/17/ Rules of Inference – Rule for Propositional Logic  The argument form with premises p1, p2, …., pn and conclusion q is valid, when (p1 ⌃ p2 ⌃ …. ⌃ pn) → q is a tautology.  To show that an argument is valid, instead of showing by truth table, we can establish the validity of some relatively simple argument forms, called rules of inference, which can be used as building blocks to construct more complicated valid argument forms.  The tautology ((p → q) ⌃ p) → q is the basis of the rule of inference called modus ponens or law of detachment.

10/17/ Rules of Inference – Rules for Propositional Logic  Example: Suppose that the conditional statement “If it snows today, then we will go skiing” and its hypothesis “It is snowing today”, are true. Then by modus ponens, it follows that the conclusion of the conditional statement, “We will go skiing” is true.  Q1: Determine whether the argument given here is valid and determine whether its conclusion must be true because of the validity of the argument.

10/17/ Rules of Inference – Rules for Propositional Logic

10/17/ Rules of Inference – Rule for Propositional Logic  Example: State which rule of inference is the basis of the following argument: “It is below freezing now. Therefore, it is either below freezing or raining now”.  Sol: Let p= “It is below freezing now.” and q = “It is raining now.” Then this argument is of the form: p  p v q This is an argument that uses the addition rule.  Q2: State which rule of inference is the basis of the following argument: “It is below freezing and raining now. Therefore, it is below freezing”.

10/17/ Introduction to Proofs  A theorem is a statement that can be shown to be true (usually important statement)  Less important theorem sometimes are called propositions  A proof is a sequence of statements (valid argument) to show that a theorem is true  The statements to be used in proofs include:  Axioms (statement assumed to be true without proof)  Ex: If x is positive integer then x+1 is positive integer.  Hypothesis (premises) of the theorem  Previously proven theorems  Rules of inference used to draw conclusions and to move from one step to another

10/17/2015 Prepared by Dr.Saad Alabbad9 Introduction to Proofs  A theorem is a statement that can be shown to be true (usually important statement)  Less important theorem sometimes are called propositions  A proof is a sequence of statements (valid argument) to show that a theorem is true  The statements to be used in proofs include:  Axioms (statement assumed to be true without proof)  Ex:If x is positive integer then x+1 is positive integer.  Hypothesis (premises) of the theorem  Previously proven theorems  Rules of inference used to draw conclusions and to move from one step to another Rules of inference Axioms Hypothesis proven theorems New theorem

10/17/2015 Prepared by Dr.Saad Alabbad10 Introduction to Proofs  Example:  If I have a car (C) I will drive to Makkah(M). My boss gave me 40,000 (G) or Fired me(F). If I have SR40,000 (H) then I have a car(C). My boss did not fire me. Therefore I will drive to Makkah(M). 1.G  F Hypothesis 2.  F Hypothesis 3.G Disjunctive syllogism rule using 1 and 2 4.G  H Axiom 5.H  CHypothesis 6.G  C Hypo. syllogism using 4,5 7.C Modus ponens using 3 and 6 8.C  M Hypothesis 9.M Modus ponens using 7 and 8

10/17/2015 Prepared by Dr.Saad Alabbad11 Methods of proving theorems: Direct proofs  A direct proof of a conditional statement H 1  H 2 …  H n  C is established by assuming the truth of all hypothesis and using rules of inference, axioms and proven theorems to assert the truth of the conclusion  Example: prove that “if n is even then n 2 is even” 1.Assume that n is even (hypothesis) 2.Therefore n=2k where k is integer (definition of even number) 3.By squaring n=2k we get n 2 =(2k) 2 =4k 2 =2(2k 2 ) 4.Since 2K 2 is integer (Axiom. See p.A-5) 5.Therefore n 2 =2r is even

10/17/2015 Prepared by Dr.Saad Alabbad12 Methods of proving theorems: Proof by contraposition  An indirect proof of a conditional statement p  q is a direct proof of its contraposition  q   p.  Example 1: prove that “if n 2 is even then n is even” The contraposition is “if n is not even then n 2 is not even” 1.Assume that n is not even i.e n is odd (hypothesis) 2.Therefore n=2k+1 where k is integer (definition of odd number) 3.By squaring n=2k+1 we get  n 2 =(2k+1) 2  =4k 2 +4k+1  =2(2k 2 +2k)+1= 2r+1 4.Since 2k 2 +2k is integer (Axiom. See p.A-5) 5.Therefore n 2 =2r+1 is not even (odd)

10/17/2015 Prepared by Dr.Saad Alabbad13 Methods of proving theorems: Proof by contraposition  Example 2: prove that if n=ab then a  n or b  n where a and b are positive integers 1.Let p be a  n, q be b  n and r be n=ab 2.We want to prove that r  p  q 3.The contraposition is  ( p  q )   r (By definition) 4.Which is equivalent to  p   q   r (De Morgan’s law) 5.Now assume that a  n and b  n (  p   q ) 6.Then a.b  n.  n=n (by multiplying the two inequalities) 7.Therefore ab  n 8.Which is the same as  r

10/17/2015 Prepared by Dr.Saad Alabbad14 Methods of proving theorems: Vacuous and Trivial Proofs  Vacuous Proof If we know that p is false then p  q is vacuously true.  Example 1: prove that if x 2  0 then 1=2 where x is a real number  Since x 2  0 for every real number then the implication is vacuously true  Example 2: prove that if he is alive and he is dead then the sun is ice cold.  Since the hypothesis is always false the implication is vacuously true.  Trivial Proof If we know q is true then p  q is trivially true.  Example 1: prove that if x=2 then x 2  0 for all real numbers  Since x 2  0 is true then the implication is trivially true.(we didn’t use the fact x=2) pq p  q FFTTFFTT FTFTFTFT TTFTTTFT pq FFTTFFTT FTFTFTFT TTFTTTFT

10/17/2015 Prepared by Dr.Saad Alabbad15 Methods of proving theorems: Proofs by Contradiction(1)  In proof by contradiction it is shown that if some statement were false, a logical contradiction occurs, hence the statement must be true  Show that  2 is irrational 1.Let p be  2 is irrational 1.Assume  p is true “  2 is rational ” 1.Then  2=a/b where gcd(a,b)=1, b  0 and a  0 (Definition of rational numbers) 2.Squaring both sides we get 2=a 2 /b 2 3.It follows that 2a 2 =b 2 4.Hence b 2 is even (Definition of even numbers) 5.Which means that b is even (Proved theorem. see slide 5) 6.But a 2 =b 2 /2=(2k) 2 /2=2k 2 so a is even also (Definition of even numbers and proved thoeorm) 7.But this is a contradiction since 7 and 8 contradict the fact that gcd(a,b)=1 since if a and b are even then 2 is a common divisor.

10/17/2015 Prepared by Dr.Saad Alabbad16 Methods of proving theorems: Proofs by Contradiction(2)  Why is this method valid ?  The contradiction forces us to reject our assumption because our other steps based on that assumption are logical and justified. The only “mistake” that we could have made was the assumption itself.  Be careful!  Sometimes the contradiction comes from a mistake in the steps of the proof and not from the assumption. This makes the proof invalid.  Example: prove that 1=2 1.Suppose that 2  1 and a=b for some a. 2.Then 2b  b [multiply by b] 3.a+b  b [2b=b+b=a+b by hypothesis] 4.(a-b)(a+b)  b(a-b) [multiply by a-b] 5.a 2 -b 2  ab-b 2 6.a 2  ab [subtract b 2 from both sides] 7.a  b which contradicts our assumption that a=b 8.Hence it follows that 1=2  Can you find the error 

10/17/2015 Prepared by Dr.Saad Alabbad17 Methods of proving theorems: Proofs by Contradiction(3)  To prove a conditional statement p  q by contradiction we prove that p   q  F is true which is equivalent to p  q.  Example:  If 3n+2 is odd then n is odd  Suppose that 3n+2 is odd and n is even [ p   q] Then 1. n=2r [hypothesis  q and definition of even numbers] 2.3n=6r [multiply 1 by 3] 3.3n+2=2+6r [add 2 to both sides] 4.3n+2=2(1+3r) 5.3n+2=2k [let k=1+3r] 6.Thus 3n+2 is even which is false (a contradiction !) 7.Therefore the implication is true.

10/17/2015 Prepared by Dr.Saad Alabbad18 Methods of proving theorems: Proofs of Equivalence and Disproof by counter example  Proofs of Equivalence  To prove p  q we have to prove p  q and q  p  Example: prove “n is even if and only if n 2 is even”  “if n is even then n 2 is even” proved in slide 4  “n 2 is even then n is even” proved in slide 5  Therefore, n is even if and only if n 2 is even  Proving equivalence of several propositions  If we want to prove that p 1  p 2  p 3 …  p n  Then it is sufficient to prove p 1  p 2,, p 2  p 3 … p n  p 1  Disproof by Counterexample  Prove that “For all real numbers x 2 >x” is false  X=0.5 is a counterexample since >0.5 is not true

10/17/2015 Prepared by Dr.Saad Alabbad19 Methods of proving theorems: Exhaustive Proof and Proof by Cases(1)  Sometimes there is no single argument that works for all possible cases appearing in the statement. So we have to consider all different cases and/or instances.  (1) Exhaustive Proof In this type of proofs. All possible instances are relatively small. So we prove each instance separately. Example: Prove that (n+1) 3 >= 3 n if n is a positive integer with n  4. We only have 4 instances to consider, n = 1, 2, 3, and 4. Proof of case n = 1: (1+1) 3 >= 3 1 i.e 4 >= 3 which is true. Check n = 2, 3, and 4 similarly.  Notes  Human can perform exhaustive proofs with limited number of possibilities. Computers can consider much larger number of instances/cases. However  Instances/cases must be finite and enumerable

10/17/2015 Prepared by Dr.Saad Alabbad20 Methods of proving theorems: Exhaustive Proof and Proof by Cases(2)  (2) Proof by Cases In this type of proofs. The proof covers each possible case. Each case may cover an infinite number of instances Example: Prove "if n is an integer then n 2 >= n". Case 1: n = 0. Since 0 2 = 0, 0 2 >= 0. Case 2 Case 2: n >= 1. n >= 1 implies n 2 >= n. Case 3: n n..  Question: prove that |xy|=|x||y|  Hint: Consider all 4 cases depending on whether x is positive or x is negative and whether or not y is negative.  Common errors in with exhaustive proof and proof by cases:  Draw conclusion from non-exhaustive examples  Not covering all possible cases

10/17/2015 Prepared by Dr.Saad Alabbad21 Methods of proving theorems: Existence Proofs  Many theorems state that an object with certain properties exists. I.e.,  xP(x) where P is a predicate. A proof of such a theorem is called an EXISTENCE PROOF. There are two kinds:  (1) Constructive Existence Proof The proof is established be giving example a such that P(a) is true Example: Prove "there is a positive integer that can be written as the sum of cubes in two different ways." Proof: consider 1729= = Finding such examples may require computer assistance. Check n = 2, 3, and 4 similarly.

10/17/2015 Prepared by Dr.Saad Alabbad22 Methods of proving theorems: Existence Proofs (2) Non-constructive Existence Proof  The proof is established by showing that an object a with P(a) is true must exist without explicitly demonstrating one. Proofs by contradiction are usually used in such cases.  Example: Let x 1,x 2,..,x n be positive integers such that their average is m. prove that there exists x i such that x i ≥m  Proof: suppose that there is no such number.i,e x 1  m, x 2  m … x n  m By adding these inequalities we get : x 1 + x 2 +…+ x n  nm Dividing by n : (x 1 + x 2 +…+ x n )/n  m But since the average is defined as (x 1 + x 2 +…+ x n )/n Then we have m  m which is a contradiction. Therefore there must be a number x i such that x i ≥m. But we can not specify which number is that.

10/17/2015 Prepared by Dr.Saad Alabbad23 Methods of proving theorems: Uniqueness Proofs  Some theorems state that there is exactly one element with a certain property.  A proof of such a theorem is called a UNIQUENESS PROOF.  Strategy here is (1) show that an element x with the desired property exists (2) show that any other y (y != x) does not have the property. I.e., if x and y both have the property, then x must equal y.  Example: prove that the equation 3x+5=9 has a unique solution.  (1) There exists a solution namely x=4/3  (2) suppose that y and z are solutions then 3y+5=9=3z+5 So 3y=3z Dividing by 3 we get y=z This proves that the solution is unique

10/17/2015 Prepared by Dr.Saad Alabbad24 END