Download presentation
Presentation is loading. Please wait.
1
Proof by Induction and contradiction Leo Cheung
2
The TAs Our office is in SHB117, feel free to come if you get problems about the course Or ask your questions in the newsgroup news://news.erg.cuhk.edu.hk/cuhk.cse.csc 2110news://news.erg.cuhk.edu.hk/cuhk.cse.csc 2110
3
The Plan Some basic mathematical background Mathematical Induction Proof by contradiction
4
Background - Summation
5
Background - Product
6
Background - Factorial
7
Mathematical Induction - Idea You want to prove something (call it f(n)) to be true for all natural number n>=1 Step 1: Base case –Prove n=1 (that is f(1)) is true Step 2: “Induction” –Prove that if f(k) is true then f(k+1) is also true, for all k>=1 Done!
8
Why it’s done? All we know (and proved) ▪f(1) is true ▪if f(k) is true than f(k+1) is true for all k >=1
9
Example Base Case (n=0): L.H.S. = 1, R.H.S. = 1(1+1)/2 = 1 Assume f(k) is true, i.e. Then So f(k+1) is also true. By the principal of induction f(n) is true for all n >= 1
10
And lets try Base Case (n=0): L.H.S. = 2 0 = 1, R.H.S. = 2 1 – 1 =1 Assume f(k) is true, i.e. Then So f(k+1) is also true. By the principal of induction f(n) is true for all n >= 0
11
Contradiction-Idea You want to prove f is true then Assume f is false By the assumption, you derive some false statements So the assumption is wrong That means f is true
12
Examples Prove: For all integers n, if n 2 is odd, then n is odd. Assume there is a n such that n 2 is odd and n is even ▪n = 2k for some k ▪n 2 = (2k)x(2k) = 4k 2, which is even ▪Contradiction! So the assumption must be wrong.
13
Examples Prove: There are infinitely many prime numbers. Assume not, there are only n primes p 1, p 2, …, p n ▪Consider k = p 1 p 2 … p n + 1 ▪k is not divisible by any prime p i ▪So k is a prime (other than p 1, p 2,..., p n ) ▪Contradiction!
14
END Exercise will be posted on the course webpage
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.