Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mathematical Induction

Similar presentations


Presentation on theme: "Mathematical Induction"— Presentation transcript:

1 Mathematical Induction
and Recursion

2 Mathematical Induction
What is the formula for the sum of the n positive integers? The sum of the first n positive integers for n = 1, 2, 3, 4, 5 are 1=1 1+2 = 3 = 1+2+3 = 6=

3 Mathematical Induction
=10 = =15 = From these values it is reasonable to guess that the sum of the first n positive integers is

4 Let P(n) be the proposition of that 1 + 2 + 3 + …+ n =
The proposition P(n) is true for all positive integers n. In other words, mathematical induction is used to prove proposition of the form n, P(n), where the universe of discourse is the set of positive integers. Note: Sn = [ a (a+ L)] / where a = 1st term; L is the last term ; Sn = sum of the first ‘n’ terms

5 Induction Approach A proof by mathematical induction that P (n) is true for every positive integers n consists of two steps: BASIS STEP: The proposition P (1) is shown to be true. INDUCTIVE STEP : The implication P (k) → P (k+1) is shown to be true for every positive integer k.

6 Inductive hypothesis The statement P (k) for a fixed positive integer k is called the inductive hypothesis. When both steps are completed, then we have proved that n P (n) is true. This proof technique can be stated as, [P(1) k (P (k) → P (k+1))] → n P(n).

7 Or Essentially a “domino effect” principle. Based on a predicate-logic inference rule: P(0) n0 (P(n)P(n+1)) ___________________ n0 P(n)

8 Example 1 Problem: Use mathematical induction to prove that the sum of the first n even positive integers is n(n+1). Solution: Let P(n) denote the proposition that the sum of the first n even positive integers is n(n+1). We must : complete the basis step; that is we must show that P(1) is true. carry out the inductive step; that is we must show that P(k+1) is true when P(k) is assumed to be true.

9 Solution: We must show that P(k+1) is true, assuming that
Note that P(k+1) is the statement that …+ 2k + (2(k+1)) = [ …+ 2k] + (2k+2) = k(k+1) + (2k +2) = k2 + 3k + 2 = (k+1) ((k+1)+1)

10 Solution: Basis Step: P(1) states that the sum of the first one even positive integers is 1(1+1) =2. This is true since the sum of the first even positive integers is 2. Inductive Step: To complete the inductive step we must show that the proposition P(k) → P(k+1) is true for every positive integer k. To do this, suppose that P(k) is true for a positive integer k; that is …+ 2k = k(k+1)

11 Solution: This shows that P(k+1) follows from P(k).
Since P(1) is true and the implication P(k) → P(k+1) is true for all positive integers k, thus P(n) is true for all positive integers n.

12 Example 2 Problem: Use mathematical induction to show that
…+ 2n = 2n+1 – 1 For all non-negative integers n. Solution: Let P(n) denote the proposition that this formula is correct for the nonnegative integer n. Basis Step: P(0) is true since 20 = 1= 21 – 1 Inductive Step: assume that P(k) is true. It must be shown that P(k+1) is true, namely, …+ 2k + 2k+1 = 2(k+1)+1 – 1 =2k+2 – 1

13 Solution: Using the inductive hypothesis P(k), it follows that
…+ 2k + 2k+1 = ( …+ 2k ) +2(k+1) =(2k+1 – 1) +2(k+1) = 2.2(k+1) – 1 = 2k+2 – 1. Thus, P(n) is true for all positive integers n.

14 Example 3 The Fibonacci numbers, f0, f 1, f 2, …. are defined by the equation f0=0, f 1=1, and f n = f n-1+ f n-2, for n = 2,3,4,… Show that whenever n ≥ 3, fn > αn-2, where α = . Solution: Let P(n) be the statement fn > αn-2 . we want to show that P(n) is true whenever n is an integer greater than or equal to 3.

15 Example 3 Basis Step: Note that, f3 = 3 > < 3= f4 .
α2 = * . = < 3= f4 . Thus, P(3) and P(4) are true.

16 Example 3 Inductive Step:
Assume that P(k) is true, namely fk > αk-2 for all integers k≥4. we must show that P(k+1) is true, that is, that fk+1 > αk-1. Since α is the solution of x2-x-1=0, it follows that α2 = α +1. Therefore, αk-1= α2. αk-3= (α+1)( αk-3) = αk-2+ αk-3 . By inductive hypothesis, fk > αk-2 and fk-1 > αk-3 Therefore, we have fk+1 = f k+ f k-1> αk-2 + αk-3 = αk-1 . .

17 Recursion A recurrence relation for a sequence a0, a1, · · · is a relation that defines An in terms of a0, a1, · · · , an-1. The formula relating to an earlier values in the sequence is called the generating rule. The assignment of a value to one of the a’s is called an initial condition. .

18 Example 4 The Fibonacci sequence 1, 1, 2, 3, 5, · · ·
is a sequence in which every number after the first two is the sum of the preceding two numbers. Find the generating rule and the initial conditions. Solution. The initial conditions are a0 = a1 = 1 and the generating rule is an = a n−1 + a n−2, n ≥ 2. .

19 Example 5 Give a recursive definition of the factorial function F(n) = n! Solution: The initial value of this function, namely, F(0) =1, and giving a rule for finding F(n+1) from F(n). This is obtained by noting that (n+1)! From n! by multiplying with (n+1). Hence, the rule is F(n+1) = (n+1) F(n). .

20 Example 6 Find a solution for the recurrence relation Solution.
Listing the first five terms of the sequence one finds a0 = 1 a1 = 1 + 2 a2 = 1 + 4 a3 = 1 + 6 a4 = 1 + 8 Hence, a good guess is an = 2n + 1, n ≥ 0. Now show that this formula is valid by using mathematical induction. .

21 Example 6 Basis Step: For n = 0, a0 = 1 = 2(0) + 1.
Induction hypothesis: Suppose that an = 2n + 1. Induction Step: We must show that a n+1 = 2(n+1)+1. By the definition of an+1 we have an+1 = an + 2 = 2n = 2(n + 1) + 1. they solve it by re-arranging the terms and re-structure it to be of the same pattern like the original (2n+1) type .

22 Example 7 Consider the arithmetic sequence an = an-1 + d, n ≥ 1
where a0 is the initial value. Find an explicit formula for an. Solution. Listing the first four terms of the sequence after a0 we find a1 = a0 + d a2 = a0 + 2d a3 = a0 + 3d a4 = a0 + 4d Hence, a guess is an = a0 + nd. Next, we prove the validity of this formula by induction. See the restructuring ! .

23 Example 7 Basis Step: For n = 0, a0 = a0 + (0)d.
Induction hypothesis: Suppose that an = a0 + nd. Induction step: We must show that an+1 = a0 + (n + 1)d. By the definition of an+1 we have an+1 = an + d = a0 + nd + d = a0 + (n + 1)d. See the re-structuring? .

24 Example 8 Find a solution to the recurrence relation Solution.
Writing the first five terms of the sequence we find a0 = 0 a1 = 0 a2 = 0 + 1 a3 = a4 = A guessing formula is that - again the restructuring? an = · · · + (n − 1) = n(n − 1)/2 .


Download ppt "Mathematical Induction"

Similar presentations


Ads by Google