CS104:Discrete Structures Chapter 2: Proof Techniques.

Slides:



Advertisements
Similar presentations
With examples from Number Theory
Advertisements

Discrete Math Methods of proof 1.
Introduction to Proofs
Chapter 3 Direct Proof and Proof by Contrapositive
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
Induction and recursion
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.
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:
Copyright © Zeph Grunschlag,
1 Indirect Argument: Contradiction and Contraposition.
Introduction to Proofs ch. 1.6, pg. 87,93 Muhammad Arief download dari
Introduction to Proofs Goals 1.Introduce notion of proof & basic proof methods. 2.Distinguish between correct & incorrect arguments 3.Understand & construct.
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
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
Review I Rosen , 3.1 Know your definitions!
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.
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 Math/CSE 1019C: Discrete Mathematics for Computer Science Fall 2011 Suprakash Datta Office: CSEB 3043 Phone: ext
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.
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,
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
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.
Introduction to Proofs
Chapter 5. Section 5.1 Climbing an Infinite Ladder Suppose we have an infinite ladder: 1.We can reach the first rung of the ladder. 2.If we can reach.
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.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Methods of Proof Lecture 4: Sep 20 (chapter 3 of the book, except 3.5 and 3.8)
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.
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.
Chapter 1 Logic and Proof.
The Foundations: Logic and Proofs
CSE15 Discrete Mathematics 02/01/17
CSE15 Discrete Mathematics 02/08/17
Proof methods We will discuss ten proof methods: Direct proofs
Methods of Proof CS 202 Epp, chapter 3.
Proof Techniques.
The Foundations: Logic and Proofs
Indirect Proof by Contradiction Direct Proof by Cases
CS 220: Discrete Structures and their Applications
Methods of Proof Rosen 1.7, 1.8 Lecture 4: Sept 24, 25.
Foundations of Discrete Mathematics
Foundations of Discrete Mathematics
Introduction to Proofs
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Methods of Proof Rosen 1.7, 1.8 Lecture 4: Sept, 2019.
Presentation transcript:

CS104:Discrete Structures Chapter 2: Proof Techniques

2 Introduction to Proofs (In Book: Chapter 1-sec 1.8)

Introduction to Proofs 3 A proof : is a valid argument that establishes the truth of a mathematical statement. There are two types of proofs :  Formal proof : where all steps are supplied and the rules for each step in the argument are given  Informal proof : where more than one rule of inference may be used in each step, where steps may be skipped, where the axioms being assumed and rule of inference used are not explicitly stated.

Introduction to Proofs (Cont.) 4  A theorem is a statement that can be shown to be true.  Less important theorems sometimes are called propositions.  (Theorems can also be referred to as facts or results.)  it may be the universal quantification of a conditional statement with one or more premises and a conclusion, or it may be another type of logical statements.  Proof is a valid argument (sequence of statements) that establishes the truth of a theorem. And the statements to be used in proofs include:  Axioms or postulates (statement assumed to be true without proof)  Hypothesis (premises) of the theorem  Previously proven theorems  Rules of inference used to draw conclusions and to move from one step to another o Ex: If x is positive integer then x+1 is positive integer. Axioms Hypothesis Proven theorems New Theorems Rules of inference

Introduction to Proofs (Cont.) 5  Lemma is a less important theorem that is helpful in the proof of other results  A corollary is a theorem that can be established directly from a theorem that has been proved.  A conjuncture is a statement that is being proposed to be a true statement, usually on the basis of some partial evidence. When a proof of a conjuncture is found, the conjuncture becomes a theorem

Introduction to Proofs (Cont.) 6  Methods of proving theorems:  Direct proofs  Proof by Contraposition  Vacuous Proofs  Trivial Proofs  Proofs by Contradiction  Proof by cases

Methods of proving theorems – Direct proofs 7  A direct proof of a conditional statement p  q is constructed when the first step is the assumption that p is true; subsequent steps are constructed using rules of inference, with the final step showing that q must also be true. A direct proof shows that a conditional statement p  q is true by showing that if p is true then q must also be true. In a direct proof, we assume that p is true and use axioms, definitions, and previously proven theorems, together with rules of inference, to show that q must also be true.

8  Definition : The integer n is even if there exists an integer k such that n = 2k, and n is odd if there exists an integer k such that n = 2k + 1.  Note that every integer is either even or odd, and no integer is both even and odd.  Two integers have the same parity when both are even or both are odd; they have opposite parity when one is even and the other is odd. Methods of proving theorems – Direct proofs

9  Example Give a direct proof of the theorem : “If n is an odd integer, then n 2 is odd.”  Proof: We assume that n is odd. ( hypothesis ) => n = 2k + 1, where k is some integer.( definition of odd number ) => n 2 = (2k+1) 2 = 4k 2 + 4k + 1 = 2(2k 2 +2k)+1 ( By squaring ) Since r = 2k 2 +2k is an integer ( Axiom ) => n 2 = 2r+1 is odd.  Example : Use a direct proof to show that : “If n is an even integer, then n 2 is even.” We can square both sides of the equation n = 2k + 1 to obtain a new equation that expresses n 2

Methods of proving theorems – Direct proofs 10  Can we use this methodology to prove theorems of the form ∀ x(P(x) → Q(x)) ? Proofs of theorems of this type that are not direct proofs, that is, that do not start with the premises and end with the conclusion are called indirect proof.  Example Give a direct proof of the theorem : “if m and n are both perfect squares, then nm is also perfect”  Proof: We assume that m and n are both perfect squares : m = s 2 and n = t 2 m.n = s 2. t 2 = (st) 2 m.n is also perfect

Methods of proving theorems – Proof by Contrapositio n 11  An extremely useful type of indirect proof is known as proof by contraposition ( p → q equivalent to ¬ q → ¬ p )  Methodology of Proof by Contraposition : It is proving the conditional statement p → q by showing that its contrapositive, ¬ q → ¬ p, is true to prove that p → q ¬ q¬ q ¬ q¬ q Begin with is true as a premise using ( axioms, definitions previously proven theorems with rules of inference ) ¬ p¬ p ¬ p¬ p must be also true It is showing the contrapositive ¬ q → ¬ p is true End with is true

12  Example Prove that if n is an integer and 3n + 2 is odd, then n is odd.  Proof: We assume that the conclusion of the conditional statement “if 3n + 2 is odd, then n is odd” is false. => n = 2k, where k is some integer. ( definition of even number ) => 3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1)( Substituting 2k for n ) Since r = 3k + 1 is an integer( Axiom ) => 3n + 2 = 2r is even. => We assume that n is even.( hypothesis ) ( definition of even number ) Because the negation of the conclusion of the conditional statement implies that the hypothesis is false, the original conditional statement is true. We have proved the theorem “if 3n + 2 is odd, then n is odd” Methods of proving theorems – Proof by Contrapositio n ( Substituting 2k for n in hypthesis : 3n+2 )

13  Example Use an indirect proof to show that “if n 2 is odd then n is odd”  Proof: The contraposition is “if n is not odd then n 2 is not odd ” => n = 2k, where k is some integer.( definition of even number ) => n 2 = (2k) 2 = 4k 2 = 2(2k 2 ) Since r = 2k 2 is an integer( Axiom ) => n 2 = 2r => We Assume that n is not odd i.e., n is even( hypothesis ) ( definition of not odd number ) Methods of proving theorems – Proof by Contrapositio n Thus, if n 2 is odd then n is odd is true

14  Example Prove that if n = ab where a and b are positive integers then a   n or b   n  Proof: Let p=“a  n”, q=“b  n” and r=“n=ab” We want to prove that r  p  q => The contraposition is  (p  q )   r (By definition) =>  p   q   r (De Morgan’s law) Now, assume that a  n and b  n (  p   q) => a.b   n.  n = n (by multiplying above twos) => ab  n =>  r which contradicts the statement n = ab Because the negation of the conclusion of the conditional statement implies that the hypothesis is false, the original conditional statement is true. Methods of proving theorems – Proof by Contrapositio n

Methods of proving theorems – Vacuous Proofs 15  Vacuous Proofs A conditional statement p  q is TRUE if p is FALSE. If we can show that p is False, then we have a proof, called vacuous proof, of the conditional statement p  q.  Example Show that the proposition P(0) is true, where P(n) is “If n > 1, then n 2 > n” and the domain consists of all integers.  Proof: Note that P(0) is “If 0 > 1, then 0 2 > 0.” We can show P(0) using a vacuous proof. Indeed, the hypothesis 0 > 1 is false. This tells us that P(0) is automatically true.  Example Prove that if he is alive and he is dead then the sun is ice cold  Proof: Since the hypothesis is always false the implication is vacuously true.

Methods of proving theorems – Trivial Proofs 16  Trivial Proofs A conditional statement p  q is TRUE if q is True. If we can show that q is True, then we have a proof, called Trivial proof, of the conditional statement p  q.  Example Let P(n) be “If a and b are positive integers with a ≥ b, then a n ≥ b n where the domain consists of all nonnegative integers. Show that P(0) is true.  Proof: The proposition P(0) is “If a ≥ b, then a 0 ≥ b 0.” Because a 0 = b 0 = 1, the conclusion of the conditional statement “If a ≥ b, then a 0 ≥ b 0 ” is true. Hence, this conditional statement, which is P(0), is true  Example Prove that if x=2 then x 2  0 for all real numbers  Proof: Since x 2  0 is true then the implication is trivially true. (we didn’t use the fact x=2)  Example Use a trivial proof to show that if n > 1 then n 2 ≥ n for all integers

Methods of proving theorems – Proofs by Contradiction 17  Example Prove that  2 is irrational by giving a proof by contradiction.  Proof: Let p is “  2 is irrational “ To start a proof by contradiction, we suppose that ¬ p is true, "It is not the case that is irrational” Let  p is  2 is rational ( hypothesis )  2 = a/b for some integers a and b (b  0) and a and b have no common factors We can square both sides of the equation  2 = a/b => 2 = a 2 /b 2 Definition: The real number r is rational if there exist integers p and q with q  0 such that r = p/q and p and q have no common factors A real number that is not rational is called irrational

Methods of proving theorems – Proofs by Contradiction 18 We have now shown that the assumption of ¬ p leads to the equation √2 = a/b, where  a and b have no common factors,  but both a and b are even ( that is, 2 divides both a and b) That is our assumption of ¬ p leads to the contradiction, ¬ p must be false. That is, the statement p, “ √2 is irrational,” is true. We have proved that √2 is irrational. => 2b 2 = a 2 By the definition of an even integer it follows that a 2 is even, so we can substituting with a = 2c for some integer => 2b 2 = (2c) 2 = 4c 2  b 2 = 2c 2 By the definition of an even integer it follows that b 2 is even, i.e. b is even ( Dividing both sides of this equation by 2 )

Methods of proving theorems – Proofs by Contradiction 19  To prove a conditional statement p  q by contradiction we prove that: ( p   q  F is true ) which is equivalent to p  q.  Example Give a proof by contradiction of the theorem : “If 3n + 2 is odd, then n is odd.”  Proof: Suppose that 3n+2 is odd and n is even [p   q] => n = 2r (hypothesis  q, definition of even numbers) =>3n = 6r (multiply both sides by 3) => 3n+2=2+6r (add 2 to both sides) => 3n+2=2(1+3r) => 3n+2=2k (Let k=1+3r) => Thus 3n+2 is even which is false (a contradiction !) Therefore the implication is true.

Methods of proving theorems – Proofs of Equivalence 20  Proofs of Equivalence To prove a theorem that is a biconditional statement, that is, a statement of the form p ↔ q, we show that p → q and q → p are both true.  Example Prove the theorem: “If n is an integer, then n is odd if and only if n 2 is odd.” “if n is odd then n 2 is odd” proved in Example 5 “ n 2 is odd then n is odd” proved in Example 7  Therefore, n is even if and only if n 2 is even  Proving equivalence of several propositions: If we want to prove that p1  p2  p3…  pn  Then it is sufficient to prove p1  p2,, p2  p3 … pn  p1

Methods of proving theorems – Counterexample 21  Counterexample : To show that a statement of the form ∀ xP(x) is false, we need only find a counterexample, that is, an example x for which P(x) is false.  E.g. Prove that “For all real numbers x 2 > x” is false X=0.5 is a counterexample since > 0.5 is not true  To show that this statement is false, we look for a counterexample which is 3 because we cannot write 3 as the sum of the squares of two integers. To show this is the case, note that the only perfect squares not exceeding 3 are: (0 2 = 0 & 1 2 = 1), but 3  1+0. Therefore the statement is false  Example Show that the statement: “Every positive integer is the sum of the squares of two integers” is false.

Methods of proving theorems – proof by cases 22  Proof by cases : A proof by cases must cover all possible cases that arise in a theorem. Each case may cover an infinite number of instances  Example Prove "if n is an integer then n 2 ≥ n".  Proof: We can prove that n 2 ≥ n for every integer by considering three cases, when n = 0, when n ≥ 1, and when n ≤ -1. Case 1: When n = 0, since 0 2 = 0, 0 2 >= 0. So, n 2 ≥ n is true. Case 2: When n ≥ 1, From n ≥ 1, we get n 2 ≥ n (by multiplying with n). Case 3: When n ≤ -1, since n is negative, n 2 is positive, so n 2 ≥ n. Hence, if n is an integer then n 2 ≥ n.

Methods of proving theorems – proof by cases 23  Example Use a proof by cases to prove that |xy| = |x||y|, where x and y real numbers. Hint: Consider all 4 cases: x and y positive or negative

Mistakes in Proofs 24  There are many common errors made in constructing mathematical and the most common errors are mistakes in arithmetic and basic algebra.  Each step of a mathematical proof needs to be correct and the conclusion needs to follow logically from the steps that precede it. Be careful! Many mistakes result from the introduction of steps that do not logically follow from those that precede it

Mistakes in Proofs 25  Example What is wrong with this famous supposed “proof” that 1 = 2 ?  Proof: Suppose a and b are two equal positive integers. Steps : 1. a = b 2. a 2 = ab 3. a 2 - b 2 = ab - b 2 4. (a − b)(a + b) = b(a − b) 5. a + b = b 6. 2b = b 7. 2 = 1 Reason ( Given) (Multiply both sides of (1) by a) (Subtract b2 from both sides of (2)) (Factor both sides of (3)) (Divide both sides of (4) by a − b ) (Replace a by b in (5) because a = b & simplify) (Divide both sides of (6) by b)  Can you find the error  The error is that a − b equals zero; division of both sides of an equation by the same quantity is valid as long as this quantity is not zero. Every step is valid except for one, step 5 where we divided both sides by a − b

Mistakes in Proofs 26  Example What is wrong with this “proof” ? “Theorem:” If n 2 is positive, then n is positive.  Proof: Suppose that n 2 is positive. Because the conditional statement : “If n is positive, then n 2 is positive” is true, we can conclude that n is positive. Then our hypothesis is Q(n). (1)  Solution : Let P(n) be “n is positive” and Q(n) be “n 2 is positive.” This statement “If n is positive, then n 2 is positive” is the statement: ∀ n(P (n) → Q(n)). (2) From the hypothesis (1) and the statement (2): We cannot conclude P(n) because we are not using a valid rule of inference. Instead, we can prove that by using counterexample A counterexample supplied by n = −1 for which n 2 = 1 is positive, but n is negative.

End of Chapter 2