Download presentation
Presentation is loading. Please wait.
Published byAron Hamilton Modified over 8 years ago
1
Reading and Writing Mathematical Proofs Spring 2016 Lecture 2: Basic Proving Techniques II
2
Reading and Writing Mathematical Proofs Previously on:
3
Definition Mathematical proof A convincing argument for the reader to establish the correctness of a mathematical statement without any doubt
4
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
5
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
6
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
7
Overview Basic Proving Techniques 1. Forward-backward method 2. Mathematical induction 3. Case analysis 4. Proof by contradiction
8
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
9
Basic Example
10
Basic Proving Techniques II Today on: The proving cookbook…
11
Today: “Proving Teletubbies are unlikable!” “How to prove you are cool (and own a Ferrari).” “How to store way too many pigeons.”
12
Case Analysis A) Suitcase B) Bookcase C) In case …
13
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
14
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
15
Basic Example Theorem I do not like any teletubby. Let’s prove P ⇒ Q
16
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
17
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
18
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
19
Example
20
Often omitted
21
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]
22
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]
23
Practice 1
25
Practice 2 Theorem Among any 6 people there are 3 mutual friends or 3 mutual strangers.
26
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.
27
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.
28
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
29
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
30
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
31
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
32
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
33
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
34
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
35
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. □
36
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. □
37
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”
38
Proof by Contradiction It’s elementary…
39
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”
40
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!
41
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.
42
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)
43
Example
49
Example 2
50
Practice
51
Practice 2
53
Loop Invariant More on proving loops…
54
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]
55
Basic Example sum = 0 for i = 1 to A.length do sum = sum + A[i]
56
Basic Example sum = 0 for i = 1 to A.length do sum = sum + A[i]
57
Basic Example sum = 0 for i = 1 to A.length do sum = sum + A[i]
58
Tips and Tricks
59
sum = 0 for i = 1 to A.length do sum = sum + A[i]
60
Tips and Tricks sum = 0 for i = 1 to A.length do sum = sum + A[i]
61
Tips and Tricks sum = 0 for i = 1 to A.length do sum = sum + A[i]
62
Tips and Tricks sum = 0 for i = 1 to A.length do sum = sum + A[i]
63
Tips and Tricks
64
Notes 1. for i = n downto 1 2. do stuff 1. while x 2 < n 2. do x = x + 1 1. while x ≤ n 2. do x = x + 2 Termination values? i = 0 x = ⌈√n⌉ x = n+1 or x = n+2
65
Example
75
More More on Loop Invariants and more examples on Wednesday!
76
Reading and Writing Mathematical Proofs Next time on:
77
Next time! “Mono-chromatic horses!” “Matching match sticks” “Circles around trees!” IH
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.