Check that this pattern is consistent with your substitutions, but you do not need to formally prove it is correct via induction. i) T(n) = T(n - 1) + 1 ii) T(n) = T(n - 3) + 4
Given:
Assume that, .
(i)
Assume that the recurrence relation is.
Obtain the recurrence relation such that the terms are look like after the kth substitution.
Substitute in the recurrence relation.
Substitute in the recurrence relation.
Therefore, .
By the above recurrence relation, .
In general, after the kth substitution the recurrence relation .
Let's prove the recurrence relation by induction on k.
when , .
Assume that, the recurrence relation is true for .
Since , the recurrence relation becomes,
Therefore, the recurrence relation after the kth substitution is .
(ii)
Assume that the recurrence relation is.
Obtain the recurrence relation such that the terms are look like after the kth substitution.
Substitute in the recurrence relation.
Substitute in the recurrence relation.
Therefore, .
By the above recurrence relation, .
In general, after the kth substitution the recurrence relation .
Let's prove the recurrence relation by induction on k.
when , .
Assume that, the recurrence relation is true for .
Since , the recurrence relation becomes,
Therefore, the recurrence relation after the kth substitution is .
Step by step
Solved in 3 steps