Lecture 3 Recurrences Algorithm
Lecture 3 Recurrences Algorithm
definition, P1 is true.
By the minimality of k, Pk−1 is true and Pk is true.
Substitution
Method
A Summation Problem
Prove that for any integer n ≥ 1:
1 + 2 + 3 + · · · + n = n(n+1)/2 .
Define:
L(n) = 1 + 2 + 3 + · · · + n.
R(n) = n(n+1)/2 .