Reading and Writing Mathematical Proofs Spring 2016 Lecture 2: Basic Proving Techniques II.

Slides:



Advertisements
Similar presentations
Is it rational or irrational?
Advertisements

With examples from Number Theory
Introduction to Proofs
Chapter 3 Elementary Number Theory and Methods of Proof.
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,
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
Copyright © Cengage Learning. All rights reserved.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Proof Points Key ideas when proving mathematical ideas.
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.
CS5371 Theory of Computation
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 Goals 1.Introduce notion of proof & basic proof methods. 2.Distinguish between correct & incorrect arguments 3.Understand & construct.
Mathematical Induction Readings on induction. (a) Weiss, Sec. 7.2, page 233 (b) Course slides for lecture and notes recitation. Every criticism from a.
CSE115/ENGR160 Discrete Mathematics 03/29/11 Ming-Hsuan Yang UC Merced 1.
TR1413: Discrete Mathematics For Computer Science Lecture 1: Mathematical System.
Lecture , 3.1 Methods of Proof. Last time in 1.5 To prove theorems we use rules of inference such as: p, p  q, therefore, q NOT q, p  q, therefore.
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
Reading and Writing Mathematical Proofs Spring 2014 Lecture 1: Proofs in Textual Form.
Reading and Writing Mathematical Proofs Autumn 2015 Lecture 1: Proofs in Textual Form.
Introduction to Proofs
Reading and Writing Mathematical Proofs
Discrete Maths Objective to introduce mathematical induction through examples , Semester 2, Mathematical Induction 1.
MATH 224 – Discrete Mathematics
1 Inference Rules and Proofs (Z); Program Specification and Verification Inference Rules and Proofs (Z); Program Specification and Verification.
Section 3.1: Proof Strategy Now that we have a fair amount of experience with proofs, we will start to prove more difficult theorems. Our experience so.
Proofs1 Elementary Discrete Mathematics Jim Skon.
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.
Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques.
Discrete Maths: Induction/1 1 Discrete Maths Objective – –to introduce mathematical induction through examples , Semester
1 Put your name if you want your attendance credit. Please put your as well. CSC 320 is done at 11:30 so I did NOT fill in the box for 11:30 for.
Mathematical Induction I Lecture 4: Sep 16. This Lecture Last time we have discussed different proof techniques. This time we will focus on probably the.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
Reading and Writing Mathematical Proofs Spring 2015 Lecture 4: Beyond Basic Induction.
Theory of Computation, Feodor F. Dragan, Kent State University 1 TheoryofComputation Spring, 2015 (Feodor F. Dragan) Department of Computer Science Kent.
Copyright © Zeph Grunschlag, Induction Zeph Grunschlag.
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.
Discrete Structures & Algorithms More on Methods of Proof / Mathematical Induction EECE 320 — UBC.
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.
CSE373: Data Structures and Algorithms Lecture 2: Proof by Induction Linda Shapiro Winter 2015.
INDUCTION Slides of Ken Birman, Cornell University.
Copyright © Zeph Grunschlag, Induction Zeph Grunschlag.
CS104:Discrete Structures Chapter 2: Proof Techniques.
Introduction to Proofs
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.
Reading and Writing Mathematical Proofs Spring 2016 Lecture 1: Basic Proving Techniques I.
Methods of Proof Lecture 4: Sep 20 (chapter 3 of the book, except 3.5 and 3.8)
Section 1.7. Section Summary Mathematical Proofs Forms of Theorems Direct Proofs Indirect Proofs Proof of the Contrapositive Proof by Contradiction.
Proof And Strategies Chapter 2. Lecturer: Amani Mahajoub Omer Department of Computer Science and Software Engineering Discrete Structures Definition Discrete.
Introduction to Proofs Goals 1.Introduce notion of proof & basic proof methods. 2.Distinguish between correct & incorrect arguments 3.Understand & construct.
CSE15 Discrete Mathematics 02/01/17
CSE373: Data Structures and Algorithms Lecture 2: Proof by Induction
The Foundations: Logic and Proofs
Brief Review of Proof Techniques
CS 220: Discrete Structures and their Applications
CS 220: Discrete Structures and their Applications
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Advanced Analysis of Algorithms
Copyright © Cengage Learning. All rights reserved.
Introduction to Proofs
Presentation transcript:

Reading and Writing Mathematical Proofs Spring 2016 Lecture 2: Basic Proving Techniques II

Reading and Writing Mathematical Proofs Previously on:

Definition Mathematical proof A convincing argument for the reader to establish the correctness of a mathematical statement without any doubt

Two Proof Formats This should be in the back of your mind Theorem If x is odd, then x 2 is odd Proof Since x is odd, there exists a k ℤ such that x = 2k + 1. Then, x 2 = (2k + 1) 2 = 4k 2 + 4k + 1 = 2(2k 2 + 2k) + 1 = 2m+1. As there exists a m ℤ such that x 2 = 2m + 1, x 2 is odd. □ This is what you should write down

Proof Detail When is a proof detailed enough?  Depends on what the reader will accept as true statements  A proof with more detail has “more obvious” statements…  … but is also much longer  A good proof must find the right balance

Proving Tips Tips for writing proofs 1. State the proof techniques you’re using 2. Keep a linear flow Proving process different from written proof 3. Describe every step clearly in words 4. Don’t use complicated notation 5. Make sure your axioms are actually “obvious” What is obvious to you may not be obvious to the reader 6. Finish your proof Connect everything with what you were trying to prove

Overview Basic Proving Techniques 1. Forward-backward method 2. Mathematical induction 3. Case analysis 4. Proof by contradiction

Forward Backward Method Theorem If my hamsters do excessive exercise, I will be tired in the morning. Proof My hamsters do excessive exercise They are running in their exercise wheel The exercise wheel is making noise Something is keeping me awake I do not get a good night’s sleep I am tired in the morning

Basic Example

Basic Proving Techniques II Today on: The proving cookbook…

Today: “Proving Teletubbies are unlikable!” “How to prove you are cool (and own a Ferrari).” “How to store way too many pigeons.”

Case Analysis A) Suitcase B) Bookcase C) In case …

Case Analysis Case analysis Prove the theorem by considering a small number of cases P 1, P 2, and P 3 describe the different cases Don’t forget to prove: P 1 or P 2 or P 3 (one of the cases must hold)! Let’s prove P ⇒ Q P 1 ⇒ Q P 2 ⇒ Q P ⇒ P 1 ⋁ P 2 ⋁ P 3 P 3 ⇒ Q

Usage When to use? Generally useful for a “for all”-quantifier  Can be broken down into a small number of configurations Examples An integer is odd or even An integer is positive, negative, or zero x ≤ y or y < x A quadrilateral is convex or not

Basic Example Theorem I do not like any teletubby. Let’s prove P ⇒ Q

Basic Example Theorem For any teletubby, I do not like it. Case 1 (Tinky-Winky): Is purple. I don’t like purple. Thus, I do not like Tinky-Winky. Let’s prove P ⇒ Q P 1 ⇒ Q

Basic Example Theorem For any teletubby, I do not like it. Case 2 (Po): Has a circle on his head. I don’t like circles. Thus, I do not like Po. Let’s prove P ⇒ Q P 2 ⇒ Q

Basic Example Theorem For any teletubby, I do not like it. Case 1 (Tinky-Winky): … Case 4 (Dispy): … As any teletubby must fall into these categories (by definition), I do not like any teletubby. Let’s prove P ⇒ Q P 1 ⇒ Q P 4 ⇒ Q P ⇒ P 1 ⋁ P 2 ⋁ P 3 ⋁ P 4

Example

Often omitted

Loop Invariant At the start of iteration i, large is the biggest even value in A[1..i-1]. Maintenance We assume the loop invariant (LI) holds at the start of iteration i. Then large is the biggest even value in A[1..i-1]. ….. So we have proven the LI is also true at the start of iteration i+1. Practice 1 Algorithm LargeEven(A) large = 0 for i = 1 to n if A[i] > large and A[i] is even then large = A[i]

Assumption At the start of iteration i, large is the biggest even value in A[1..i-1]. Claim At the start of iteration i+1, large is the biggest even value in A[1..i]. Practice 1 Algorithm LargeEven(A) large = 0 for i = 1 to n if A[i] > large and A[i] is even then large = A[i]

Practice 1

Practice 2 Theorem Among any 6 people there are 3 mutual friends or 3 mutual strangers.

Practice 2 Theorem For any graph G=(V,E) with |V| = 6 vertices there is a complete subgraph of size 3 or an independent set of size 3.

Practice 2 Theorem For any graph G=(V,E) with |V| = 6 vertices there is a complete subgraph of size 3 or an independent set of size 3.

Practice 2 Proof Consider any vertex x V. We consider the following cases: Case (1): x is connected to at least three other vertices in G x could be part of a complete subgraph. When is this not the case? Case (2): x is connected to at most two other vertices of G x could be part of an independent set. When is this not the case? x x

Practice 2 Proof Consider any vertex x V. We consider the following cases: Case (1): x is connected to at least three other vertices in G Let these vertices be u, v, and w. We again consider two cases: Case (2): x is connected to at most two other vertices of G x u v w x u v w

Practice 2 Proof Consider any vertex x V. We consider the following cases: Case (1): x is connected to at least three other vertices in G Let these vertices be u, v, and w. We again consider two cases: Case (2): x is connected to at most two other vertices of G x u v w x u v w

Practice 2 Proof Consider any vertex x V. We consider the following cases: Case (1): x is connected to at least three other vertices in G Let these vertices be u, v, and w. We again consider two cases: Case (2): x is connected to at most two other vertices of G x u v w x u v w

Practice 2 Proof Consider any vertex x V. We consider the following cases: Case (1): x is connected to at least three other vertices in G Let these vertices be u, v, and w. We again consider two cases: Case (2): x is connected to at most two other vertices of G Let u, v, and w be three vertices not connected to x. More cases: w u v x w u v x x u v w x u v w

Practice 2 Proof Consider any vertex x V. We consider the following cases: Case (1): x is connected to at least three other vertices in G Let these vertices be u, v, and w. We again consider two cases: Case (2): x is connected to at most two other vertices of G Let u, v, and w be three vertices not connected to x. More cases: w u v x x u v w x u v w w u v x

Practice 2 Proof Consider any vertex x V. We consider the following cases: Case (1): x is connected to at least three other vertices in G Let these vertices be u, v, and w. We again consider two cases: Case (2): x is connected to at most two other vertices of G Let u, v, and w be three vertices not connected to x. More cases: w u v x w u v x x u v w x u v w

Practice 2 Proof Consider any vertex x V. We consider the following cases: Case (1): x is connected to at least three other vertices in G Let these vertices be u, v, and w. We again consider two cases: Case (a): u, v, and w are independent. Then {u, v, w} is our indep. set. Case (b): u, v, and w are not independent. Without loss of generality, let u and v be connected. Then {x, u, v} is our complete subgraph. Case (2): x is connected to at most two other vertices of G Let u, v, and w be three vertices not connected to x. More cases: Case (a): u, v, and w form a complete subgraph. Done! Case (b): u, v, and w do not form a complete subgraph. Without loss of generality, let u and v be independent. Then {x, u, v} is our indep. set. □

Practice 2 Proof Consider any vertex x V. We consider the following cases: Case (1): x is connected to at least three other vertices in G Let these vertices be u, v, and w. We again consider two cases: Case (a): u, v, and w are independent. Then {u, v, w} is our indep. set. Case (b): u, v, and w are not independent. Without loss of generality, let u and v be connected. Then {x, u, v} is our complete subgraph. Case (2): x is connected to at most two other vertices of G Let u, v, and w be three vertices not connected to x. More cases: Case (a): u, v, and w form a complete subgraph. Done! Case (b): u, v, and w do not form a complete subgraph. Without loss of generality, let u and v be independent. Then {x, u, v} is our indep. set. □

Tips and Tricks Dealing with Cases Cases can be nested! (as in example) Proofs should not have too many cases Many cases are hard to check :( Reducing the number of cases can be helpful to the reader If two cases are basically the same, only give it once Some cases can be avoided with “without loss of generality”

Proof by Contradiction It’s elementary…

Contradiction Proof by Contradiction  Assume the negation and show that “it is impossible”  To prove Q: Assume ¬Q and derive contradiction (false) by forward reasoning  To prove ¬ Q: Assume Q and derive contradiction…  Very powerful technique! “When you have eliminated the impossible, whatever remains, however improbable, must be the truth”

Usage When to use?  Useful when the negation of the statement is easier to work with  Useful when the negation as a premise gives more information E.g. when the negation has a “there exists”-quantifier  Always try this method if you’re stuck!

Basic Example Theorem I never leave my house without my Ferrari Proof For sake of contradiction, assume I did leave my house without my Ferrari. But then I would not look cool (by Lemma X). I am very cool (by Axiom Y). Contradiction, thus the assumption must be false. Hence, I never leave my house without my Ferrari.

Rational Numbers Definition A number x is rational if there exists integers a and b such that x = a / b Examples 6, ⅓, and -⅝ are rational π and e are irrational (not rational)

Example

Example 2

Practice

Practice 2

Loop Invariant More on proving loops…

Loop Invariant What do we want? How do we prove something is true at the end? What do we really know? sum = 0 for i = 1 to A.length do sum = sum + A[i]

Basic Example sum = 0 for i = 1 to A.length do sum = sum + A[i]

Basic Example sum = 0 for i = 1 to A.length do sum = sum + A[i]

Basic Example sum = 0 for i = 1 to A.length do sum = sum + A[i]

Tips and Tricks

sum = 0 for i = 1 to A.length do sum = sum + A[i]

Tips and Tricks sum = 0 for i = 1 to A.length do sum = sum + A[i]

Tips and Tricks sum = 0 for i = 1 to A.length do sum = sum + A[i]

Tips and Tricks sum = 0 for i = 1 to A.length do sum = sum + A[i]

Tips and Tricks

Notes 1. for i = n downto 1 2. do stuff 1. while x 2 < n 2. do x = x while x ≤ n 2. do x = x + 2 Termination values? i = 0 x = ⌈√n⌉ x = n+1 or x = n+2

Example

More More on Loop Invariants and more examples on Wednesday!

Reading and Writing Mathematical Proofs Next time on:

Next time! “Mono-chromatic horses!” “Matching match sticks” “Circles around trees!” IH