d Structure
d Structure
Nazia 110
Inbasaat talha 115
Zainab shamim 122
Topic:
Mathematical Induction
Recursion
Intr0ducti0n:-
Real Life Example:
Mathematical inducti0n:
PRINCIPLE OF 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.
Examples:
Problem 1:
Use mathematical induction to prove that
1 + 2 + 3 + ... + n = n (n + 1) / 2
for all positive integers n.
Problem 2:
Prove that
1 2 + 2 2 + 3 2 + ... + n 2 = n (n + 1) (2n
+ 1)/ 6
For all positive integers n.
S0luti0n:
Solution to Problem 1
Let the statement P (n) be
1 + 2 + 3 + ... + n = n (n + 1) / 2
STEP 1: We first show that p (1) is true.
Left Side = 1
Right Side = 1 (1 + 1) / 2 = 1
Both sides of the statement are equal hence p (1) is true.
STEP 2: We now assume that p (k) is true
1 + 2 + 3 + ... + k = k (k + 1) / 2
and show that p (k + 1) is true by adding k + 1 to both sides of the above
statement
1 + 2 + 3 + ... + k + (k + 1) = k (k + 1) / 2 + (k + 1)
= (k + 1)(k / 2 + 1)
= (k + 1)(k + 2) / 2
The last statement may be written as
1 + 2 + 3 + ... + k + (k + 1) = (k + 1)(k + 2) / 2
Which is the statement p(k + 1).
S0luti0n:
Solution to Problem 2:
Statement P (n) is defined by
1 2 + 2 2 + 3 2 + ... + n 2 = n (n + 1) (2n + 1)/ 2
STEP 1: We first show that p (1) is true.
Left Side = 1 2 = 1
Right Side = 1 (1 + 1) (2*1 + 1)/ 6 = 1
Both sides of the statement are equal hence p (1) is true.
STEP 2: We now assume that p (k) is true
1 2 + 2 2 + 3 2 + ... + k 2 = k (k + 1) (2k + 1)/ 6
and show that p (k + 1) is true by adding (k + 1) 2 to both sides of the
above statement
1 2 + 2 2 + 3 2 + ... + k 2 + (k + 1) 2 = k (k + 1) (2k + 1)/ 6 + (k + 1) 2
Set common denominator and factor k + 1 on the right side
= (k + 1) [ k (2k + 1)+ 6 (k + 1) ] /6
Cont.……
f(x)=2^x
f(0)=2^0=1 (BASIC STEP)
f(x+1)=2^(x+1)=2.2^x (RECURSIVE STEP)