cs70 lecture 2 outline quick background and notation
play

CS70: Lecture 2. Outline. Quick Background and Notation. Direct - PowerPoint PPT Presentation

CS70: Lecture 2. Outline. Quick Background and Notation. Direct Proof (Forward Reasoning). Theorem: For any a , b , c Z , if a | b and a | c then a | b c . Integers closed under addition. Proof: Assume a | b and a | c a , b Z = a


  1. CS70: Lecture 2. Outline. Quick Background and Notation. Direct Proof (Forward Reasoning). Theorem: For any a , b , c ∈ Z , if a | b and a | c then a | b − c . Integers closed under addition. Proof: Assume a | b and a | c a , b ∈ Z = ⇒ a + b ∈ Z b = aq and c = aq ′ where q , q ′ ∈ Z Today: Proofs!!! a | b means “a divides b”. b − c = aq − aq ′ = a ( q − q ′ ) Done? 1. By Example (or Counterexample). 2 | 4? Yes! ( b − c ) = a ( q − q ′ ) and ( q − q ′ ) is an integer so 2. Direct. (Prove P = ⇒ Q . ) 7 | 23? No! a | ( b − c ) 3. by Contraposition (Prove P = ⇒ Q ) 4 | 2? No! 4. by Contradiction (Prove P .) Works for ∀ a , b , c ? Formally: a | b ⇐ ⇒ ∃ q ∈ Z where b = aq . Argument applies to every a , b , c ∈ Z . 5. by Cases 3 | 15 since for q = 5, 15 = 3 ( 5 ) . Direct Proof Form: Goal: P = ⇒ Q A natural number p > 1, is prime if it is divisible only by 1 and Assume P . itself. ... Therefore Q. Another direct proof. The Converse Another Direct Proof. Let D 3 be the 3 digit natural numbers. Theorem: For n ∈ D 3 , if the alternating sum of digits of n is divisible Theorem: ∀ n ∈ D 3 , ( 11 | n ) = ⇒ ( 11 | alt. sum of digits of n ) by 11, than 11 | n . Proof: Assume 11 | n . n = 100 a + 10 b + c = 11 k = ⇒ ∀ n ∈ D 3 , ( 11 | alt. sum of digits of n ) = ⇒ 11 | n 99 a + 11 b +( a − b + c ) = 11 k = ⇒ Thm: ∀ n ∈ D 3 , ( 11 | alt. sum of digits of n ) = ⇒ 11 | n Examples: a − b + c = 11 k − 99 a − 11 b = ⇒ n = 121 Alt Sum: 1 − 2 + 1 = 0. Divis. by 11. As is 121. Is converse a theorem? a − b + c = 11 ( k − 9 a − b ) = ⇒ a − b + c = 11 ℓ where ℓ = ( k − 9 a − b ) ∈ Z n = 605 Alt Sum: 6 − 0 + 5 = 11 Divis. by 11. As is 605 = 11 ( 55 ) ∀ n ∈ D 3 , ( 11 | n ) = ⇒ ( 11 | alt. sum of digits of n ) That is 11 | alternating sum of digits. Proof: For n ∈ D 3 , n = 100 a + 10 b + c , for some a , b , c . Example: n = 264. 11 | n ? 11 | 2 − 6 + 4? Note: similar proof to other. In this case every = ⇒ is ⇐ ⇒ Assume: Alt. sum: a − b + c = 11 k for some integer k . Often works with arithmetic properties except when multiplying by 0. Add 99 a + 11 b to both sides. We have. 100 a + 10 b + c = 11 k + 99 a + 11 b = 11 ( k + 9 a + b ) Left hand side is n , k + 9 a + b is integer. = ⇒ 11 | n . Theorem: ∀ n ∈ N , ( 11 | alt. sum of digits of n ) ⇐ ⇒ ( 11 | n ) Direct proof of P = ⇒ Q : Assumed P : 11 | a − b + c . Proved Q : 11 | n .

  2. Proof by Contraposition Another Contrapostion... Proof by Contradiction Lemma: For every n in N , n 2 is even = ⇒ n is even. ( P = ⇒ Q ) Thm: For n ∈ Z + and d | n . If n is odd then d is odd. √ √ n 2 is even, n 2 = 2 k , ... Theorem: 2 is irrational. 2 k even? n = 2 k + 1 what do we know about d ? b ) 2 � = 2. Must show: For every a , b ∈ Z , ( a Proof by contraposition: ( P = ⇒ Q ) ≡ ( ¬ Q = ⇒ ¬ P ) What to do? P = ’ n 2 is even.’ ........... ¬ P = ’ n 2 is odd’ A simple property (equality) should always “not” hold. Goal: Prove P = ⇒ Q . Proof by contradiction: Q = ’n is even’ ........... ¬ Q = ’n is odd’ Assume ¬ Q ⇒ n 2 is odd. Theorem: P . ...and prove ¬ P . Prove ¬ Q = ⇒ ¬ P : n is odd = ¬ P = ⇒ P 1 ··· = ⇒ R Conclusion: ¬ Q = ⇒ ¬ P equivalent to P = ⇒ Q . n = 2 k + 1 Proof: Assume ¬ Q : d is even. d = 2 k . n 2 = 4 k 2 + 4 k + 1 = 2 ( 2 k + k )+ 1. ¬ P = ⇒ P 1 ··· = ⇒ ¬ R d | n so we have n 2 = 2 l + 1 where l is a natural number.. ¬ P = ⇒ False n = qd = q ( 2 k ) = 2 ( kq ) ... and n 2 is odd! Contrapositive: True = ⇒ P . Theorem P is proven. n is even. ¬ P ¬ Q = ⇒ ¬ P so P = ⇒ Q and ... Contradiction Proof by contradiction: example Product of first k primes.. √ Theorem: 2 is irrational. Theorem: There are infinitely many primes. √ Assume ¬ P : 2 = a / b for a , b ∈ Z . Proof: Did we prove? Reduced form: a and b have no common factors. ◮ Assume finitely many primes: p 1 ,..., p k . ◮ “The product of the first k primes plus 1 is prime.” √ ◮ Consider ◮ No. 2 b = a q = p 1 × p 2 ×··· p k + 1 . ◮ The chain of reasoning started with a false statement. 2 b 2 = a 2 = 4 k 2 Consider example.. ◮ q cannot be one of the primes as it is larger than any p i . a 2 is even = ◮ 2 × 3 × 5 × 7 × 11 × 13 + 1 = 30031 = 59 × 509 ⇒ a is even. ◮ q has prime divisor p (” p > 1” = R ) which is one of p i . ◮ There is a prime in between 13 and q = 30031 that divides ◮ p divides both x = p 1 · p 2 ··· p k and q , and divides q − x , a = 2 k for some integer k q . ◮ = ⇒ p | q − x = ⇒ p ≤ q − x = 1. b 2 = 2 k 2 ◮ Proof assumed no primes in between. ◮ so p ≤ 1. ( Contradicts R . ) b 2 is even = ⇒ b is even. The original assumption that “the theorem is false” is false, a and b have a common factor. Contradiction. thus the theorem is proven.

  3. Proof by cases. (“divide-and-conquer” strategy) Proof by cases. Be careful. Theorem: x 5 − x + 1 = 0 has no solution in the rationals. Theorem: There exist irrational x and y such that x y is rational. Theorem: 3 = 4 √ Proof: First a lemma... Let x = y = 2. Lemma: If x is a solution to x 5 − x + 1 = 0 and x = a / b for a , b ∈ Z , Proof: Assume 3 = 4. Start with 12 = 12. Divide one side by 3 and √ √ 2 is rational. Done! then both a and b are even. Case 1: x y = the other by 4 to get 4 = 3. By commutativity theorem holds. 2 √ Reduced form a √ b : a and b can’t both be even! + Lemma 2 is irrational. Don’t assume what you want to prove! Case2: 2 = ⇒ no rational solution. Theorem: 1 = 2 √ √ √ 2 , y = Proof of lemma: Assume a solution of the form a / b . Proof: For x = y , we have ◮ New values: x = 2 2. ( x 2 − xy ) = x 2 − y 2 � 5 � a ◮ 2 � √ − a / b + 1 = 0 √ √ √ x ( x − y ) = ( x + y )( x − y ) � √ 2 √ √ 2 = 2 = 2 . b 2 ∗ x y = 2 = 2 2 x = ( x + y ) multiply by b 5 , x = 2 x a 5 − ab 4 + b 5 = 0 1 = 2 Thus, in this case, we have irrational x and y with a rational x y (i.e., Case 1: a odd, b odd: odd - odd +odd = even. Not possible. Dividing by zero is no good. 2). Case 2: a even, b odd: even - even +odd = even. Not possible. Also: Multiplying inequalities by a negative. Case 3: a odd, b even: odd - even +even = even. Not possible. One of the cases is true so theorem holds. Case 4: a even, b even: even - even +even = even. Possible. P = ⇒ Q does not mean Q = ⇒ P . Question: Which case holds? Don’t know!!! The fourth case is the only one possible, so the lemma follows. Summary Direct Proof: To Prove: P = ⇒ Q . Assume P . reason forward, Prove Q . By Contraposition: To Prove: P = ⇒ Q Assume ¬ Q . Prove ¬ P . By Contradiction: To Prove: P Assume ¬ P . Prove False . By Cases: informal. Universal: show that statement holds in all cases. Existence: used cases where one is true. √ √ Either 2 and 2 worked. √ √ √ 2 worked. or 2 and 2 Careful when proving! Don’t assume the theorem. Divide by zero. Watch converse. ...

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend