Your SlideShare is downloading.
×

- 1. Discrete Structures Induction (Ch. 5) Dr. Muhammad Humayoun Assistant Professor COMSATS Institute of Computer Science, Lahore. mhumayoun@ciitlahore.edu.pk https://sites.google.com/a/ciitlahore.edu.pk/dstruct/ A lot of material is taken from the slides of Dr. Atif and Dr. Mudassir 1
- 2. INDUCTION • What is Induction? • Generalization of statements from facts. Statements may be True or False but not both. •The principle of mathematical induction is a useful tool for proving that a certain predicate is true for all natural numbers. •It cannot be used to discover theorems, but only to prove them. 2
- 3. MATHEMATICAL INDUCTION To prove that P(n) is true for all positive integers n, where P(n) is a propositional function, we complete two steps: • BASIS STEP: We verify that P(1) is true. • INDUCTIVE STEP: We show that the conditional statement P(k) → P(k + 1) is true for all positive integers k. The assumption that P(k) is true is called the inductive hypothesis. 3
- 4. Example Suppose that we have an infinite ladder 1. We can reach the first rung of the ladder. 2. If we can reach a particular rung of the ladder, then we can reach the next rung. Then, we can conclude that we are able to reach every rung of this infinite ladder. 4
- 5. Example using Dominoes 5 • An infinite row of dominoes, labeled 1, 2, 3, ..., n • P(n): Domino n is knocked over • P(1): The first domino is knocked over • P(k): The kth domino is knocked over • The fact that – The first domino is knocked over – And whenever the kth domino is knocked over, it also knocks the (k+1)st domino over • Implies that all the dominoes are knocked over
- 6. EXAMPLE 1 at Page#316 Show that 1+2+···+n=n(n+1)/2 for positive integers. Let P(n): (1+2+···+n)=n(n+1)/2 for all +ve integers n. BASIS STEP: P(1) is true, because 1 = 1(1 + 1)2. INDUCTIVE STEP: ∀k [ P(k) -> P(k+1) ] We assume that P(k) holds for an arbitrary positive integer k: 1+2+···+k = k(k+1)/2 ----- (1). Now we have to prove that P(k+1) holds. i.e. 1+2+···+(k+1) = (k+1)(k+1+1)/2. 1+2+···+(k+1) = (k+1)(k+2)/2. ----- (2). 6
- 7. EXAMPLE 1 Cont. Add k+1 in equation 1 on both sides: 1+2+···+k + (k+1) = k(k+1)/2 + (k+1) = [k(k + 1) + 2(k + 1)]/2 = (k + 1)(k + 2)/2 =(k + 1)((k + 1)+1)/2 • This last equation shows that P(k+1) is true under the assumption that P(k) is true. This completes the inductive step. So by mathematical induction we know that P(n) is true for all positive integers n: 1 + 2+· · ·+n = n(n + 1)/2 for all positive integers n. 7 p(k)
- 8. 8 Example 2 at Page# 316 • Conjecture a formula for the sum of the first n positive odd integers. Then prove your conjecture using mathematical induction. • The sums of the first n positive odd integers for n = 1, 2, 3, 4, 5 are • 1 = 1 , 1 + 3 = 4, 1 + 3 + 5 = 9, 1 + 3 + 5 + 7 = 16, 1 + 3 + 5 + 7 + 9 = 25. • 1 + 3 + 5+· · ·+(2n − 1) = n2 Proposition: 1 + 3 + … + (2n-1) = n2 for all integers n≥1. Proof (by induction): 1) Basis step: The statement is true for n=1: 1=12 . 2) Inductive step: Assume the statement is true for some k≥1 (inductive hypothesis) , show that it is true for k+1 .
- 9. Example 2 at Page# 316 (Conti…) Proof (cont.): The statement is true for k: 1+3+…+(2k-1) = k2 (1) We need to show it for k+1: 1+3+…+(2(k+1)-1) = (k+1)2 1+3+…+(2k+1) = (k+1)2 (2) Adding both sides (2k+1) in eqn (1), we get, 1+3+…+(2k-1)+(2k+1) = k2+(2k+1) = (k+1)2 . We proved the basis and inductive steps, so we conclude that the given statement is true. ■ p(k)
- 10. 10 At Page# 318 1 – Hypothesis? P(n) = 1 + 2 + 22 + … + 2n = 2 n+1 – 1 for all non-negative integers n. 2 - Base Step? n = 0 10 = 21-1. not n=1! The base case can be negative, zero, or positive 3 – Inductive Hypothesis Assume P(k) = 1 + 2 + 22 + … + 2k = 2 k+1 – 1 ----- (1). 4 – Inductive Step: show that (k) P(k) P(k+1), assuming P(k). How? P(k+1)= 1 + 2 + 22 + … + 2k+1 = (2k+1+1 – 1)
- 11. Example 3 (Conti…) • Adding 2k+1 both sides in eqn 1 We proved the basis and inductive steps, So, we conclude that the given statement is true. 11 P(k+1)= 1 + 2 + 22 + … + 2k+ 2k+1 = (2k+1 – 1) + 2k+1 p(k) ----- (2). = 2. 2k+1 - 1 P(k+1) = 2k+2 - 1 = 2(k+1)+1 - 1
- 12. EXAMPLE 4 at Page# 318 • Use mathematical induction to prove this formula for the sum of a finite number of terms of a geometric progression with initial term a and common ratio r: • The statement is true for n=0, 12 1 – Hypothesis? P(n) = a + ar + ar2 + … + arn = for all non-negative integers n. 2 - Base Step?
- 13. EXAMPLE 4 (Conti…) at Page# 318 We proved the basis and inductive steps, so, we conclude that the given statement is true 13 3 – Inductive Hypothesis Assume P(k) = P(n) = a + ar + ar2 + … + ark = ----- (1). 4 – Inductive Step: show that (k) P(k) P(k+1), assuming P(k). How? Assume P(k+1) = P(n) = a + ar + ar2 + … + ark+1 = ---- (2) Adding ark+1 both sides in eqn 1 P(k+1) = a + ar + ar2 + … + ark + ark+1 = p(k)