lec7

advertisement
‫‪MATH 226‬‬
‫رياضيات متقطعة لعلوم الحاسب‬
Chapter 5
What’s is Induction About?
 Many statements assert that a property is an universal true
– i.e., all the elements of the universe exhibit that
property;
 Examples:
1. For every positive integer n: n! ≤ nn
2. For every set with n elements, the cardinality of its power
set is 2n.
 Induction is one of the most important techniques for
proving statements about universal properties.
3

We know that:
1. We can reach the first rung of this ladder;
2. If we can reach a particular rung of the ladder,
then we can reach the next rung of the ladder.
Can we reach every step of this infinite ladder?
Yes, using Mathematical Induction which is
a rule of inference that tells us:
P(1)
k (P(k)  P(k+1))
------------------------- n (P(n)
EXAMPLE 1 Show that if n is a positive integer, then
1 + 2+· · ·+n = n(n + 1(/2
.
Solution: Let P(n), 1 + 2+· · · n = n(n+1)/2
BASIS STEP: P(1) is true, because 1 = 1(1 + 1)/2
INDUCTIVE STEP: we assume that P(k) holds for an arbitrary
positive integer k. 1 + 2+· · ·+k = k(k + 1)/2
Under this assumption, it must be shown that P(k + 1) is true,
namely, that
1 + 2+· · ·+k + (k + 1) = (k + 1)[(k + 1) + 1]/2 = (k + 1)(k + 2)/2
add k + 1 to both sides of the equation in P(k), we obtain
1 + 2+· · ·+k + (k + 1) = k(k + 1)/2+ (k + 1)
=( k(k + 1) + 2(k + 1))/2
= (k + 1)(k + 2)/2
.
 Example 2 :Use induction to prove that the 1 + 2 + 22 +
… + 2n = 2n+1 - 1 for all non-negative integers n.
 1 – Hypothesis?
P(n) = 1 + 2 + 22 + … + 2n = 2 n+1 – 1
for all non-negative integers n.
2 - Base case?
n = 0 10 = 21-1.
3 – Inductive Hypothesis
Assume P(k) = 1 + 2 + 22 + … + 2k = 2 k+1 – 1
7
not n=1! The base case
can be negative, zero,
or positive
Example 3. Use MI to prove that the sum of the first n odd
positive integers is n2
n
Pf : Let P(n) denote the proposition that
2
(
2
i
1
)

n

i 1
Basis step : P(1) is true , since 1=12
Inductive step : Suppose that P(k) is true for a positive
integer k,
i.e., 1+3+5+…+(2k-1)=k2
Note that 1+3+5+…+(2k-1)+(2k+1) = k2+2k+1= (k+1)2
∴ P(k+1) is true
By induction, P(n) is true for all nZ+
Example 4Use MI to prove the inequality
n < 2n for all nZ+
pf : Let P(n) be the proposition “ n < 2n ”.
Basis step : P(1) is true since 1 < 21 .
Inductive step :
Assume that P(k) is true for a positive integer k,
i.e., k < 2k.
Consider P(k+1) :
k + 1 < 2k + 1  2k + 2k =2k + 1
∴ P(k+1) is true.
By MI, P(n) is true for all nZ+.
Ch4-9
Download