CSE15 Discrete Mathematics 02/01/17

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 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
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(
So far we have learned about:
Copyright © Zeph Grunschlag,
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
Introduction to Proofs
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.
CS 103 Discrete Structures Lecture 07b
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
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.
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.
Section 3.3: Mathematical Induction Mathematical induction is a proof technique that can be used to prove theorems of the form:  n  Z +,P(n) We have.
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,
Copyright © Curt Hill Proofs An Introduction.
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.
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.
CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2012 CSE
Methods of Proof Lecture 4: Sep 20 (chapter 3 of the book, except 3.5 and 3.8)
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.
Introduction to Proofs Goals 1.Introduce notion of proof & basic proof methods. 2.Distinguish between correct & incorrect arguments 3.Understand & construct.
Chapter 1 Logic and Proof.
Hubert Chan (Chapters 1.6, 1.7, 4.1)
Chapter 1 Logic and Proof.
The Foundations: Logic and Proofs
CSE15 Discrete Mathematics 02/08/17
Proof methods We will discuss ten proof methods: Direct proofs
Methods of Proof CS 202 Epp, chapter 3.
Predicate Calculus Validity
Proof Techniques.
Methods of Proof A mathematical theorem is usually of the form pq
Hubert Chan (Chapters 1.6, 1.7, 4.1)
Explorations in Artificial Intelligence
The Foundations: Logic and Proofs
Mathematical Reasoning
Methods of Proof. Methods of Proof Definitions A theorem is a valid logical assertion which can be proved using Axioms: statements which are given.
Week #6 – 30 September / 2/4 October 2002 Prof. Marie desJardins
CS 220: Discrete Structures and their Applications
Applied Discrete Mathematics Week 1: Logic
CS 220: Discrete Structures and their Applications
Methods of Proof Rosen 1.7, 1.8 Lecture 4: Sept 24, 25.
Foundations of Discrete Mathematics
Mathematical Reasoning
Introduction to Proofs
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Methods of Proof Rosen 1.7, 1.8 Lecture 4: Sept, 2019.
Presentation transcript:

CSE15 Discrete Mathematics 02/01/17 Ming-Hsuan Yang UC Merced

1.7 Introduction to proofs Proof: valid argument that establishes the truth of a mathematical statement, e.g., theorem A proof can use hypotheses, axioms, and previously proven theorems Formal proofs: can be extremely long and difficult to follow Informal proofs: easier to understand and some of the steps may be skipped, or axioms are not explicitly stated

Some terminology Theorem: a mathematical statement that can be shown to be true Proposition: less important theorem Axiom (postulate): a statement that is assumed to be true Lemma: less important theorem that is helpful in the proof of other results Corollary: a theorem that can be established directly from a theorem that has been proved Conjecture: a statement proposed to be true, but not proven yet

Direct proofs of p→q First assume p is true Then show q must be true (using axioms, definitions, and previously proven theorems) So the combination of p is true and q is false never occurs Thus p→q is true Straightforward But sometimes tricky and require some insight

Example Definition: Show “If n is an odd integer, then n2 is odd” 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 an integer is either even or odd Show “If n is an odd integer, then n2 is odd”

Example Note the theorem states By definition of odd integer, n=2k+1, where k is some integer n2=(2k+1)2=4k2+4k+1=2(2k2+2k)+1 By definition of odd integer, we conclude n2 is an odd integer Consequently, we prove that if n is an odd integer, then n2 is odd

Example “If m and n are both perfect squares, then nm is also a perfect square (an integer a is a perfect square if there is an integer b such that a=b2) By definition, there are integers s and t such that m=s2, and n=t2 Thus, mn=s2t2=(st)2 (using commutativity and associativity of multiplication) We conclude mn is also a perfect square

Proof by contraposition Indirect proof: sometimes direct proof leads to dead ends Based on Use ┐q as hypothesis and show ┐p must follow

Example Show that “if n is an integer and 3n+2 is odd, then n is odd” Use Proof by contraposition: Assume n is even, i.e., n=2k, for some k It follows 3n+2=3(2k)+2=6k+2=2(3k+1) Thus 3n+2 is even

Example Prove that if n=ab, where a and b are positive integers, then

Vacuous proof Prove p→q is true Vacuous proof: If we show p is false and then claim a proof of p→q However, often used to establish special case Show that p(0) is true when p(n) is “If n>1, then n2>n” and the domain consists of all integers The fact 02>0 is false is irrelevant to the truth value of the conditional statement

Trivial proof Trivial proof: a proof of p→q that uses the fact q is true Often important when special cases are proved Let p(n) be “If a and b are positive integers with a≥b, then an ≥bn where the domain consists of all integers The proposition p(0) is “If a≥b, then a0 ≥b0”. a0 ≥b0 is true, hence the conditional statement p(0) is true

Example Definition: the real number r is rational if there exist integers p and q with q≠0 such that r=p/q A real number that is not rational is irrational Prove that the sum of two rational numbers is rational (i.e., “For every real number r and every real number s, if r and s are rational numbers, then r+s is rational”) Direct proof? Proof by contraposition?

Direct proof Let r=p/q and s=t/u where p, q, t, u, are integers and q≠0, and u≠0. r+s=p/q+t/u=(pu+qt)/qu Since q≠0 and u≠0, qu≠0 Consequently, r+s is the ratio of two integers. Thus r+s is rational

Example Prove that if n is an integer and n2 is odd, then n is odd Direct proof? Proof by contraposition?

Proof by contradiction Suppose we want to prove a statement p Further assume that we can find a contradiction q such that ┐p→q is true Since q is false, but ┐p→q is true, we can conclude ┐p is false, which means p is true The statement ┐r˄r is contradiction, we can prove that p is true if we can show that ┐p→(┐r˄r), i.e., if p is not true, then there is a contradiction

Example Show that at least 4 of any 22 days must fall on the same day of the week Let p be the proposition “at least 4 of any 22 days fall on the same day of the week” Suppose ┐p is true, which means at most 3 of 22 days fall on the same day of the week Which implies at most 21 days could have been chosen because for each of the days of the week, at most 3 of the chosen days could fall on that day If r is the statement that 22 days are chosen. Then, we have ┐p→(┐r˄r)

Example Prove that is irrational by giving a proof by contradiction Let p be the proposition “ is irrational” ┐p: is rational, and thus where a and b have no common factors Thus 2=a2/b2, 2b2=a2, and thus a2 is even a2 is even and so a is even (can easily show if n2 is even, then n is even). Let a=2c for some integer c, 2b2=a2=4c2, and thus b2=2c2, and b2 is even

Example Since b2 is even, b must be even ┐p leads to where and b have no common factors, and both a and b are even (and thus a common factor), a contradiction That is, the statement “ is irrational” is true

Proof by contradiction Can be used to prove conditional statements First assume the negation of the conclusion Then use premises and negation of conclusion to arrive a contradiction Reason: p→q≡((p˄┐q)→F)

Proof by contradiction Can rewrite a proof by contraposition of a conditional statement p→q as proof by contradiction Proof by contraposition: show if ┐q then ┐p Proof by contradiction: assume p and ┐q are both true Then use steps of ┐q→┐p to show ┐p is true This leads to ┐q→p˄┐p, a contradiction

Example Proof by contradiction “If 3n+2 is odd, then n is odd” Let p be “3n+2 is odd” and q be “n is odd” To construct a proof by contradiction, assume both p and ┐q are both true Since n is even, let n=2k, then 3n+2=6k+2= 2(3k+1). So 3n+2 is even, i.e. ┐p, Both p and ┐p are true, so we have a contradiction

Example Note that we can also prove by contradiction that p→q is true by assuming that p and ┐q are both true, and show that q must be also true This implies q and ┐q are both true, a contradiction Can turn a direct proof into a proof by contradiction

Proof of equivalence To prove a theorem that is a biconditional statement p↔q, we show p→q and q →p The validity is based on the tautology (p↔q) ↔((p→q)˄(q →p))

Example Prove the theorem “If n is a positive integer, then n is odd if and only if n2 is odd” To prove “p if and only if q” where p is “n is odd” and q is “n2 is odd” Need to show p→q and q→p “If n is odd, then n2 is odd”, and “If n2 is odd, then n is odd We have proved p→q and q→p in previous examples and thus prove this theorem with iff

Equivalent theorems p1↔p2↔…↔pn For i and j with 1≤i≤n and 1≤j≤n, pi and pj are equivalent [p1↔p2↔…↔pn] ↔[(p1→ p2)˄(p2→ p3) ˄…˄(pn→ p1)] More efficient than prove pi→ pj for i≠j with 1≤i≤n and 1≤j≤n Order is not important as long as we have chain

Example Show that these statements about integer n are equivalent P1: n is even P2: n-1 is odd P3: n2 is even Show that by p1→ p2 and p2→ p3 and p3→ p1 p1→ p2 : (direct proof) Suppose n is even, then n=2k for some k. thus n-1=2k-1=2(k-1)+1 is odd

Example p2→ p3 : (direct proof) Suppose n-1 is odd, then n-1=2k+1 for some k. Hence n=2k+2, and n2=(2k+2)2=4k2+8k+4=2(2k2+4k+2) is even p3→ p1: (proof by contraposition) That is, we prove that if n is not even, then n2 is not even. This is the same as proving if n is odd, then n2 is odd (which we have done)

Counterexample To show that a statement is false, all we need to do is to find a counterexample, i.e., an example x for which p(x) is false

Example Show that “Every positive integer is the sum of the squares of two integers” is false An counterexample is 3 as it cannot be written as the sum of the squares to two integers Note that the only perfect squares not exceeding 3 are 02=0 and 12=1 Furthermore, there is no way to get 3 as the sum of two terms each of which is 0 or 1

Mistakes in proofs What is wrong with this proof “1=2”? a=b (given) a2=ab (multiply both sides of 1 by a) a2-b2 =ab-b2 (subtract b2 from both sides of 2) (a-b)(a+b)=b(a-b) (factor both sides of 3) a+b=b (divide both sides of 4 by a-b) 2b=b (replace a by b in 5 as a=b and simply) 2=1 (divide both sides of 6 by b)

What is wrong with this proof? “Theorem”: If n2 is positive, then n is positive “Proof”: Suppose n2 is positive. As the statement “If n is positive, then n2 is positive” is true, we conclude that n is positive p(n): If n is positive, q(n): n2 is positive. The statement is and the hypothesis is q(n). From these, we cannot conclude p(n) as no valid rule of inference can be applied Counterexample: n=-1

What is wrong with this proof? “Theorem”: If n is not positive, then n2 is not positive “Proof”: Suppose that n is not positive. Because the conditional statement “If n is positive, then n2 is positive” is true, we can conclude that n2 is not positive. From we cannot conclude as no valid rule of inference can be used Counterexample: n=-1

Circular reasoning Is the following argument correct? Suppose that n2 is even, then n2=2k for some integer k. Let n=2y for some integer y. This shows that n is even Wrong argument as the statement “n=2y for some integer y” is used in the proof No argument shows n can be written as 2y Circular reasoning as this statement is equivalent to the statement being proved

Proofs Learn from mistakes Even professional mathematicians make mistakes in proofs Quite a few incorrect proofs of important results have fooled people for years before subtle errors were found Some other important proof techniques Mathematical induction Combinatorial proof