CS 70 Vivian Fang August 29, 2016 Lecture 3 1 Proof by Contradiction Theorem: There are infinitely many primes. Proof : • Assume finitely many primes: p1 . . . pk • Consider q = p1 · · · p2 · · · . . . px + 1 • q cannot be one of the primes as it is larger than any pi . • q has prime divisor p (00 p > 100 = R), which is one of pi . • p divides both x = p1 · p2 . . . pk and q, and divides x − q. • =⇒ p|x − q =⇒ p ≤ x − q = 1. • So p ≤ 1. This contradicts R. We did not prove “the product of the first k primes plus 1 is prime”. The chain of reasoning started with a false statement. 2 Proof by Cases (“Divide and Conquer”) Theorem: x5 − x + 1 = 0 has no solution in the rationals. Proof : First, a lemma. Lemma: If x is a solution to x5 − x + 1 = 0 and x = a/b for a, b ∈ Z, then both a and b are even. (this is just one case!) Reduced form ab : a and b cannot be even. =⇒ no rational solution. Proof of Lemma: Assume the solution of the form a/b. a a ( )5 − + 1 = 0 b b Multiply by b5 = a5 − ab4 + b5 = 0 1 • Case 1: a odd, b odd: odd - odd + odd = even. But odd - odd + odd is odd! Case is not possible. • Case 2: a odd, b even: odd - odd + even = even. Case is not possible. • Case 3: a odd, b even: odd - even + even = even. Case is not possible. • Case 4: a even, b even: even - even + even = even. Case is possible. Theorem: There exist irrational x and y such that xy is rational. √ Let x = y = 2. y • Case 1: x = to Case 2. √ √ 2 2 is rational. We’ll just assume that this case is true, and move on √ √2 • Case 2: x = 2 is irrational. √ √ √2 – New values: x = 2 , y = 2. √ √ √2 √ 2 – xy = ( 2) 2 = 2 = 2. y One of these cases hold so the theorem is true. Which on holds? We don’t know! =/ Be careful! Theorem: 3 = 4 Proof : Assume 3 = 4. Start with 12 = 12. Divide one side by 3 and the other by 4 to get 4 = 3. By commutativity theorem holds. Don’t assume what you want to prove. Theorem: 1 = 2 Proof : For x = y, we have (x2 − xy) = x2 − y 2 x(x − y) = (x + y)(x − y) x = (x + y) x = 2x 1=2 Here, dividing by zero is no good. 3 3.1 Proof by Induction The Natural Numbers “The proof strategy is akin to climbing a ladder. But the ladder’s infinite, so you don’t have to climb the whole ladder.” 0, 1, 2, 3, . . . , n, n + 1, n + 2, n + 3, ... 2 3.2 7-Year Old Gauss • Teacher: Hello class. • Please add the numbers from 1 to 100. • Gauss: It’s 5050! ( (100)(101) ) 2 • How? Child Gauss Claim: ∀n ∈ N, n P i= i=1 n(n + 1) 2 • Idea: Assume predicate for n = k. k P i= i=1 • Is predicate true for n = k + 1? k+1 P i= i=1 k P k(k + 1) . 2 i + (k + 1) = i=1 (k + 1)(k + 2) 2 • How about k + 2? Same argument for k + 1 works! Induction Step. • Base case: k = 1. • This is the idea! Not the formal way to prove it. Induction is the canonical way of proving statements of the form (∀k ∈ N)(P (k)). The Basic Form: • Prove P (0). Base Case. • P (k) =⇒ P (k + 1) – Assume P (k), Induction Hypothesis. – Prove P (k + 1), Induction Step. • You can use P (k) to prove P (k + 1). This may seem circular but you’re not using the exact same predicate to prove P (k + 1). You are not proving P (k) =⇒ P (k). A Visualization: • The predicates are an infinite sequence of dominos. • Prove that they all fall down, starting with P (0). Theorem: For all natural numbers n, 1 + 2 + . . . + n = Proof : • Base case: Does 0 = 0(0 + 1) ? Yes. 2 3 n(n + 1) 2 • Induction Hypothesis: 1 + . . . + n = n(n + 1) 2 n(n + 1) + (n + 1) 2 n2 + n + 2(n + 1) = 2 2 n + 3n + 2 = 2 (n + 1)(n + 2) = 2 1 + . . . + n + (n + 1) = • (∀n ∈ N)(P (n) =⇒ P (n + 1)). Proved! Theorem: Any map can be colored so that hose regions share an edge have different colors. Not proving this. Too hard. Theorem: Any map formed by dividing the plane into regions by drawing straight lines can be properly colored with two colors. The coloring is symmetric (you can swap red and blue). Proof : • Base Case: Just one line (R on top, B on bottom) • 1. Add vertical line. 2. Get inerited color for split regions. 4 3. Switch on one side of new line. (Fix conflicts along one line, and make no new ones.) • Algorithm gives (∀n ∈ N)(P (n) =⇒ P (n + 1)). Proved! 5
© Copyright 2026 Paperzz